Group chat knowledge automatic extraction method and device based on big language and storage medium

By using a group chat knowledge automatic extraction method based on a large language model, the inefficiency caused by reliance on manual group chat knowledge management is solved. This method enables efficient extraction of structured knowledge from unstructured group chats, improving the efficiency and quality of knowledge extraction.

CN121809635APending Publication Date: 2026-04-07CHINA MERCHANTS BANK
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-25
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

In existing technologies, the management of group chat knowledge relies on manual organization and summarization, which leads to low efficiency and difficulty in efficiently identifying and extracting high-quality knowledge units. In particular, it is difficult to accurately identify cross-domain professional terms and related question-and-answer contexts in group chat content with multiple intersecting topics and unstructured content.

Method used

An automated knowledge extraction method for group chats based on a large language model is adopted. By acquiring real-time chat message data, the same question is identified and aggregated into multi-turn dialogues to generate dialogue groups. The large language model is then guided by prompt words to generate structured question-answer pairs, which are finally stored in the knowledge base when the review conditions are met.

Benefits of technology

It enables the accurate reconstruction of complete question-and-answer contexts from chaotic group chat message streams, improving the efficiency and quality of knowledge extraction, transforming it into an automated, intelligent, and standardized high-efficiency process, and significantly reducing operating costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121809635A_ABST
    Figure CN121809635A_ABST
Patent Text Reader

Abstract

The invention discloses a large language-based group chat knowledge automatic extraction method and device, and a storage medium. The method comprises the steps of obtaining real-time chat message data of a target group chat; identifying the same question in the real-time chat data, aggregating identification results into multiple rounds of dialogues, and generating a dialogue group based on the multiple rounds of dialogues; inputting the dialogue group into a large language model, and guiding the large language model to generate structured question and answer pairs from the dialogue group through cue words; when it is confirmed that the question and answer pairs meet the preset auditing conditions, the question and answer pairs are stored in a knowledge base. According to the method, a large language model is introduced to be combined with a multi-round dialogue group intelligent identification strategy, a complete question and answer context is accurately reconstructed from a disordered group chat message flow, the accuracy and integrity of structured knowledge extraction are ensured, a low-efficiency and non-standard knowledge precipitation process which depends on manpower is converted into an automatic, intelligent and standardized efficient process, and the efficiency is improved. And the efficiency, the scale and the quality of knowledge extraction are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of automated knowledge extraction technology in the banking industry, and in particular to a method, device and storage medium for automated extraction of knowledge from group chats based on large language. Background Technology

[0002] In modern enterprise digital operation systems, various work groups built on instant messaging tools have become key carriers for knowledge transfer and experience accumulation. Whether it's technical maintenance Q&A, customer service support, project collaboration, or data business communication, these groups continuously generate a large amount of real-time solutions, troubleshooting experience, business rule discussions, and expert practical insights, covering multiple professional fields such as infrastructure, application systems, security compliance, and data governance. This forms a dynamically accumulating, value-intensive collective wisdom "knowledge mine." Especially in complex business scenarios such as data asset operation, the business definitions, governance rules, and front-line practical experience contained in relevant Q&A groups are particularly timely and practical.

[0003] However, the current management of this group chat knowledge still mainly relies on manual sorting and summarization, which faces significant limitations in large-scale and systematic processing. Specifically, since group chat content usually exists in the form of unstructured, multi-topic, multi-turn dialogues, and involves a large number of professional terms and domain backgrounds, it is difficult for manual methods to efficiently identify and extract high-quality knowledge units.

[0004] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention

[0005] The main purpose of this application is to provide a method, device and storage medium for automated extraction of group chat knowledge based on large language, which aims to solve the technical problem of low efficiency caused by the reliance on manual extraction in existing group chat knowledge extraction.

[0006] To achieve the above objectives, this application proposes an automated knowledge extraction method for group chats based on large language, the method comprising: Obtain real-time chat message data from the target group chat; Identify the same question in the real-time chat data, aggregate the identification results into multi-turn dialogues, and generate a dialogue group based on the multi-turn dialogues; The dialogue group is input into a large language model, and prompt words guide the large language model to generate structured question-answer pairs from the dialogue group; Once the question-and-answer pair is confirmed to meet the preset review conditions, the question-and-answer pair is stored in the knowledge base.

[0007] In one embodiment, the steps of identifying the same question in the real-time chat data, aggregating the identification results into multi-turn dialogues, and generating a dialogue group based on the multi-turn dialogues include: Identify the dialogue information in the real-time chat data, and based on the preset conversation end judgment rule, identify the conversations that have ended in the real-time chat data; Locate the questioning session in the ended session, and extract the multi-turn dialogue based on the questioning session from the dialogue information; The multi-turn dialogue is used to generate a dialogue group.

[0008] In one embodiment, before the step of inputting the dialogue group into a large language model and guiding the large language model to generate structured question-answer pairs from the dialogue group using prompt words, the method further includes: Calculate the message length of the dialogue group; Based on the statistically obtained message length, the data output length parameter of the large language model is dynamically adjusted.

[0009] In one embodiment, the step of dynamically adjusting the data output length parameter of the large language model based on the statistically obtained message length includes: Calculate the basic output data length based on the message length of the dialogue group; Identify the linguistic complexity features of the dialogue group, including the number of dialogue turns, whether it contains program code blocks, and whether it contains multi-domain terms; The adjustment coefficient is determined based on the language complexity features, and the target output data length is calculated based on the basic output data length and the adjustment coefficient. Set the target output data length to the data output length parameter of the large language model.

[0010] In one embodiment, the steps of determining adjustment coefficients based on the language complexity features and calculating the target output data length based on the base output data length and the adjustment coefficients include: Analyze the feature points in the complex features of the language and set weight factors for the feature points; The feature points are determined based on the language performance of the dialogue group, and the sub-coefficients of the feature points are determined based on the language performance. The initial adjustment coefficient of the feature point is calculated based on the weighting factor and sub-coefficient, and the initial adjustment coefficient is subject to a preset threshold limit to obtain the final adjustment coefficient.

[0011] In one embodiment, the step of inputting the dialogue group into a large language model and guiding the large language model to generate structured question-answer pairs from the dialogue group using prompt words includes: Identify the dialogue type of the dialogue group and obtain the control instructions corresponding to the dialogue type; Based on the control instructions, prompt words are generated and input into the large language model; The prompt words guide the large language model to recognize the context of the dialogue group, and the recognition result of the context is output in a structured format.

