Question and answer processing method, electronic equipment, storage medium and program product
By building a target knowledge base in a question-and-answer community and using a large language model to generate response results, the problem of high time consumption by technical support personnel is solved, efficient automatic responses are achieved, and the efficiency of resolving user problems is improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2026-04-03
AI Technical Summary
In Q&A communities, as the number of users increases, technical support staff need to spend a lot of time searching for and answering questions, resulting in low response efficiency and users' problems not being resolved in a timely manner.
By obtaining the target question message, the target knowledge base that matches the knowledge management attributes of the question and answer community is determined. The large language model is used to generate the response results, including the knowledge base constructed from knowledge documents and historical question and answer data, which is then retrieved and rewritten to generate the response results.
It improved the efficiency of answering user questions in Q&A communities, reduced labor costs, and achieved an automated answering solution.
Smart Images

Figure CN121786141A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to a question-and-answer processing method, electronic device, storage medium, and program product. Background Technology
[0002] With the continuous development of computer technology, technical service products are constantly being innovated. During the use of these products, users raise a wide variety of questions. For example, for database products, user questions may include, but are not limited to, database configuration, performance optimization, troubleshooting, and implementation of new features. Q&A communities built around technical service products can provide users and developers with a space for in-depth discussions on core technologies and related fields. In these communities, users can ask questions, which can be answered by other users or technical support personnel. Simultaneously, the answers to these questions can be provided as search results to other users with the same or similar questions, achieving the effect of knowledge sharing. However, as the number of community users increases, so does the amount of content asked. Technical support personnel need to spend a significant amount of time searching for relevant information and answering questions in the community, which is inefficient and may result in some user problems not being resolved in a timely manner. Therefore, a new solution is needed. Summary of the Invention
[0003] This application provides a question-and-answer processing method, electronic device, storage medium, and program product to improve the efficiency of answering user questions in question-and-answer communities.
[0004] This application provides a question-and-answer processing method, comprising: obtaining a target question message associated with a target service object, wherein the target question message is determined based on a user's questioning operation in a question-and-answer community corresponding to the target service object; determining a target knowledge base that matches the knowledge management attributes corresponding to the question-and-answer community, wherein the target knowledge base is constructed based on knowledge documents corresponding to the target service object and / or historical question-and-answer data in the question-and-answer community, and the knowledge management attributes are attributes used to manage knowledge data related to the target service object; retrieving the target knowledge base based on the target question message to obtain target knowledge data matching the target question message; and generating a response result corresponding to the target question message by calling a large language model based on the target question message and the target knowledge data.
[0005] Optionally, determining the target knowledge base that matches the knowledge management attributes corresponding to the question-and-answer community includes: obtaining the knowledge management attributes and knowledge base configuration data corresponding to the question-and-answer community, wherein the knowledge base configuration data includes: the correspondence between different knowledge management attributes and at least one knowledge base; querying the knowledge base configuration data according to the knowledge management attributes corresponding to the question-and-answer community to determine the target knowledge base corresponding to the target question message from at least one knowledge base.
[0006] Optionally, the Q&A community includes: a communication group or a Q&A page; obtaining the knowledge management attributes corresponding to the Q&A community includes: obtaining the identifier of the communication group or the identifier of the category section corresponding to the Q&A page; obtaining the knowledge management attributes corresponding to the Q&A community based on the identifier of the communication group or the identifier of the category section.
[0007] Optionally, retrieving target knowledge data matching the target question message from the target knowledge base includes: obtaining question-and-answer context information and / or domain information of the target question message in the question-and-answer community; rewriting the target question message based on the question-and-answer context information and / or domain information; calculating the similarity between the rewritten target question message and the knowledge data in the target knowledge base to obtain multiple knowledge data with a similarity greater than a set threshold to the rewritten target question message; sorting the multiple knowledge data according to at least one sorting dimension, and selecting a specified number of knowledge data as target knowledge data matching the target question message based on the sorting result.
[0008] Optionally, the at least one sorting dimension includes at least the publication time of the knowledge data.
[0009] Optionally, the method further includes: obtaining feedback data from the user regarding the response result; if the feedback data is positive feedback data, updating the target knowledge base based on the target question message and the response result; if the feedback data is negative feedback data, obtaining a corrected response result for the response result, and updating the target knowledge base based on the target question message and the corrected response result.
[0010] This application also provides a question-and-answer processing method, including: responding to a user's question in a question-and-answer community, obtaining a target question message, wherein the question-and-answer community corresponds to a target service object; sending the target question message to a server, so that the server uses the question-and-answer processing method provided in this application to obtain a response result corresponding to the target question message; receiving the response result returned by the server, and outputting the response result.
[0011] This application embodiment also provides a question-and-answer processing system, including: a terminal device and a server; wherein, the terminal device is used to: respond to a user's question operation in a question-and-answer community, obtain a target question message, and send the target question message to the server, the question-and-answer community corresponding to a target service object; receive a reply result returned by the server, and output the reply result; the server is used to: obtain the target question message; determine a target knowledge base that matches the knowledge management attributes corresponding to the question-and-answer community, the target knowledge base being constructed based on the knowledge documents corresponding to the target service object and / or historical question-and-answer data in the question-and-answer community; search the target knowledge base according to the target question message to obtain target knowledge data matching the target question message; and call a large language model according to the target question message and the target knowledge data to generate a reply result corresponding to the target question message.
[0012] This application also provides an electronic device, including: a memory and a processor; the memory is used to store one or more computer instructions; the processor is used to execute the one or more computer instructions to perform the steps in the method provided in this application.
[0013] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, can implement the steps in the method provided in this application.
[0014] This application also provides a computer program product, including: a computer program / instructions, which, when executed by a processor, can implement the steps in the method provided in this application.
[0015] In the question-and-answer processing method provided in this application embodiment, after obtaining the question message from the question-and-answer community, the method retrieves the knowledge base based on the question message, and automatically generates a response by calling a large language model based on the question message and the retrieval results. The knowledge base is constructed based on the knowledge documents of the target service object and / or historical question-and-answer data from the question-and-answer community. Therefore, the target knowledge data retrieved from the target knowledge base includes relevant knowledge in the vertical domain, which facilitates the large language model to accurately perform the answer generation task in the vertical domain. This achieves automatic responses to user questions in the question-and-answer community, improves response efficiency, and reduces labor costs. Attached Figure Description
[0016] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0017] Figure 1 A flowchart illustrating the execution of a question-and-answer processing method provided in an exemplary embodiment of this application on the server side;
[0018] Figure 2a A schematic diagram illustrating the collection of user historical question and answer data and the formation of community historical question and answer data, provided as an exemplary embodiment of this application;
[0019] Figure 2b This is a schematic diagram illustrating an exemplary embodiment of the present application, showing how knowledge retrieval is performed based on a document knowledge base and a high-quality question-answering knowledge base to assist a large language model in generating response results corresponding to a target question message;
[0020] Figure 2c This is a schematic diagram of an iterative question-answering chain provided in an exemplary embodiment of this application;
[0021] Figure 3 This is a schematic diagram of a knowledge base management interface provided in an exemplary embodiment of this application;
[0022] Figure 4 A flowchart illustrating the execution of a question-and-answer processing method on the terminal side, as provided in an exemplary embodiment of this application.
[0023] Figure 5 A schematic diagram of a question-and-answer page provided for an exemplary embodiment of this application;
[0024] Figure 6 A schematic diagram of the architecture of a question-answering system provided in an exemplary embodiment of this application;
[0025] Figure 7 A schematic diagram of the server structure provided in an exemplary embodiment of this application;
[0026] Figure 8 This is a schematic diagram of the structure of a terminal device provided for an exemplary embodiment of this application. Detailed Implementation
[0027] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0028] The terminology used in the embodiments of this application is for the purpose of describing particular embodiments only and is not intended to limit the application. The singular forms “a,” “said,” and “the” used in the embodiments of this application and the appended claims are also intended to include the plural forms, unless the context clearly indicates otherwise. “Multiple” generally includes at least two, but does not exclude the inclusion of at least one.
[0029] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0030] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a product or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a product or system. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the product or system that includes said element.
[0031] Currently, in Q&A communities built around technical service products, when users ask questions related to these products, the answers are typically provided manually by other users or technical support personnel. As the number of users of these technical service products increases, so does the volume of user questions. Technical support personnel need to spend a significant amount of time searching for relevant information in the community and answering questions, which is inefficient and may result in some user problems not being resolved promptly. To address these technical problems, this application provides a solution in some embodiments. The technical solutions provided by each embodiment are described in detail below with reference to the accompanying drawings.
[0032] Figure 1 This is a flowchart illustrating a question-and-answer processing method provided in an exemplary embodiment of this application. The method may include, for example: Figure 1 The steps shown are as follows:
[0033] Step 101: Obtain the target question message associated with the target service object. The target question message is determined based on the user's questioning operation in the question and answer community corresponding to the target service object.
[0034] Step 102: Determine the target knowledge base that matches the knowledge management attributes corresponding to the question and answer community. The target knowledge base is constructed based on the knowledge documents corresponding to the target service object and / or the historical question and answer data in the question and answer community. The knowledge management attributes are attributes used to manage the knowledge data related to the target service object.
[0035] Step 103: Search the target knowledge base according to the target question message to obtain target knowledge data that matches the target question message.
[0036] Step 104: Based on the target question message and the target knowledge data, call the large language model to generate the response result corresponding to the target question message.
[0037] This embodiment can be executed by a server, which can be a conventional server, a virtual machine, a virtualized data center, an elastic computing instance, etc. The server can run a question-and-answer processing device for executing this embodiment. This device can consist of a single application or multiple application components; this embodiment does not impose any limitations on this.
[0038] The target service object can be any product that can provide technical services, such as database products, cloud computing products, containerization products, microservice products, mobile development products, etc., and this embodiment does not impose any restrictions. In some practical application scenarios, after providing technical service products to users, cloud computing providers can build a Q&A community around the technical service products to answer questions and provide convenient technical support. For example, after a database product is launched or open-sourced to users, a database product-related Q&A community can be built to allow users and technical support personnel to exchange technical questions and share knowledge.
[0039] The Q&A community can function as a chat group on an instant messaging client or as a website service. Users can access the Q&A community through their terminal device's instant messaging client or browser. A Q&A assistant is configured within the community to interact with users and detect their questions. This assistant can function as a virtual Q&A bot in the chat group or as a virtual Q&A bot within the website service. Taking a Q&A bot in a chat group as an example, the bot is bound to a Webhook URL (Webhook Uniform Resource Locator), which contains an access token used to verify the message's origin. When a user asks a question to the bot in the chat group, the instant messaging client can send a POST request carrying the question message to this Webhook URL. The Q&A processing device on the server can listen to this Webhook URL to receive POST requests from the instant messaging client. The question-and-answer processing device can process the question message in the POST request based on the method provided in the embodiments of this application, obtain the answer result, and send a POST request carrying the answer result to the Webhook URL. The instant messaging client obtains the answer result by listening to the Webhook URL and displays the answer result to group members.
[0040] In step 101, the target question message associated with the target service object is determined based on the user's questioning action in the question-and-answer community corresponding to the target service object. For example, when the question-and-answer community is implemented as a chat group, the instant messaging client can detect the user's questioning action in the chat group. This questioning action can be the user directly sending a question message in the chat group, or it can be the user referencing or notifying the question-and-answer robot in the chat group and sending a question message to the question-and-answer robot. For example, when the question-and-answer community is implemented as a website service, the browser can detect the user's selection action on the question-and-answer robot, display the question-and-answer interface, and obtain the question message entered by the user in the question-and-answer interface.
[0041] After obtaining the question message through the question-and-answer assistant, the question-and-answer processing device can directly use the question message as the target question message associated with the target service object, or it can rewrite the target question message and use the rewritten question message as the target question message. This embodiment does not impose any restrictions.
[0042] Optionally, after rewriting the user-provided question message to obtain the target question message, the question-and-answer processing device can return the target question message to the question-and-answer assistant, which then displays the target question message to the user for confirmation. If a user's confirmation of the target question message is detected, the question-and-answer assistant can return the confirmed target question message to the question-and-answer processing device. The question-and-answer processing device can then execute subsequent steps based on the confirmed target question message. If a user's denial of the target question message is detected, the question-and-answer assistant can return a rewritten message to the question-and-answer processing device. This rewriting operation can be repeated until the rewritten target question message is confirmed by the user. The question-and-answer processing device can then execute subsequent steps based on the confirmed target question message.
[0043] After obtaining the target question message based on the above implementation method, in step 102, a target knowledge base matching the knowledge management attributes corresponding to the question-and-answer community can be determined. Optionally, the question-and-answer processing device can determine the target knowledge base corresponding to the target question message from at least one knowledge base based on the knowledge management attributes corresponding to the question-and-answer community. Alternatively, the question-and-answer processing device can determine the target knowledge base as a knowledge base that has been filtered according to the knowledge management attributes of the question-and-answer community during the historical dialogue period.
[0044] The at least one knowledge base may include a general domain knowledge base and a vertical domain knowledge base corresponding to the target service object. The general domain knowledge base is used to implement general domain knowledge retrieval and to use the retrieval results for question-and-answer dialogues within the general domain. The vertical domain knowledge base is used to implement vertical domain knowledge retrieval and to use the retrieval results for question-and-answer dialogues within the vertical domain.
[0045] Knowledge management attributes refer to the attributes used to manage knowledge data related to the target service audience within a Q&A community. The knowledge management attributes corresponding to a Q&A community may include at least one of the following: the user organization corresponding to the Q&A community, the knowledge topics corresponding to the Q&A community, and the knowledge permissions possessed by the Q&A community. Specifically, the user organization corresponding to the Q&A community is used for knowledge management from the perspective of user groups. For example, this user organization may include novice organizations, developer organizations, hobbyist organizations, etc. Accordingly, Q&A communities can be divided into: novice Q&A communities, developer Q&A communities, hobbyist Q&A communities, etc.
[0046] The knowledge topics within the Q&A community are used for knowledge management from the perspective of knowledge content. For example, taking database products as an example, the knowledge topics for database products may include various topics such as database configuration, performance optimization, troubleshooting, new feature implementation, compatibility and integration, and database security. Accordingly, the Q&A community can be divided into: a Q&A community for database product A, a Q&A community for database product B, a database configuration Q&A community, a database troubleshooting Q&A community, and a database security Q&A community, etc.
[0047] The knowledge permissions granted to Q&A communities are used for knowledge management from a knowledge security perspective. These permissions may include, for example, public user permissions, registered user permissions, and authenticated user permissions. Accordingly, Q&A communities can be categorized as: public Q&A communities, registered user Q&A communities, and authenticated user Q&A communities, etc., without further listing.
[0048] In some exemplary embodiments, when building a knowledge base for a question-and-answer community, knowledge documents and / or historical question-and-answer data can be categorized according to the knowledge management attributes corresponding to the question-and-answer community, so as to build corresponding knowledge bases for question-and-answer communities with different knowledge management attributes. The correspondence between different knowledge management attributes and at least one knowledge base can be stored in the knowledge base configuration data. Continuing with the example of a database product, according to different user organizations, the following knowledge bases can be built for the database product: novice knowledge base, developer knowledge base, and hobbyist knowledge base. According to different knowledge topics, the following knowledge bases can be built for the database product: database configuration knowledge base, performance optimization knowledge base, troubleshooting knowledge base, new feature implementation knowledge base, compatibility and integration knowledge base, database security knowledge base, etc. According to different knowledge permissions, the following knowledge bases can be built for the database product: public knowledge base, registered user knowledge base, and certified user knowledge base, etc.
[0049] Optionally, when the question-and-answer processing device determines the target knowledge base corresponding to the target question message from at least one knowledge base based on the knowledge management attributes corresponding to the question-and-answer community, it can obtain the knowledge management attributes corresponding to the question-and-answer community and the knowledge base configuration data, and query the knowledge base configuration data according to the knowledge management attributes corresponding to the question-and-answer community, so as to determine the target knowledge base corresponding to the target question message from at least one knowledge base. The target knowledge base can be one or more knowledge bases, and this embodiment does not impose any limitations. For example, if the question-and-answer community is a communication group used to share database configuration knowledge with novice users, then the novice knowledge base and the database security knowledge base can be used as the target knowledge base.
[0050] Based on this implementation method, on the one hand, by classifying the knowledge base, the scale of knowledge in different knowledge bases is reduced, thereby effectively reducing the amount of computation required when searching the knowledge base. On the other hand, classifying the knowledge base facilitates hierarchical management of different knowledge bases. For example, when users in some communication groups do not have access to certain knowledge, the knowledge can be managed by configuring the correspondence between the knowledge base and the communication group.
[0051] Optionally, if the Q&A community is implemented as a communication group or a Q&A page, when obtaining the knowledge management attributes corresponding to the Q&A community, the Q&A processing device can obtain the identifier of the communication group or the identifier of the category section corresponding to the Q&A page, and obtain the knowledge management attributes corresponding to the Q&A community based on the identifier of the communication group or the identifier of the category section corresponding to the Q&A page. The Q&A page may include a Q&A webpage or a client page of a Q&A application.
[0052] The identifier for this communication group is its name or number, which corresponds to the knowledge management attributes. For example, continuing with the database product example, the group names for communication groups corresponding to different knowledge topics could be: Sub-product A Communication Group, Sub-product B Communication Group, Database Configuration Communication Group, Troubleshooting Communication Group, etc. Category sections refer to different discussion sections divided according to specific knowledge topics, user organizations, or knowledge permissions, to help users find the information they need more effectively, and also to facilitate the management and maintenance of community content. For example, continuing with the database product example, category sections corresponding to different knowledge topics could include: Database Configuration Section, Troubleshooting Section, Database Security Section, etc.
[0053] In this embodiment, a mapping relationship between the identifiers of different communication groups and attribute categories can be established, as well as a mapping relationship between the identifiers of different category sections and attribute categories. Furthermore, after obtaining the identifier of the communication group or the identifier of the category section corresponding to the target question message, the knowledge management attributes corresponding to the target question message can be obtained relatively accurately based on the aforementioned mapping relationship. This facilitates the classification of the target question message and accurate knowledge base matching according to the classification results.
[0054] After determining the target knowledge base based on the above steps, in step 103, the target knowledge base can be retrieved according to the target question message to obtain target knowledge data that matches the target question message.
[0055] In this embodiment, the target knowledge base is constructed based on the knowledge data corresponding to the target service object. This knowledge data may include: knowledge documents and / or historical question-and-answer data from question-and-answer communities. Knowledge documents refer to technical documents, books, and other materials used to store knowledge associated with the target object. For example, taking a database product as an example, knowledge documents may mainly include knowledge documents categorized according to the vertical domain corresponding to the database product, including but not limited to official technical documents, technical manuals, and database learning materials. The format of these knowledge documents may include, but is not limited to, markdown, txt, and ppt formats. In this embodiment, after obtaining knowledge documents in different formats, the question-and-answer processing device can convert these documents into a unified format and perform text extraction based on the converted format.
[0056] The historical question-and-answer data in the question-and-answer community may include the user's historical question-and-answer data, or it may include a large amount of historical question-and-answer data from other community users; this embodiment does not impose any limitations. The historical question-and-answer data in the question-and-answer community can be stored in a designated database using a historical question-and-answer table. For example... Figure 2a As shown, the question-and-answer processing device can collect user-submitted questions and corresponding answers, and store them in a user history question-and-answer data table. The question-and-answer data in the user history question-and-answer data table can be stored in a community history question-and-answer data table through knowledge aggregation / clustering. Upon receiving a user's target question message, question-and-answer knowledge can be retrieved from both the user history question-and-answer data table and the community history question-and-answer data table.
[0057] In some embodiments, after acquiring different types of knowledge data based on the above implementation methods, the different types of knowledge data can be vectorized to obtain knowledge vectors, and the knowledge vectors can be stored in a fused knowledge base. The knowledge base constructed based on this implementation method includes both document knowledge and question-answering knowledge. Before vectorization processing, the knowledge data can undergo deduplication and filtering to improve the efficiency of vectorization processing.
[0058] In other embodiments, a document knowledge base and a question-and-answer knowledge base can be constructed separately. For example... Figure 2b As shown, after obtaining the knowledge document, it can be segmented, deduplicated, filtered, and vectorized to obtain a knowledge vector, which can then be stored in the document knowledge base. For example... Figure 2b As shown, historical Q&A data from the community's historical Q&A database can be retrieved, and the questions in the historical Q&A data can be completed and keywords extracted. Based on the extracted keywords, the questions in the historical Q&A data can be clustered to obtain a high-quality question set. For example... Figure 2bAs shown, after obtaining a set of high-quality questions, the corresponding answers can be evaluated and adjusted using either large language model annotation or manual annotation. After vectorizing the adjusted high-quality questions and answers, question-answer knowledge vectors can be obtained, which can be stored... Figure 2b The high-quality question-and-answer knowledge base shown. For example... Figure 2b As shown, when searching the target knowledge base based on a user's question, knowledge can be retrieved from the document knowledge base to obtain document knowledge fragments, and from the high-quality question-and-answer knowledge base to obtain question-and-answer knowledge fragments. Based on the document knowledge fragments and question-and-answer knowledge fragments, target knowledge data matching the target question message is obtained.
[0059] In some optional embodiments, when the question-answering processing device searches the target knowledge base based on the target question message, it can calculate the similarity between the target question message and the knowledge data in the target knowledge base to obtain multiple knowledge data that have a similarity greater than a set threshold with the target question message. Specifically, the target question message can be vectorized to obtain a question vector, and the similarity between the question vector and the corresponding knowledge vectors in the target knowledge base can be calculated to obtain the similarity between the target question message and the knowledge data in the target knowledge base. Then, the multiple knowledge data can be sorted according to at least one sorting dimension, and a specified number of knowledge data can be selected as target knowledge data matching the target question message based on the sorting result.
[0060] In other exemplary embodiments, the question-answering processing device may employ a rewrite-retrieve-rerank-read process to retrieve target knowledge data matching the target question message from the target knowledge base. During the rewrite phase, the device may obtain the question-answering context information and / or domain information of the target question message within the question-answering community, and rewrite the target question message based on this context information and / or domain information, thus rewriting a multi-round question-and-answer session into a single, complete question. This question-answering context information may include the user's question-answering context information within the community and / or other users' context information within the community, specifically determined based on the question time of the target question message. The user's question-answering context information within the community is stored in a user historical question-answering data table. The device may select a portion of historical question-answering data within a set time range from the user's historical question-answering data table as the question-answering context information, based on the user's question time. For example, a portion of historical question-answering data from the half-hour preceding the question time may be selected as the question-answering context information.
[0061] The domain information of the target service object refers to the technical field in which the corresponding technical service product belongs. For example, the domain information of a database product is the database technology field, and the domain information of a containerization product is the virtualization technology field. The domain information of the target service object can be fixed, or it can be determined by the target attribute category to which the target query message belongs.
[0062] In this context, the target attribute category refers to any one or more attribute categories among the multiple attribute categories of the target service object. The attribute categories of the target service object refer to multiple categories obtained by classifying the attributes of the target service object from the dimensions of function management or product model. For example, taking a database product as an example, the attribute categories of a database product may include: database configuration, performance optimization, troubleshooting, new feature implementation, compatibility and integration, database security, and other attribute categories.
[0063] In this implementation, the target question message is obtained by rewriting the question message provided by the user. This rewriting operation is used to normalize the target question message so that the large language model can better understand the domain context of the target question message and improve the accuracy of the answer.
[0064] Optionally, the question-answering processing device can invoke a large language model to rewrite the target question message. The device can construct rewriting prompts based on the question-answering context and the target question message, and input these prompts into the large language model. For example, a rewriting prompt could be: "Please complete my question based on the question-answering context, assuming there are any ellipses or references. Output the full version of my question.\nMy question is here: {{question}}\nNote that you only need to output the full version of my question; no other content is required. The full question should be answerable without prior knowledge of the question and answer, and also better suited for retrieving relevant information. Full question:." The question-answering processing device can then obtain the rewritten target question message returned by the large language model based on the rewriting prompts.
[0065] During the retrieval phase, the question-answering processing device can calculate the similarity between the rewritten target question message and the knowledge data in the target knowledge base, obtaining multiple knowledge data whose similarity to the rewritten target question message is greater than a set threshold. Specifically, the question-answering processing device can vectorize the target question message to obtain a question vector, and calculate the similarity between the question vector and the corresponding knowledge vector in the target knowledge base, obtaining the similarity between the target question message and the knowledge data in the target knowledge base. This similarity can be cosine similarity. The multiple knowledge data with similarity greater than the set threshold can be the top N knowledge data in the similarity ranking, where N can be 5, 10, 15, or other values; this embodiment does not impose any restrictions. In the re-ranking phase, the multiple knowledge data are then ranked according to at least one ranking dimension, and a specified number of knowledge data are selected as target knowledge data matching the target question message. For example, the 15 retrieved knowledge data can be ranked, and the top three knowledge data can be selected as target knowledge data matching the target question message. During the reading phase, target prompts can be constructed by combining the rewritten target question message and the retrieved target knowledge data.
[0066] In this implementation, the target question message is rewritten using question-and-answer context information. This automatically improves the target question message when it contains referential information or lacks contextual information. Therefore, searching the target knowledge base based on the improved question message facilitates the retrieval of knowledge documents that match the user's actual question intent, thus enabling the large language model to output accurate answers.
[0067] Optionally, the sorting dimension used when sorting the retrieved knowledge data includes at least the publication time of the knowledge data. The publication time of the knowledge data is used to characterize the confidence level of the knowledge document. In practical applications, with the continuous development and innovation of technology, the relevant information of the target service object is constantly updated and iterated, and conflicts may exist between different knowledge data in the knowledge base. Based on this, in this embodiment, the retrieved knowledge data can be reordered according to the publication time of the knowledge data, thereby improving the credibility of knowledge data with a later publication time, making the retrieved target knowledge data more accurate and reliable, and reducing the risk of unreliable answer results due to conflicts between old and new information.
[0068] After obtaining the target knowledge data based on the above implementation method, in step 103, the question-and-answer processing device can generate target prompt words based on the target question message and the target knowledge data. In this step, the prompt word template can be filled in based on the target knowledge data and the target question message to obtain structured target prompt words.
[0069] In step 104, the question-answering processing device can provide the target prompt word to the large language model, so that the large language model outputs the answer result corresponding to the target question message. Here, the large language model is a large-scale trained natural language processing (NLP) model. Large language models are typically built based on deep learning techniques and trained on large-scale training datasets, thus exhibiting powerful performance in processing natural language tasks. The number of parameters in the large language model is greater than a set threshold, which is typically on the order of millions or billions.
[0070] In this embodiment, the question-and-answer processing device can call the online service corresponding to the large language model through the interface provided by the large language model, so as to make full use of the performance of the updated large language model to answer questions in the question-and-answer community when the large language model is updated in real time.
[0071] It is worth noting that in some optional embodiments, the question-and-answer processing device can obtain user feedback and optimize subsequent answers based on the user feedback. Optionally, the question-and-answer processing device can obtain user feedback data on the answer result; if the feedback data is positive feedback data, the target knowledge base is updated based on the target question message and the answer result; if the feedback data is negative feedback data, a corrected answer result is obtained, and the target knowledge base is updated based on the target question message and the corrected answer result.
[0072] like Figure 2c As shown, the question-and-answer processing device can pass user questions to a large language model for processing to generate a basis and a response. The basis refers to the knowledge content used to generate the response. The device can obtain user feedback on the response. If the user's feedback is positive, the device can store the triple consisting of the question, basis, and response in high-quality historical question-and-answer data. If the user's feedback is negative, the device can first store the question, basis, and response in the user's historical question-and-answer data, and then evaluate and adjust the response through manual annotation. The adjusted question, basis, and response can then be stored in high-quality columnar question-and-answer data. Figure 2c As shown, based on high-quality historical question-and-answer data, the large language model can be fine-tuned to continuously optimize its performance in handling vertical domain tasks.
[0073] Optionally, if the user's feedback to the response is negative, the question-and-answer processing device can further send the target question message to technical support personnel for a manual response. After obtaining the manual response, the question-and-answer processing device can provide the result to the terminal device, allowing the terminal device to display the result to the user. Furthermore, the question-and-answer processing device can identify the importance of the target question message. If the importance of the target question message exceeds a set importance threshold, it sends the target question message to technical support personnel for a manual response. After obtaining the manual response, the question-and-answer processing device can provide the result to the terminal device, allowing the terminal device to display the result to the user. Based on this implementation, unaccepted answers or important questions can receive timely technical support, thereby improving the user experience.
[0074] The foregoing embodiments describe how to classify knowledge documents and / or historical Q&A data according to the knowledge management attributes of the Q&A community, so as to build corresponding knowledge bases for Q&A communities with different knowledge management attributes, and will be further illustrated by examples.
[0075] For operators or technical support personnel of Q&A communities, the service operation management system corresponding to the Q&A community can be used to build knowledge bases for Q&A communities with different knowledge management attributes. The service operation management system can provide... Figure 3 The diagram shown illustrates the knowledge base management interface, as follows: Figure 3As shown, the knowledge base management interface includes the following functions: (1) Create a new knowledge base: Enter the knowledge base name and description to create a new knowledge base. (2) Download knowledge documents: Click to select the document in the table, and click the "Download Selected Document" button to download the document in the knowledge base. (3) Add a document to the vector library: Click to select the document in the table, select the maximum length of a single text segment, the overlap length of adjacent text, and enable Chinese title enhancement in the "File Processing Configuration", and click the "Add to Vector Library" button. If the file only exists in the knowledge base but has not yet been vectorized, it will be segmented into text blocks and then vectorized. (4) Delete a document from the vector library: Click to select the document in the table, and click "Delete from Vector Library" to delete the vectorized representation of the document, but it will still exist in the knowledge base. (5) Delete a document from the knowledge base: Click to select the document in the table, and click "Delete from Knowledge Base" to delete the document from both the vector library (if it exists) and the knowledge base. (6) Rebuild Vector Library: Click “Rebuild Vector Library from Source File” to select the knowledge base to be rebuilt, the maximum length of a single text segment, the overlap length of adjacent texts, and the enhancement of Chinese titles. Click the “Confirm Reconstruction” button to start the reconstruction. (7) Delete Knowledge Base: Delete the entire knowledge base.
[0076] based on Figure 3 The interface shown enables customized knowledge base management, allowing users to select appropriate knowledge base file configurations based on communication groups with different knowledge management attributes. This allows for customized knowledge management and facilitates flexible responses to different application scenarios and needs.
[0077] In addition to the aforementioned embodiments, this application also provides a question-and-answer processing method executed by a terminal device, which will be described below in conjunction with the appendix. Figure 4 An example is provided. Figure 4 As shown, when the question-and-answer processing method is executed on the terminal device side, it can mainly include the following steps:
[0078] Step 401: Respond to the user's question in the Q&A community and obtain the target question message, wherein the Q&A community corresponds to the target service object.
[0079] Step 402: Send the target question message to the server so that the server can determine the target knowledge base that matches the knowledge management attributes corresponding to the question and answer community, retrieve the target knowledge base according to the target question message, obtain the target knowledge data that matches the target question message, and call the large language model to generate the answer result corresponding to the target question message according to the target question message and the target knowledge data.
[0080] Step 403: Receive the response result returned by the server and output the response result.
[0081] This embodiment can be executed by a terminal device, which can be a user's mobile phone, tablet computer, desktop computer, smart wearable device, etc., and this embodiment is not limited to any particular device. The terminal device can provide a human-computer interaction interface for accessing the Q&A community. A Q&A assistant is configured in the Q&A community to interact with the user and detect the user's question-asking actions.
[0082] In this embodiment, the user's question-asking action in the Q&A community can be initiated through a human-machine interface provided by the terminal device. This human-machine interface may include at least one of the following: command-line interface (CLI), graphical user interface (GUI), text user interface (TUI), voice user interface (VUI), touch user interface (TUI), gesture user interface (Gestural UI), keyboard and mouse interface, natural language processing (NLP) interface, sensor and biometric interface, and hardware controller. The Q&A community can be a chat group established on an instant messaging client or a website service. Users can access the Q&A community through an instant messaging client or browser provided by the terminal device. Optionally, the Q&A assistant can be a virtual Q&A robot in the chat group or a Q&A robot in a website service. For example, when the Q&A community is implemented as a chat group, the instant messaging client can detect the user's question-asking action in the chat group. This question-asking action can be the user directly sending a question message in the chat group, or it can be the user referencing or notifying the Q&A robot in the chat group and sending a question message to the Q&A robot. For example, when a Q&A community provides services to a website, the browser can detect the user's selection of the Q&A bot, display the Q&A interface, and obtain the question message entered by the user in the Q&A interface.
[0083] In some optional embodiments, the target question-and-answer message is a question message directly entered by the user through a question-asking operation.
[0084] In some alternative embodiments, the target question-and-answer message is a rewritten question message obtained by modifying the question message directly input by the user. This modification operation can be performed by a question-and-answer assistant or by a question-and-answer processing device running on the server. Optionally, after detecting a question operation, the question-and-answer assistant can obtain the question message input by the user through the question operation and directly send the question message to the server. The question-and-answer processing device running on the server can then modify the question message into a target question message containing vertical domain characteristics based on the domain information corresponding to the target service object and / or the target attribute category corresponding to the question message, as described in the foregoing embodiments. The question-and-answer assistant can display the modified target question message to the user for confirmation. If a confirmation operation is detected, the question-and-answer assistant can return the confirmed target question message to the question-and-answer processing device. The question-and-answer processing device can then perform subsequent steps based on the confirmed target question message. If a denial operation is detected, the question-and-answer assistant can return a rewritten message to the question-and-answer processing device. This rewriting operation can be repeated until the modified target question message is confirmed by the user.
[0085] After the terminal device sends the target query message to the server, the server can search the target knowledge base based on the target query message to obtain target knowledge data that matches the target query message, and generate target prompt words based on the target query message and the target knowledge data. The large language model can output the corresponding answer result based on the target prompt words, which will not be described further.
[0086] In this implementation, when the terminal device executes the question-and-answer processing method, it can utilize the server to automatically generate the corresponding answer to the target question message using the target knowledge base and large language model. This achieves automatic answers to user questions in the question-and-answer community. On the one hand, based on the large language model, it can quickly respond to user questions, reducing user waiting time. On the other hand, it reduces reliance on technical support personnel, thus lowering labor costs.
[0087] When a Q&A community is implemented as a Q&A page, it can provide, for example... Figure 5 The question-and-answer interface shown. Figure 5 As shown, users can select different dialogue parameters in the left navigation bar of the Q&A interface, including: current dialogue, dialogue mode, LLM model, Prompt template, temperature parameter, number of historical dialogue turns, knowledge base configuration, etc. After the user enters a question, the Q&A interface can display the corresponding answer, which can include the answer to the question itself, keywords, and extended questions.
[0088] In addition to the question-and-answer processing method provided in the foregoing embodiments, this application also provides a question-and-answer processing system, which may include a terminal device and a server. The terminal device and the server may use the methods described in the foregoing embodiments, and the details are as described above, and will not be repeated here.
[0089] Figure 6 The question-answering system is illustrated from a system architecture perspective, such as... Figure 6 As shown, the question-answering processing system mainly includes: basic components, a retrieval enhancement and generation framework, and a question-answering robot. The basic components may include a database service component, a hybrid analysis engine, a large language model, an instant messaging service, an open-source framework, a search engine, and data visualization and business intelligence tools. Specifically, the database service component stores knowledge data and its corresponding knowledge vectors; the hybrid analysis engine converts unstructured knowledge data (such as images, videos, and audio) into high-dimensional vectors; the large language model outputs responses based on input prompts; the instant messaging service establishes a question-answering community for knowledge exchange; and the open-source framework optimizes the responses output by the large language model based on user feedback to enrich the knowledge base. Data mining tools analyze and mine data from multiple dimensions within the question-answering community, such as the number of users, the number of questions asked, and the time users spent asking questions. Data visualization and business intelligence tools generate visual data dashboards based on the data mining results, enabling community developers and administrators to optimize the functionality and user experience of the question-answering community.
[0090] like Figure 6 As shown, the retrieval enhancement generation framework can be used to vectorize multi-source documents to obtain a vector database. When obtaining a user's query message, the vector database is searched based on the query message to obtain retrieval fragments. These retrieval fragments can be provided to a large language model, which can then generate responses based on the knowledge provided by the retrieval fragments.
[0091] like Figure 6 As shown, for operators of Q&A communities, Q&A bots can provide services such as base model configuration, multimodal document management, custom settings for operation groups, service operation management systems, real-time monitoring of community hotspots, and data dashboards. For users of Q&A communities, Q&A bots can provide the function of automatically outputting answers to user questions and various front-end display functions.
[0092] When a question-and-answer processing system conducts self-service question-and-answer in a question-and-answer community, it can mainly perform the following steps:
[0093] (1) Load the Vector Embedding model to convert the user's target question message into a question vector.
[0094] (2) Select the target knowledge base needed for the question and answer in the communication group.
[0095] (3) Establish connections with large language models.
[0096] (4) Upon receiving the user's target question message, construct rewriting prompts for the target question message based on the user's historical question and answer data, and rewrite the target question message using a large language model.
[0097] (5) Retrieve the target knowledge base based on the rewritten target question message. The rewritten target question message is vectorized using a vector embedding model to obtain the question vector, and the similarity between the question vector and the knowledge vectors in the target knowledge base is calculated. Based on the similarity, N relatively relevant knowledge data are retrieved from the target knowledge base.
[0098] (6) Reorder the N retrieved knowledge texts according to at least one sorting dimension, and select a specified number of knowledge data that are ranked first as target knowledge data based on the sorting results.
[0099] (7) Generate prompt words based on the rewritten target question message and the retrieved target knowledge data, and use a large language model to generate the response result based on the prompt words.
[0100] (8) Add the rewritten target question message and answer results to the user's historical question and answer data for subsequent retrieval and data analysis.
[0101] (9) Construct prompts for generating extension questions. For example, the prompt could be: "Please extract keywords based on this answer:\n{result}\n and recommend three related extension questions. The answer format is 'keyword': 'extension question':, no additional output is required." Input the prompt into the large language model to obtain extension questions related to the user's target question message.
[0102] (10) The response results and the extended question are provided to the user in order to provide more comprehensive information and deeper communication.
[0103] It should be noted that the execution subject of each step of the method provided in the above embodiments can be the same device, or the method can be executed by different devices. For example, the execution subject of steps 101 to 104 can be device A; or the execution subject of steps 101 and 102 can be device A, and the execution subject of step 103 can be device B; and so on.
[0104] Furthermore, some processes described in the above embodiments and accompanying drawings include multiple operations appearing in a specific order. However, it should be clearly understood that these operations may not be executed in the order they appear herein, or they may be executed in parallel. The operation numbers, such as 101, 102, etc., are merely used to distinguish different operations and do not represent any execution order. Additionally, these processes may include more or fewer operations, and these operations may be executed sequentially or in parallel. It should be noted that the descriptions such as "first" and "second" in this document are used to distinguish different messages, devices, modules, etc., and do not represent a sequential order, nor do they limit "first" and "second" to different types.
[0105] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or refuse.
[0106] In addition to the foregoing embodiments, this application also provides a question-and-answer processing system, including a terminal device and a server. The terminal device can be a user-side mobile phone, computer, tablet computer, smart wearable device, etc. The server can be a conventional server or a cloud server.
[0107] The terminal device is used to: respond to a user's question in a Q&A community, obtain the target question message, and send the target question message to the server, wherein the Q&A community corresponds to the target service object; receive the reply result returned by the server, and output the reply result; the server is used to: obtain the target question message; determine the target knowledge base corresponding to the target question message from at least one knowledge base according to the knowledge management attributes corresponding to the Q&A community, wherein the target knowledge base is constructed based on the knowledge documents corresponding to the target service object and / or the historical question and answer data in the Q&A community; search the target knowledge base according to the target question message to obtain target knowledge data matching the target question message; and call a large language model according to the target question message and the target knowledge data to generate the reply result corresponding to the target question message. For details, please refer to the descriptions in the foregoing embodiments, which will not be repeated here.
[0108] Figure 7 This illustration shows a structural diagram of an electronic device provided in an exemplary embodiment of this application. This electronic device can be implemented as a server, and the server is suitable for the question-and-answer processing method provided in the foregoing embodiments. Figure 7As shown, the server includes: a memory 701, a processor 702, and a communication component 703.
[0109] Memory 701 is used to store computer programs and can be configured to store various other data to support operations on the server. Examples of this data include instructions for any application or method used to operate on the server.
[0110] Processor 702, coupled to memory 701, is configured to execute a computer program in memory 701 for: acquiring a target question message associated with a target service object, the target question message being determined based on a user's questioning operation in a question-and-answer community corresponding to the target service object; determining a target knowledge base matching the knowledge management attributes corresponding to the question-and-answer community, the target knowledge base being constructed based on knowledge documents corresponding to the target service object and / or historical question-and-answer data in the question-and-answer community, the knowledge management attributes being attributes used to manage knowledge data related to the target service object; retrieving the target knowledge base based on the target question message to obtain target knowledge data matching the target question message; and generating a response result corresponding to the target question message by calling a large language model based on the target question message and the target knowledge data.
[0111] Optionally, when determining the target knowledge base that matches the knowledge management attributes corresponding to the question-and-answer community, the processor 702 is specifically used to: determine the target attribute category corresponding to the question message among multiple attribute categories corresponding to the target service object; and determine the knowledge base corresponding to the target category attribute from at least one pre-built knowledge base as the target knowledge base.
[0112] Optionally, the Q&A community includes: a communication group or a Q&A page; when the processor 702 obtains the knowledge management attributes corresponding to the Q&A community, it is specifically used to: obtain the identifier of the communication group or the identifier of the category section corresponding to the Q&A page; and obtain the knowledge management attributes corresponding to the Q&A community based on the identifier of the communication group or the identifier of the category section.
[0113] Optionally, when the processor 702 retrieves target knowledge data matching the target question message from the target knowledge base based on the target question message, it specifically performs the following steps: acquiring question-and-answer context information and / or domain information of the target question message in the question-and-answer community; rewriting the target question message based on the question-and-answer context information and / or domain information; calculating the similarity between the rewritten target question message and the knowledge data in the target knowledge base to obtain multiple knowledge data whose similarity to the rewritten target question message is greater than a set threshold; sorting the multiple knowledge data according to at least one sorting dimension, and selecting a specified number of knowledge data as target knowledge data matching the target question message based on the sorting result.
[0114] Optionally, the at least one sorting dimension includes at least the publication time of the knowledge data.
[0115] Furthermore, such as Figure 7 As shown, the server also includes other components such as a power supply component 704, a display component 705, and an audio component 706. Figure 7 The diagram only shows some components and does not mean that the server only includes... Figure 7 The components shown. The server in this embodiment can be implemented as a conventional server, cloud server, or server array, etc.
[0116] In this embodiment, after obtaining a question message from the Q&A community, the server retrieves information from the knowledge base based on the question message, and then uses a large language model to automatically generate a response based on the question message and the retrieval results. The knowledge base is constructed from the knowledge documents of the target service object and / or historical question-and-answer data from the Q&A community. Therefore, the target knowledge data retrieved from the target knowledge base includes relevant knowledge in the vertical domain, which facilitates the large language model in accurately performing the answer generation task in the vertical domain. This achieves automatic responses to user questions in the Q&A community, improves response efficiency, and reduces labor costs.
[0117] Figure 8 This illustration shows a structural diagram of an electronic device provided in an exemplary embodiment of this application. This electronic device can be implemented as a terminal device, such as... Figure 8 As shown, the terminal device includes: a memory 801, a processor 802, and a communication component 803.
[0118] Memory 801 is used to store computer programs and can be configured to store various other data to support operation on a terminal device. Examples of this data include instructions for any application or method used to operate on the terminal device.
[0119] The processor 802, coupled to the memory 801, is used to execute a computer program in the memory 801 for: responding to a user's question in a question-and-answer community; obtaining a target question message, wherein the question-and-answer community corresponds to a target service object; sending the target question message to a server so that the server uses the question-and-answer processing method provided in this application embodiment to obtain a response result corresponding to the target question message; receiving the response result returned by the server and outputting the response result.
[0120] Furthermore, such as Figure 8 As shown, the terminal device also includes other components such as a power supply component 804, a display component 805, and an audio component 806. Figure 8 The diagram only shows some components and does not mean that the terminal device only includes... Figure 8 The components are shown. The terminal device in this embodiment can be implemented as a desktop computer, laptop computer, smartphone, or IoT device, etc.
[0121] In this embodiment, when the terminal device executes the question-and-answer processing method, it can utilize the server to automatically generate the response result corresponding to the target question message using the target knowledge base and large language model. This achieves automatic answers to user questions in the question-and-answer community. On the one hand, based on the large language model, it can quickly respond to user questions, reducing user waiting time. On the other hand, it reduces reliance on technical support personnel, thus lowering labor costs.
[0122] exist Figure 7 as well as Figure 8 In the illustration, the memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random-Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0123] The communication component is configured to facilitate wired or wireless communication between the device containing the communication component and other devices. The device containing the communication component can access wireless networks based on communication standards, such as Wi-Fi, 2G (e.g., Global System for Mobile Communications (GSM)), 3G (e.g., Wideband Code Division Multiple Access (WCDMA), 4G (e.g., Long Term Evolution (LTE)), 4G+ (e.g., LTE-Advanced (LTE-A)), or 5G (5th Generation Mobile Communication Technology), or combinations thereof. In one exemplary embodiment, the communication component receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component may be implemented based on Near Field Communication (NFC), Radio Frequency Identification (RFID), Infrared Data Association (IrDA), Ultra Wide Band (UWB), Bluetooth (BT), and other technologies.
[0124] The power supply component provides power to various components of the device in which it resides. The power supply component may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device in which it resides.
[0125] The display component includes a screen, which may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touchscreen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors can sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation.
[0126] An audio component may be configured to output and / or input audio signals. For example, the audio component includes a microphone (MIC) configured to receive external audio signals when the device containing the audio component is in an operating mode, such as call mode, recording mode, or voice recognition mode. The received audio signals may be further stored in memory or transmitted via a communication component. In some embodiments, the audio component also includes a speaker for outputting audio signals.
[0127] Accordingly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed, can perform the steps in the above method embodiments that can be executed by a server or terminal device.
[0128] This application also provides a computer program product, including: a computer program / instructions, which, when executed by a processor, can implement the steps in the method provided in this application.
[0129] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM (Compact Disc Read-Only Memory), optical storage, etc.) containing computer-usable program code.
[0130] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0131] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0132] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0133] In a typical configuration, a computing device includes one or more processors (Central Processing Unit, CPU), input / output interfaces, network interfaces, and memory.
[0134] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0135] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, Digital Video Disc (DVD) or other optical storage, magnetic tape, disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0136] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, product, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, product, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, product, or apparatus that includes said element.
[0137] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A question-and-answer processing method, characterized in that, include: Obtain the target question message associated with the target service object, wherein the target question message is determined based on the user's questioning operation in the question and answer community corresponding to the target service object; A target knowledge base matching the knowledge management attributes corresponding to the question-and-answer community is determined. The target knowledge base is constructed based on the knowledge documents corresponding to the target service object and / or the historical question-and-answer data in the question-and-answer community. The knowledge management attributes are attributes used to manage the knowledge data related to the target service object. Based on the target question message, the target knowledge base is retrieved to obtain target knowledge data that matches the target question message; Based on the target question message and the target knowledge data, a large language model is invoked to generate the response result corresponding to the target question message.
2. The method according to claim 1, characterized in that, Determine the target knowledge base that matches the knowledge management attributes corresponding to the question-and-answer community, including: Obtain the knowledge management attributes and knowledge base configuration data corresponding to the question and answer community. The knowledge base configuration data includes: the correspondence between different knowledge management attributes and at least one knowledge base. Based on the knowledge management attributes corresponding to the question-and-answer community, the knowledge base configuration data is queried to determine the target knowledge base corresponding to the target question message from at least one knowledge base.
3. The method according to claim 2, characterized in that, The Q&A community includes: communication groups or Q&A pages; obtaining the knowledge management attributes corresponding to the Q&A community includes: Obtain the identifier of the communication group or the identifier of the category section corresponding to the question and answer page; Based on the identifier of the communication group or the identifier of the category section, obtain the knowledge management attributes corresponding to the Q&A community.
4. The method according to any one of claims 1-3, characterized in that, The target knowledge base is retrieved based on the target question message to obtain target knowledge data matching the target question message, including: Obtain the question-and-answer context information and / or domain information of the target question message in the question-and-answer community; The target question message is rewritten based on the question-and-answer context information and / or domain information; The similarity between the rewritten target question message and the knowledge data in the target knowledge base is calculated to obtain multiple knowledge data that have a similarity greater than a set threshold with the rewritten target question message. The plurality of knowledge data are sorted according to at least one sorting dimension, and a specified number of knowledge data are selected as target knowledge data to match the target question message based on the sorting result.
5. The method according to claim 4, characterized in that, The at least one sorting dimension includes at least the publication time of the knowledge data.
6. The method according to any one of claims 1-3, characterized in that, Also includes: Obtain the user's feedback data on the response result; If the feedback data is positive feedback data, then the target knowledge base is updated according to the target question message and the response result; If the feedback data is negative feedback data, then the corrected response result of the response result is obtained, and the target knowledge base is updated according to the target question message and the corrected response result.
7. A question-and-answer processing method, characterized in that, include: Responding to user questions in a Q&A community, obtaining the target question message, wherein the Q&A community corresponds to the target service object; The target question message is sent to the server so that the server obtains the response result corresponding to the target question message using the method described in any one of claims 1-6; Receive the response result returned by the server and output the response result.
8. A question-and-answer processing system, characterized in that, include: Terminal devices and servers; The terminal device is used to: respond to a user's question in a Q&A community, obtain the target question message, and send the target question message to the server, wherein the Q&A community corresponds to the target service object; receive the reply result returned by the server, and output the reply result; The server is configured to: acquire the target question message; determine a target knowledge base that matches the knowledge management attributes corresponding to the question-and-answer community, wherein the target knowledge base is constructed based on the knowledge documents corresponding to the target service object and / or historical question-and-answer data in the question-and-answer community; retrieve the target knowledge base based on the target question message to obtain target knowledge data that matches the target question message; and, based on the target question message and the target knowledge data, invoke a large language model to generate a response result corresponding to the target question message.
9. An electronic device, characterized in that, include: Memory and processor; The memory is used to store one or more computer instructions; The processor is configured to execute one or more computer instructions for performing the steps of the method according to any one of claims 1-6 or 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When a computer program is executed by a processor, it can implement the question-and-answer processing method according to any one of claims 1-6 or 7.
11. A computer program product, characterized in that, include: A computer program / instruction, which, when executed by a processor, enables the question-and-answer processing method as described in any one of claims 1-6 or 7.