Method and device for constructing dialogue knowledge base, computer equipment, readable storage medium and program product
By acquiring dialogue and interaction content in social scenarios, labeling and converting it into structured question-and-answer pairs, the problem of poor training data quality for AI models is solved, improving the model's performance in social scenarios and adapting to rapidly changing social cultures.
Patent Information
- Application Number
- CN202610563203.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-27
- Publication Date
- 2026-08-25
AI Technical Summary
The poor quality of training data for existing AI models in social scenarios leads to rigid response styles, a lack of genuine social interaction, and an inability to adapt to rapidly changing social cultures, thus limiting their performance in anthropomorphic and social intelligence applications.
By acquiring dialogue interaction content from user accounts in social scenarios, labeling account behavior and profile tags, converting it into structured question-and-answer pairs, and conducting quality assessment and screening, a dialogue knowledge base is constructed for use in training large-scale social models.
The quality of training data has been improved, enabling the model to have more realistic social expression capabilities, meeting the needs of anthropomorphic scenarios such as social companionship, content creation assistants, and virtual digital humans.
Smart Images

Figure CN122635528A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to a method, apparatus, computer device, computer-readable storage medium, and computer program product for constructing a dialogue knowledge base. Background Technology
[0002] The performance of AI (Artificial Intelligence) models is highly dependent on a large amount of high-quality training data with a realistic social context. However, in reality, data, especially data involving social culture, colloquial expressions, multi-turn dialogues and other vivid social content, is often difficult to obtain on a large scale, has high annotation costs, and is not timely.
[0003] Many related technologies rely on general dialogue datasets (such as publicly available question-and-answer data, customer service dialogues, etc.) or model-generated data. This leads to the following problems in social scenarios: rigid response styles, a lack of genuine social interaction in dialogues, and an inability to adapt to rapidly changing social cultures. These shortcomings severely limit the performance of AI models in application scenarios that require a high degree of anthropomorphism and social intelligence (such as social companionship, content creation assistants, virtual digital humans, etc.).
[0004] Therefore, there is a problem with the poor quality of training data for AI models in related technologies. Summary of the Invention
[0005] Therefore, it is necessary to provide a method, apparatus, computer device, computer-readable storage medium, and computer program product for constructing a dialogue knowledge base that can improve the quality of training data for models, in order to address the aforementioned technical problems.
[0006] Firstly, this application provides a method for constructing a dialogue knowledge base, including:
[0007] Acquire dialogue and interaction content between user accounts and target content in social scenarios;
[0008] The account behavior tags and account profile tags corresponding to the dialogue interaction content are labeled to obtain the labeled dialogue interaction content;
[0009] Based on the dialogue structure of the annotated dialogue interaction content, the annotated dialogue interaction content is converted into structured question-answer pair samples.
[0010] Obtain the quality assessment results of the question-answer pair samples, and store the question-answer pair samples whose quality assessment results meet the preset conditions into the dialogue knowledge base; the samples in the dialogue knowledge base are used to train the social big data model.
[0011] In one embodiment, the step of converting the annotated dialogue interaction content into structured question-answer pair samples based on the dialogue structure of the annotated dialogue interaction content includes:
[0012] Identify question samples that match the interactive intent of the labeled dialogue content;
[0013] Based on the annotated dialogue interaction content, generate a response sample that matches the question sample;
[0014] The question-answer pair sample is obtained based on the matched question sample and answer sample.
[0015] In one embodiment, the labeled dialogue interaction content includes single-turn interaction content and / or multi-turn interaction content, and determining the question sample that matches the interaction intent of the labeled dialogue interaction content includes:
[0016] For the multi-turn interaction content in the labeled dialogue interaction content, based on the context of the multi-turn interaction content, determine the question sample that matches the interaction intent of the multi-turn interaction content;
[0017] For the single-turn interaction content in the labeled dialogue interaction content, a question sample matching the single-turn interaction content is generated based on the semantic information of the single-turn interaction content.
[0018] In one embodiment, the labeled dialogue interaction content includes single-turn interaction content and / or multi-turn interaction content, and the step of generating a response sample matching the question sample based on the labeled dialogue interaction content includes:
[0019] For the multi-turn interaction content in the labeled dialogue interaction content, a response sample matching the question sample is generated based on the response content in the multi-turn interaction content;
[0020] For the single-turn interaction content in the labeled dialogue interaction content, the single-turn interaction content is rewritten based on the key content of the single-turn interaction content to generate a response sample that matches the question sample; the semantic richness of the response sample is higher than that of the single-turn interaction content, and the dialogue style matches the dialogue style of the single-turn interaction content.
[0021] In one embodiment, the method further includes:
[0022] A dialogue relationship graph corresponding to the dialogue interaction content is constructed by identifying the account field; the dialogue relationship graph represents the dialogue relationship between different user accounts in the dialogue interaction content.
[0023] Based on all root nodes and corresponding leaf nodes in the dialogue relationship graph, identify all dialogue links in the dialogue relationship graph;
[0024] Based on all dialogue links in the dialogue relationship graph, the single-turn interaction content and / or the multi-turn interaction content are identified in the labeled dialogue interaction content.
[0025] In one embodiment, obtaining the quality assessment results of the question-and-answer pair sample includes:
[0026] Obtain the quality assessment results of the question-and-answer pair samples under preset quality assessment dimensions; the preset quality assessment dimensions include at least one of retrieval matching degree, generation usability, knowledge timeliness, and diversity and coverage; the quality assessment results include at least one of retrieval matching degree assessment results, generation usability assessment results, knowledge timeliness assessment results, and diversity and coverage assessment results; the retrieval matching degree assessment result indicates whether the question-and-answer pair samples are easily matched by the retrieval system; the generation usability assessment result indicates whether the question-and-answer pair samples are suitable as reference samples for the generation model; the knowledge timeliness assessment result indicates whether the question-and-answer pair samples conform to the current social culture; the diversity and coverage assessment result indicates whether the question-and-answer pair samples cover at least one of different topics, different account profiles, and different dialogue styles.
[0027] Secondly, this application also provides an apparatus for constructing a dialogue knowledge base, comprising:
[0028] The acquisition module is used to acquire the dialogue and interaction content between user accounts and target content in social scenarios;
[0029] The annotation module is used to annotate the account behavior tags and account profile tags corresponding to the dialogue interaction content, so as to obtain the annotated dialogue interaction content;
[0030] The conversion module is used to convert the annotated dialogue interaction content into structured question-answer pair samples based on the dialogue structure of the annotated dialogue interaction content.
[0031] The evaluation module is used to obtain the quality evaluation results of the question-answer pair samples, and store the question-answer pair samples whose quality evaluation results meet the preset conditions into the dialogue knowledge base; the samples in the dialogue knowledge base are used to train the social big model.
[0032] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program that, when executed by the processor, implements the steps of the method described above.
[0033] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the steps of the above-described method.
[0034] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the steps of the above-described method.
[0035] The aforementioned method, apparatus, computer equipment, computer-readable storage medium, and computer program product for constructing a dialogue knowledge base involve: acquiring dialogue interaction content between user accounts and target content in a social context; labeling the dialogue interaction content with corresponding account behavior tags and account profile tags to obtain labeled dialogue interaction content; converting the labeled dialogue interaction content into structured question-answer pair samples based on the dialogue structure of the labeled dialogue interaction content; obtaining the quality evaluation results of the question-answer pair samples; storing question-answer pair samples whose quality evaluation results meet preset conditions into the dialogue knowledge base; and using the samples in the dialogue knowledge base to train a large-scale social model.
[0036] In this way, by directly acquiring the dialogue interaction content between user accounts and target content in social scenarios, and combining account behavior and account profiles for more accurate data annotation, it supports refined retrieval and scenario-based applications. Based on the dialogue structure of the annotated dialogue interaction content, the annotated dialogue interaction content is transformed into structured question-answer pair samples. After quality evaluation and selection of high-quality samples, a dialogue knowledge base is constructed. This not only solves the problems of difficulty in obtaining large-scale training data for social scenarios, high annotation costs, and poor timeliness in related technologies, but also avoids the defects of AI model responses that are rigid, lack real social feeling, and cannot adapt to rapidly changing social culture caused by relying on general datasets or model-generated data. It effectively improves the quality of training data for large social models, enabling the trained models to have more realistic social expression capabilities and better meet the application needs of anthropomorphic social scenarios such as social companionship, content creation assistants, and virtual digital humans. Attached Figure Description
[0037] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0038] Figure 1 This is a flowchart illustrating a method for constructing a dialogue knowledge base in one embodiment;
[0039] Figure 2 This is a flowchart illustrating the steps of converting labeled dialogue interaction content into structured question-and-answer pairs based on the dialogue structure of labeled dialogue interaction content in one embodiment.
[0040] Figure 3 This is a flowchart illustrating a method for constructing a dialogue knowledge base in another embodiment;
[0041] Figure 4 This is a structural block diagram of a device for constructing a dialogue knowledge base in one embodiment;
[0042] Figure 5 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0043] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0044] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.
[0045] In one embodiment, such as Figure 1 The diagram illustrates a method for constructing a dialogue knowledge base. This embodiment uses the application of this method to a computer device as an example. It is understood that the computer device can be a terminal, a server, or a system including both a terminal and a server. In this embodiment, the method includes steps S110 to S140:
[0046] Step S110: Obtain the dialogue and interaction content between the user account and the target's published content in the social scenario.
[0047] Among them, social scenarios can refer to interactive scenarios on social platforms.
[0048] The target content can refer to the content published by user accounts on a target social media platform, selected based on a preset crawling strategy. In some embodiments, target content can be obtained based on keyword search, such as calling the target social media platform's search interface based on input keyword search conditions to retrieve original content published by accounts containing the keywords, which is then used as the target content. In other embodiments, target content can be obtained based on social topic tags, such as aggregating original content published by accounts belonging to the corresponding topic tag under the target social media platform based on input topic tag conditions (e.g., "food in City A"), which is then used as the target content. In still other embodiments, target content can be obtained based on account profiles, such as targeting original content published by specified types of user accounts on the target social media platform based on preset user profile filtering conditions (e.g., food bloggers), which is then used as the target content.
[0049] Among them, dialogue interaction content refers to comment-type interactive information generated around the target published content. It can include first-level comments that directly address the target published content, such as comments posted by user accounts (comment accounts) directly addressing the target published content, which are the first-level interactive information directly related to the target published content; it can also include multi-level nested reply content formed by replying to comments, such as reply information posted by user accounts to existing first-level comments or other reply content, forming a multi-level dialogue relationship between comments.
[0050] Step S120: Label the account behavior tags and account profile tags corresponding to the dialogue interaction content to obtain the labeled dialogue interaction content.
[0051] Among them, account behavior tags are tags that classify the behavioral intentions of user accounts that post dialogue and interaction content, such as sharing: showing off children, food, travel, and outfits; seeking help: asking for recommendations, advice, or answers; discussion: topic discussions, debates, and experience exchanges; and emotional: venting, complaining, praising, and comforting.
[0052] Among them, the account profile tags are tags obtained by profiling users based on the content characteristics of dialogue interaction content and the account information of user accounts.
[0053] In specific implementations, account behavior tags and account profile tags corresponding to the dialogue interaction content can be labeled based on a large language model or classification model to obtain the labeled dialogue interaction content. In some embodiments, after determining the account behavior tags and account profile tags corresponding to the dialogue interaction content, the dialogue interaction content can be associated with the corresponding account behavior tags and account profile tags and stored.
[0054] In some embodiments, during the process of tagging account behavior labels corresponding to dialogue interaction content, the behavioral intent of the user account can be identified based on the dialogue interaction content using a large language model or classification model, and the content domain under each behavioral intent can be further subdivided (e.g., "sharing food" can be subdivided into "Chinese food", "Western food", "desserts", etc.). Further subdivision can be made down to knowledge points (e.g., "Chinese food - Sichuan cuisine - spicy hot pot"). In some embodiments, this can be done selectively, or only key domains can be labeled.
[0055] In practical applications, account behavior tags can be named vertical dimension tags, and account profile tags can be named horizontal dimension tags. Through this dual-dimensional tag system, refined organization and indexing of social content can be achieved. For example: the tag "Sharing - Food - Desserts × Women - Post-95s - First-tier cities" is suitable for conversational scenarios recommending dessert shops to young female users; the tag "Seeking Help - Childcare - Sleep Problems × Women - Mothers - Second-tier cities" is suitable for RAG (Retrieval Augmented Generation) scenarios in childcare Q&A.
[0056] Step S130: Based on the dialogue structure of the annotated dialogue interaction content, convert the annotated dialogue interaction content into structured question-answer pair samples.
[0057] Dialogue structure refers to the hierarchical relationship, interaction rounds, and question-and-answer correspondence between comments and replies in a dialogue interaction. Based on the interaction rounds and nesting depth, dialogue structures are divided into two categories: single-turn dialogue structures and multi-turn dialogue structures. A single-turn dialogue structure refers to a single-level dialogue form where only a user account comments on the target content, and this comment has no subsequent nested replies. For example, if the target content is food-related, and the comment is: "XX's butter hot pot base is super fragrant, highly recommended!", then this dialogue interaction belongs to a single-turn dialogue structure. A multi-turn dialogue structure refers to a dialogue form where, based on the first-level comment, there are multiple levels of nested replies to that comment, forming two or more levels of continuous interaction. It consists of multiple progressive dialogue rounds, from first-level comment → first-level reply → second-level reply…, with clear question-and-answer / response relationships between adjacent levels, forming a chain-like multi-turn dialogue unit. For example, comment "User Account_A": "Does anyone know which hot pot restaurant in City A is good?" "User Account_B": "Store C and Store D are both good." "User Account_A": "Thanks!" If the dialogue message is "I'll give it a try," then the dialogue belongs to a multi-turn dialogue structure.
[0058] In practice, different question-and-answer pair generation strategies can be used to generate corresponding structured question-and-answer pair samples for the labeled dialogue interaction content with different dialogue structures. Structured question-and-answer pair samples are standardized training samples formed by normalizing and formatting unstructured comment dialogues (i.e., dialogue interaction content) according to the interaction level and question-and-answer correspondence.
[0059] Step S140: Obtain the quality assessment results of the question-answer pair samples, and store the question-answer pair samples whose quality assessment results meet the preset conditions into the dialogue knowledge base.
[0060] The samples in the dialogue knowledge base are used to train the large social model.
[0061] Among them, the quality assessment result refers to the result obtained by evaluating the quality of the question-and-answer pair samples from the perspective of AI model application using a machine consumption-centered quality assessment framework.
[0062] In practice, the quality assessment results of question-answer pairs can be obtained, and those question-answer pairs that meet the preset conditions can be stored in the dialogue knowledge base. In practical applications, the quality of question-answer pairs can be assessed from multiple quality assessment dimensions. Based on the quality assessment score of the question-answer pairs under each quality assessment dimension and the corresponding dimension weight, the total quality score of the question-answer pairs can be determined. Then, question-answer pairs that meet the preset conditions can be selected based on the total quality score.
[0063] The aforementioned method for constructing a dialogue knowledge base directly acquires dialogue interaction content between user accounts and target content in social scenarios. By combining account behavior and account profiles, more accurate data annotation is performed to support refined retrieval and scenario-based applications. Based on the dialogue structure of the annotated dialogue interaction content, the annotated dialogue interaction content is converted into structured question-answer pair samples. After quality evaluation, high-quality samples are selected to construct the dialogue knowledge base. This method not only solves the problems of difficulty in obtaining large-scale training data for social scenarios, high annotation costs, and poor timeliness in related technologies, but also avoids the defects of AI model responses that are rigid, lack real social feeling, and cannot adapt to rapidly changing social cultures caused by relying on general datasets or model-generated data. It effectively improves the quality of training data for large social models, enabling the trained models to have more realistic social expression capabilities and better meet the application needs of anthropomorphic social scenarios such as social companionship, content creation assistants, and virtual digital humans.
[0064] In some embodiments, such as Figure 2 As shown, step S130 involves converting the annotated dialogue interaction content into structured question-answer pair samples based on the dialogue structure of the annotated dialogue interaction content, including steps S210 to S230:
[0065] Step S210: Identify question samples that match the interactive intent of the labeled dialogue content.
[0066] Interaction intent refers to the user's core needs or expressive purpose hidden in the labeled dialogue interaction content.
[0067] Among them, the question sample refers to the interactive intent based on the labeled dialogue interaction content, which is formed into a question text after being processed in a standardized and normalized manner. It needs to match the user's interactive intent and conform to the preset question format.
[0068] In practice, implicit questions and core intentions can be extracted from the labeled dialogue interaction content to determine question samples that match the interaction intentions of the labeled dialogue interaction content.
[0069] Step S220: Generate a response sample that matches the question sample based on the annotated dialogue interaction content.
[0070] The response sample is based on the annotated dialogue interaction content. It is a text form of response extracted, organized and standardized from the generated question sample. It must match the interaction intent of the question sample and accurately respond to the request of the question sample.
[0071] In practice, response samples matching the question samples can be generated based on the annotated dialogue content. Specifically, information that can respond to the above question samples can be extracted from the annotated dialogue content (if the annotated dialogue content does not explicitly mention it, a standard response can be supplemented based on the annotated interaction intent and combined with conventional response logic to generate a response sample).
[0072] Step S230: Obtain question-answer pairs based on the matched question samples and answer samples.
[0073] In practice, the matched question samples and answer samples are combined to form question-answer pairs.
[0074] The technical solution of this embodiment identifies question samples that match the interactive intent of the annotated dialogue content; generates response samples that match the question samples based on the annotated dialogue content; and obtains question-answer pairs based on the matched question and response samples. Thus, by combining the dialogue structure, matching question samples with interactive intent, and generating corresponding response samples, structured question-answer pairs are obtained. This standardizes and transforms unstructured social dialogue content, ensuring the accuracy and relevance of question-answer matching, improving the structuring and usability of data, and providing high-quality standardized samples for subsequent applications such as model training.
[0075] In some embodiments, the annotated dialogue interaction content includes single-turn interaction content and / or multi-turn interaction content. Single-turn interaction content refers to dialogue interaction content with a single-turn dialogue structure; multi-turn interaction content refers to dialogue interaction content with a multi-turn dialogue structure. Different question generation strategies are employed for single-turn and multi-turn interaction content.
[0076] Specifically, determining the question samples that match the interaction intent of the annotated dialogue interaction content includes: for multi-turn interaction content in the annotated dialogue interaction content, determining the question samples that match the interaction intent of the multi-turn interaction content based on the context of the multi-turn interaction content; and for single-turn interaction content in the annotated dialogue interaction content, generating the question samples that match the single-turn interaction content based on the semantic information of the single-turn interaction content.
[0077] In specific implementation, for multi-turn interaction content in the labeled dialogue, question samples matching the interaction intent of the multi-turn interaction content are determined based on the context of the multi-turn interaction content. In some embodiments, implicit questions can be extracted from the first round of dialogue summary of the multi-turn interaction content. For example, in the dialogue "A: Does anyone know which hot pot restaurant in City A is good? B: Shops C and D are both good," the question sample is: "What are some good hot pot restaurants in City A?"
[0078] For single-turn interactions within labeled dialogue content, question samples matching the single-turn interactions can be generated based on their semantic information. For example, a single-turn interaction might be: "C store's butter hot pot broth is super fragrant, highly recommended," and the question sample could be: "How's the hot pot at C store?"
[0079] The technical solution of this embodiment includes labeled dialogue interaction content including single-turn interaction content and / or multi-turn interaction content; for multi-turn interaction content in labeled dialogue interaction content, question samples matching the interaction intent of multi-turn interaction content are determined based on the context of multi-turn interaction content; for single-turn interaction content in labeled dialogue interaction content, question samples matching single-turn interaction content are generated based on the semantic information of single-turn interaction content.
[0080] In this way, by adopting differentiated question sample extraction methods for single-round and multi-round interaction content, and matching corresponding question samples by combining the context of multi-round interaction with the semantic information of single-round interaction, it is possible to fully adapt to the interaction characteristics of different dialogue structures, ensure the accuracy and rationality of question sample extraction, improve the adaptability and reliability of structured question answering, and make the structured transformation of social dialogue data more in line with actual interaction logic.
[0081] In some embodiments, the annotated dialogue interaction content includes single-turn interaction content and / or multi-turn interaction content. Based on the annotated dialogue interaction content, generating a response sample that matches the question sample includes: for the multi-turn interaction content in the annotated dialogue interaction content, generating a response sample that matches the question sample based on the response content in the multi-turn interaction content; for the single-turn interaction content in the annotated dialogue interaction content, rewriting the single-turn interaction content based on the key content of the single-turn interaction content to generate a response sample that matches the question sample; the semantic richness of the response sample is higher than that of the single-turn interaction content, and the dialogue style matches the dialogue style of the single-turn interaction content.
[0082] The response content can be the reply text used to respond to the previous questions in multi-round interactive content, including core response information and supplementary and extended information.
[0083] Among them, key content can be semantic fragments that carry core viewpoints, evaluations, or core information in a single round of interactive content.
[0084] Semantic richness can refer to the completeness and semantic fullness of text information. In this embodiment, the rewritten response sample has a higher semantic richness than the original single-round interaction content.
[0085] Dialogue style refers to the tone, expression habits, and spoken language characteristics of the text. The rewritten response samples maintain the same style as the original single-round interaction content.
[0086] In practice, during the process of generating response samples that match the question samples based on the labeled dialogue interaction content, for multi-round interaction content, response samples that match the question samples can be generated based on the response content in the multi-round interaction content. In practical applications, the second round (the first reply) is usually taken as the main answer to generate the response sample; if there are subsequent rounds, multiple replies can be merged into a more complete answer to generate the response sample.
[0087] For single-turn interaction content, overly colloquial or brief content can be rewritten. This can be done using a large language model to rewrite and expand the content while preserving the original dialogue style and key information, generating response samples. For example, consider the single-turn interaction: "C store is amazing! The beef tallow hot pot base is absolutely incredible!" Extracting the key phrases "C store is delicious, beef tallow hot pot base" from the single-turn interaction content, the original brief and colloquial text is rewritten. While retaining the original dialogue style of praise and recommendation, the semantics are expanded and the expression is standardized to generate a response sample: "C store's hot pot is very delicious, especially the beef tallow hot pot base, which is incredibly fragrant. Highly recommended!" This response sample has higher semantic completeness and maintains consistency with the praise style of the original comment.
[0088] In this embodiment, the labeled dialogue interaction content includes single-turn interaction content and / or multi-turn interaction content. For the multi-turn interaction content within the labeled dialogue interaction content, a response sample matching the question sample is generated based on the response content within the multi-turn interaction content. For the single-turn interaction content within the labeled dialogue interaction content, the single-turn interaction content is rewritten based on its key content to generate a response sample matching the question sample. The semantic richness of the response sample is higher than that of the single-turn interaction content, and its dialogue style matches the dialogue style of the single-turn interaction content.
[0089] Thus, different response generation methods are adopted for multi-round and single-round interactive content. For multi-round interactive content, response samples are generated directly based on the response content, which can ensure the authenticity and relevance of the response information. For single-round interactive content, the key content is rewritten, which improves the semantic richness of the response samples while maintaining the original dialogue style. This makes the generated response samples more standardized, complete, and relevant to actual interaction scenarios, effectively improving the quality and usability of structured question answering samples.
[0090] In some embodiments, for the identification of dialogue structure, the dialogue relationship of the labeled dialogue interaction content can be identified first, the dialogue link can be extracted, and thus the single-turn interaction content and / or multi-turn interaction content can be identified.
[0091] Specifically, the method also includes: identifying and constructing a dialogue relationship graph corresponding to the dialogue interaction content through the account field; the dialogue relationship graph represents the dialogue relationship between different user accounts in the dialogue interaction content; identifying all dialogue links in the dialogue relationship graph based on all root nodes and corresponding leaf nodes in the dialogue relationship graph; and identifying single-turn interaction content and / or multi-turn interaction content in the labeled dialogue interaction content based on all dialogue links in the dialogue relationship graph.
[0092] Among them, the account field can be a key field in social platform comment data used to identify user identity and interaction relationship, including but not limited to user ID, comment ID, reply ID, @username, etc., which is the core basis for building dialogue relationship.
[0093] Among them, the dialogue relationship graph is a directed topology graph built based on the account field, with comments as nodes and reply relationships as directed edges, accurately representing the comment reply association relationship between different user accounts.
[0094] The root node is the node in the dialogue relationship graph that has no prior response. It corresponds to the original first-level comment that is published directly on the target content and is the starting point of the dialogue chain.
[0095] In this context, leaf nodes are nodes in the dialogue relationship graph that have no subsequent replies, corresponding to the final reply content in the dialogue chain, and are the termination point of the dialogue chain.
[0096] Among them, the dialogue link is the complete interaction path from the root node to the leaf node in the dialogue relationship graph, representing a set of continuous user dialogue sequences.
[0097] In practical implementation, a dialogue relationship graph corresponding to the interactive content can be constructed using account fields. This graph represents the dialogue relationships between different user accounts within the interactive content. For example, reply relationships between comments can be identified using account fields such as "reply ID" and "@username," constructing a directed graph to represent the reply chain between comments. The root node (original comment) and leaf nodes (final reply) of the constructed directed graph are then identified. Based on all root nodes and corresponding leaf nodes in the dialogue relationship graph, all dialogue links in the graph are identified and converted into a dialogue sequence (arranged chronologically). For instance, the complete dialogue path from the root node to the leaf node is extracted, complex dialogue trees with too many branches (more than 3 branches) are filtered out, the main dialogue is retained, and a dialogue sequence in JSONL format is generated.
[0098] Thus, based on the length of all dialogue links in the dialogue relationship graph, single-turn and / or multi-turn interactions are identified from the annotated dialogue content. For multi-turn interactions, complete contextual information (all preceding dialogue turns) is preserved, and metadata such as the speaker's role, speaking time, and number of likes for each turn are annotated. This mechanism allows for the extraction of thousands to tens of thousands of authentic multi-turn dialogue samples from flattened comment data.
[0099] The technical solution of this embodiment constructs a dialogue relationship graph corresponding to the dialogue interaction content by identifying the account field. The dialogue relationship graph represents the dialogue relationships between different user accounts in the dialogue interaction content. Based on all root nodes and corresponding leaf nodes in the dialogue relationship graph, all dialogue links in the dialogue relationship graph are identified. Based on all dialogue links in the dialogue relationship graph, single-turn interaction content and / or multi-turn interaction content are identified in the labeled dialogue interaction content. In this way, by constructing a dialogue relationship graph through the account field and extracting complete dialogue links based on root nodes and leaf nodes, the originally flat and disordered comment data can be structured and organized, accurately distinguishing between single-turn and multi-turn interaction content, fully preserving the real dialogue logic and contextual relationships between users, improving the accuracy and completeness of dialogue content recognition, and providing a standardized and reliable data foundation for subsequent labeling, question-and-answer pair generation, and other processing. The AI model can learn natural dialogue flow and interaction patterns.
[0100] In some embodiments, obtaining the quality assessment results of question-answer pair samples includes: obtaining the quality assessment results of question-answer pair samples under a preset quality assessment dimension.
[0101] In specific implementation, during the process of obtaining the quality assessment results of question-answer pair samples, the quality assessment results corresponding to the question-answer pair samples under preset quality assessment dimensions can be obtained. These preset quality assessment dimensions include at least one of retrieval matching degree, generation usability, knowledge timeliness, and diversity and coverage. The quality assessment results include at least one of the following: retrieval matching degree assessment result, generation usability assessment result, knowledge timeliness assessment result, and diversity and coverage assessment result. Specifically, the retrieval matching degree assessment result indicates whether the question-answer pair samples are easily matched by the retrieval system. The generation usability assessment result indicates whether the question-answer pair samples are suitable as reference samples for the generation model. The knowledge timeliness assessment result indicates whether the question-answer pair samples conform to current social culture. The diversity and coverage assessment result indicates whether the question-answer pair samples cover at least one of different topics, different account profiles, and different dialogue styles.
[0102] In some embodiments, dimension 1: retrieval adaptability may include:
[0103] Keyword coverage: Evaluates the richness of keywords in questions and answers;
[0104] Semantic integrity: Evaluating whether an answer contains complete semantic information without relying on context;
[0105] Recall simulation: Using the actual RAG retrieval model, evaluate the recall of this data under relevant queries.
[0106] Dimension 2: The availability of generated tasks can include:
[0107] Length appropriateness: Evaluate whether the text length is within the optimal input range for the generative model;
[0108] Style consistency: Assess whether the conversation style is consistent (e.g., both are conversational or both are formal).
[0109] Example quality: Evaluate the improvement in the quality of the generated data when used as an example.
[0110] Dimension 3: Knowledge timeliness can include:
[0111] Freshness of elements: Assess whether it incorporates the latest social culture;
[0112] Time decay factor: Calculate the timeliness weight based on the publication time (e.g., data within 6 months has a weight of 1.0, and data from 1 year ago has a weight of 0.5).
[0113] Popularity metrics: Combining social metrics such as the number of likes and comments to assess the popularity of content.
[0114] Dimension 4: Diversity and coverage can include:
[0115] Topic distribution balance: Assess whether the knowledge base covers various topic tags evenly;
[0116] Account profile diversity: Assess whether it covers user groups of different ages, genders, and interest groups;
[0117] Conversation style diversity: Assess the diversity of conversation styles (humorous, serious, professional, sarcastic, etc.).
[0118] This evaluation framework can quantify the machine availability of question-and-answer pairs for a sample and guide the optimization of data cleaning and filtering strategies.
[0119] In some embodiments, the quality assessment framework can be adjusted according to specific application scenarios, such as:
[0120] RAG applications: focusing on retrieval recall and semantic completeness;
[0121] Dialogue generation: Emphasizing dialogue coherence and stylistic consistency;
[0122] Content creation: Emphasizing fun and diverse expression.
[0123] In some embodiments, the total quality score of a question-answer pair sample can be determined based on the quality assessment score of the sample in each quality assessment dimension and the corresponding dimension weight, thereby selecting question-answer pair samples that meet preset conditions based on the total quality score.
[0124] The technical solution of this embodiment obtains the quality assessment results of question-and-answer pairs under preset quality assessment dimensions. The preset quality assessment dimensions include at least one of retrieval matching degree, generation usability, knowledge timeliness, and diversity and coverage. The quality assessment results include at least one of retrieval matching degree assessment results, generation usability assessment results, knowledge timeliness assessment results, and diversity and coverage assessment results. The retrieval matching degree assessment result indicates whether the question-and-answer pairs are easily matched by the retrieval system. The generation usability assessment result indicates whether the question-and-answer pairs are suitable as reference samples for the generation model. The knowledge timeliness assessment result indicates whether the question-and-answer pairs conform to the current social culture. The diversity and coverage assessment result indicates whether the question-and-answer pairs cover at least one of different topics, different account profiles, and different dialogue styles.
[0125] In this way, the quality of question-answer pairs is evaluated from machine-oriented dimensions such as retrieval matching degree, generation usability, knowledge timeliness, diversity and coverage. This differs from the evaluation methods in related technologies that focus on human reading experience. It can more accurately evaluate the adaptability of the samples to the retrieval system and generation model, ensuring that the constructed sample library is more in line with the actual use needs of AI models, effectively improving the model training and inference effects, and avoiding the problem of mismatch between high-quality human-readable data and machine-usable data.
[0126] In another embodiment, such as Figure 3 The diagram illustrates a flowchart of a method for constructing a dialogue knowledge base, applicable to computer devices, and includes the following steps:
[0127] Step S302: Obtain the dialogue and interaction content between the user account and the target's published content in the social scenario.
[0128] Step S304: Label the account behavior tags and account profile tags corresponding to the dialogue interaction content to obtain the labeled dialogue interaction content.
[0129] Step S306: Construct a dialogue relationship graph corresponding to the dialogue interaction content by identifying the account field; the dialogue relationship graph represents the dialogue relationship between different user accounts in the dialogue interaction content.
[0130] Step S308: Identify all dialogue links in the dialogue relationship graph based on all root nodes and corresponding leaf nodes in the graph.
[0131] Step S310: Based on all dialogue links in the dialogue relationship graph, identify single-turn interaction content and / or multi-turn interaction content in the labeled dialogue interaction content.
[0132] Step S312: For the multi-turn interaction content in the labeled dialogue interaction content, determine the question samples that match the interaction intent of the multi-turn interaction content based on the context of the multi-turn interaction content.
[0133] Step S314: For the single-turn interaction content in the labeled dialogue interaction content, generate question samples that match the single-turn interaction content based on the semantic information of the single-turn interaction content.
[0134] Step S316: For the multi-round interaction content in the labeled dialogue interaction content, generate a response sample that matches the question sample based on the response content in the multi-round interaction content.
[0135] Step S318: For the single-round interaction content in the labeled dialogue interaction content, rewrite the single-round interaction content based on the key content of the single-round interaction content to generate a response sample that matches the question sample.
[0136] Step S320: Based on the matched question samples and answer samples, obtain question-answer pair samples.
[0137] Step S322: Obtain the quality assessment results of the question-answer pair samples under the preset quality assessment dimensions, and store the question-answer pair samples whose quality assessment results meet the preset conditions into the dialogue knowledge base.
[0138] It should be noted that the specific limitations of the above steps can be found in the specific limitations of a method for constructing a dialogue knowledge base described above.
[0139] In some other embodiments, after obtaining the dialogue and interaction content between user accounts and target published content in a social context, data cleaning can be performed first. This application designs a multi-layered data cleaning pipeline to progressively filter noise and extract high-quality content:
[0140] The first layer: format standardization and basic filtering, including:
[0141] Remove duplicate data (duplicate removal based on content hashing);
[0142] Filter advertising and marketing content (based on keyword and pattern matching);
[0143] Filter out illegal content (based on a sensitive word database and content moderation model);
[0144] Standardize data format (unify JSON storage structure), including: unify data format to JSONL (one JSON object per line), fill in missing fields (e.g., set author_info to {} when it is empty), and type conversion (e.g., convert string time to datetime object).
[0145] The second layer: Dialogue structure recognition and extraction, including:
[0146] Identify the "comment-reply" dialogue chain and construct a dialogue tree structure;
[0147] Extract complete multi-turn dialogue sequences (2 or more rounds);
[0148] Differentiate between single-turn comments and multi-turn dialogues, and process them separately.
[0149] Label the dialogue roles (initiator, responder).
[0150] The third layer: quality scoring and intelligent filtering, including:
[0151] Length filtering: Filters content that is too short (<5 characters) or too long (>500 characters);
[0152] Information density scoring: Using a large language model to evaluate the information density and interest of the content;
[0153] Dialogue coherence score: assesses the contextual coherence of multi-turn dialogues;
[0154] Element detection: Identify whether it contains the latest social culture elements such as internet slang, memes, and emojis.
[0155] Thus, after data cleaning, steps S110 to S140 can be executed.
[0156] Furthermore, this application also designs a knowledge base architecture that supports dynamic updates:
[0157] 1. Incremental data access:
[0158] Supports daily / weekly incremental crawling of new data;
[0159] New data is automatically fed into the cleaning production line for processing;
[0160] After deduplication from existing data, the data is entered into the database.
[0161] 2. Time-related decay mechanism:
[0162] Each data entry is labeled with a timestamp and a timeliness weight;
[0163] Automatically reduce the retrieval weight of older data over time;
[0164] Regularly archive or delete outdated data.
[0165] 3. Tracking trending topics:
[0166] Real-time statistics on changes in the popularity of topic tags;
[0167] Automatically identify emerging trending topics and create new tags;
[0168] Prioritize the allocation of crawling and processing resources for popular topics.
[0169] Through this dynamic update mechanism, the knowledge base can remain timely and keep up with changes in social culture.
[0170] In summary, this application provides a systematic and modular framework for constructing a social dialogue knowledge base. The various alternative implementations described above demonstrate that this technical solution is not limited to a specific algorithm or platform, possessing strong engineering practicality and industrial application value. It can flexibly construct optimal social knowledge base systems according to the needs of different scenarios.
[0171] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.
[0172] Based on the same inventive concept, this application also provides a dialog knowledge base construction apparatus for implementing the dialog knowledge base construction method described above. The solution provided by this apparatus is similar to the solution described in the above method; therefore, the specific limitations of one or more dialog knowledge base construction apparatus embodiments provided below can be found in the limitations of the dialog knowledge base construction method described above, and will not be repeated here.
[0173] In one exemplary embodiment, such as Figure 4 As shown, a device for constructing a dialogue knowledge base is provided, comprising: an acquisition module 410, an annotation module 420, a conversion module 430, and an evaluation module 440, wherein:
[0174] The acquisition module 410 is used to acquire the dialogue and interaction content between user accounts and target published content in social scenarios.
[0175] The annotation module 420 is used to annotate the account behavior tags and account profile tags corresponding to the dialogue interaction content, so as to obtain the annotated dialogue interaction content.
[0176] The conversion module 430 is used to convert the annotated dialogue interaction content into structured question-answer pair samples based on the dialogue structure of the annotated dialogue interaction content.
[0177] The evaluation module 440 is used to obtain the quality evaluation results of the question-answer pair samples and store the question-answer pair samples whose quality evaluation results meet the preset conditions into the dialogue knowledge base; the samples in the dialogue knowledge base are used to train the social big model.
[0178] In one embodiment, the conversion module 430 is specifically used to determine a question sample that matches the interaction intent of the annotated dialogue interaction content; generate a response sample that matches the question sample based on the annotated dialogue interaction content; and obtain the question-answer pair sample based on the matched question sample and response sample.
[0179] In one embodiment, the labeled dialogue interaction content includes single-turn interaction content and / or multi-turn interaction content. The conversion module 430 is specifically used to determine, based on the context of the multi-turn interaction content, a question sample matching the interaction intent of the multi-turn interaction content; and to generate a question sample matching the single-turn interaction content based on the semantic information of the single-turn interaction content.
[0180] In one embodiment, the labeled dialogue interaction content includes single-turn interaction content and / or multi-turn interaction content. The conversion module 430 is specifically used to generate a response sample matching the question sample based on the response content in the multi-turn interaction content of the labeled dialogue interaction content; and to rewrite the single-turn interaction content based on the key content of the single-turn interaction content of the labeled dialogue interaction content to generate a response sample matching the question sample. The semantic richness of the response sample is higher than that of the single-turn interaction content, and the dialogue style matches the dialogue style of the single-turn interaction content.
[0181] In one embodiment, the apparatus further includes: an identification module, configured to identify and construct a dialogue relationship graph corresponding to the dialogue interaction content through an account field; the dialogue relationship graph represents the dialogue relationship between different user accounts in the dialogue interaction content; identify all dialogue links in the dialogue relationship graph based on all root nodes and corresponding leaf nodes in the dialogue relationship graph; and identify the single-turn interaction content and / or the multi-turn interaction content in the labeled dialogue interaction content based on all dialogue links in the dialogue relationship graph.
[0182] In one embodiment, the evaluation module 440 is specifically used to obtain the quality evaluation results of the question-and-answer pair sample under a preset quality evaluation dimension; the preset quality evaluation dimension includes at least one of retrieval matching degree, generation usability, knowledge timeliness, and diversity and coverage; the quality evaluation result includes at least one of retrieval matching degree evaluation result, generation usability evaluation result, knowledge timeliness evaluation result, and diversity and coverage evaluation result; the retrieval matching degree evaluation result indicates whether the question-and-answer pair sample is easily matched by the retrieval system; the generation usability evaluation result indicates whether the question-and-answer pair sample is suitable as a reference sample for the generation model; the knowledge timeliness indicates whether the question-and-answer pair sample conforms to the current social culture; the diversity and coverage evaluation result indicates whether the question-and-answer pair sample covers at least one of different topics, different account profiles, and different dialogue styles.
[0183] The modules in the aforementioned dialogue knowledge base construction device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.
[0184] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 5As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a method for constructing a dialogue knowledge base. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0185] Those skilled in the art will understand that Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0186] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.
[0187] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.
[0188] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0189] 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, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0190] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0191] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0192] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for constructing a dialogue knowledge base, characterized in that, The method includes: Acquire dialogue and interaction content between user accounts and target content in social scenarios; The account behavior tags and account profile tags corresponding to the dialogue interaction content are labeled to obtain the labeled dialogue interaction content; Based on the dialogue structure of the annotated dialogue interaction content, the annotated dialogue interaction content is converted into structured question-answer pair samples. Obtain the quality assessment results of the question-answer pair samples, and store the question-answer pair samples whose quality assessment results meet the preset conditions into the dialogue knowledge base; the samples in the dialogue knowledge base are used to train the social big model.
2. The method according to claim 1, characterized in that, The step of converting the annotated dialogue interaction content into structured question-answer pair samples based on the dialogue structure of the annotated dialogue interaction content includes: Identify question samples that match the interactive intent of the labeled dialogue content; Based on the annotated dialogue interaction content, generate a response sample that matches the question sample; The question-answer pair sample is obtained based on the matched question sample and answer sample.
3. The method according to claim 2, characterized in that, The labeled dialogue interaction content includes single-turn interaction content and / or multi-turn interaction content, and the step of determining the question sample that matches the interaction intent of the labeled dialogue interaction content includes: For the multi-turn interaction content in the labeled dialogue interaction content, based on the context of the multi-turn interaction content, determine the question sample that matches the interaction intent of the multi-turn interaction content; For the single-turn interaction content in the labeled dialogue interaction content, a question sample matching the single-turn interaction content is generated based on the semantic information of the single-turn interaction content.
4. The method according to claim 2, characterized in that, The labeled dialogue interaction content includes single-turn interaction content and / or multi-turn interaction content. Generating a response sample matching the question sample based on the labeled dialogue interaction content includes: For the multi-turn interaction content in the labeled dialogue interaction content, a response sample matching the question sample is generated based on the response content in the multi-turn interaction content; For the single-turn interaction content in the labeled dialogue interaction content, the single-turn interaction content is rewritten based on the key content of the single-turn interaction content to generate a response sample that matches the question sample; the semantic richness of the response sample is higher than that of the single-turn interaction content, and the dialogue style matches the dialogue style of the single-turn interaction content.
5. The method according to claim 3, characterized in that, The method further includes: A dialogue relationship graph corresponding to the dialogue interaction content is constructed by identifying the account field; the dialogue relationship graph represents the dialogue relationship between different user accounts in the dialogue interaction content. Based on all root nodes and corresponding leaf nodes in the dialogue relationship graph, identify all dialogue links in the dialogue relationship graph; Based on all dialogue links in the dialogue relationship graph, the single-turn interaction content and / or the multi-turn interaction content are identified in the labeled dialogue interaction content.
6. The method according to claim 1, characterized in that, The process of obtaining the quality assessment results of the question-and-answer pair samples includes: Obtain the quality assessment results of the question-and-answer pair samples under preset quality assessment dimensions; the preset quality assessment dimensions include at least one of retrieval matching degree, generation usability, knowledge timeliness, and diversity and coverage; the quality assessment results include at least one of retrieval matching degree assessment results, generation usability assessment results, knowledge timeliness assessment results, and diversity and coverage assessment results; the retrieval matching degree assessment result indicates whether the question-and-answer pair samples are easily matched by the retrieval system; the generation usability assessment result indicates whether the question-and-answer pair samples are suitable as reference samples for the generation model; the knowledge timeliness assessment result indicates whether the question-and-answer pair samples conform to the current social culture; the diversity and coverage assessment result indicates whether the question-and-answer pair samples cover at least one of different topics, different account profiles, and different dialogue styles.
7. A device for constructing a dialogue knowledge base, characterized in that, The device includes: The acquisition module is used to acquire the dialogue and interaction content between user accounts and target content in social scenarios; The annotation module is used to annotate the account behavior tags and account profile tags corresponding to the dialogue interaction content, so as to obtain the annotated dialogue interaction content. The conversion module is used to convert the annotated dialogue interaction content into structured question-answer pair samples based on the dialogue structure of the annotated dialogue interaction content. The evaluation module is used to obtain the quality evaluation results of the question-answer pair samples, and store the question-answer pair samples whose quality evaluation results meet the preset conditions into the dialogue knowledge base; the samples in the dialogue knowledge base are used to train the social big model.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.