[0012] In one embodiment, the step of guiding the large language model to recognize the context of the dialogue group through the prompt words and outputting the recognition result of the context in a structured format includes: The prompt words guide the large language model to parse the logical relationships between the conversation messages in the dialogue group, and extract the question intent and the corresponding answer content from the parsing results; The question intent and the corresponding answer content are generated into a question-answer pair, the question-answer pair is encapsulated according to a preset key-value pair, and the question-answer pair is output.

[0013] In one embodiment, the step of guiding the large language model to parse the logical relationships between conversation messages in the dialogue group through the prompt words includes: Identify the explicit relationships between messages in the dialog group; Based on preset session lifecycle rules and the timestamp sequence of each message, the session status of each message is determined; Based on the explicit association and the session state, retrieve the session messages of the same complete question-and-answer session from the original message sequence of the dialogue group; Add a logical association identifier to the captured session messages.

[0014] Furthermore, to achieve the above objectives, this application also proposes an automated knowledge extraction device for group chats based on large language, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the automated knowledge extraction method for group chats based on large language as described above.

[0015] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the automated knowledge extraction method for group chat based on large language as described above.

[0016] One or more technical solutions proposed in this application have at least the following technical effects: The technical solution of this application involves acquiring real-time chat message data of a target group chat; identifying the same question in the real-time chat data, aggregating the identification results into multi-turn dialogues, and generating a dialogue group based on the multi-turn dialogues; inputting the dialogue group into a large language model, and guiding the large language model to generate structured question-and-answer pairs through prompt words; and storing the question-and-answer pairs in a knowledge base when it is confirmed that the question-and-answer pairs meet preset review conditions.

[0017] This application introduces a large language model combined with a multi-turn group chat intelligent recognition strategy to accurately reconstruct the complete question-and-answer context from the chaotic group chat message flow, ensuring the accuracy and completeness of structured knowledge extraction. It transforms the knowledge accumulation process, which relies on manual labor, is inefficient and non-standard, into an automated, intelligent, and standardized high-efficiency process, significantly improving the efficiency, scale and quality of knowledge extraction. Attached Figure Description

[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 This is a flowchart illustrating the first embodiment of the group chat knowledge automatic extraction method based on large language in this application; Figure 2 This is a detailed step diagram of step S20 in the first embodiment; Figure 3 This is a detailed step diagram of step S30 in the first embodiment; Figure 4 This is a flowchart illustrating the second embodiment of the group chat knowledge automated extraction method based on large language in this application; Figure 5 This is a detailed step diagram of step S50 in the second embodiment; Figure 6 A schematic diagram of the technical framework for a general knowledge extraction capability framework for group chats; Figure 7 This is a schematic diagram of the device structure of the hardware operating environment involved in the automated knowledge extraction method for group chat based on large language in the embodiments of this application.

[0021] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0022] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0023] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0024] The main solution of this application embodiment is: to obtain real-time chat message data of the target group chat; to identify the same question in the real-time chat data, to aggregate the identification results into multi-turn dialogues, and to generate a dialogue group based on the multi-turn dialogues; to input the dialogue group into a large language model, and to guide the large language model to generate structured question-answer pairs through prompt words; and to store the question-answer pairs in a knowledge base when it is confirmed that the question-answer pairs meet the preset review conditions.

[0025] Current technologies primarily rely on manual reading, sorting, summarizing, and inputting of the massive, multi-round, and highly fragmented unstructured dialogue information generated in enterprise work group chats to achieve knowledge accumulation. This approach is not only slow and costly in terms of manpower, but also struggles to accurately identify cross-domain professional terms and effectively connect fragmented question-and-answer contexts, resulting in low knowledge extraction efficiency and inconsistent quality. This severely restricts the large-scale, systematic management and immediate reuse of enterprise knowledge assets.

[0026] This application provides a solution that, by introducing a large language model as the core understanding and generation engine, combined with a specially designed multi-turn group chat intelligent recognition strategy, can automatically and accurately reconstruct the complete question-and-answer context from chaotic group chat message streams. Furthermore, it utilizes a dynamic prompt word generation and output parameter optimization mechanism based on scenario and content complexity to ensure the accuracy and completeness of structured knowledge extraction. Finally, a human-machine collaborative review process achieves quality control and efficient data entry, transforming the originally manual, inefficient, and non-standardized knowledge accumulation process into an automated, intelligent, and standardized high-efficiency process. This significantly improves the efficiency, scale, and quality of knowledge extraction while reducing operating costs.

[0027] Based on this, embodiments of this application provide a method for automated extraction of knowledge from group chats based on large language, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the automated group chat knowledge extraction method based on large language in this application. In this embodiment, the automated group chat knowledge extraction method based on large language includes steps S10-S40: Step S10: Obtain real-time chat message data of the target group chat; In this embodiment, acquiring real-time chat message data of the target group chat is essentially the data input basis for the knowledge automated extraction process. The core data processing logic of this process lies in establishing a stable, near real-time and highly compatible automated acquisition and preprocessing channel for group chat messages, ensuring that subsequent processing modules can obtain complete and structured raw data input.

[0028] In practice, a data connection is established with one or more designated work groups by calling the application programming interface (API) provided by the target instant messaging platform. To achieve low-latency data acquisition, the technical solution configures a Kafka-based message queue cluster as the data transmission channel. When a new chat message is generated within the group, the chat message and its associated metadata are captured through the API and immediately encapsulated into a data packet of a specific format, which is then pushed to a designated topic in the Kafka cluster. This mechanism ensures that the latency from message generation to capture by the backend system is typically controlled within ten seconds, meeting near real-time requirements.

[0029] Specifically, after the chat messages and their metadata are consumed and stored in the backend database, they need to undergo further parsing and standardization. Since the raw data is usually returned in JSON string format and may contain diverse content types, the data parsing and cleaning module uses a JSON parsing tool library to parse the strings and extract key fields including the sender's unique identifier, message content, message sending timestamp, reference message identifier, and mentioned user identifier.

[0030] To address the unique formats that message content may contain, such as emoticons, images, or files, the technical solution incorporates compatible processing logic. For example, for image messages, the data parsing and cleaning module identifies specific message type identifiers and extracts the image file's storage identifier or network address from the JSON data. Subsequently, based on the storage identifier or network address, the image file is downloaded and transferred to a dedicated file server. Simultaneously, the message content is marked in the database as a reference to the file server path, thereby ensuring the complete acquisition and associated storage of multimedia information.

