Chat record image label full quantity extraction method and related device
Patent Information
- Application Number
- CN202610833954.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-10
- Publication Date
- 2026-09-25
AI Technical Summary
[0003]当前主流的聊天记录画像标签分析技术,整体采用固定窗口分片、多标签并行分析、投票聚合决策的线性处理流程方案,存在的问题是:固定分片导致低频标签场景稀疏,标签严重遗漏,单个切片内可能完全不出现某些标签场景,当所有切片均未出现时该标签在最终结果中完全丢失,无法实现全量标签覆盖,画像维度残缺、评估不完整;投票聚合丢弃败方依据,被丢弃的内容往往包含销售沟通中的真实问题与可改进点,这些关键缺陷信息被彻底抹除,导致画像结果只能展示优势、无法暴露问题,丧失对销售能力提升的指导价值;硬切分破坏对话的语义连贯性,同一话题、同一情绪、同一逻辑的表达常常跨越切片边界,大语言模型在分析时缺少必要上下文,无法准确理解意图、情绪与逻辑关系,进而出现误判、漏判、依据提取不完整,分析准确性下降;未对无价值内容进行过滤,聊天记录中包含的纯表情消息、纯标点符号、空白消息、系统提示消息以及无文字的图片、文件、链接、名片消息直接送入模型,不仅大幅增加无效消耗、提升成本、降低速度,还容易导致模型将无意义内容误判为标签依据,进一步降低分析准确性;大语言模型输出格式不稳定,直接输出JSON结构化结果存在格式语法错误、必需字段缺失、标签名称与预设不一致、轮次编号数据类型错误、输出内容被截断、附带多余注释文本等问题,导致下游自动化系统无法解析,需要人工介入修复,严重降低系统的工程可靠性、稳定性与自动化程度
通过调用训练完成的大语言模型对序列化聊天记录进行全文扫描,为每个预设标签维度获取相关轮次索引集合,能够避免固定分片造成的标签遗漏,实现全量标签覆盖。基于相关轮次索引集合构造包含上下文扩展的聚焦分析文本,保持对话语义连贯,避免硬切分带来的上下文断裂,提升标签判定准确性。采用对聚焦分析文本进行单一预设标签维度分析的方式,得到正面依据列表和反面依据列表,降低分析复杂度,提高依据提取的完整度。对正面依据列表和反面依据列表所含依据分别去重后进行依据数量对比,确定最终判定结果,同时完整保留正反双向依据,不丢弃少数方依据,为销售沟通问题的定位和改进提供完整信息。最终组装生成的聊天记录画像标签全量提取结果,能够全面、可信地反映销售与客户沟通的多维度表现。
Smart Images

