Problem optimization processing method and device
By rewriting and semantically understanding user questions, and utilizing generative adversarial networks and the BERT model, the problem of inaccurate understanding of user intent in information retrieval systems is solved, achieving more accurate and efficient information acquisition.
Patent Information
- Application Number
- CN202510859939.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-25
- Publication Date
- 2025-10-21
AI Technical Summary
Existing information retrieval and question-answering systems fail to accurately understand user intent due to non-standard or ambiguous question wording, resulting in inaccurate and inefficient search results, which negatively impacts the user's experience and effectiveness in obtaining information.
By acquiring user-input questions, rewriting them, using pre-trained generative adversarial networks and BERT models for semantic understanding, identifying key information and structural relationships, retrieving relevant knowledge documents, and displaying the highest-scoring documents based on scoring rules.
The accuracy and efficiency of search results are improved, users can obtain the required information more quickly, and user satisfaction and trust are enhanced.
Smart Images

Figure CN120821797A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of natural language processing, and in particular to a problem optimization processing method and device. Background Art
[0002] With the rapid development of internet technology, information is exploding. Users typically seek answers by entering questions into search engines or intelligent question-answering systems. However, these questions are often ambiguous, incomplete, and lack professionalism, posing a significant challenge to accurately and quickly obtaining the required information. Existing information retrieval and question-answering systems, due to the diversity and complexity of user question expressions and the limitations of existing technologies, suffer from issues such as an inability to accurately understand user intent, inaccurate search results, and low efficiency when processing user input questions. This severely impacts the user experience and effectiveness of obtaining information. Summary of the Invention
[0003] The present invention is proposed to address the above technical issues. The embodiments of the present invention provide a method and apparatus for optimizing question processing, which can address the problems in existing information retrieval and question-answering systems, such as the inability to accurately understand user intent, inaccurate retrieval results, and low efficiency caused by non-standard and ambiguous user question expressions.
[0004] According to one aspect of the present invention, a problem optimization processing method is provided, comprising:
[0005] Get the pending questions input by the user;
[0006] Rewriting the problem to be processed to obtain a rewritten problem;
[0007] Retrieving a first knowledge document related to the rewritten question;
[0008] Based on the scoring rules, multiple first knowledge documents are scored and the first knowledge document with the highest score is displayed.
[0009] In one embodiment, rewriting the problem to be processed to obtain a rewritten problem includes:
[0010] Identifying key semantic information of the problem to be processed;
[0011] Based on the key semantic information, the problem to be processed is subjected to grammatical analysis and word segmentation processing to obtain a plurality of words;
[0012] Determining the grammatical structure relationship of the plurality of words in the question to be processed to obtain structural information of the question to be processed;
[0013] The problem to be processed is rewritten based on the key semantic information and the structural information to obtain a rewritten problem.
[0014] In one embodiment, rewriting the problem to be processed based on the key semantic information and the structural information to obtain a rewritten problem includes:
[0015] Retrieving a second knowledge document related to the key semantic information and the structural information;
[0016] extracting key information from the second knowledge document;
[0017] Based on the key information, the problem to be processed is rewritten to obtain a rewritten problem.
[0018] In one embodiment, the retrieving a second knowledge document related to the key semantic information and the structural information includes:
[0019] Determining entity information in the key semantic information and modification and limitation information in the structural information;
[0020] A second knowledge document related to the entity information and the modification qualification information is retrieved.
[0021] In one embodiment, retrieving a first knowledge document related to the rewritten question includes:
[0022] Convert the rewritten question into a sentence vector;
[0023] Calculating the similarity between the sentence vector and other reference sentence vectors;
[0024] Obtain first knowledge documents corresponding to other reference sentence vectors whose similarity is higher than a preset similarity threshold.
[0025] In one embodiment, retrieving a first knowledge document related to the rewritten question includes:
[0026] Determining rewritten entity information and rewritten modification and limitation information in the rewritten question;
[0027] Obtaining a knowledge graph related to the rewritten entity information;
[0028] Based on the rewriting modification limitation information, a first knowledge document is inferred from the knowledge graph.
[0029] In one embodiment, rewriting the pending question based on the key information to obtain a rewritten question includes:
[0030] Based on the rewritten question model, a rewritten question corresponding to the key information is obtained.
[0031] In one embodiment, the method for constructing the rewriting problem model includes:
[0032] Get multiple reference user questions;
[0033] Obtain reference key information corresponding to each reference user question;
[0034] Rewriting corresponding reference user questions based on the reference key information and the rewritten question examples to obtain multiple reference rewritten questions;
[0035] A rewritten question model is constructed based on the multiple reference user questions, the multiple reference key information, and the multiple reference rewritten questions.
[0036] In one embodiment, scoring the plurality of first knowledge documents based on the scoring rule includes:
[0037] Obtain the historical user stay time corresponding to each first knowledge document;
[0038] Obtain the historical user click count corresponding to each first knowledge document;
[0039] Obtaining historical feedback evaluations corresponding to each first knowledge document;
[0040] Obtaining semantic similarity between each first knowledge document and the problem to be processed;
[0041] Obtaining the authoritative score corresponding to each first knowledge document;
[0042] The score of each first knowledge document is calculated according to the historical user stay time, the historical user click times, the historical feedback evaluation, the semantic similarity and the authoritative score.
[0043] According to another aspect of the present invention, there is provided a problem optimization processing device, comprising:
[0044] The acquisition module is used to obtain the pending questions input by the user;
[0045] A rewriting module, configured to rewrite the problem to be processed to obtain a rewritten problem;
[0046] A retrieval module, configured to retrieve a first knowledge document related to the rewritten question;
[0047] The scoring module is used to score multiple first knowledge documents based on scoring rules and display the first knowledge document with the highest score.
[0048] The question optimization processing method and apparatus provided by the present invention include: obtaining a pending question input by a user, rewriting the pending question to obtain a rewritten question, retrieving first knowledge documents related to the rewritten question, scoring multiple first knowledge documents based on scoring rules, and displaying the first knowledge documents with the highest scores. By rewriting the pending question, detecting relevant documents based on the rewritten question, and prioritizing the display of documents with higher scores, more accurate answers can be obtained, rather than traditional systems that return a pile of potentially relevant but inaccurate information, greatly improving user satisfaction and trust in the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] The above and other objects, features, and advantages of the present invention will become more apparent through a more detailed description of the embodiments of the present invention in conjunction with the accompanying drawings. The accompanying drawings are provided to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and are not intended to limit the present invention. In the drawings, the same reference numerals generally represent the same components or steps.
[0050] Figure 1 It is a flowchart of a problem optimization processing method provided by an exemplary embodiment of the present invention.
[0051] Figure 2 It is a structural diagram of a problem optimization processing system provided by an exemplary embodiment of the present invention.
[0052] Figure 3 It is a flowchart of a problem optimization processing method provided by another exemplary embodiment of the present invention.
[0053] Figure 4 It is a structural diagram of a problem optimization processing device provided by an exemplary embodiment of the present invention.
[0054] Figure 5 is a structural diagram of an electronic device provided by an exemplary embodiment of the present invention. DETAILED DESCRIPTION
[0055] Below, the exemplary embodiments according to the present invention will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments of the present invention, and it should be understood that the present invention is not limited to the exemplary embodiments described herein.
[0056] Figure 1 It is a flowchart of a problem optimization processing method provided by an exemplary embodiment of the present invention.
[0057] like Figure 1 As shown in Figure 2, the problem optimization processing method includes:
[0058] Step 110: Obtain the pending questions input by the user.
[0059] Step 120: Rewrite the problem to be processed to obtain a rewritten problem.
[0060] In an embodiment of the present invention, in order to improve the accuracy of the results fed back to the user, the question to be processed is rewritten, thereby reducing the feedback of irrelevant search results. For example, in traditional information retrieval, for a broad question like "find a good mobile phone", a large amount of mobile phone information of various types may be returned, many of which do not meet the user's specific expectations of "good"; and through the question rewriting technology of the present invention, after rewriting the question to "What are the mobile phones with camera pixels higher than 12 million and prices between 2,000 and 3,000 yuan?", the search results will be more focused on the mobile phone products that the user really needs, greatly improving the accuracy and relevance of the search results. At the same time, due to the reduction of unnecessary search scope, the search efficiency has also been significantly improved, and users can obtain the required information more quickly.
[0061] Specifically, the present invention uses a pre-trained generative adversarial network (GAN) to rewrite questions. The GAN consists of a generator and a discriminator. The generator is responsible for generating rewritten questions based on the input information, and the discriminator is used to judge whether the generated questions are reasonable and meet the requirements. The training data contains a large number of labeled user questions, corresponding retrieval results, and high-quality rewritten questions labeled by experts. When generating rewritten questions, the generator refers to the training data, combines the user's original question and the extracted key information, and generates questions such as "What are the laptops with a battery capacity greater than 70Wh and a full charge time of more than 10 hours?" This not only retains the user's original intention but is also clearer and more accurate.
[0062] Step 130: Retrieve a first knowledge document related to the rewritten question.
[0063] In an embodiment of the present invention, since the pending question input by the user is rewritten, the accuracy of the rewritten question when retrieving documents is guaranteed. Therefore, the first knowledge document related to the rewritten question is retrieved with higher accuracy than the document retrieved from the pending question.
[0064] Step 140: Based on the scoring rules, score the multiple first knowledge documents and display the first knowledge document with the highest score.
[0065] In an embodiment of the present invention, since multiple first knowledge documents can be retrieved based on the rewritten question, in order to present the most relevant and most valuable documents to the user, the retrieved first knowledge documents are scored according to scoring rules, and the first knowledge document with the highest score is displayed.
[0066] In one embodiment, step 120 can be specifically implemented as follows: identifying key semantic information of the problem to be processed; based on the key semantic information, performing grammatical analysis and word segmentation on the problem to be processed to obtain multiple words; determining the grammatical structural relationship of the multiple words in the problem to be processed to obtain structural information of the problem to be processed; based on the key semantic information and structural information, rewriting the problem to be processed to obtain a rewritten problem.
[0067] In this embodiment of the present invention, a pre-trained BERT model is used as the basic semantic understanding model. For example, a user input question, "I want a laptop with long battery life," is used as input for the BERT model. Through its multi-layer, bidirectional Transformer architecture, the model encodes each word in the question, learning the contextual dependencies between words and thereby identifying key semantic information such as "long battery life" and "laptop."
[0068] The NLTK library is used to perform lexical analysis and word segmentation on the question, obtaining words such as "I", "want", "endurance", "strong", "of", and "laptop", and the part of speech of each word is marked, such as "I" is a pronoun, "want" is a verb, and "laptop" is a noun. With the help of the spaCy library, a syntactic tree of the question is constructed to clarify the grammatical structure relationship between words. For example, "endurance is strong" is a modification and restriction relationship of "laptop". Through these operations, the structure and semantic information of the user's question are fully analyzed. NLTK (Natural Language Toolkit) is a Python library for processing and analyzing human language data. spaCy is an open source Python library for natural language processing (NLP) that aims to provide fast, accurate and efficient text processing tools.
[0069] In one embodiment, step 120 may be specifically implemented as follows: retrieving a second knowledge document related to key semantic information and structural information; extracting key information from the second knowledge document; and rewriting the problem to be processed based on the key information to obtain a rewritten problem.
[0070] In an embodiment of the present invention, during the process of knowledge retrieval and information extraction, first, a related second knowledge document is retrieved from the database based on specific key semantic information and structural information. Then, relevant key information is extracted from the document. These key information can be important concepts, facts, data, or connections, etc. Finally, the extracted information is used to rewrite the problem to be processed to make it clearer or more specific, thereby obtaining a rewritten problem. For example, the original question: What is machine learning? The retrieved second knowledge document: A paper on machine learning, which includes the definition of machine learning, main types (supervised learning, unsupervised learning, reinforcement learning), application fields (such as image recognition, natural language processing), etc. Extracted key information: Machine learning is a technology that enables computers to learn from data and make decisions. The main types include supervised learning, unsupervised learning, and reinforcement learning. Application fields include image recognition and natural language processing, etc. Rewritten question: What is the definition of machine learning, what are the main types and their application fields?
[0071] For example, for the question "I want a laptop with long battery life," we extract "laptop" as entity information and "long battery life" as structural information. For keyword-based search, we can quickly locate relevant documents by searching for documents containing keywords like "laptop" and "long battery life" in a text database containing laptop product information.
[0072] In one embodiment, step 120 may be specifically implemented as follows: determining entity information in the key semantic information and modification and limitation information in the structural information; and retrieving a second knowledge document related to the entity information and the modification and limitation information.
[0073] In natural language processing, determining entity information (such as names of people, places, and organizations) within key semantic information and modifiers (such as adjectives and adverbs) within structural information is crucial for accurately understanding and processing text. Entity information helps identify core concepts and themes within a text, facilitating the better location of relevant knowledge documents. Modifiers provide detailed descriptions and context for entities, making search results more precise and relevant.
[0074] For example, in the query "What is XX Company's latest product?", the entity information is "XX Company," and the qualifying information is "latest product." In this case, searching for second knowledge documents related to "XX Company" and "latest product" will yield information about XX Company's recently released products.
[0075] Therefore, through deep semantic understanding and structural parsing technology, the intention of the user input question can be grasped more accurately. Compared with the traditional semantic analysis method, the pre-trained language model based on the Transformer architecture can learn more complex semantic relationships and contextual information, which greatly improves the accuracy of understanding the user's question intention. For example, for some vague and implicit semantic questions, such as "I want to go out for a trip recently. Are there any places that are not too popular but have beautiful scenery that you can recommend?", the question understanding module of the present invention can accurately identify the user's travel needs, preferences for destinations (not too popular and beautiful scenery) and other intentions, while traditional methods may fail to accurately grasp the user's intentions due to the deviation in understanding the vague expression "not too popular".
[0076] In one embodiment, step 130 can be specifically implemented as follows: converting the rewritten question into a sentence vector; calculating the similarity between the sentence vector and other reference sentence vectors; and obtaining a first knowledge document corresponding to other reference sentence vectors whose similarity is higher than a preset similarity threshold.
[0077] In an embodiment of the present invention, based on semantic similarity retrieval, the question is converted into a vector form (which can be represented by the question vector output by the BERT model), and through cosine similarity calculation, documents with high similarity to the question semantic vector are searched in the document library to supplement semantically similar documents that may be missed by relying solely on keyword retrieval.
[0078] Similarly, the method for obtaining the second knowledge document can also include: converting the problem to be processed into a sentence vector to be processed; calculating the similarity between the sentence vector to be processed and other processed reference sentence vectors; and obtaining the second knowledge document corresponding to other reference processed sentence vectors whose similarity is higher than a preset similarity threshold.
[0079] In one embodiment, step 130 can be specifically implemented as follows: determining the rewritten entity information and the rewritten modification and limitation information in the rewritten question; obtaining a knowledge graph related to the rewritten entity information; and inferring a first knowledge document from the knowledge graph based on the rewritten modification and limitation information.
[0080] In an embodiment of the present invention, when processing a rewritten question, it is first necessary to identify the rewritten entity information (such as "XX Company") and the rewritten modification and qualification information (such as "latest products"). By extracting this information, a knowledge graph related to "XX Company" can be obtained. This knowledge graph includes various data about the company's basic information, product lines, historical events, etc. Next, based on the modification and qualification information of "latest products", the first knowledge document about the most recently released products of XX Company can be inferred from the knowledge graph. This reasoning process can help us form a comprehensive view, provide the latest and most relevant information, and thus answer users' questions more effectively.
[0081] Specifically, based on the reasoning retrieval of the knowledge graph, a knowledge graph containing laptop-related knowledge is constructed. Nodes are entities such as laptop brands, models, and configuration parameters (such as battery capacity and processor performance), and edges are relationships between entities, such as "a certain laptop model equipped with a certain brand of processor" and "battery capacity affects battery life." Based on the information in the question, reasoning is performed within the knowledge graph. For example, starting from the question "long battery life," the relationships within the knowledge graph are used to infer parameters related to battery life, such as battery capacity. This expands the search scope and obtains more comprehensive relevant knowledge.
[0082] Similarly, the method for obtaining the second knowledge document also includes: determining the entity information and modification and limitation information in the problem to be processed; obtaining a reference knowledge graph related to the entity information; and inferring the first knowledge document from the reference knowledge graph based on the modification and limitation information.
[0083] In one embodiment, step 120 may be specifically implemented as follows: based on the rewritten question model, obtaining the rewritten question corresponding to the key information.
[0084] Among them, the method for constructing a rewriting question model includes: obtaining multiple reference user questions; obtaining reference key information corresponding to each reference user question; rewriting the corresponding reference user questions based on the reference key information and rewriting question examples to obtain multiple reference rewritten questions; constructing a rewriting question model based on multiple reference user questions, multiple reference key information and multiple reference rewritten questions.
[0085] In this embodiment of the present invention, when constructing a rewritten question model, we first obtain multiple reference user questions and their corresponding reference key information. By analyzing this key information, we can rewrite each reference user question based on the rewritten question example, thereby generating multiple reference rewritten questions. These rewritten questions not only retain the original user's intent but also provide more precise questions through explicit modification and qualifier information.
[0086] To achieve this goal, a pre-trained generative adversarial network (GAN) can be used. The model consists of a generator and a discriminator. The generator is responsible for generating new rewritten questions based on the input user questions and the extracted key information, while the discriminator is used to evaluate whether the generated questions are reasonable and meet expectations. The training data contains a large number of labeled user questions, corresponding retrieval results, and high-quality rewritten questions annotated by experts, which provides rich learning materials for the model. In this way, the generator can learn how to generate questions such as "What are the laptops with a battery capacity greater than 70Wh and a full charge time of more than 10 hours?", that is, while retaining the user's original intention, it provides a clearer and more accurate expression. This model not only improves the quality of question rewriting, but also enhances the interaction between users and the system.
[0087] In one embodiment, step 140 can be specifically implemented as follows: obtaining the historical user residence time corresponding to each first knowledge document; obtaining the historical user click counts corresponding to each first knowledge document; obtaining the historical feedback evaluation corresponding to each first knowledge document; obtaining the semantic similarity between each first knowledge document and the problem to be processed; obtaining the authoritative score corresponding to each first knowledge document; and calculating the score of each first knowledge document based on the historical user residence time, the historical user click counts, the historical feedback evaluation, the semantic similarity, and the authoritative score.
[0088] In an embodiment of the present invention, the search results are processed according to a preset relevance scoring standard. The relevance scoring standard comprehensively considers factors such as the semantic similarity between the document and the question (which can be obtained by calculating the cosine similarity between the document vector and the question vector), the authority of the document (for example, documents from well-known technology review websites are more authoritative), and the user's historical feedback on the document (if the user has frequently clicked on a certain type of document in the past, this type of document will be given a higher weight when scoring). The search results are sorted and the most relevant and valuable results are presented to the user, such as showing the user a list of eligible laptop products and detailed introductions.
[0089] At the same time, the system records user feedback, such as whether the user clicks on a search result, how long they stay on the result page, and whether they comment on the result. Based on this feedback, the parameters of the generative adversarial network in the rewriting question model are adjusted to optimize the strategy for generating rewriting questions. The system also optimizes the retrieval algorithm and parameters, such as adjusting the weights for semantic similarity calculations and the rules for knowledge graph reasoning, to continuously improve the system's ability to handle user questions and the quality of retrieval results.
[0090] Therefore, the technical solution of the present invention can adapt to different fields and different types of user questions. Whether it is information query in daily life or knowledge retrieval in professional fields, the effect of information acquisition can be improved by intelligently rewriting user questions. For example, in the medical field, for the user question "I have a headache recently, what may be the reason", the system can analyze the user's symptom information through the question understanding module, search in the medical knowledge database, and rewrite the question according to the search results to "I have headache symptoms recently, which common diseases may cause it", so as to obtain more accurate medical knowledge answers. Moreover, with the continuous updating and expansion of text databases and knowledge graphs, the system of the present invention can automatically adapt to new knowledge and information and has good scalability. Ultimately, it provides users with more accurate and more demand-oriented retrieval results, which greatly improves the user experience in the process of information acquisition. Users do not need to spend a lot of time and energy to screen and judge the validity of retrieval results, and can quickly get satisfactory answers. For example, in an intelligent question-answering system, after a user inputs a question, it can be processed by the technology of the present invention and can directly obtain an accurate answer, instead of returning a bunch of possibly relevant but inaccurate information like traditional systems. This greatly improves the user's satisfaction and trust in the system, and is conducive to promoting the widespread application of information retrieval and intelligent question-answering technology in more fields.
[0091] Figure 2 It is a structural diagram of a problem optimization processing system provided by an exemplary embodiment of the present invention. Figure 3 FIG. 1 is a flow chart of a problem optimization processing method provided by another exemplary embodiment of the present invention. Figure 2-3 shown.
[0092] 1. System construction
[0093] Build a question rewriting system based on retrieval-enhanced generation. This system consists of a question understanding module, a retrieval module, a question rewriting module, and a result feedback module. Each module can be deployed on the server side and interact with user terminals via the network. The system operating environment must be equipped with hardware resources that meet the computing requirements of deep learning, such as a high-performance GPU. It must also install relevant deep learning frameworks such as TensorFlow or PyTorch, as well as open-source libraries related to natural language processing, such as NLTK and spaCy, to support the functional implementation of each module.
[0094] 2. Question Understanding Module
[0095] In the question understanding module, a pre-trained BERT model is used as the foundational semantic understanding model. For example, a user input question, "I want a laptop with long battery life," is used as input for the BERT model. Using its multi-layer, bidirectional Transformer architecture, the model encodes each word in the question, learning the contextual dependencies between words and identifying key semantic information such as "long battery life" and "laptop."
[0096] Using the NLTK library for lexical analysis and word segmentation, we identify words such as "I," "want," "battery life," "strong," "of," and "laptop." We also annotate each word's part of speech, identifying "I" as a pronoun, "want" as a verb, and "laptop" as a noun. Using the spaCy library for syntactic analysis, we construct a syntactic tree for the question and clarify the grammatical relationships between words. For example, "battery life" modifies and qualifies "laptop." These operations provide a comprehensive analysis of the structure and semantics of the user's question.
[0097] 3. Search module
[0098] The retrieval module performs searches based on the key information extracted by the question understanding module. For the question "I want a laptop with long battery life," the extracted entity "laptop" is used as the entity information, and "long battery life" is used as the key semantic information.
[0099] In keyword-based retrieval, a text database containing laptop computer product information is searched for document records containing keywords such as "laptop computer" and "long battery life" to quickly locate relevant documents. Semantic similarity-based retrieval converts the question into a vector form (which can be represented using the question vector output by the BERT model). Using cosine similarity calculations, the document library is searched for documents with a high degree of similarity to the question's semantic vector, supplementing semantically similar documents that might be missed by relying solely on keyword retrieval.
[0100] Based on the reasoning retrieval of the knowledge graph, a knowledge graph containing laptop-related knowledge is constructed. Nodes represent entities such as laptop brand, model, and configuration parameters (such as battery capacity and processor performance), and edges represent relationships between entities, such as "a certain laptop model equipped with a certain brand of processor" and "battery capacity affects battery life." Based on the information in the question, reasoning is performed within the knowledge graph. For example, starting from the question "long battery life," the relationships within the knowledge graph can be used to infer parameters related to battery life, such as battery capacity. This expands the search scope and obtains more comprehensive relevant knowledge.
[0101] 4. Question Rewriting Module
[0102] The question rewriting module receives search results from the search module, such as documents containing information about different laptop battery life parameters and user reviews. It analyzes these documents and extracts specific indicators related to "long battery life," such as "battery capacity greater than 70Wh" and "full charge battery life exceeding 10 hours."
[0103] Question rewriting is performed using a pre-trained generative adversarial network (GAN). The GAN consists of a generator and a discriminator. The generator is responsible for generating rewritten questions based on the input information, while the discriminator is responsible for determining whether the generated questions are reasonable and meet the requirements. The training data contains a large number of labeled user questions, corresponding search results, and high-quality rewritten questions annotated by experts. When generating rewritten questions, the generator refers to the training data, combines the user's original question with the extracted key information, and generates questions such as "Wh are there laptops with a battery capacity greater than 70Wh and a full charge life of more than 10 hours?" This retains the user's original intent while being clearer and more accurate.
[0104] 5. Result feedback module
[0105] The rewritten question is input into the search module again for retrieval to obtain new search results. The result feedback module processes the search results according to the preset relevance scoring criteria. The relevance scoring criteria comprehensively consider factors such as the semantic similarity between the document and the question (which can be obtained by calculating the cosine similarity between the document vector and the question vector), the authority of the document (for example, documents from well-known technology review websites are more authoritative), and the user's historical feedback on the document (if the user has frequently clicked on a certain type of document in the past, this type of document will be given a higher weight when scoring). The search results are sorted and the most relevant and valuable results are presented to the user, such as showing the user a list of eligible laptop products and a detailed introduction.
[0106] At the same time, the system records user feedback, such as whether the user clicks on a search result, how long they stay on the result page, and whether they comment on the result. Based on this feedback, the parameters of the generative adversarial network in the question rewriting module are adjusted to optimize the strategy for generating rewritten questions. The retrieval algorithm and parameters of the retrieval module are also optimized, such as adjusting the weights for semantic similarity calculations and the rules for knowledge graph reasoning, to continuously improve the system's ability to handle user questions and the quality of retrieval results.
[0107] Figure 4 FIG. 1 is a schematic diagram of a problem optimization processing device provided by an exemplary embodiment of the present invention. Figure 4As shown, the problem optimization processing device includes: an acquisition module 201, which is used to obtain the problem to be processed input by the user; a rewriting module 202, which is used to rewrite the problem to be processed to obtain the rewritten problem; a retrieval module 203, which is used to retrieve the first knowledge document related to the rewritten problem; and a scoring module 204, which is used to score multiple first knowledge documents based on scoring rules and display the first knowledge document with the highest score.
[0108] In one embodiment, the rewriting module 202 can be specifically configured to: identify key semantic information of the problem to be processed; based on the key semantic information, perform grammatical analysis and word segmentation on the problem to be processed to obtain multiple words; determine the grammatical structural relationship of multiple words in the problem to be processed to obtain structural information of the problem to be processed; based on the key semantic information and structural information, rewrite the problem to be processed to obtain a rewritten problem.
[0109] In one embodiment, the rewriting module 202 may be specifically configured to: retrieve a second knowledge document related to key semantic information and structural information; extract key information from the second knowledge document; and rewrite the problem to be processed based on the key information to obtain a rewritten problem.
[0110] In one embodiment, the rewriting module 202 may be specifically configured to: determine entity information in the key semantic information and modification and limitation information in the structural information; and retrieve a second knowledge document related to the entity information and the modification and limitation information.
[0111] In one embodiment, the retrieval module 203 can be specifically configured to: convert the rewritten question into a sentence vector; calculate the similarity between the sentence vector and other reference sentence vectors; and obtain the first knowledge document corresponding to other reference sentence vectors whose similarity is higher than a preset similarity threshold.
[0112] In one embodiment, the retrieval module 203 can be specifically configured to: determine the rewritten entity information and the rewritten modification and limitation information in the rewritten question; obtain the knowledge graph related to the rewritten entity information; and infer the first knowledge document from the knowledge graph based on the rewritten modification and limitation information.
[0113] In one embodiment, the rewriting module 202 may be specifically configured to obtain a rewritten question corresponding to the key information based on the rewritten question model.
[0114] In one embodiment, a device for constructing a rewritten question model includes: obtaining multiple reference user questions; obtaining reference key information corresponding to each reference user question; rewriting the corresponding reference user questions based on the reference key information and the rewritten question examples to obtain multiple reference rewritten questions; and constructing a rewritten question model based on the multiple reference user questions, the multiple reference key information and the multiple reference rewritten questions.
[0115] In one embodiment, the scoring module 204 can be specifically configured to: obtain the historical user residence time corresponding to each first knowledge document; obtain the historical user click counts corresponding to each first knowledge document; obtain the historical feedback evaluation corresponding to each first knowledge document; obtain the semantic similarity between each first knowledge document and the problem to be processed; obtain the authoritative score corresponding to each first knowledge document; calculate the score of each first knowledge document based on the historical user residence time, historical user click counts, historical feedback evaluation, semantic similarity and authoritative score.
[0116] Figure 5 1 shows a block diagram of an electronic device according to an embodiment of the present application.
[0117] like Figure 5 As shown, the electronic device 10 includes one or more processors 11 and a memory 12.
[0118] The processor 11 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 10 to perform desired functions.
[0119] The memory 12 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. The non-volatile memory may include, for example, read-only memory (ROM), a hard disk, a flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 11 may execute the program instructions to implement the problem optimization processing method of each embodiment of the present application described above and / or other desired functions. Various contents such as input signals, signal components, noise components, etc. may also be stored in the computer-readable storage medium.
[0120] In one example, the electronic device 10 may further include an input device 13 and an output device 14 , and these components are interconnected via a bus system and / or other forms of connection mechanisms (not shown).
[0121] When the electronic device 10 is a stand-alone device, the input device 13 may be a communication network connector, configured to receive collected input signals from the first device and the second device.
[0122] In addition, the input device 13 may also include, for example, a keyboard, a mouse, and the like.
[0123] The output device 14 can output various information to the outside, including determined distance information, direction information, etc. The output device 14 can include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, and the like.
[0124] Of course, to simplify, Figure 5 Only some of the components related to the present application in the electronic device 10 are shown, and components such as buses, input / output interfaces, etc. are omitted. In addition, the electronic device 10 may further include any other appropriate components according to specific application scenarios.
[0125] The computer program product may be written in any combination of one or more programming languages to implement the program code for performing the operations of the embodiments of the present application, including object-oriented programming languages such as Java, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0126] The computer-readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can, for example, include but is not limited to a system, device or component of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0127] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A problem optimization processing method, characterized in that: include: Get the pending questions input by the user; Rewriting the problem to be processed to obtain a rewritten problem; Retrieving a first knowledge document related to the rewritten question; Based on the scoring rules, multiple first knowledge documents are scored and the first knowledge document with the highest score is displayed.
2. The problem optimization processing method according to claim 1, characterized in that: The step of rewriting the problem to be processed to obtain a rewritten problem includes: Identifying key semantic information of the problem to be processed; Based on the key semantic information, the problem to be processed is subjected to grammatical analysis and word segmentation processing to obtain a plurality of words; Determining the grammatical structure relationship of the plurality of words in the question to be processed to obtain structural information of the question to be processed; The problem to be processed is rewritten based on the key semantic information and the structural information to obtain a rewritten problem.
3. The problem optimization processing method according to claim 2, characterized in that: The step of rewriting the problem to be processed based on the key semantic information and the structural information to obtain a rewritten problem includes: Retrieving a second knowledge document related to the key semantic information and the structural information; extracting key information from the second knowledge document; Based on the key information, the problem to be processed is rewritten to obtain a rewritten problem.
4. The problem optimization processing method according to claim 3, characterized in that: The retrieving a second knowledge document related to the key semantic information and the structural information includes: Determining entity information in the key semantic information and modification and limitation information in the structural information; A second knowledge document related to the entity information and the modification qualification information is retrieved.
5. The problem optimization processing method according to claim 1, characterized in that: The retrieving a first knowledge document related to the rewritten question includes: Convert the rewritten question into a sentence vector; Calculating the similarity between the sentence vector and other reference sentence vectors; Obtain first knowledge documents corresponding to other reference sentence vectors whose similarity is higher than a preset similarity threshold.
6. The problem optimization processing method according to claim 1, characterized in that: The retrieving a first knowledge document related to the rewritten question includes: Determining rewritten entity information and rewritten modification and limitation information in the rewritten question; Obtaining a knowledge graph related to the rewritten entity information; Based on the rewriting modification limitation information, a first knowledge document is inferred from the knowledge graph.
7. The problem optimization processing method according to claim 3, characterized in that: The step of rewriting the problem to be processed based on the key information to obtain a rewritten problem includes: Based on the rewritten question model, a rewritten question corresponding to the key information is obtained.
8. The problem optimization processing method according to claim 7, characterized in that: The method for constructing the rewriting problem model includes: Get multiple reference user questions; Obtain reference key information corresponding to each reference user question; Rewriting corresponding reference user questions based on the reference key information and the rewritten question examples to obtain multiple reference rewritten questions; A rewritten question model is constructed based on the multiple reference user questions, the multiple reference key information, and the multiple reference rewritten questions.
9. The problem optimization processing method according to claim 1, characterized in that: Scoring the plurality of first knowledge documents based on the scoring rule includes: Obtain the historical user stay time corresponding to each first knowledge document; Obtain the historical user click count corresponding to each first knowledge document; Obtaining historical feedback evaluations corresponding to each first knowledge document; Obtaining semantic similarity between each first knowledge document and the problem to be processed; Obtaining the authoritative score corresponding to each first knowledge document; The score of each first knowledge document is calculated according to the historical user stay time, the historical user click times, the historical feedback evaluation, the semantic similarity and the authoritative score.
10. A problem optimization processing device, characterized in that: include: The acquisition module is used to obtain the pending questions input by the user; A rewriting module, configured to rewrite the problem to be processed to obtain a rewritten problem; A retrieval module, configured to retrieve a first knowledge document related to the rewritten question; The scoring module is used to score multiple first knowledge documents based on scoring rules and display the first knowledge document with the highest score.