[0031] Step S20: Identify the same question in the real-time chat data, aggregate the identification results into multi-turn dialogues, and generate a dialogue group based on the multi-turn dialogues; In this embodiment, the process of identifying the same question in real-time chat data and aggregating it into a dialogue group is based on the fact that, in the chaotic group chat message stream, according to preset rules and explicit relationships between messages, discrete message fragments belonging to the same question and answer topic are accurately collected and integrated to form structured multi-turn dialogue units, providing high-quality contextual input for subsequent knowledge generation.

[0032] In practice, session lifecycle management is performed on the acquired raw message data. Furthermore, session boundaries are defined based on the "question-answer" interaction pattern, and session termination rules are set. For example, if it is detected that a questioner has not sent any new messages within a preset time threshold, or has not received a reply from the relevant staff member within a set time, the current session surrounding the question is determined to have ended. Moreover, through periodic batch processing tasks, all active question sessions are scanned, and ended sessions are identified and closed according to the aforementioned rules.

[0033] Specifically, further identification operations are performed using a message relationship identification algorithm and a chat group aggregation strategy. The message relationship identification algorithm relies on two explicit association signals: message referencing and mentioning. Message referencing occurs when the responder directly references a specific question message using the "reference" function; mentioning occurs when the responder mentions the questioner using the "@" function. By parsing the "reference message identifier" and "mentioned user identifier" fields of each chat message, response links are established between the chat messages. Based on these response links, all subsequent messages directly or indirectly related to the first message initiated by the questioner through referencing or mentioning can be aggregated into an independent chat group.

[0034] For complex scenarios such as cross-day conversations and multi-threaded cross-conversations, supplementary logic is introduced. Specifically, to address conversation breaks that may occur due to time segmentation, related messages belonging to the same questioner and occurring consecutively can be merged across days during aggregation. Simultaneously, to handle duplicate conversation groups that may arise from delayed responses, an inclusion relationship detection algorithm is designed. This algorithm compares the message sets contained in different conversation groups. If a newly identified conversation group completely contains all messages from another earlier conversation group, it is considered a duplicate, and the older, incomplete conversation group is automatically removed, retaining only the latest complete conversation group. Finally, each successfully aggregated conversation group is saved as a structured data object, whose attributes include at least: a unique conversation group identifier, an associated questioner identifier, a source group identifier, a sequence of all message contents arranged chronologically, and the start and end times of the conversation.

[0035] Step S30: Input the dialogue group into the large language model, and guide the large language model to generate structured question-answer pairs from the dialogue group through prompt words; In this embodiment, the dialogue group is input into the large language model to generate structured question-answer pairs. Through carefully designed instruction templates and parameter control, the large language model is guided to understand the semantic core of the multi-turn dialogue and extract standardized question-answer knowledge items from it, thereby realizing the automatic conversion from unstructured dialogue text to structured knowledge.

[0036] Specifically, the identified dialogue groups are formatted as input, and the message sequences within these groups are integrated into a coherent text context in chronological order. This text context typically includes the questioner's description, possible follow-up questions, answers from multiple respondents, discussions, and clarifications. To help the large language model distinguish between different speakers, a speaker identifier is appended to each message. The formatted text, along with necessary metadata instructions, constitutes the input to the large language model.

[0037] Furthermore, prompt word engineering and dynamic configuration of model parameters are performed. The prompt word engineering consists of a series of carefully designed natural language instructions used to guide the large language model to perform specific knowledge extraction tasks. Specific typical prompt word templates can explicitly instruct the large language model to act as a "knowledge extraction expert," requiring it to summarize the core question and its corresponding accurate and complete answer based on the provided dialogue history. The prompt word engineering can strictly define the output format, for example, mandating output in a specified JSON structure, such as {"question": "extracted question text", "answer": "summarized answer text"}, to ensure the machine-readable output. In addition, the prompt word engineering embeds specific instructions for handling complex scenarios, such as: requiring the large language model to retain program code or SQL statements as is, without modification or omission; requiring the filtering of polite but redundant phrases such as "thank you" and specific names of individuals from the answer; and instructing the large language model to summarize only the current question when known knowledge sharing content is mixed into the dialogue.

[0038] When calling the large language model's application programming interface (API), key generation parameters are dynamically adjusted based on the length and complexity of the input dialogue. For example, to prevent accidental truncation when generating long answers, the upper limit parameter for the number of generated tokens is adaptively increased based on the number of tokens in the input text. Simultaneously, appropriate temperature parameters are set to control the randomness of the output, ensuring stable and reliable results in scenarios requiring high knowledge accuracy. By encapsulating a unified model call service, the technical solution supports flexible switching between different large language model vendors or versions; only the corresponding API needs to be adapted and the prompt words fine-tuned, improving the system's scalability and adaptability.

[0039] Step S40: When it is confirmed that the question-answer pair meets the preset review conditions, the question-answer pair is stored in the knowledge base.

[0040] In this embodiment, the generated question-and-answer pairs are reviewed and stored, constructing a human-machine collaborative quality control and knowledge entry process. Through convenient tools and auxiliary information, human reviewers can efficiently verify and correct the knowledge entries automatically generated by the large language model, and finally persistently store the question-and-answer pairs that meet the quality standards in the knowledge base, completing the last step of knowledge assetization.

[0041] In practice, one or more generated question-and-answer pairs, along with their original dialogue group context and automatically extracted additional information, are pushed to a specially designed online review workbench. This workbench is presented as an interactive web application, typically divided into two main areas. One side clearly displays the complete original dialogue message history corresponding to the question-and-answer pair, arranged chronologically, facilitating reviewers' tracing of knowledge sources and verification of context. The other side displays the question-and-answer pairs to be reviewed in a list format, with each record containing automatically generated "question" and "answer" fields, and providing operation buttons such as "Approve," "Modify," and "Reject."

[0042] Furthermore, regarding the multiple auxiliary decision-making information provided for manual review, not only is the original dialogue provided, but also feature tags for each question-and-answer pair are automatically extracted and labeled. These feature tags are implemented by training a large language model or a dedicated classification model. Specifically, the large language model automatically determines the business domain to which the question and answer content belongs, including "retail data," "regulatory reporting," and "system operation and maintenance," and displays the feature tags to the reviewer for verification or modification. This operation greatly reduces the workload of manual classification. At the same time, rich metadata is extracted and displayed from the original data, including the questioner's identification information, the question time, the final response time, and the name of the source group chat, giving the knowledge entries better traceability and management attributes.