Figure CN122819216A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of chat history profile tag analysis technology, and in particular to a method and related equipment for full extraction of chat history profile tags. Background Technology
[0002] As enterprises deepen their digital transformation, instant messaging tools have become the core carriers for customer communication, demand matching, problem handling, and relationship maintenance in enterprise sales scenarios. Sales personnel generate massive, continuous, and high-information-density chat logs with customers throughout the entire process of customer acquisition, follow-up, closing, and after-sales service. These chat logs comprehensively record the salesperson's verbal expressions, emotional transmissions, logical reasoning, problem responses, and customer interaction attitudes, while also containing key information such as customer needs, emotional attitudes, praise / criticism, and willingness to cooperate. They are the core data source for building salesperson capability profiles, service quality profiles, and customer relationship profiles. Based on this data value, enterprises need to automate, scale, and standardize the analysis of sales-customer chat logs to extract multi-dimensional tags for use in business scenarios such as sales capability assessment, new employee training optimization, script improvement, performance evaluation, and service compliance checks. However, how to extract multi-dimensional tags accurately and completely from massive, continuous chat logs while ensuring the completeness of the data and the usability of the results remains a pressing technical challenge.
[0003] Current mainstream chat log profiling and tagging analysis technologies generally employ a linear processing flow of fixed-window segmentation, multi-tag parallel analysis, and voting aggregation decision-making. This approach has several drawbacks: fixed segmentation leads to sparse low-frequency tag scenarios, resulting in significant tag omissions. Certain tag scenarios may be completely absent within a single segment, and when they are absent across all segments, they are completely lost in the final result, failing to achieve full tag coverage and resulting in incomplete profiling dimensions and assessments. Voting aggregation discards evidence of the losing side, often including real problems and areas for improvement in sales communication. This complete erasure of crucial defect information means the profiling results only showcase strengths, failing to expose problems and thus losing its guiding value for improving sales capabilities. Furthermore, hard segmentation disrupts the semantic coherence of the dialogue. Expressions of the same topic, emotion, and logic often cross segment boundaries, leaving large language models without necessary context during analysis. The model fails to accurately understand intent, emotion, and logical relationships, leading to misjudgments, omissions, and incomplete data extraction, thus reducing analytical accuracy. Furthermore, the lack of filtering for worthless content, including pure emoji messages, pure punctuation, blank messages, system prompts, and textless images, files, links, and business cards, directly feeds these messages into the model. This significantly increases wasted resources, raises costs, and slows down the process. It also easily causes the model to misclassify meaningless content as tag data, further reducing analytical accuracy. The large language model's output format is unstable; directly outputting JSON structured results results in errors such as syntax errors, missing required fields, inconsistent tag names with presets, incorrect round number data types, truncated output, and redundant annotation text. These issues prevent downstream automated systems from parsing the data, requiring manual intervention and severely reducing the system's engineering reliability, stability, and automation level.
[0004] Therefore, it is necessary to design a chat log profile tag extraction method that can achieve full tag coverage, full data retention, unbroken context, and reliable output. Summary of the Invention
[0005] This invention aims to address the shortcomings of existing technologies, specifically providing a method and related equipment for full extraction of chat history profile tags, as detailed below: 1) In a first aspect, the present invention provides a method for full extraction of chat history profile tags, the specific technical solution of which is as follows: The obtained complete chat logs are preprocessed to obtain serialized chat logs that retain round numbers; The trained large language model is invoked to perform a full-text scan of the serialized chat history and obtain the relevant round index set corresponding to each preset tag dimension; Based on the relevant round index set, a focused analysis text containing context expansion is constructed for each preset label dimension. The trained large language model is then called to perform single preset label dimension analysis on the focused analysis text to obtain a list of positive and negative evidence for each preset label dimension. For each preset label dimension, the positive and negative evidence lists are deduplicated, and the number of evidences in the positive and negative evidence sets of each preset label dimension is compared to determine the final judgment result for each preset label dimension. The final judgment results, positive basis set, and negative basis set for each preset tag dimension are assembled to generate the full extraction results of chat history profile tags.
[0006] The beneficial effects of the method for full extraction of chat history profile tags provided by this invention are as follows: By calling a trained large language model to perform a full-text scan of serialized chat logs, relevant round index sets are obtained for each preset tag dimension, avoiding tag omissions caused by fixed segmentation and achieving full tag coverage. Based on the relevant round index sets, focused analysis text with contextual expansion is constructed to maintain semantic coherence in the dialogue, avoid contextual breaks caused by hard segmentation, and improve tag determination accuracy. A single preset tag dimension analysis method is used on the focused analysis text to obtain positive and negative evidence lists, reducing analysis complexity and improving the completeness of evidence extraction. After deduplication of evidence in the positive and negative evidence lists, the number of evidences is compared to determine the final judgment result. Simultaneously, both positive and negative evidence are fully retained, without discarding minority evidence, providing complete information for locating and improving sales communication issues. The final assembled chat log profile tag extraction results can comprehensively and reliably reflect the multi-dimensional performance of sales and customer communication.
[0007] Based on the above solution, the method for full extraction of chat history profile tags of the present invention can be further improved as follows.
[0008] Furthermore, the trained large language model is invoked to perform a full-text scan of the serialized chat records, obtaining the relevant round index set corresponding to each preset tag dimension. This includes: constructing pre-scan prompts, which contain the names and definitions of each preset tag dimension, output data target format constraints, fallback instructions, and lenient policy instructions; inputting the serialized chat records and pre-scan prompts into the trained large language model, and performing a first check on the output of the trained large language model, including format validity, required fields, tag name consistency, and data type, to obtain the relevant round index set corresponding to each preset tag dimension that passes the check.
[0009] The beneficial effects of adopting the above-mentioned further scheme are as follows: By constructing pre-scan prompts containing the names and definitions of each preset tag dimension, output data target format constraints, fallback instructions, and lenient policy instructions, the trained large language model can perform full-text scanning of serialized chat records, accurately locate the relevant rounds for each preset tag dimension, the lenient policy instructions effectively reduce the probability of missing relevant rounds, and the fallback instructions ensure that each preset tag dimension returns output, preventing dimension loss. The output of the trained large language model undergoes a first check, including format validity, required fields, tag name consistency, and data type, ensuring that the output has a valid structure, contains all preset tag dimension round fields and description fields, the tag names are completely consistent with the presets, and the round number data type is correct. This reliably obtains the relevant round index set corresponding to each preset tag dimension, providing an accurate round location basis for subsequent focused analysis and avoiding process interruptions or location errors caused by abnormal output formats.
[0010] Furthermore, based on the relevant round index set, a focused analysis text with contextual expansion is constructed for each preset tag dimension. The trained large language model is then invoked to perform single preset tag dimension analysis on the focused analysis text, obtaining a positive and negative evidence list for each preset tag dimension. This includes: taking each round number in the relevant round index set corresponding to each preset tag dimension as the center, expanding the round numbers before and after it by a preset number of windows to obtain an extended round index set; extracting the dialogue content corresponding to the extended round index set from the serialized chat history and concatenating it to construct the focused analysis text for each preset tag dimension; inputting the focused analysis text and the constructed focused analysis prompts into the trained large language model, performing a first check on the output of the trained large language model, including format validity, required fields, tag name consistency, and data type, to obtain the initial positive and negative evidence lists for each preset tag dimension that pass the check; performing a second check on the initial positive and negative evidence lists, including authenticity, logical consistency, and redundancy checks, to obtain the initial positive and negative evidence lists for each preset tag dimension that pass the check.
[0011] The beneficial effects of adopting the above-mentioned further scheme are as follows: Taking each round number in the relevant round index set corresponding to each preset label dimension as the center, the round numbers of the preset number of windows are extended before and after it to obtain the extended round index set. This ensures the contextual coherence of the relevant dialogue and avoids misjudgment and omission of evidence caused by semantic breaks due to hard segmentation. The dialogue content corresponding to the extended round index set is extracted from the serialized chat history and concatenated to construct the focused analysis text, so that a single analysis has complete contextual information. The focused analysis text and focused analysis prompts are input into the trained large language model for single preset label dimension analysis, which reduces the task complexity of a single analysis and improves the accuracy of judgment and the comprehensiveness of evidence extraction. The first verification ensures that the output format is legal, the fields are complete, the label names are consistent, and the data types are correct, so as to reliably obtain the initial positive evidence list and the initial negative evidence list. By performing a second verification on the initial positive evidence list and the initial negative evidence list, including authenticity, logical consistency, and redundancy checks, fabricated, contradictory, and duplicate evidence is eliminated, so as to obtain a true, reliable, and logically consistent positive evidence list and negative evidence list.
[0012] Furthermore, a second verification is performed on the initial positive evidence list and the initial negative evidence list, including checks on authenticity, logical consistency, and redundancy. This includes: inputting the initial positive evidence list and the initial negative evidence list into the trained large language model, verifying one by one whether each piece of evidence truly exists in the serialized chat history, whether the analysis and explanation in each piece of evidence reasonably supports the positive or negative category to which the evidence belongs, and identifying and removing duplicate evidence that points to the same round number and has the same semantics.
[0013] The beneficial effects of adopting the above-mentioned further solutions are as follows: Inputting the initial positive and negative evidence lists into the trained large language model verifies the authenticity of each piece of evidence in the serialized chat logs, identifying and eliminating fabricated or rewritten evidence to ensure the authenticity of the evidence sources. Verifying the analysis and explanation in each piece of evidence to reasonably support its positive or negative category reveals and eliminates evidence with obvious contradictions or reasoning errors between the analysis and explanation and the category label, ensuring the logical consistency of the evidence. Identifying and eliminating duplicate evidence pointing to the same round number and having the same semantics avoids statistical bias caused by the same communication fact appearing multiple times in the evidence list. Through the above authenticity verification, logical consistency verification, and redundancy check, reliable, logically sound, and non-redundant positive and negative evidence lists are selected from the initial evidence list, providing a high-quality evidence foundation for subsequent evidence quantity comparison and final judgment.
[0014] Furthermore, the evidence contained in the positive and negative evidence lists for each preset tag dimension is deduplicated, including: for the evidence contained in the positive and negative evidence lists for each preset tag dimension, deduplication is performed according to the principle of retaining only one instance of the same dialogue content under the same round number.
[0015] The beneficial effects of adopting the above-mentioned further solution are as follows: For each preset label dimension, the evidence in the positive and negative evidence lists is deduplicated according to the principle of retaining only one instance of the same dialogue content under the same round number. This eliminates the problem of the same communication fact being counted multiple times due to overlapping context window expansions. When the focused analysis layer expands the context window for adjacent related rounds, the expansion range of different related rounds may cover the same round range, and the same dialogue content may be extracted multiple times and included in the same evidence list. Through the deduplication operation of the global aggregation layer, only one evidence with the same round number and dialogue content is retained in the positive and negative evidence lists. This ensures that each independent communication fact is counted only once in the evidence count, so that the number of positive and negative evidence used for subsequent evidence count comparisons truly reflects the number of different communication facts, avoiding distortion of the judgment results due to duplicate counting, and providing a reliable quantitative basis for the accuracy of the final judgment result.
[0016] Furthermore, the acquired complete chat logs undergo input preprocessing to obtain serialized chat logs with retained round numbers. This includes: using a rule engine combined with regular expressions to match the content of each message in the complete chat logs; identifying pure emoji messages, pure punctuation messages, blank messages, system prompt messages, and image messages, file messages, link messages, and business card messages without text content as invalid information; retaining the round number of the invalid message and marking its message content as filtered; and retaining the message content that is not identified as invalid information to form serialized chat logs.
[0017] The beneficial effects of adopting the above-mentioned further solution are as follows: By using a rule engine combined with regular expressions to match the content of each message in the complete chat log, it can automatically identify and determine that pure emoji messages, pure punctuation messages, blank messages, system prompt messages, and image messages, file messages, link messages, and business card messages without text content are invalid information. This prevents these content without analytical value from entering the subsequent processing flow, reduces the interference of invalid information on the trained large language model, lowers inference costs, and prevents the model from misjudging meaningless content as a label basis. The round number of the invalid message is retained, and the message content is marked as filtered, maintaining the integrity of the round order of the chat log and ensuring the accuracy of the round index during subsequent pre-scanning and focused analysis. Message content that is not determined to be invalid information is retained, forming a serialized chat log, providing standardized input data with a clear structure and continuous rounds for subsequent steps, improving the overall processing stability and efficiency.
[0018] Furthermore, after preprocessing the acquired complete chat records to obtain serialized chat records with retained round numbers, the process also includes: counting the number of message contents in the serialized chat records that are not marked as filtered; when the number is less than a preset threshold, it is determined that there are insufficient valid rounds, and no processing is performed to generate a full extraction result of chat record profile tags.
[0019] The beneficial effects of adopting the above-mentioned further scheme are as follows: The number of messages in the serialized chat logs that are not marked as filtered is counted. When this number is less than a preset threshold, it is determined that there are insufficient effective rounds, and the generation of full chat log profile tag extraction results is not performed. By setting a threshold for the number of effective rounds, forced analysis is avoided when there are too few dialogue rounds or insufficient effective information, preventing the extracted profile tags from lacking representativeness and reliability due to insufficient sample size. Simultaneously, the process is directly terminated and a prompt message is output when there are insufficient effective rounds, saving the inference computation resources of the trained large language model, avoiding meaningless deep processing of low-quality input, and improving the overall processing efficiency of the method. The pre-emptive check for the number of effective rounds provides a guarantee of data sufficiency for subsequent pre-scanning, focused analysis, and global aggregation layers, ensuring that the generated full extraction results are based on sufficiently rich dialogue information.
[0020] 2) Secondly, the present invention also provides a system for full extraction of chat history profile tags, the specific technical solution of which is as follows: It includes a preprocessing module, a scanning module, an analysis module, a determination module, and an assembly module; The preprocessing module is used to preprocess the acquired complete chat logs to obtain serialized chat logs that retain the round number; The scanning module is used to call the trained large language model to perform a full-text scan of the serialized chat history and obtain the relevant round index set corresponding to each preset tag dimension. The analysis module is used to construct focused analysis text with context expansion for each preset label dimension based on the relevant round index set, and call the trained large language model to perform single preset label dimension analysis on the focused analysis text to obtain the positive evidence list and negative evidence list for each preset label dimension. The determination module is used to deduplicate the evidence in the positive evidence list and negative evidence list of each preset label dimension, and compare the number of evidence in the positive evidence set and negative evidence set of each preset label dimension after deduplication to determine the final judgment result of each preset label dimension. The assembly module is used to assemble the final judgment results, positive basis set, and negative basis set for each preset tag dimension to generate the full extraction results of chat history profile tags.
[0021] 3) In a third aspect, the present invention also provides an electronic device, the electronic device including a processor coupled to a memory, the memory storing at least one computer program, the at least one computer program being loaded and executed by the processor, so as to enable the electronic device to implement any of the above-mentioned methods for full extraction of chat record profile tags.
[0022] 4) In a fourth aspect, the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements any of the above-mentioned methods for extracting full chat record profile tags.
[0023] It should be noted that the beneficial effects of the technical solutions of the second to fourth aspects of the present invention and their corresponding possible implementations can be found in the above description of the technical effects of the first aspect and its corresponding possible implementations, and will not be repeated here. Attached Figure Description
[0024] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments of the present invention will be briefly introduced below: Figure 1 This is a flowchart illustrating a method for extracting full chat history profile tags according to an embodiment of the present invention. Figure 2 This is a sample diagram illustrating the serialization of chat logs; Figure 3 This is a schematic diagram of a chat history profile tag full extraction system according to an embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0025] The principles and features of the present invention are described below. The examples given are only for explaining the present invention and are not intended to limit the scope of the present invention.
[0026] The technical solution of the present invention and how the technical solution of the present invention solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of the present invention will now be described with reference to the accompanying drawings.
[0027] like Figure 1 As shown in the figure, the method for extracting full chat history profile tags according to an embodiment of the present invention has the following overall architecture: input preprocessing layer, pre-scanning layer, focused analysis layer, and global aggregation layer, with dual output verification and secondary verification of the basis for assurance. This method takes the complete chat history between a salesperson and a customer as input. First, it filters out valueless content to purify the input; then, it uses full-text pre-scanning to accurately locate the relevant dialogue rounds for each tag, avoiding omissions in segmentation; subsequently, it adopts a "one tag, one analysis" strategy, combined with context window expansion to ensure semantic coherence, and uses a fallback method to ensure no tags are lost; in the output stage, it adds format verification and basis authenticity verification to ensure reliable results; finally, in the global aggregation stage, it determines the tag tendency by quantity, but retains all positive and negative evidence, achieving the technical goals of "full tag coverage, full evidence retention, unbroken context, and reliable output," including the following steps: S1. Perform input preprocessing on the obtained complete chat logs to obtain serialized chat logs that retain round numbers.
[0028] The preprocessing layer uses a rule engine combined with regular expressions to match the content of each message in the complete chat history. Messages consisting solely of emojis, punctuation marks, blank messages, system notifications, and images, files, links, or business cards without text content are identified as invalid. The round number of the invalid message is retained, and its content is marked as filtered. Messages not identified as invalid are retained, forming a serialized chat history. The specific implementation process is as follows: For invalid information that needs to be filtered, corresponding matching rules are predefined, and each type of rule is described using regular expressions or pattern matching strings. For pure emoticon messages, the rule is set as follows: the message text consists only of one or more emoticon identifiers and does not contain any text. For pure punctuation messages, the rule is set as follows: the message text consists entirely of punctuation characters, including Chinese punctuation, English punctuation, and whitespace characters other than spaces, but must not contain any letters, numbers, or Chinese characters, such as consecutive periods, exclamation marks, or commas. For blank messages, the rule is set as follows: the message text is an empty string or contains only invisible whitespace characters such as spaces, tabs, and newlines. For system notification messages, the rule is set as follows: the message text matches a preset list of system notification patterns. These patterns are automatically generated notification texts by the system, such as "The other party has withdrawn a message," "You have added the other party as a contact," "The group chat has been disbanded," etc. For image messages, file messages, link messages, and business card messages without text content, the rule is set as follows: the message body contains the corresponding media type identifier and the message text field is empty or contains only whitespace characters. That is, although the message carries non-text content such as images, files, links, or business cards, it does not include any text descriptions that can be analyzed. All of the above rules are deployed in the rule engine, which is responsible for scheduling the rules to judge each message in the order they are defined.
[0029] The acquired complete chat logs are unfolded into a message sequence according to the chronological order of the conversations. Each round of dialogue corresponds to a sender / receiver role and the corresponding message content. Starting from the first round of dialogue, each message is retrieved sequentially, and its content is fed into the rule engine. The rule engine matches the message content according to a preset rule order: if the message content matches the rule for pure emoji messages, the message is determined to be invalid; if it does not match, it continues to try the rule for pure punctuation messages, and if it matches, it is determined to be invalid; if it still does not match, it tries the rule for blank messages, system prompt messages, image messages without text, file messages without text, link messages without text, and business card messages without text in sequence. Once a rule is successfully matched, no further rule attempts are made, and the message is immediately determined to be invalid. If all rules fail to match, the message is considered valid, and the message content is retained.
[0030] For messages deemed invalid, they are not directly deleted from the chat history. Instead, the round number of the message remains unchanged, and the message content field is replaced with a fixed identifier marking the filtered status. This identifier can be a uniformly agreed-upon special string, such as "filtered," to clearly inform subsequent processing stages that this message will not be analyzed. Simultaneously, the round number is fully preserved, ensuring the chat history's round sequence remains completely consistent with the original dialogue, preventing disruption of the round order or number misalignment due to message content removal. If multiple messages exist within the same round, and some are deemed invalid, only those messages are marked as filtered; other messages in the same round remain unchanged. If all messages in a round are deemed invalid, all messages in that round are marked as filtered, and the round number is retained.
[0031] For all messages not deemed invalid, the original message content and corresponding round number are preserved. After traversing and marking all messages, a complete sequence of records with consecutive round numbers is obtained. Each record in the sequence contains a round number and message content, which may be the original dialogue text or a status indicator of a filtered state. This sequence of records is the serialized chat log, which will serve as the unified input for subsequent pre-scanning, focused analysis, and global aggregation. The serialized chat log completely preserves the round skeleton of the original dialogue while eliminating interference from content without analytical value, ensuring the accuracy of subsequent round indexes for each preset tag dimension and the consistency of cross-layer transmission.
[0032] To illustrate more specifically the data organization of serialized chat logs, using Figure 2 The example clip shown in the image will be used as an example for detailed explanation: Figure 2 The record sequence is arranged in ascending order of round number, with each round number identifying an independent round. Each round contains the message content sent by the seller and the customer in that round. Specifically, the round number of the first round (i.e., Figure 2 The value of the number "1" in "[Round 1]" is 1, and this round contains two messages: the first message comes from the seller (i.e. Figure 2 The message content of the “sales” section is marked as filtered (i.e., Figure 2 The "[Filtered]" indicates that this message was determined to be invalid information and replaced with a fixed identifier during the input preprocessing stage; the second message comes from the client (i.e. Figure 2 The message content of the "customer" in the second round (i.e., the original dialogue text "Hello") was not filtered. Figure 2The value of the number "2" in "[Round 2]" is 2. In this round, the seller's message content is the original dialogue text "How have you been lately?", and the customer's message content is the original dialogue text "Not bad". Both messages retain their original content. The round number of the third round (i.e. Figure 2 The value of the number "3" in "[Round 3]" is 3. In this round, both the seller's and customer's messages are marked as filtered, indicating that both messages in this round were determined to be invalid information and replaced with fixed identifiers during the input preprocessing stage. However, the round number is still retained to maintain the continuity of the round order. This continues until the Nth round. Thus, it can be seen that each round in the serialized chat log has a corresponding round number. Each message in each round is either the original dialogue text or a fixed identifier indicating the filtered state. Furthermore, the messages from the seller and customer are organized together according to the round, forming a standardized input data with continuous round numbers, a clear structure, and the removal of content with no analytical value. This provides an accurate and consistent round index foundation for subsequent pre-scanning, focused analysis, and global aggregation processing.
[0033] In this context, a rule engine refers to a software component that abstracts business decision-making logic into several conditional rules and executes matching according to priority. In the input preprocessing step, the rule engine is responsible for loading regular expression matching rules for various types of invalid information and performing rule judgment on each message content. If a match is found, the judgment result is output, thereby decoupling the complex filtering logic from the message traversal process, facilitating rule maintenance and expansion.
[0034] The filtered state refers to the state where invalid messages have their message content replaced with a fixed identifier after preprocessing. This identifier indicates that the corresponding message has been marked and excluded from the analysis process, but the round number of the round is still retained to maintain the integrity of the round structure of the chat history.
[0035] Serialized chat logs refer to a collection of records organized in round-number order after input preprocessing. Each record contains a round number and corresponding message content. Invalid messages are marked as filtered, while valid messages remain unchanged. Serialized chat logs serve as unified input data for all subsequent processing layers, ensuring the traceability of round indexes and the consistency of multi-step processing.
[0036] S2. Call the trained large language model to perform a full-text scan of the serialized chat history and obtain the relevant round index set corresponding to each preset tag dimension.
[0037] The pre-scanning layer is designed with a "localize first, then analyze" approach, breaking down the complex task of "simultaneously locating and judging massive amounts of text" into two simpler tasks: "lightweight localization" and "precise judgment." Through a lightweight full-text scan of the complete chat log, the trained large language model is only required to identify the relevant round numbers for each preset tag dimension (without making positive or negative judgments), significantly reducing the cognitive load on the trained large language model and decreasing the tag omission rate. Specifically, this includes: S20. Construct pre-scan prompts. Pre-scan prompts include the names and definitions of each preset label dimension, output data target format constraints, fallback instructions, and lenient policy instructions. Pre-scan prompts refer to the instruction text in the pre-scan layer used to guide the trained large language model to perform a lightweight full-text scan of serialized chat records. Pre-scan prompts integrate the names and definitions of all preset label dimensions, output data target format constraints, fallback instructions, and lenient policy instructions, enabling the trained large language model to output the relevant round index set for each preset label dimension at once.
[0038] For example, the preset tag dimensions can be set to seven, divided into two main categories: expressive ability and customer relationship. The expressive ability category includes three preset tag dimensions: verbal expression, emotional value, and logical expression; the customer relationship category includes four preset tag dimensions: customer praise / criticism, casual conversation with customers, problem handling, and greetings. When writing the code, each preset tag dimension should be given a name, and positive and negative tags should be clearly defined, specifically: 1) Regarding the language expression dimension, the positive label is set as "concise language", which is defined as the salesperson's language expression in the chat history is concise and clear, uses refined words, and does not repeat or embellish; the negative label is set as "redundant language", which is defined as the salesperson's expression is repetitive, redundant, and has low effective information density.
[0039] 2) For the emotional value dimension, the positive label is set as "positive emotional value", which is defined as the salesperson's ability to convey positive emotions, including expressions of encouragement, affirmation, and empathy, effectively mobilizing the customer's positive emotions; the negative label is set as "negative emotional value", which is defined as the salesperson's transmission of negative emotions, including expressions of complaining, perfunctory attitude, indifference, or failure to respond to the customer's emotional needs.
[0040] 3) Regarding the dimension of logical expression, the positive label is set as "clear logic", which means that the salesperson's expression is clear, the cause and effect relationship is clear, and the reasoning is reasonable, which helps the customer understand; the negative label is set as "confusing logic", which means that the salesperson's expression has problems such as inconsistency, unclear organization, and logical jumps, which hinders the customer's understanding.
[0041] 4) Regarding the customer praise / criticism dimension, the positive label is set as "positive customer praise / criticism", which is defined as the customer expressing clear praise, commendation or recognition for the salesperson, product or service in the chat history; the negative label is set as "negative customer praise / criticism", which is defined as the customer clearly expressing criticism, dissatisfaction, complaints or doubts.
[0042] 5) Regarding the dimension of casual conversation with customers, the positive label is set as "positive casual conversation with customers", which is defined as salespeople being able to use appropriate casual conversation to shorten the distance between customers and create a lively communication atmosphere; the negative label is set as "negative casual conversation with customers", which is defined as salespeople engaging in excessive casual conversation or inappropriate casual conversation content, which affects their professional image or reduces communication efficiency.
[0043] 6) For the problem-solving dimension, the positive label is set as "positive problem-solving", which means that sales personnel can effectively respond to the problems raised by customers and provide accurate answers or clear solutions; the negative label is set as "negative problem-solving", which means that sales personnel shirk responsibility, avoid the problem, provide incorrect answers, or fail to follow up when faced with customer problems.
[0044] 7) For the greeting dimension, the positive label is set as "positive greeting", which is defined as salespeople proactively using appropriate greetings to convey politeness and care at the beginning, end of conversations or on holiday occasions; the negative label is set as "negative greeting", which is defined as salespeople lacking necessary greetings or using greetings awkwardly and inappropriately.
[0045] The names and definitions of the seven preset label dimensions are presented in a structured list in the pre-scan prompts. Each dimension also indicates the positive label name, the negative label name, and the corresponding definition.
[0046] The output data target format constraint specifies the data structure that the trained large language model must return to ensure that the pre-scan results can be automatically parsed by downstream programs. For example, the output data target format constraint explicitly requires that the trained large language model output a JSON object. The top-level of the JSON object must contain exactly seven keys, each with a name that is identical to the seven predefined label dimension names; no additions, deletions, or name changes are allowed. The value corresponding to each key must be an object containing a "Round" field and a "Description" field. The value of the "Round" field must be an array, with array elements being integer round numbers. These round numbers must be between the value 1 and the total number of rounds N; the array can be empty. The value of the "Description" field must be a string. When the "Round" array is empty, the "Description" field briefly explains why no relevant rounds were found; when the "Round" array is not empty, the "Description" field can briefly explain the basis for selecting these rounds. The output data target format constraint also emphasizes that the trained large language model must not append any explanatory text or comments to the JSON object, and the output must begin with a valid JSON start character so that a standard JSON parser can directly parse it.
[0047] The fallback instruction is designed to address situations where a predefined tag dimension genuinely lacks a relevant turn in the complete chat log. This prevents the trained large language model from automatically omitting or arbitrarily filling in data when no relevant turns are found. The fallback instruction requires a response for each predefined tag dimension. Even if a full-text scan reveals no turns related to a particular tag dimension, the JSON key for that dimension must return an empty array for "Turns" with a "Description" field explaining why no turns were found. The dimension key must never be omitted from the top-level JSON. The fallback instruction also requires the model not to return fabricated data with arbitrary turn numbers when no relevant turns are found.
[0048] The lenient strategy instruction is a supplementary instruction used to reduce the probability of missing relevant rounds. The lenient strategy instruction requires the trained large language model, when performing full-text scanning to locate relevant rounds, to include the round to which the message belongs in the relevant round index set if it is uncertain whether a message belongs to a certain preset label dimension, following the principle of "better to select more than to miss". The purpose of the lenient strategy instruction is to prioritize recall. The subsequent focusing analysis layer will make a fine-grained judgment on relevant rounds. Even if some rounds that are not directly related are selected, it will not lead to incorrect judgments. However, if key rounds are missed, the judgment basis for the corresponding preset label dimension may be incomplete. By setting the lenient strategy instruction, the pre-scanning layer controls the risk of missing labels while postponing the precise screening work to the focusing analysis layer.
[0049] S21. Input the serialized chat history and pre-scanned prompts into the trained large language model. Perform the first verification on the output of the trained large language model, including format validity, required fields, tag name consistency, and data type. Obtain the relevant round index set corresponding to each preset tag dimension that passes the verification.
[0050] It should be noted that training the large language model is a preliminary step, employing a training paradigm that combines self-supervised pre-training with supervised instruction fine-tuning, a technique already in use. The training data includes a large-scale general text corpus and diverse instruction-following task data. After multiple rounds of iterative training, the model acquires the ability to understand natural language instructions and generate corresponding text output. The trained large language model is then directly used as the inference tool in this step.
[0051] Serialized chat logs are a sequence of records that retains round numbers after input preprocessing. Serialized chat logs contain valid message content and message content marked as filtered. The total number of rounds in the serialized chat logs is denoted as... The pre-scan prompts are structured instruction texts containing the names and definitions of each preset label dimension, output data target format constraints, fallback instructions, and lenient policy instructions. During input, the pre-scan prompts and the serialized chat log are combined according to predetermined concatenation rules to form the complete input text for a single inference request. After receiving the complete input text, the trained large language model performs a full-text scan of the serialized chat log during the inference phase, identifying the rounds related to each preset label dimension, and generating output text according to the output data target format constraints specified in the pre-scan prompts. The output text is a JSON object containing seven preset label dimensions as top-level keys. Each key corresponds to an object containing a "round" field and a "description" field. The "round" field is an array whose elements are round numbers identified as related to the corresponding preset label dimension after full-text scanning. The "description" field is a string briefly explaining the reasons for selecting the relevant round or why no relevant round was found. During this step, the trained large language model does not output any positive or negative judgments for any dimension.
[0052] The first validation is performed on the output of the trained large language model. This first validation includes four checks: format validity, required fields, label name consistency, and data type. These checks are performed sequentially; if any check fails, the output validation fails, and subsequent checks are discontinued. Specifically, the format validity check verifies whether the text output by the trained large language model is a valid JSON object, capable of being successfully parsed by a standard JSON parser. The required fields check, after passing the format validity check, verifies whether the top-level JSON object contains exactly seven keys. These seven keys must be named as follows: Language Expression, Emotional Value, Logical Expression, Customer Praise / Criticism, Casual Chat, Problem Handling, and Greeting. Every key must be present; missing keys and extra keys beyond the seven are not allowed. Simultaneously, it verifies whether the value corresponding to each key is an object, and whether the object contains both a "round" field and a "description" field; both fields must exist simultaneously. The tag name consistency check, after the mandatory field check passes, compares the seven key names at the top level of the JSON object with the seven preset tag dimension names listed in the pre-scan prompts, verifying that the names are completely identical, without any inconsistencies such as spelling differences, capitalization differences, extra spaces, or name order errors. The data type check, after the tag name consistency check passes, verifies whether the value of the "round" field under each preset tag dimension is an array. If it is an array, it further verifies whether each element in the array is a positive integer, and whether the value of each positive integer is within the valid round range. The valid round range is from... Total number of rounds The closed interval, i.e., the number of each round. Must meet: ,in, This represents any round number in the array. This indicates the total number of rounds of serializing the chat history, and also verifies whether the value of the "Description" field is a string type.
[0053] If all four checks pass, the first validation is considered successful, and the output of the trained large language model is considered valid. If any check fails, the first validation fails. When the first validation fails, specific error information is recorded, such as a description of the format validity check failure, missing or redundant field names in the required field check, inconsistent key names in the label name consistency check, non-positive integer array element values or out-of-range round numbers in the data type check. The error information is appended to the pre-scan prompt, and the trained large language model is re-invoked. The retry call can execute a maximum of [number missing]. Second-rate, This is the preset maximum number of retries. If in If the first checksum of any output within a retry passes, the retrying stops, and the output that passes the checksum is taken as the valid output; if If the first verification fails after the second retry, the fallback analysis mode is triggered. All preset tag dimensions will directly use the complete chat history as the focus analysis text in the subsequent focus analysis layer, no longer relying on the relevant round index set output by the pre-scanning layer.
[0054] For the valid JSON object that passes the first validation, extract the "round" array for each preset tag dimension. The elements in the array are the relevant round numbers for the corresponding preset tag dimension. For the first... For each preset label dimension, all relevant round numbers in the array are aggregated into a set, denoted as the relevant round index set corresponding to that preset label dimension: ,in, Indicates the first One preset label dimension, The value is from arrive Positive integers, seven preset label dimensions correspond to language expression, emotional value, logical expression, customer praise and criticism, casual conversation with customers, problem handling, and greetings in a fixed order; Indicates the first A set of relevant round indexes for each preset tag dimension; This represents the number of each relevant round in the set, where each round number is a sequence number starting from... arrive Positive integers between; This represents the total number of related round numbers in the set. When the "round" array is empty, It is an empty set. The value is Simultaneously, the string content of the "Description" field corresponding to each preset label dimension is extracted, and this string is retained as auxiliary information in the pre-scan results.
[0055] Iterate through the relevant round index set of all seven preset label dimensions. For satisfying For the empty set, a preset label dimension is defined, and the corresponding preset label dimension is marked as requiring fallback analysis. This mark will be read in the focused analysis layer to determine whether to trigger the fallback mechanism for the corresponding preset label dimension. The preset label dimension, which is not an empty set, and the relevant round index set are directly used for the construction of subsequent context window expansion and focused analysis text.
[0056] Among them, the fallback analysis mode refers to the mode where the relevant round index set of the pre-scanning layer is empty or the first check is in If the attempt fails after the second retrieval, the subsequent focused analysis layer will use the complete chat history as the downgraded text for focused analysis. This fallback analysis mode ensures that all preset tag dimensions have a chance to be analyzed, preventing tag omissions due to partial failures in the pre-scanning layer.
[0057] S3. Based on the relevant round index set, construct a focused analysis text with context extension for each preset label dimension, and call the trained large language model to perform single preset label dimension analysis on the focused analysis text to obtain the positive evidence list and negative evidence list for each preset label dimension.
[0058] The design philosophy of the focused analysis layer is "one label, one analysis," constructing a dedicated analysis segment for each preset label dimension. This ensures that the trained large language model performs a single analysis targeting only one dimension, avoiding attentional distraction and cognitive overload caused by multi-dimensional parallel analysis. This improves judgment accuracy and the completeness of evidence extraction, specifically including: S30. Taking each round number in the relevant round index set corresponding to each preset label dimension as the center, expand the round numbers before and after it by a preset number of windows to obtain the expanded round index set; Get the preset number of windows. The preset number of windows is a pre-defined positive integer value, denoted as . . The value of determines the range of the number of rounds that can be expanded to the left and right sides from each relevant round. The principle for setting the preset number of windows is to ensure that enough contextual information is included, while avoiding excessively long text analysis, which would lead to excessively high inference costs and distraction for the trained large language model. Preferred value It can also be set according to the actual situation.
[0059] Perform context window expansion for each round number in the relevant round index set; specifically, for the set... Each relevant round number in ( The value ranges from arrive ),by Expand forward from the center Round, obtain the left boundary round number. ; Expand backward Round, obtain the round number of the right boundary. The left and right boundary round numbers together determine a closed interval of integers: The closed interval of integers represents the interval numbered by the relevant round number. The range of round numbers covered by the centered context expansion window. Since this range may exceed the actual round number range of the serialized chat log, it is necessary to separate the closed integer interval from the valid round interval. Find the intersection to truncate round numbers that cross the boundary, and retain the round numbers within the boundary. arrive The portion within the scope. A single relevant round number. The set of valid round numbers obtained after expanding the context window is as follows: ,in, Indicates the range of legal rounds. This indicates the total number of rounds in serializing the chat history. This represents the intersection operation of sets.
[0060] For the relevant round index set Each relevant round number in After performing the above expansion operations, the set of valid round numbers corresponding to each relevant round number is combined to obtain the result. An expanded round index set with preset tag dimensions. The mathematical expression for the extended round index set is: ,in, Indicates to from arrive Find the union of each set in turn; Represents the relevant round index set The first in Each relevant round number; Indicates the preset number of windows; This indicates the total number of rounds for serializing the chat history; Indicated by The integer closed interval centered at; This represents the intersection operation of sets; This indicates the range of valid rounds. The final result is a set of integers without duplicate elements, where each element is a round number, and all round numbers are in the range of 1 / 2. arrive Within the range. Through set union, if the context expansion windows of multiple related round numbers overlap, the overlapping round numbers are within... It is retained only once to avoid the same round appearing repeatedly in the focused analysis text.
[0061] S31. Extract the dialogue content corresponding to the extended round index set from the serialized chat history and concatenate them to construct the focused analysis text for each preset tag dimension; For the The pre-defined label dimensions have yielded an expanded round index set. Traversal All round numbers are retrieved from the serialized chat history in ascending order. Each complete record for each round number is extracted, including the round number and message content field. The message content field may contain normal dialogue text or markers indicating a filtered state. Regardless of whether the message content is normal text or a filtered status marker, it is placed into the concatenation list in round number order.
[0062] The records in the list to be concatenated are concatenated sequentially according to their round numbers, from smallest to largest, to form a continuous text segment. This text segment is the [number]th [round number]. The text is a focused analysis document with predefined label dimensions. During concatenation, each record can be separated by a newline character, and a round number is retained before each record as a location identifier. This allows the trained large language model to locate the source of information based on the round number in subsequent analysis. The final constructed focused analysis text maintains semantic contextual coherence centered on relevant rounds, avoiding semantic breaks in the dialogue caused by hard segmentation.
[0063] S32. Input the focused analysis text and the constructed focused analysis prompts into the trained large language model, perform the first verification on the output of the trained large language model, including format validity, required fields, label name consistency, and data type, and obtain the initial positive evidence list and initial negative evidence list for each preset label dimension that pass the verification.
[0064] Focused analysis prompts are analysis instruction texts targeting a single preset label dimension. Unlike pre-scan prompts, which cover all seven preset label dimensions at once, focused analysis prompts only involve one preset label dimension at a time. Focused analysis prompts can include the name of the single preset label dimension, its category, positive label name and definition, negative label name and definition, output data target format constraints, and full extraction instructions.
[0065] The output data target format constraint requires that the trained large language model be output in JSON object format. The JSON object must contain three fields: "Judgment," "Positive Basis," and "Negative Basis." The "Judgment" field's value is the specific label name under the corresponding preset label dimension, i.e., the positive label name or the negative label name. The "Positive Basis" field is an array, where each element is an object containing three fields: "Round," "Original Text," and "Analysis." The "Round" field's value is the round number of the basis source, indicating the round from which the basis originated. arrive The values are positive integers between 0 and 1. The "Original Text" field contains the original message text from the serialized chat history. The "Analysis" field contains the analysis and explanation of the evidence provided by the trained large language model. The "Negative Evidence" field contains an array with the same structure as the "Positive Evidence" field, where each element also contains the "Round", "Original Text", and "Analysis" fields. The full extraction command requires the trained large language model to extract all relevant content line by line, without omitting any message content that can be used as positive or negative evidence.
[0066] If the corresponding preset label dimension is marked as requiring fallback analysis in the pre-scan layer, a fallback prompt is added to the focused analysis prompt words, instructing the trained large language model to carefully check whether relevant content exists in the complete chat history.
[0067] The focused analysis text and focused analysis prompts are input into the trained large language model, and the output is obtained. The focused analysis prompts and focused analysis text are combined according to a predetermined concatenation rule to form the complete input text for a single inference request, and the trained large language model is invoked for inference. After receiving the complete input text, the trained large language model outputs a text, the content of which is JSON format data generated according to the output data target format constraints in the focused analysis prompts. The JSON object contains a "Decision" field, a "Positive Evidence" field, and a "Negative Evidence" field. The value of the "Decision" field is the specific label name under the corresponding preset label dimension, i.e., the positive label name or the negative label name; the value of the "Positive Evidence" field is an array, and each element of the array is an object containing a "Round" field, a "Original Text" field, and an "Analysis" field, recording the round number of the basis source, the original message text, and the analysis description, respectively; the structure of the "Negative Evidence" field is the same as that of the "Positive Evidence" field. In this step, the trained large language model only outputs the decision result and the bidirectional evidence list for the currently analyzed single preset label dimension, without involving other preset label dimensions. The trained large language model is called one by one for each of the seven preset label dimensions.
[0068] The first validation is performed on the output of the trained large language model. The checks for the first validation are the same as those in the pre-scanning layer; details are provided above and will not be repeated here. If all four checks pass, the first validation is considered successful, and the "positive evidence" array in the output is used as the initial positive evidence list, and the "negative evidence" array is used as the initial negative evidence list. If any check fails, the first validation is considered unsuccessful, the error message is recorded, and appended to the focus analysis prompt. The trained large language model is then retried, with a maximum of [number] retries. Second-rate, This is the preset maximum number of retries. If... If the first verification still fails after the second retry, the corresponding preset label dimension is marked as having an abnormal output format. The original output and error information are recorded, and the subsequent processing flow for the corresponding preset label dimension is terminated.
[0069] S33. Perform a second verification on the initial positive evidence list and the initial negative evidence list, including checks on authenticity, logical consistency, and redundancy, and obtain the positive evidence list and the negative evidence list for each of the preset label dimensions that pass the verification.
[0070] The initial list of positive and negative evidence is input into the trained large language model. Each piece of evidence is verified to ensure it actually exists in the serialized chat history and that the analysis and explanation within each piece of evidence reasonably supports its positive or negative category. Duplicate evidence pointing to the same round number and having the same semantics is identified and removed. The positive and negative evidence lists for each preset tag dimension that pass the verification are obtained. The specific implementation process is as follows: Each piece of evidence from the initial positive and negative evidence lists is submitted to the trained large language model for authenticity verification. The input for authenticity verification includes the original message text of the corresponding round in the serialized chat log and the "original text" field value from the evidence to be verified. The trained large language model compares the "original text" field value with the original message text of the corresponding round in the serialized chat log to verify whether the "original text" field content truly exists in the serialized chat log and whether there is any fabrication, rewriting, addition, or deletion of characters that contradicts the original message text. Evidence whose "original text" field value does not completely match the original message text is deemed to have failed the authenticity verification and is discarded.
[0071] The evidence that passed the authenticity check will be resubmitted to the trained large language model for logical consistency check. The input for logical consistency check includes the content of the "Analysis" field of the evidence to be checked and the category label to which the evidence belongs, which can be either positive or negative. The trained large language model determines whether the analysis description in the "Analysis" field logically supports the fact that the evidence to be checked is classified into a positive or negative category, and whether there are obvious contradictions, reasoning errors, or far-fetched connections between the analysis description and the category label. Evidence that does not logically support its category is deemed to have failed the logical consistency check and is discarded.
[0072] All evidence that passes authenticity and logical consistency checks is aggregated into a single evidence set, and redundancy is eliminated from this set. The rule for redundancy elimination is: for multiple evidences with the same round number and semantics, only one is retained, and the rest are deemed redundant and eliminated. Let the aggregated focused analysis layer evidence set be: ,in, This represents the set of evidence summarized in the focused analysis layer after verification of authenticity and logical consistency. This represents the criteria in the set. Indicates the total number of criteria. For the criteria set... Each of the bases ,set up Based on The corresponding round number, Based on The original text. Focusing on the set of bases after deduplication in the analysis layer. for: ,in, This represents the set of criteria after deduplication in the focused analysis layer; express The first in One basis; Indicates a membership relationship; This indicates that the subsequent conditions have been met; This indicates that it does not exist; express The first in One basis; express Less than ; express Round number; express Round number; This indicates that the two round numbers are the same; express The original text; express The original text; This indicates that the two have the same meaning; This represents logical AND. The mathematical expression means: for... Each of the bases in If there is no precedent for it that has the same round number and semantics, ,but Retained in Middle, otherwise Removed.
[0073] After redundancy removal, the remaining evidence belonging to the positive category is compiled into a positive evidence list for that preset label dimension, and the evidence belonging to the negative category is compiled into a negative evidence list for that preset label dimension. The positive evidence list and the negative evidence list are the final results that pass the validation, and are used for subsequent global deduplication and quantity comparison.
[0074] The initial positive evidence list refers to the list of evidence entries directly obtained from the "positive evidence" array of the JSON object after the output of the large language model trained in the focused analysis layer has passed the first verification. It has not yet undergone authenticity verification, logical consistency verification, and redundancy removal. The initial negative evidence list refers to the list of evidence entries directly obtained from the "negative evidence" array of the JSON object after the output of the large language model trained in the focused analysis layer has passed the first verification. It has also not yet undergone authenticity verification, logical consistency verification, and redundancy removal.
[0075] S4. For each preset label dimension, the positive and negative evidence lists are deduplicated, and the number of evidences in the positive and negative evidence sets of each preset label dimension after deduplication is compared to determine the final judgment result for each preset label dimension.
[0076] The design concept of the global aggregation layer is "determine the majority and retain all evidence", which breaks the limitation of existing technology that "only retains the evidence of the winner" and ensures that the evidence of both sides is completely retained. At the same time, the final determination of the tag is completed through deduplication and quantity comparison. Specifically, for each preset label dimension, the positive and negative evidence lists are deduplicated, including: For each preset tag dimension, the supporting evidence lists for both positive and negative arguments are deduplicated, adhering to the principle of retaining only one instance of the same dialogue content within the same round number. The specific implementation process is as follows: Obtain the positive and negative evidence lists for each preset tag dimension. The positive evidence list contains all positive evidence entries after authenticity verification, logical consistency verification, and redundant removal by the focused analysis layer. The negative evidence list contains all negative evidence entries after the same verification process. Process the positive and negative evidence lists as separate sets of evidence to be deduplicated.
[0077] Perform global aggregation layer deduplication on both the positive and negative evidence lists. The deduplication principle is as follows: within the same evidence list under the same preset tag dimension, for multiple evidences with the same round number and identical original text content, only one is retained, and the remaining duplicate evidences are removed. The original text content here corresponds to the "Original Text" field value in each evidence. Let the global aggregation layer evidence set corresponding to the positive or negative evidence lists to be deduplicated under a certain preset tag dimension be: ,in, This represents the set of criteria for deduplication in the global aggregation layer. This represents the criteria in the set. This indicates the total number of references in the set. (For reference sets...) Each of the bases ,set up Based on The corresponding round number, Based on The original text. The set of criteria for deduplication in the global aggregation layer. for: ,in This represents the set of criteria used after deduplication in the global aggregation layer. express The first in One basis; Indicates a membership relationship; This indicates that the subsequent conditions have been met; This indicates that it does not exist; express The first in One basis; Indicates the sequence number is The basis is in the serial number The basis before; express Round number; express Round number; This indicates that the two round numbers are the same; express The original text; express The original text; This indicates that the two original texts contain the same content; This represents logical AND. The mathematical expression means: for... Each of the bases in If there is no precedent for it that has the same round number and the same original content, ,but Retained in Middle, otherwise Removed.
[0078] For the first After performing the deduplication operation on the positive and negative evidence lists for each preset tag dimension, we obtain the deduplicated positive evidence set and the deduplicated negative evidence set. The total number of evidence items in the deduplicated positive evidence set is denoted as . , greater than or equal to An integer. Count the total number of criteria in the set of criteria after deduplication, denoted as . , greater than or equal to Integers. and This will be used for quantity comparison and determination of the final judgment result in subsequent step S41.
[0079] The number of positive and negative evidence sets for each preset tag dimension after deduplication is compared to determine the final judgment result for each preset tag dimension. The specific implementation process is as follows: For the first Based on a preset tag dimension, obtain the number of unique positive evidence entries. The reverse of the deduplicated data is based on the number of entries. .Will and Perform a numerical comparison. There are three possible outcomes: the first outcome is... Greater than This indicates that, within the preset label dimension, the number of positive arguments exceeds the number of negative arguments; the second result is... Less than This indicates that the number of negative arguments exceeds the number of positive arguments; the third result is... equal This indicates that the number of positive and negative arguments is the same.
[0080] The final judgment result for this preset label dimension is directly determined by the result of the quantity comparison. The specific judgment rule is as follows: If Then the first The final determination result for each preset label dimension is the positive label for that dimension; if Then the first The final determination result for each preset label dimension is the negative label of that dimension; if Then the first The final determination result for each preset label dimension is the neutral label for that dimension.
[0081] For the specific names of the positive and negative labels, refer to the label definitions preset for each preset label dimension in the pre-scan prompts and focus analysis prompts. Taking the language expression dimension as an example, the positive label name is "concise language," and the negative label name is "redundant language." If this dimension... Greater than If so, the final judgment result is "concise language"; if Less than If so, the final judgment will be "the language is verbose"; if equal If so, the final determination result is a neutral label.
[0082] For the other six preset label dimensions, the same rules are followed to compare the number of criteria and determine the final judgment result for each. After all seven preset label dimensions have been judged, the final judgment result for each preset label dimension, along with the deduplicated sets of positive and negative criteria, is output for subsequent assembly processing.
[0083] It should be noted that the final judgment is based on the number of duplicate positive supporting evidence. and the number of negative evidence The system makes a judgment based on the quantitative comparison relationship. Regardless of whether the judgment result belongs to a positive, negative, or neutral label, both the deduplicated sets of positive and negative evidence are fully retained, without discarding any evidence content from either side due to the judgment result. This "majority-based judgment, full evidence retention" approach differs from the winner-takes-all evidence retention strategy in existing technologies. This ensures that the final output not only provides a clear label judgment conclusion but also fully presents all the communication facts supporting both positive and negative conclusions, providing sufficient information for subsequent sales capability assessment, problem diagnosis, and improvement guidance.
[0084] The final determination result refers to the specific tag output value determined for each preset tag dimension after comparing the number of values in the global aggregation layer. The value space of the final determination result includes three possibilities: the preset positive tag name, negative tag name, or neutral tag for that preset tag dimension.
[0085] S5. Assemble the final judgment results, positive basis set and negative basis set for each preset tag dimension to generate the full extraction results of chat history profile tags.
[0086] Collect data for each preset label dimension, and obtain the final judgment result, positive evidence set, and negative evidence set for each of the seven preset label dimensions. For the first... The final judgment result for each preset tag dimension has been determined and may be a preset positive tag name, negative tag name, or neutral tag for that preset tag dimension. The positive basis set is the deduplicated set, containing a total of [number missing] basis entries. The set of bases for the positive case is the set of bases obtained after deduplication, containing a total of [number] bases. The set of bases, in which, Indicates the first The number of positive data entries after deduplication based on a preset tag dimension. Indicates the first The number of duplicate entries after deduplication based on a preset tag dimension. The value is from arrive A positive integer. Each piece of evidence in the positive evidence set contains a round number field, a source text field, and an analysis field, and each piece of evidence in the negative evidence set also contains a round number field, a source text field, and an analysis field.
[0087] Construct the output structure for a single preset tag dimension. For each preset tag dimension, create a structured dimension result object containing the following fields: Preset Tag Dimension Name field, used to identify the preset tag dimension corresponding to this dimension result object; Final Judgment Result field, used to record the final judgment result for this preset tag dimension, with the field value being either a positive tag name, a negative tag name, or a neutral tag; Total Number of Positive Basis fields, used to record the number of unique positive basis entries. The "Negative Basis Total" field records the number of duplicate negative basis entries. The positive evidence list field stores all evidence entries in the deduplicated positive evidence set, with each entry retaining its round number, original text content, and analysis description. The negative evidence list field stores all evidence entries in the deduplicated negative evidence set, with each entry also retaining its round number, original text content, and analysis description. Both the positive and negative evidence lists are fully retained; neither side's evidence is discarded regardless of the final decision's direction.
[0088] The system aggregates and generates a full extraction result of chat history profile tags. It aggregates the dimension result objects of all seven preset tag dimensions in a fixed order: language expression, emotional value, logical expression, customer praise / criticism, casual conversation, problem handling, and greeting. The aggregated result forms a complete output object, which is the full extraction result of the chat history profile tags. The full extraction result of the chat history profile tags can be expressed in JSON format. The top level of the JSON object is organized by preset tag dimension names, with each preset tag dimension name as the key and the corresponding dimension result object as the value. The dimension result object internally contains the following fields: final judgment result field, total number of positive evidence fields, total number of negative evidence fields, list of positive evidence fields, and list of negative evidence fields. The list of positive evidence fields and the list of negative evidence fields are each arrays, and each element in the array is an object containing a round field, a source text field, and an analysis field.
[0089] The chat log profile tag extraction results generated by the above assembly method fully compile the judgment conclusions and two-way evidence for all seven preset tag dimensions in a single output structure. The positive and negative performance of each preset tag dimension is verifiable, and each piece of evidence can be traced back to the specific round number and original content in the serialized chat log. Compared with existing technologies that only retain the evidence of the winner, the full extraction results of chat log profile tags not only provide a judgment on whether the salesperson's performance is positive or negative in each dimension, but also retain a small amount of negative evidence that may exist in the positive tag dimensions, and a small amount of positive evidence that may exist in the negative tag dimensions. This full information retention allows users of the results to comprehensively understand the salesperson's communication characteristics, identify overall strengths, and discover hidden specific problems, providing sufficient factual support for subsequent targeted improvements, training program development, and performance evaluation.
[0090] The "Full Extraction Result of Chat History Profile Tags" refers to the complete analysis result output by this method. It is a structured data object that summarizes the final judgment results, positive evidence sets, and negative evidence sets for all seven preset tag dimensions. The "Full Extraction Result of Chat History Profile Tags" fully preserves the positive and negative evidence for all dimensions, supporting a comprehensive profile evaluation of sales-customer chat history.
[0091] Optionally, in the above technical solution, after preprocessing the obtained complete chat records to obtain serialized chat records with retained round numbers, the method further includes: counting the number of message contents in the serialized chat records that are not marked as filtered; when the number is less than a preset threshold, it is determined that there are insufficient valid rounds, and no processing is performed to generate a full extraction result of chat record profile tags.
[0092] This invention provides a method for full extraction of chat log profile tags. Through an input preprocessing step, a rule engine combined with regular expressions is used to filter out pure emoji messages, pure punctuation messages, blank messages, system prompts, and various media messages without text content. This purifies the input data, avoids interference from worthless content in subsequent analysis, and reduces ineffective resource consumption during inference in the trained large language model. A pre-scanning layer performs a lightweight full-text scan of the serialized chat logs, accurately locating the relevant round index set for each preset tag dimension. Combined with fallback and lenient policy instructions, this ensures that low-frequency tag scenarios are not missed, achieving full coverage of all preset tag dimensions and avoiding tag omissions caused by fixed segmentation. A context window expansion method is used to construct focused analysis text, maintaining the semantic coherence of related dialogues and avoiding contextual breaks and judgment biases caused by hard segmentation. A single preset tag dimension analysis method reduces the task complexity of a single analysis, improving the accuracy of tag judgment and the comprehensiveness of the extracted criteria. A dual output validation mechanism verifies the format validity, required fields, label name consistency, data type, and the authenticity and logical consistency of the evidence in the output of the trained large language model. Fabricated, contradictory, and redundant evidence is eliminated, ensuring the stability of the analysis results' format and the reliability of the evidence. A global aggregation layer compares the number of positive and negative evidence to determine the final judgment, while fully preserving both sets of evidence without discarding any. This ensures that the output provides clear multi-dimensional label judgments and fully presents all the communication facts supporting both conclusions, providing comprehensive and reliable data support for business applications such as sales capability assessment, problem diagnosis, script improvement, and service compliance checks.
[0093] In the above embodiments, although the steps are numbered S1, S2, etc., they are only specific embodiments given by the present invention. Those skilled in the art can adjust the execution order of S1, S2, etc. according to the actual situation. The scheme after adjusting the order is also within the protection scope of the present invention. It can be understood that in some embodiments, some or all of the above embodiments may be included.
[0094] like Figure 3 As shown, an embodiment of the present invention provides a chat history profile tag full extraction system 200, which includes a preprocessing module 201, a scanning module 202, an analysis module 203, a determination module 204, and an assembly module 205. Preprocessing module 201 is used to preprocess the acquired complete chat history to obtain serialized chat history that retains the round number; The scanning module 202 is used to call the trained large language model to perform full-text scanning of the serialized chat records and obtain the relevant round index set corresponding to each preset tag dimension; Analysis module 203 is used to construct focused analysis text with context extension for each preset label dimension based on the relevant round index set, and call the trained large language model to perform single preset label dimension analysis on the focused analysis text to obtain a list of positive evidence and a list of negative evidence for each preset label dimension. The determination module 204 is used to deduplicate the evidence contained in the positive evidence list and negative evidence list of each preset label dimension, and compare the number of evidences in the positive evidence set and negative evidence set of each preset label dimension after deduplication to determine the final judgment result of each preset label dimension. Assembly module 205 is used to assemble the final judgment results, positive basis set and negative basis set of each preset tag dimension to generate the full extraction result of chat history profile tags.
[0095] Optionally, in the above technical solution, the scanning module 202 is specifically used for: Construct pre-scan prompts, which include the names and definitions of each preset label dimension, output data target format constraints, fallback instructions, and lenient policy instructions; The serialized chat history and pre-scanned prompts are input into the trained large language model. The first check is performed on the output of the trained large language model, including format validity, required fields, tag name consistency, and data type. The relevant round index set corresponding to each preset tag dimension that passes the check is obtained.
[0096] Optionally, in the above technical solution, the analysis module 203 includes an extension unit, a construction unit, a first verification unit, and a second verification unit; An extension unit is used to extend the set of round numbers to the front and back of each round number in the relevant round index set corresponding to each preset label dimension, thus obtaining an extended round index set. The construction unit is used to extract the dialogue content corresponding to the extended round index set from the serialized chat history and splice them together to construct the focused analysis text for each preset tag dimension; The first verification unit is used to input the focused analysis text and the constructed focused analysis prompt words into the trained large language model, and to perform the first verification on the output of the trained large language model, including format validity, required fields, label name consistency, and data type, and to obtain the initial positive evidence list and the initial negative evidence list for each preset label dimension that have passed the verification. The second verification unit is used to perform a second verification on the initial positive evidence list and the initial negative evidence list, including verification of authenticity, logical consistency, and redundancy, and to obtain the positive evidence list and negative evidence list of each preset label dimension that have passed the verification.
[0097] Optionally, in the above technical solution, the second verification unit is specifically used to: input the initial positive evidence list and the initial negative evidence list into the trained large language model, verify one by one whether each piece of evidence truly exists in the serialized chat history, whether the analysis and explanation in each piece of evidence reasonably supports the positive or negative category to which the evidence belongs, and identify and remove duplicate evidence that points to the same round number and the same semantics.
[0098] Optionally, in the above technical solution, the determining module includes a deduplication unit, which is used to: deduplicate the evidence contained in the positive evidence list and negative evidence list of each preset tag dimension according to the principle of retaining only one piece of the same dialogue content under the same round number.
[0099] Optionally, in the above technical solution, the preprocessing module 201 is specifically used to: use a rule engine combined with regular expressions to match the content of each message in the complete chat history, determine the matched pure emoticon messages, pure punctuation messages, blank messages, system prompt messages, and image messages, file messages, link messages, and business card messages without text content as invalid information, retain the round number of the invalid message, and mark its message content as filtered; retain the message content that is not determined to be invalid information to form a serialized chat history.
[0100] Optionally, the above technical solution also includes a statistical judgment module, which is used to: perform input preprocessing on the obtained complete chat records to obtain serialized chat records with retained round numbers, count the number of message contents in the serialized chat records that are not marked as filtered, and when the number is less than a preset threshold, determine that there are not enough valid rounds, and do not perform processing to generate a full extraction result of chat record profile tags.
[0101] It should be noted that the beneficial effects of the chat history profile tag full extraction system 200 provided in the above embodiments are the same as those of the chat history profile tag full extraction method described above, and will not be repeated here. Furthermore, the system provided in the above embodiments is only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the system can be divided into different functional modules according to the actual situation to complete all or part of the functions described above. In addition, the system and method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process is detailed in the method embodiments, and will not be repeated here.
[0102] The chat history profile tag extraction system of the present invention can be a computer program (including program code) running on a computer device. For example, the chat history profile tag extraction system of the present invention is an application software that can be used to execute the corresponding steps in the chat history profile tag extraction method of the present invention.
[0103] In some embodiments, the chat history profile tag extraction system of the present invention can be implemented in a combination of hardware and software. As an example, the chat history profile tag extraction system of the present invention can be a processor in the form of a hardware decoding processor, which is programmed to execute the chat history profile tag extraction method of the present invention. For example, the processor in the form of a hardware decoding processor can be one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.
[0104] The modules described in the embodiments of this invention can be implemented in software or hardware. The names of the modules are not, in some cases, limiting the scope of the module itself.
[0105] An electronic device according to an embodiment of the present invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements any of the above-mentioned methods for extracting full chat history profile tags. That is, an electronic device according to an embodiment of the present invention may include, but is not limited to: a processor and a memory; the memory is used to store the computer program; the processor is used to execute the method for extracting full chat history profile tags shown in any embodiment of the present invention by calling the computer program.
[0106] In one alternative embodiment, an electronic device is provided, such as Figure 4 As shown, Figure 4The illustrated electronic device 4000 includes a processor 4001 and a memory 4003. The processor 4001 and the memory 4003 are connected, for example, via a bus 4002. Optionally, the electronic device 4000 may further include a transceiver 4004, which can be used for data interaction between the electronic device and other electronic devices, such as sending and / or receiving data. It should be noted that in practical applications, the transceiver 4004 is not limited to one type, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of the present invention.
[0107] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this invention. Processor 4001 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
[0108] Bus 4002 may include a path for transmitting information between the aforementioned components. Bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Bus 4002 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 4 The bus 4002 is represented by only one thick line, but this does not mean that there is only one bus or one type of bus.
[0109] The memory 4003 may be ROM (Read Only Memory) or other types of static storage devices capable of storing static information and instructions, RAM (Random Access Memory) or other types of dynamic storage devices capable of storing information and instructions, or EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto.
[0110] The memory 4003 stores application code (computer program) for executing the present invention, and its execution is controlled by the processor 4001. The processor 4001 executes the application code stored in the memory 4003 to implement the content shown in the foregoing method embodiments.
[0111] Among them, electronic devices can also be terminal devices, which can be any device that can install applications, including at least one of smartphones, tablets, laptops, desktop computers, smart speakers, smartwatches, smart TVs, and smart in-vehicle devices.
[0112] It should be noted that, Figure 4 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention.
[0113] An embodiment of the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements any of the above-mentioned methods for extracting full chat history profile tags.
[0114] Alternatively, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), magnetic tape, a floppy disk, and an optical data storage device, etc.
[0115] In an exemplary embodiment, a computer program product or computer program is also provided, which includes computer instructions stored in a computer-readable storage medium. The processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform any of the above-described methods for full extraction of chat history profile tags.
[0116] Computer program code for performing the operations of this invention 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 C or similar 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).
[0117] It should be understood that the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of methods and computer program products according to various embodiments of the present invention. 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 the 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, may 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.
[0118] The computer-readable storage medium provided in this invention can be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EEPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0119] The aforementioned computer-readable storage medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the method shown in the above embodiments.
[0120] The above description is merely a preferred embodiment of the present invention and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of disclosure in this invention is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-disclosed concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this invention.
[0121] It should be noted that the terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and represent a limitation on a specific order or sequence. Where appropriate, the order of use for similar objects can be interchanged so that the embodiments of this application described herein can be implemented in an order other than that shown or described.
[0122] Those skilled in the art will recognize that this invention can be implemented as a system, method, or computer program product. Therefore, this invention can be specifically implemented in the following forms: it can be entirely hardware, entirely software (including firmware, resident software, microcode, etc.), or a combination of hardware and software, generally referred to herein as a "circuit," "module," or "system." Furthermore, in some embodiments, this invention can also be implemented as a computer program product contained in one or more computer-readable media, which includes computer-readable program code.
[0123] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. A method for extracting full profile tags from chat logs, characterized in that, include: The obtained complete chat logs are preprocessed to obtain serialized chat logs that retain round numbers; The trained large language model is invoked to perform a full-text scan of the serialized chat history to obtain the relevant round index set corresponding to each preset tag dimension; Based on the relevant round index set, a focused analysis text containing context expansion is constructed for each preset label dimension, and the trained large language model is called to perform single preset label dimension analysis on the focused analysis text to obtain a positive evidence list and a negative evidence list for each preset label dimension. For each preset label dimension, the basis in the positive basis list and negative basis list is deduplicated, and the basis count of the positive basis set and negative basis set of each preset label dimension after deduplication is compared to determine the final judgment result of each preset label dimension. The final judgment result, positive basis set, and negative basis set for each preset tag dimension are assembled to generate a full extraction result of chat history profile tags.
2. The method for full extraction of chat history profile tags according to claim 1, characterized in that, The trained large language model is invoked to perform a full-text scan of the serialized chat history, obtaining a set of relevant round indices corresponding to each preset tag dimension, including: Construct pre-scan prompt words, wherein the pre-scan prompt words include the name and definition of each preset label dimension, output data target format constraints, fallback instructions and lenient policy instructions; The serialized chat history and the pre-scanned prompts are input into the trained large language model. The output of the trained large language model is subjected to a first check, including format validity, required fields, tag name consistency, and data type. The relevant round index set corresponding to each preset tag dimension that passes the check is obtained.
3. The method for full extraction of chat history profile tags according to claim 1, characterized in that, Based on the relevant round index set, a focused analysis text containing contextual expansion is constructed for each preset label dimension. The trained large language model is then invoked to perform single preset label dimension analysis on the focused analysis text, obtaining a positive evidence list and a negative evidence list for each preset label dimension, including: Taking each round number in the relevant round index set corresponding to each preset label dimension as the center, extend the round numbers before and after it by a preset number of windows to obtain the extended round index set; Extract the dialogue content corresponding to the extended round index set from the serialized chat history and concatenate them to construct focused analysis text for each preset tag dimension; The focused analysis text and the constructed focused analysis prompts are input into the trained large language model. The output of the trained large language model is subjected to a first check, including format validity, required fields, tag name consistency, and data type. The initial positive evidence list and the initial negative evidence list of each preset tag dimension that pass the check are obtained. A second verification, including authenticity, logical consistency, and redundancy checks, is performed on the initial positive evidence list and the initial negative evidence list to obtain the positive evidence list and the negative evidence list for each preset tag dimension that pass the verification.
4. The method for full extraction of chat history profile tags according to claim 3, characterized in that, The second verification performed on the initial positive evidence list and the initial negative evidence list includes checks for authenticity, logical consistency, and redundancy. Input the initial list of positive and negative evidence into the trained large language model, verify each evidence to see if it actually exists in the serialized chat history, and verify whether the analysis and explanation in each evidence reasonably supports the positive or negative category to which the evidence belongs. Identify and remove duplicate evidence that points to the same round number and has the same semantics.
5. The method for full extraction of chat history profile tags according to claim 1, characterized in that, The step of deduplicating the criteria in the positive and negative criteria lists for each preset label dimension includes: For each preset label dimension, the positive and negative evidence lists are deduplicated according to the principle of retaining only one instance of the same dialogue content under the same round number.
6. The method for full extraction of chat history profile tags according to claim 1, characterized in that, The step of preprocessing the acquired complete chat logs to obtain serialized chat logs that retain round numbers includes: A rule engine combined with regular expressions is used to match the content of each message in the complete chat history. Messages consisting solely of emojis, punctuation marks, blank messages, system prompts, and images, files, links, or business cards without text content are identified as invalid information. The round number of the invalid message is retained, and its content is marked as filtered. Messages not identified as invalid are retained, forming the serialized chat history.
7. The method for full extraction of chat history profile tags according to claim 6, characterized in that, After preprocessing the acquired complete chat logs to obtain serialized chat logs that retain round numbers, the process further includes: The number of messages in the serialized chat history that are not marked as filtered is counted. If the number is less than a preset threshold, it is determined that there are not enough valid rounds, and no processing is performed to generate the full extraction result of the chat history profile tags.
8. A system for extracting full-volume chat history profile tags, characterized in that, It includes a preprocessing module, a scanning module, an analysis module, a determination module, and an assembly module; The preprocessing module is used to preprocess the acquired complete chat history to obtain serialized chat history that retains the round number; The scanning module is used to call the trained large language model to perform a full-text scan of the serialized chat history and obtain the relevant round index set corresponding to each preset tag dimension. The analysis module is used to construct a focused analysis text containing context expansion for each preset label dimension based on the relevant round index set, and call the trained large language model to perform single preset label dimension analysis on the focused analysis text to obtain a positive evidence list and a negative evidence list for each preset label dimension. The determining module is used to deduplicate the evidences contained in the positive evidence list and negative evidence list of each preset label dimension, and compare the number of evidences in the positive evidence set and negative evidence set of each preset label dimension after deduplication to determine the final judgment result of each preset label dimension. The assembly module is used to assemble the final judgment result, positive basis set, and negative basis set of each preset tag dimension to generate a full extraction result of chat history profile tags.
9. An electronic device, characterized in that, The method includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the method for full extraction of chat history profile tags as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a processor, implements a method for full extraction of chat history profile tags as described in any one of claims 1 to 7.