[0043] During the review process, auditors can directly modify the content of the question-and-answer pairs by comparing them with the original dialogue, or select unqualified entries to reject. For rejections, a brief reason can be provided, such as "incomplete information," "incorrect answer," or "duplicate generation." This feedback data can be used for subsequent analysis and optimization of the aforementioned automatic generation model. Once auditors confirm that a batch of question-and-answer pairs meets the preset quality standards, they can trigger the knowledge entry process through the "batch submission" operation. Based on this, the approved knowledge entries, along with their final determined feature tags and all associated metadata, are written into persistent storage according to the predefined data model of the knowledge base, thus completing the full transformation from group chat messages to structured knowledge assets.

[0044] The knowledge extraction process implemented in the above embodiments can also be characterized as a four-layer decoupled data architecture. That is, a four-level decoupled architecture is adopted to encapsulate the functional mechanisms of data access, dialogue processing, knowledge extraction, and review and storage into a general framework for group chat knowledge extraction. (See attached image.) Figure 6 , Figure 6 This is a schematic diagram of the technical framework for a general knowledge extraction capability framework for group chats, based on the diagram shown. Figure 6 The general framework for knowledge extraction in group chats includes the following: Channel data layer (group chat data collection service): By calling the group chat API interface and configuring the Kafka near real-time push channel, the full message (text / image) of more than ten data operation and maintenance Q&A groups is automatically exported and stored, providing a stable and complete data source for subsequent processing; Data processing middleware (dialogue processing service): To address the complexity of multi-turn cross-conversations in group chats, user type recognition, message relationship recognition, and multi-turn dialogue group aggregation algorithms are developed. By setting dialogue end judgment rules and cross-day dialogue processing logic, redundant dialogues are automatically eliminated, and independent dialogue groups for each questioner are generated. This provides concise, accurate, and structured data for the input of large language models, significantly reducing the complexity of model processing. Large Language Model Capability Layer (Intelligent QA Generation Service): Integrates with large language models, encapsulates standardized input and output interfaces (input: dialogue group information; output: structured QA pairs), and solves the problem of unstable model output through Prompt engineering training optimization and dynamic parameter tuning. It also supports model replacement and upgrades to improve service flexibility. Application Layer (Human-Machine Collaborative Review Service): Develop online review backend tools that allow administrators to view QA knowledge generation results, knowledge feature tags, user information, and conversation information in real time. Provide batch "review-modify-submit" functions, and synchronize to the QA knowledge base with one click after the review is approved, achieving a closed-loop process.

[0045] Furthermore, you can also view Figure 2 , Figure 2 This is a detailed step diagram of step S20 in the first embodiment, based on the shown... Figure 2 The steps of identifying the same question in the real-time chat data, aggregating the identification results into multi-turn dialogues, and generating dialogue groups based on the multi-turn dialogues include S21~23: Step S21: Identify the dialogue information in the real-time chat data, and based on the preset conversation end judgment rule, identify the conversations that have ended in the real-time chat data. Step S22: Locate the questioning session in the ended session and extract the multi-turn dialogue based on the questioning session from the dialogue information; Step S23: Generate a dialogue group from the multi-turn dialogue.

[0046] In this embodiment, the same question is identified and aggregated to generate a dialogue group. From the continuously flowing real-time chat data stream, independent, completed conversation units are segmented according to clear rules. Then, within these conversation units, effective communication sequences starting with the question are precisely located. Furthermore, through algorithmic aggregation and cleaning, structured dialogue groups are formed that can be processed by large language models. This clear aggregation process solves the problems of fragmented and concurrent group chat messages, providing semantically complete contextual units for knowledge extraction.

[0047] In practical implementation, the focus should be on identifying session boundaries, processing the acquired real-time chat message data in chronological order, and dividing sessions according to preset session end judgment rules. A typical rule for judging the response result can be based on timeout judgment of session activity. For example, a timer is initialized for each detected potential question session or its last activity timestamp is recorded. If no new relevant messages are generated within a preset continuous duration threshold, such as two hours, the session is determined to have ended. This judgment can be achieved through a periodic background batch task, which scans all sessions in an "active" state, checks the difference between the last message time and the current time, and marks sessions exceeding the threshold as "ended." In this way, multiple discrete, complete dialogue events can be segmented from a continuous chat stream.

[0048] In addition, when locating and extracting multi-turn dialogues centered on questions from ended sessions, it is necessary to identify "questioning sessions" in the ended sessions. This identification mechanism is usually achieved by identifying the message attributes or patterns that initiate the session. For example, a message that is not quoted and contains obvious question sentences or help-seeking semantics can be initially determined as the starting point of a question.

[0049] Furthermore, the dialogue thread can be reconstructed through explicit associations between conversation messages. By analyzing each message within the conversation and extracting its "reference message identifier" and "mentioned user identifier" fields, a strong association is established between a message that references another message or directly "@" a user. By tracing these associations, all subsequent messages linked through direct or indirect references or mentions, with the questioner's initial message as the root node, can be extracted to form a logically multi-turn dialogue sequence. This process ensures that even if questions and answers are separated by irrelevant comments from other people, they can still be correctly linked together.

[0050] Furthermore, the extracted multi-turn dialogues need to be post-processed to generate the final standardized dialogue groups. This generation process is achieved through key operations such as aggregation and deduplication. Specifically, all extracted messages belonging to the same question session are sorted according to their original timestamps and aggregated into a single dialogue group data object. To address the complexity of real-world scenarios, such as dialogues spanning multiple days, message completion logic is implemented to ensure that messages scattered due to date segmentation are merged into the same dialogue group. In addition, to address the situation where delayed responses may lead to the same question being identified in multiple dialogue groups, a dialogue group deduplication strategy is executed. This deduplication strategy calculates the similarity or inclusion relationship of message sets contained in different dialogue groups. If a new dialogue group completely contains the core messages of an older dialogue group, it is considered a duplicate, and the older, incomplete dialogue group records are automatically removed, retaining only the latest version with the most complete information. Each ultimately generated dialogue group contains a globally unique identifier, a sequentially arranged complete message chain, and related metadata, providing data preparation for knowledge generation.

[0051] You can also view Figure 3 , Figure 3 This is a detailed step diagram of step S30 in the first embodiment, based on the shown... Figure 3 The step of inputting the dialogue group into a large language model and guiding the large language model to generate structured question-answer pairs through prompt words includes S31-33: Step S31: Identify the dialogue type of the dialogue group and obtain the control instructions corresponding to the dialogue type; Step S32: Generate prompt words based on the control instructions, and input the prompt words into the large language model; Step S33: Guide the large language model to recognize the context of the dialogue group through the prompt words, and output the recognition result of the context in a structured format.

[0052] In this embodiment, in the refined control process that guides the large language model to generate structured question-answer pairs, scenario analysis is performed on the dialogue content based on the conversation information. The optimal generation strategy is dynamically adapted according to the analysis results. The instruction set guides the large speech model to accurately understand the context of the dialogue and forces the large language model to output the results in a machine-parseable standard format, thereby improving the accuracy, stability and standardization of knowledge extraction.

[0053] In a specific implementation, before submitting the dialogue group to the large language model, a preliminary analysis is performed on the dialogue content of the dialogue group to identify the specific dialogue type or potentially complex scenario to which the dialogue content belongs. This preliminary analysis can be implemented based on a rule-based detector or a lightweight classification model. Specifically, the message text in the dialogue group is scanned to check for specific code block markers, SQL keywords, file paths, or image references, thus identifying scenarios that "contain code-like content."

[0054] Simultaneously, by detecting potentially fixed knowledge-sharing format templates in conversation messages, scenarios of "infiltrating existing knowledge sharing" are identified. Furthermore, by analyzing dialogue rounds and message lengths, risk scenarios of "long texts being easily truncated" are predicted. Based on this identification result, a set of dedicated control instructions matching the dialogue type is obtained from a predefined instruction library, and the core components of the prompt words are constructed using this set of dedicated control instructions.

[0055] In practical implementation, prompt words are dynamically assembled and model parameters are configured based on control instructions. A basic prompt word template is maintained, which defines the model role, core task description, and general output format requirements. For example, the basic prompt word template requires the large language model to summarize questions and answers from the dialogue and output them in JSON format. Based on the control instructions obtained above, specific constraints are inserted into the basic prompt word template. Specifically, if the scenario is identified as "containing code-like content," the control instruction is added; if it is identified as "when the dialogue contains program code, SQL statements, or configuration scripts, the code snippets are preserved intact in the answer without summarization or modification," and if it is identified as "included knowledge sharing," the control instruction "if the dialogue includes well-formatted question-and-answer content for examples, ignore the example content and summarize the actual questions asked by the current user" is added. At the same time, based on the text length of the dialogue group, key parameters of the large language model are dynamically adjusted, such as max_tokens (maximum number of tokens generated), to ensure sufficient space is reserved for the output of the large language model and to prevent the answer from being truncated due to length limitations.

[0056] Furthermore, during the execution of the large language model call and parsing of its structured output, the assembled complete prompt words containing contextual instructions and the formatted dialogue group context are submitted to the large language model's application programming interface. Guided by the complete prompt words, the large language model performs dialogue understanding and knowledge extraction tasks. The final output generated by the large language model is enforced to a predefined structured format, such as a strict JSON object: {"question": "...", "answer": "..."}. Upon receiving the final output, a JSON parser is invoked to parse the output result. If parsing is successful, the contents of the "question" and "answer" fields are extracted to form a preliminary structured question-answer pair. If parsing fails, it indicates that the large language model may not have strictly adhered to the format instructions, and the output result is marked as abnormal and processed accordingly (such as logging, retrying, or transferring to manual processing). Through this closed-loop control, high-quality and automated conversion from free dialogue to structured knowledge is ensured.

[0057] Based on the above Figure 3 The content of step S33 is further refined, namely, the step of guiding the large language model to recognize the context of the dialogue group through the prompt words and outputting the recognition result of the context in a structured format, including S33-1 to S33-2: Step S33-1: Guide the large language model to parse the logical relationship between each conversation message in the dialogue group through the prompt words, and extract the question intent and the corresponding answer content from the parsing results; Step S33-2: Generate a question-and-answer pair by combining the question intent and the corresponding answer content, encapsulate the question-and-answer pair according to a preset key-value pair, and output the question-and-answer pair.

[0058] In this embodiment, the constructed large language model completes context recognition and outputs structured question-answer pairs under the guidance of prompt words. Specifically, the large language model performs deep semantic analysis and logical reconstruction on the entire input dialogue group, accurately locates the core question intent and its corresponding answer content block, and then standardizes and encapsulates these two elements to generate machine-readable and uniformly formatted structured knowledge entries.

[0059] In the specific implementation process, the large language model performs deep semantic analysis and information extraction on the dialogue group. When the assembled prompt words and formatted dialogue group context are input into the large language model, the large language model activates its natural language understanding and reasoning capabilities according to control instructions. By analyzing the inherent logical relationships between multiple conversational messages in the dialogue group, the large language model understands the progression of the dialogue. This progression includes identifying conversational messages that initiate the question, direct answers and supplementary explanations or follow-up questions, and conversational messages that belong to unrelated interjections or parallel topics. In this process, the large language model relies on the quotations or @ symbols on the message surface and uses semantic analysis to determine the response, support, opposition, or transition relationships between conversational messages. Based on the construction of this logical relationship network, the large language model performs two key extraction operations: condensing and summarizing the user's fundamental questioning intent from the initiation part of the dialogue or the core of multiple follow-up questions; and locating, filtering, and integrating all message content that constitutes a complete solution in the subsequent dialogue flow to form accurate and coherent answer content.

[0060] In addition, the extracted semantic elements are structured, encapsulated, and output. After successfully extracting the question intent and answer content, the large language model must strictly follow the predefined output format instructions in the prompt words to generate a standardized question-answer pair. Specifically, the large language model assigns a preset key, such as "question," to the textual expression of the question intent, and another preset key, such as "answer," to the integrated answer content text. Subsequently, the large language model assembles the above preset key-value pairs according to the data encapsulation format. A typical output result is: {"question": "summarized question text", "answer": "integrated answer text"}. The above encapsulation process is mandatory, and the prompt words usually contain explicit instructions such as "please strictly follow the following JSON format" to ensure the structural consistency of the output results. Finally, the large language model returns the encapsulated structured data to the calling system through the application programming interface. After receiving this structured data response, the backend service immediately performs format verification and parsing. If the parsing is successful, a structured knowledge unit is generated and awaits the subsequent review process.

[0061] Furthermore, the step of guiding the large language model to parse the logical relationships between the conversation messages in the dialogue group through the prompt words includes: Identify the explicit relationships between messages in the dialog group; Based on preset session lifecycle rules and the timestamp sequence of each message, the session status of each message is determined; Based on the explicit association and the session state, retrieve the session messages of the same complete question-and-answer session from the original message sequence of the dialogue group; Add a logical association identifier to the captured session messages.

[0062] In this embodiment, by combining explicit signals that the algorithm can recognize with preset session management rules, a subset of messages belonging to the same complete question-and-answer session is automatically reconstructed from the original message sequence of the dialogue group, and logical relationships are labeled for the message subset, thereby providing a preliminary structured and logically clear input context for the upper-level large language model and reducing the understanding burden of the model.

[0063] In the specific implementation process, the explicit relationships between each conversation message in the dialogue group are identified. The metadata fields of each conversation message are processed automatically. The explicit relationships include referencing relationships and mention relationships. The referencing relationship determines that the conversation message is a direct reply to a specific historical message by parsing the "referencing message identifier" field. The mention relationship determines one or more conversation participants that the conversation message intends to point to by parsing the "mentioned user identifier" field. A temporary relationship graph is constructed, where nodes represent messages and edges represent the explicit relationships, providing a solid foundation for subsequent conversation clustering.

[0064] Secondly, based on preset session lifecycle rules and the timestamp sequence of each session message, the session status of each session message is determined. All session messages are sorted according to their timestamps. Simultaneously, relevant session message rules, such as "if no new related replies are sent within a preset time after the last related message under a certain question topic is sent, the session ends," are applied to divide the message flow into session stages. Specifically, by tracking the chain of related messages starting from an initial question message and determining the most recent activity time of that chain, the session stage to which all session messages on that chain belong is dynamically marked (e.g., "active" or "ended"). This positioning is crucial for accurately extracting complete question-and-answer units from long-span group chat records.

[0065] Next, based on the explicit associations and the session state, session messages for the same complete question-and-answer session are retrieved from the original message sequence of the dialogue group. Combining the aforementioned relationship graph and session state markers, a message retrieval algorithm is executed. This algorithm starts from the message node identified as the "question" node and traverses along reference and mention edges, collecting all directly or indirectly related reply messages until a session boundary marked "ended" is reached or a message with no further new association edges is encountered. This process ensures that the retrieved message subset logically constitutes a closed, complete question-and-answer interaction unit.

[0066] Finally, logical association markers are added to the captured conversation messages. To clearly convey the results of the message capture algorithm to the subsequent large language model, the captured message sequences are enhanced. For example, logical association markers such as "question," "reply-direct quote," "reply-indirect association," and "follow-up question" are added before the text of each message. Alternatively, when the message list is input into the large language model, explanatory text paragraphs describing the response structure between messages are included. The output of this step is a set of messages that have undergone preliminary logical annotation and are focused on a single question-and-answer topic, greatly improving the efficiency and accuracy of the subsequent large language model in understanding the dialogue context.

[0067] Furthermore, you can also view Figure 4 , Figure 4 This is a flowchart illustrating the second embodiment of the group chat knowledge automated extraction method based on a large language model according to this application. In this embodiment, before the step of inputting the dialogue group into a large language model and guiding the large language model to generate structured question-and-answer pairs from the dialogue group using prompt words, steps S40-50 are further included: Step S40: Calculate the message length of the dialogue group; Step S50: Dynamically adjust the data output length parameter of the large language model based on the statistically obtained message length.

[0068] In this embodiment, the input dialogue group is quantitatively evaluated, and the generation constraint parameters of the large language model are adaptively configured according to the evaluation results. This is to fundamentally prevent the knowledge content from being truncated or generated incompletely due to the output length limitation of the large language model, thereby ensuring the structural integrity and information completeness of the extracted question-answer pairs.

[0069] In the specific implementation process, the message length of the dialogue group is accurately counted. This accurate counting requires a metric compatible with the tokenization method used by the large language model to process text. From the received structured dialogue group object, the body text of all sequentially arranged conversation messages within the dialogue group is extracted. Subsequently, a tokenizer matching the large language model is invoked to process the concatenated complete dialogue text. The tokenizer segments the text into basic units (i.e., tokens) recognizable by the model. The system calculates the number of these tokens to obtain the message length of the dialogue group (usually measured in token count), directly reflecting the complexity of the dialogue group's internal representation within the model and the context window resources it occupies. Simultaneously, the number of characters in the text is calculated in parallel as an auxiliary reference indicator, and metadata such as the number of independent messages contained in the dialogue group is recorded, providing multi-dimensional data support for subsequent fine-tuning.

[0070] In practice, based on the statistically obtained length information, the key output control parameters in the large language model's API are dynamically adjusted. The large language model's API provides a parameter (e.g., max_tokens or max_new_tokens) to control the maximum length of the generated text. A preset parameter adjustment strategy mapping table or calculation formula is used to reserve sufficient "space" for the large language model to generate answers that may be more lengthy than the problem description.

[0071] Specifically, the statistically obtained message length is used as an input variable and calculated through predetermined logic. A typical strategy for this calculation is to set a base output guarantee length, and then increase it proportionally based on the input length. Specifically, the adjusted `max_tokens` parameter value = base output token count + message length × expansion coefficient. Here, the base output token count is used to guarantee the generation of the shortest answer, and the expansion coefficient is a value less than 1 set based on historical experience data, reflecting the typical degree of condensation or expansion of the "answer" relative to the "question and dialogue history." Furthermore, the typical calculation strategy includes a security boundary check, which ensures that the calculated parameter value does not exceed the global upper limit allowed by the called large language model version, while avoiding setting it too high to prevent unnecessary response time delays and wasted computing resources. Finally, the dynamically calculated parameter value, along with the dialogue group content and assembled prompts, is submitted to the large language model service. Through the automated adjustment mechanism shown, the most suitable generation constraints can be intelligently adapted for dialogues with different amounts of information, providing underlying technical guarantees for high-quality and complete knowledge extraction.

[0072] You can also view Figure 5 , Figure 5 This is a detailed step diagram of step S50 in the second embodiment, based on the shown... Figure 5 The step of dynamically adjusting the data output length parameter of the large language model based on the statistically obtained message length includes S51~54: Step S51: Calculate the basic output data length based on the message length of the dialogue group; Step S52: Identify the linguistic complexity features of the dialogue group, including the number of dialogue turns, whether it contains program code blocks, and whether it contains multi-domain terms; Step S53: Determine the adjustment coefficient based on the language complexity features, and calculate the target output data length based on the basic output data length and the adjustment coefficient; Step S54: Set the target output data length to the data output length parameter of the large language model.

[0073] In this embodiment, during the process of finely calculating and setting the output length parameter of the large language model data in dynamic adjustment, a multi-factor driven, quantifiable parameter prediction model is constructed to intelligently derive the optimal output length limit that can both ensure the integrity of the answer and take into account the generation efficiency.

[0074] The base output data length is derived by statistically analyzing the message length of the dialogue group (usually expressed in tokens). This base output data length calculation essentially provides a baseline expectation for answer generation that matches the input size. A direct calculation method involves setting a fixed proportional relationship to calculate the product: base output data length = message length × α, where α is an empirical coefficient derived from historical question-and-answer pairs, representing the average proportion of the answer length relative to the question and its historical context. Alternatively, a piecewise function or lookup table method can be used. Specifically, a mapping table is pre-defined to map different input message length ranges to corresponding suggested base output lengths. For example, when the input length is 0-500 tokens, the base output length is set to 300 tokens; when the input is 501-1000 tokens, the base output length is set to 500 tokens.

[0075] This study identifies the linguistic complexity of the dialogue groups and performs multi-dimensional analysis of their content to extract key indicators affecting the complexity of answer generation. First, it counts the number of dialogue rounds, i.e., the effective number of alternating speeches in the dialogue group. More rounds usually indicate a deeper discussion or follow-up questions, potentially requiring longer summaries. Second, it detects the presence of code blocks by scanning the message text for code separators, specific programming language keywords, or indentation structures. Specifically, answers containing code often require retaining the complete code segment, significantly increasing the necessary output length. Finally, it analyzes the presence of multi-domain terminology by matching the dialogue text with pre-built dictionaries of professional terms for various domains, or by using a lightweight text classification model to determine the number of domains involved in the text. The more diverse the domains involved, the more explanatory content is likely to be required.

[0076] Furthermore, the target output data length is calculated based on complex features. An adjustment coefficient (or complexity factor) is assigned to each identified linguistic complexity feature, reflecting the amplification effect of that feature on the desired output length. For example, the adjustment coefficient increases by 0.05 for each additional round of effective dialogue; by 0.3 if a program code block is included; and by 0.15 if multi-domain terms are identified. These adjustment coefficients can be accumulated. The target output data length is then calculated using the formula: Target output data length = Base output data length × (1 + Accumulated adjustment coefficient). In addition, this calculation process needs to incorporate range constraints on the results to ensure that the final length is within a preset reasonable range.

[0077] Finally, the calculated target output data length value is set as the data output length parameter (such as max_tokens) when calling the large language model application programming interface. When assembling the large language model call request, the dynamically calculated value is assigned to the corresponding parameter field. This process directly determines the maximum space allowed for the large language model when generating answers. Through the above chained calculation, adaptive and precise configuration of generation constraints is achieved from both the "quantity" (length) and "quality" (complexity) aspects of the original dialogue, providing technical parameter guarantees for the complete and lossless extraction of core knowledge content.

[0078] Based on the above Figure 5 The content described in step S53 is further refined, including steps S53-1 to S53-3: Determining adjustment coefficients based on the language complexity features, and calculating the target output data length based on the basic output data length and the adjustment coefficients. Step S53-1: Analyze the feature points in the complex features of the language and set weight factors for the feature points; Step S53-2: Determine the feature points based on the language performance of the dialogue group, and determine the sub-coefficients of the feature points based on the language performance; Step S53-3: Calculate the initial adjustment coefficient of the feature point based on the weight factor and sub-coefficient, and apply a preset threshold limit to the initial adjustment coefficient to obtain the adjustment coefficient.

[0079] In this embodiment, the data processing logic of the core calculation sub-process of the adjustment coefficient is to decompose the comprehensive linguistic complex features into independent feature points, and establish a standardized calculation rule from qualitative identification to quantitative assignment for each feature point. Finally, through weighted summarization and boundary constraints, a stable and controllable adjustment coefficient is obtained, making the prediction model of the output length more interpretable and adaptable.

[0080] In the specific implementation process, feature point parsing and weight initialization are performed. The identified complex linguistic features are treated as a feature set, and each quantifiable dimension is defined as an independent feature point. Specifically, the number of dialogue turns is a scalar value and can be used as a feature point; the inclusion of program code blocks is a Boolean feature and can be used as another feature point; multi-domain terms are further decomposed into the scalar feature point of the number of domains involved. For each of the above feature points, its corresponding weight factor is read from the pre-configured strategy. The weight factor represents the global importance of the feature point to the final output length and is usually preset based on historical data regression analysis or domain expert experience. For example, the weight factor for "includes program code blocks" can be set to 0.30, while the weight factor for "each dialogue turn" can be set to 0.05.

[0081] In addition, the specific performance of feature points is evaluated and sub-coefficients are calculated. For each feature point, its specific linguistic performance in the current dialogue group needs to be evaluated, and a sub-coefficient is calculated accordingly. For scalar feature points (such as the number of dialogue turns), the sub-coefficient can have a linear or non-linear relationship with the linguistic performance. For example, the following settings can be made for the number of dialogue turns: 0 for turns 1-3; 0.15 for turns 4-6; and 0.25 for turns 7 and above. For Boolean feature points (such as whether a code block is included), if "yes," the sub-coefficient takes a fixed value (e.g., 1.0); if "no," it is 0. For "number of domains involved," a sub-coefficient of 0.1 can be set for each domain, with an upper limit of 0.4.

[0082] In addition, adjustment coefficients are synthesized and constraints are imposed. For each feature point, an initial adjustment coefficient component is calculated, with the formula: Initial adjustment coefficient component = feature point weight factor × feature point sub-coefficient. Then, the initial adjustment coefficient components of all feature points are summed to obtain the total initial adjustment coefficient. To prevent the coefficients from being too large or too small in extreme cases, leading to uncontrolled output length, a preset threshold limit is imposed on the sum. For example, the lower limit of the total adjustment coefficient is set to 0, and the upper limit is set to 1.0. The final adjustment coefficient is limited to the interval [0, 1.0] using the function clamp(initial adjustment coefficient, 0, 1.0). This threshold-limited adjustment coefficient is ultimately used to synthesize with the basic output data length to calculate the target output data length that reflects both dialogue complexity and robustness.

[0083] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the method for automated extraction of group chat knowledge based on large languages. Any simple modifications based on this technical concept are within the scope of protection of this application.

[0084] This application provides a group chat knowledge automatic extraction device based on big language. The group chat knowledge automatic extraction device based on big language includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the group chat knowledge automatic extraction method based on big language in the above embodiment 1.

[0085] The following is for reference. Figure 7The diagram illustrates a structural schematic of a group chat knowledge automated extraction device based on large language, suitable for implementing embodiments of this application. The group chat knowledge automated extraction device based on large language in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7 The illustrated automated knowledge extraction device for group chats based on large language is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0086] like Figure 7 As shown, the automated knowledge extraction device for large language-based group chats may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the automated knowledge extraction device for large language-based group chats. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the large language-based group chat knowledge automatic extraction device to communicate wirelessly or wiredly with other devices to exchange data. Although the figure shows a large language-based group chat knowledge automatic extraction device with various systems, it should be understood that it is not required to implement or possess all the systems shown. More or fewer systems can be implemented alternatively.

[0087] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0088] The automated group chat knowledge extraction device based on large language provided in this application employs the automated group chat knowledge extraction method based on large language in the above embodiments, which can solve the technical problem of low efficiency caused by the reliance on manual labor in existing group chat knowledge extraction. Compared with the prior art, the beneficial effects of the automated group chat knowledge extraction device based on large language provided in this application are the same as the beneficial effects of the automated group chat knowledge extraction method based on large language provided in the above embodiments, and other technical features in the automated group chat knowledge extraction device based on large language are the same as the features disclosed in the previous embodiment method, and will not be repeated here.

[0089] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0090] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0091] This application provides a storage medium, which is a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, which are used to execute the automated knowledge extraction method for group chat based on big language in the above embodiments.

[0092] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0093] The aforementioned computer-readable storage medium may be included in a large language-based group chat knowledge automatic extraction device; or it may exist independently and not be assembled into a large language-based group chat knowledge automatic extraction device.

[0094] The aforementioned computer-readable storage medium carries one or more programs. When the aforementioned one or more programs are executed by the large language-based group chat knowledge automatic extraction device, the large language-based group chat knowledge automatic extraction device implements the technical content of the above-described embodiment of the large language-based group chat knowledge automatic extraction method.

[0095] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0096] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0097] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0098] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described automated group chat knowledge extraction method based on large language. This solves the technical problem of low efficiency caused by the reliance on manual labor in existing group chat knowledge extraction methods. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the automated group chat knowledge extraction method based on large language provided in the above embodiments, and will not be repeated here.

Claims

1. A method for automatically extracting knowledge from group chats based on large language, characterized in that, The automated knowledge extraction method for group chats based on large language includes the following steps: Obtain real-time chat message data from the target group chat; Identify the same question in the real-time chat data, aggregate the identification results into multi-turn dialogues, and generate a dialogue group based on the multi-turn dialogues; The dialogue group is input into a large language model, and prompt words guide the large language model to generate structured question-answer pairs from the dialogue group; Once the question-and-answer pair is confirmed to meet the preset review conditions, the question-and-answer pair is stored in the knowledge base.

2. The method for automated knowledge extraction from group chats based on large language as described in claim 1, characterized in that, The steps of identifying the same question in the real-time chat data, aggregating the identification results into multi-turn dialogues, and generating dialogue groups based on the multi-turn dialogues include: Identify the dialogue information in the real-time chat data, and based on the preset conversation end judgment rule, identify the conversations that have ended in the real-time chat data; Locate the questioning session in the ended session, and extract the multi-turn dialogue based on the questioning session from the dialogue information; The multi-turn dialogue is used to generate a dialogue group.

3. The method for automated knowledge extraction from group chats based on large language as described in claim 1, characterized in that, Before the step of inputting the dialogue group into the large language model and guiding the large language model to generate structured question-answer pairs through prompt words, the method further includes: Calculate the message length of the dialogue group; Based on the statistically obtained message length, the data output length parameter of the large language model is dynamically adjusted.

4. The method for automated knowledge extraction from group chats based on large language as described in claim 3, characterized in that, The step of dynamically adjusting the data output length parameter of the large language model based on the statistically obtained message length includes: Calculate the basic output data length based on the message length of the dialogue group; Identify the linguistic complexity features of the dialogue group, including the number of dialogue turns, whether it contains program code blocks, and whether it contains multi-domain terms; The adjustment coefficient is determined based on the language complexity features, and the target output data length is calculated based on the basic output data length and the adjustment coefficient. Set the target output data length to the data output length parameter of the large language model.

5. The method for automated knowledge extraction from group chats based on large language as described in claim 4, characterized in that, The steps of determining adjustment coefficients based on the language complexity features and calculating the target output data length based on the base output data length and the adjustment coefficients include: Analyze the feature points in the complex features of the language and set weight factors for the feature points; The feature points are determined based on the language performance of the dialogue group, and the sub-coefficients of the feature points are determined based on the language performance. The initial adjustment coefficient of the feature point is calculated based on the weighting factor and sub-coefficient, and the initial adjustment coefficient is subject to a preset threshold limit to obtain the final adjustment coefficient.

6. The method for automated knowledge extraction from group chats based on large language as described in claim 1, characterized in that, The step of inputting the dialogue group into a large language model and guiding the large language model to generate structured question-answer pairs through prompt words includes: Identify the dialogue type of the dialogue group and obtain the control instructions corresponding to the dialogue type; Based on the control instructions, prompt words are generated and input into the large language model; The prompt words guide the large language model to recognize the context of the dialogue group, and the recognition result of the context is output in a structured format.

7. The method for automated knowledge extraction from group chats based on large language as described in claim 6, characterized in that, The steps of guiding the large language model to recognize the context of the dialogue group through the prompt words and outputting the recognition results of the context in a structured format include: The prompt words guide the large language model to parse the logical relationships between the conversation messages in the dialogue group, and extract the question intent and the corresponding answer content from the parsing results; The question intent and the corresponding answer content are generated into a question-answer pair, the question-answer pair is encapsulated according to a preset key-value pair, and the question-answer pair is output.

8. The method for automated knowledge extraction from group chats based on large language as described in claim 7, characterized in that, The step of guiding the large language model to parse the logical relationships between conversation messages in the dialogue group using the prompt words includes: Identify the explicit relationships between messages in the dialog group; Based on preset session lifecycle rules and the timestamp sequence of each message, the session status of each message is determined; Based on the explicit association and the session state, retrieve the session messages of the same complete question-and-answer session from the original message sequence of the dialogue group; Add a logical association identifier to the captured session messages.

9. A group chat knowledge automatic extraction device based on large language, characterized in that, The automated knowledge extraction device for group chats based on large language stores a computer program, which, when executed by a processor, implements the automated knowledge extraction method for group chats based on any one of claims 1-8.

10. A storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the automated knowledge extraction method for group chats based on large language as described in any one of claims 1-8.