Text classification method and apparatus, computing device, and storage medium

CN122594493APending Publication Date: 2026-08-18BEIJING YUANLI WEILAI SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610871507.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-16
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

[0004]然而,该方案在实际应用中存在明显不足

Benefits of technology

[0011] According to a sixth aspect of the embodiments of this specification, a computer-readable storage medium is provided that stores a computer program/instructions that, when executed by a processor, implement the steps of the method described in the first or second aspect above.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122594493A_ABST
    Figure CN122594493A_ABST
Patent Text Reader

Abstract

Embodiments of the present specification provide a text classification method, device, computing equipment and storage medium, wherein the text classification method comprises: obtaining a plurality of initial texts; calling at least two first agents, respectively generating classification information corresponding to each first agent based on the plurality of initial texts; calling the first agents to respectively perform difference analysis on at least two classification information to generate analysis reports corresponding to each first agent; calling a second agent to perform merging processing on the classification information based on the classification information and the analysis reports corresponding to each first agent to obtain target classification information. Through the independent construction of classification information by multiple intelligent agents of different classification dimensions and the difference analysis, and then the merging processing by the second agent to obtain the target classification information, the single perspective bias is eliminated, the cross-checking mechanism is introduced, and the accuracy and interpretability of the classification result are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments in this specification relate to the field of natural language processing technology, and in particular to a text classification method, apparatus, computing device, and storage medium. Background Technology

[0002] With the rapid development of large language model technology, the demand for automated classification and classification information construction for large-scale text sets is becoming increasingly prominent. Accurate, interpretable, and multi-dimensional classification methods are of great significance for model understanding, functional classification, and engineering management. Furthermore, high-quality and diverse training data are crucial in the training and continuous optimization of large-scale language models (LLMs). Typically, the data needs to be classified first, and then stratified sampling is performed based on the classification results to cover diverse application scenarios.

[0003] In existing technologies, a single LLM direct classification method is a typical implementation. This method assigns all text units to be classified to an LLM, allowing it to complete the construction of classification information and text classification in one go. The main process is as follows: the prompt word instructs the LLM to read all the text and generate a set of classification information; then, simultaneously or stepwise, the LLM is instructed to classify each text unit into a specific category in the classification information and output the classification result. This approach leverages the powerful semantic understanding capabilities of LLM to complete the entire process from classification information construction to text classification end-to-end.

[0004] However, this scheme has significant shortcomings in practical applications. Because the entire classification process relies on only a single agent, it is only suitable for general classification scenarios. For complex application environments and user needs, the accuracy and interpretability of the classification results are difficult to guarantee. Summary of the Invention

[0005] In view of this, embodiments of this specification provide two text classification methods. One or more embodiments of this specification also relate to two text classification devices, a computing device, a computer-readable storage medium, and a computer program product, to address the technical deficiencies existing in the prior art.

[0006] According to a first aspect of the embodiments of this specification, a text classification method is provided, comprising: Get multiple initial texts; At least two first agents are invoked to generate classification information corresponding to each first agent based on the plurality of initial texts. The classification information includes a hierarchical classification structure with at least two levels, each level including at least one category. The classification dimensions of each first agent are different. Each of the first intelligent agents is invoked to perform difference analysis on at least two categories of information, and an analysis report corresponding to each first intelligent agent is generated. The second intelligent agent is invoked to merge the classification information based on the classification information and analysis report corresponding to each of the first intelligent agents, thereby obtaining target classification information, wherein the target classification information is used to classify the text to be classified.

[0007] According to a second aspect of the embodiments of this specification, a text classification method is provided, comprising: Get the text to be categorized; The target classification agent is invoked to perform a classification operation on the text to be classified, thereby obtaining the target text category of the text to be classified. The target classification agent is constructed based on the target classification information generated by the method described in the first aspect.

[0008] According to a third aspect of the embodiments of this specification, a text classification apparatus is provided, comprising: The first acquisition module is configured to acquire multiple initial texts; The generation module is configured to invoke at least two first agents to generate classification information corresponding to each first agent based on the plurality of initial texts. The classification information includes a hierarchical classification structure with at least two levels, each level including at least one category, and the classification dimensions of each first agent are different. The analysis module is configured to invoke each of the first intelligent agents to perform difference analysis on at least two categories of information and generate an analysis report corresponding to each first intelligent agent. The merging module is configured to invoke a second agent to merge the classification information based on the classification information and analysis reports corresponding to each of the first agents, thereby obtaining target classification information, wherein the target classification information is used to classify the text to be classified.

[0009] According to a fourth aspect of the embodiments of this specification, a text classification apparatus is provided, comprising: The second acquisition module is configured to acquire the text to be classified. The classification module is configured to invoke a target classification agent to perform a classification operation on the text to be classified and obtain the target text category of the text to be classified, wherein the target classification agent is constructed based on the target classification information generated by the method described in the first aspect.

[0010] According to a fifth aspect of the embodiments of this specification, a computing device is provided, comprising: a memory and a processor; the memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions, wherein the computer programs / instructions, when executed by the processor, implement the steps of the methods described in the first or second aspect above.

[0011] According to a sixth aspect of the embodiments of this specification, a computer-readable storage medium is provided that stores a computer program / instructions that, when executed by a processor, implement the steps of the method described in the first or second aspect above.

[0012] According to a seventh aspect of the embodiments of this specification, a computer program product is provided, including a computer program / instructions that, when executed by a processor, implement the steps of the method described in the first or second aspect above.

[0013] The text classification method provided in this specification generates classification information by calling at least two first agents with different classification dimensions. This allows the construction of classification information to proceed simultaneously from multiple perspectives, eliminating the inherent perspective bias of a single agent and solving the problem of blind spots in classification information caused by a single perspective in existing technologies. By calling each first agent to perform difference analysis on at least two sets of classification information and generate analysis reports, a cross-validation mechanism between agents is introduced into the classification process. This allows for the automatic detection of omissions, misclassifications, or inappropriate granularity in the classification information, solving the problem of problems not being automatically identified and corrected due to the lack of a verification mechanism in existing technologies. By calling a second agent to merge the classification information and analysis reports to obtain the target classification information, classification information from multiple perspectives can be effectively integrated. Furthermore, due to the existence of the analysis report, the decisions made during the merging process have a traceable basis, solving the problems of opaque and untraceable decision-making processes in existing technologies. Therefore, this specification, while retaining end-to-end processing capabilities, eliminates single-perspective bias, introduces a cross-validation mechanism, and improves decision-making transparency, thereby enhancing the accuracy and interpretability of text classification. Attached Figure Description

[0014] Figure 1 This is a flowchart illustrating an existing text classification method provided in one embodiment of this specification; Figure 2 This is a flowchart illustrating a text classification method provided in one embodiment of this specification; Figure 3 This is a flowchart illustrating the processing procedure of a text classification method provided in one embodiment of this specification; Figure 4This is a flowchart illustrating the processing procedure of a text classification method provided in one embodiment of this specification; Figure 5 This is a flowchart illustrating a text classification method provided in one embodiment of this specification; Figure 6 This is a flowchart illustrating the processing procedure of a text classification method provided in one embodiment of this specification; Figure 7 This is a schematic diagram of the structure of a text classification device provided in one embodiment of this specification; Figure 8 This is a schematic diagram of the structure of a text classification device provided in one embodiment of this specification; Figure 9 This is a structural block diagram of a computing device provided in one embodiment of this specification. Detailed Implementation

[0015] Many specific details are set forth in the following description to provide a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this specification. Therefore, this specification is not limited to the specific implementations disclosed below.

[0016] The terminology used in one or more embodiments of this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of this specification. The singular forms “a,” “described,” and “the” as used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.

[0017] It should be understood that although the terms first, second, etc., may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first may also be referred to as second without departing from the scope of one or more embodiments of this specification, and similarly, second may also be referred to as first. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."

[0018] Furthermore, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties. Moreover, the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.

[0019] In one or more embodiments of this specification, a large model refers to a deep learning model with a large number of model parameters, typically containing hundreds of millions, tens of billions, hundreds of billions, trillions, or even tens of trillions of model parameters. A large model can also be called a foundation model. It is pre-trained using large-scale unlabeled corpora to produce a pre-trained model with hundreds of millions of parameters. Such models can adapt to a wide range of downstream tasks and have good generalization ability, such as LLM and multi-modal pre-training models.

[0020] In practical applications, large models only require a small number of samples to fine-tune the pre-trained model before they can be applied to different tasks. Large models can be widely used in fields such as Natural Language Processing (NLP) and Computer Vision. Specifically, they can be applied to computer vision tasks such as Visual Question Answering (VQA), Image Captioning (IC), and Image Generation, as well as natural language processing tasks such as text-based sentiment classification, text summarization, and machine translation. The main application scenarios of large models include digital assistants, intelligent robots, search, online education, office software, e-commerce, and intelligent design.

[0021] First, the terms and concepts used in one or more embodiments of this specification will be explained.

[0022] LLM stands for Large Language Model, a large pre-trained language model based on the Transformer architecture. It is capable of generating natural language responses based on input prompts and understanding complex semantic relationships. In this specification, the large language model serves as the foundational model for various intelligent agents, performing tasks such as text understanding, classification information construction, discriminant analysis, and merging.

[0023] A cue word is a sequence of input text used to guide a large language model to perform a specific task. Cue words can take various formats, including natural language descriptions, structured instructions, JSON constraints, or combinations thereof. This specification does not limit the form of cue words. Natural language cue words use free text, such as "Please classify the following text and output the category name"; structured cue words use key-value pairs or markup language, such as "role: text classification expert; task: build classification information; output_format: JSON"; JSON format cue words use a strict JSON data structure to define input and output specifications, such as "{"role": "classifier", "instruction": "classify the following text", "output_schema": {"category": "string", "confidence": "float"}}". In this specification, cue words are used to configure role definitions, behavioral constraints, task descriptions, and output format requirements for large language models, and are a core configuration tool for building various intelligent agents. By designing cue words with different content, the same large language model instance can exhibit differentiated behavior in different task scenarios. Specifically, system prompts refer to a piece of instruction text placed at the beginning of the message sequence in the large language model dialogue interface, which is used to define the model's role, behavioral constraints, and output format in this dialogue.

[0024] An agent is a large language model instance assigned specific task instructions. Each agent receives structured input data and a task description, independently performs inference, and outputs structured results. In this application, different types of agents play different roles: the first agent generates classification information, the second agent merges and processes the data to obtain target classification information, and the target classification agent classifies the text to be classified.

[0025] The text to be classified refers to text data that needs to be classified using target classification information. The text to be classified can have the same data format and source as the initial text mentioned above, or it can be newly input, unknown text.

[0026] A target classification agent is a large language model agent built based on target classification information, used to classify texts to be classified. In practical applications, multiple target classification agents can be invoked to process different batches of texts to be classified in parallel, and then the classification results can be concatenated to obtain the final target text category.

[0027] Confidence labels are labels attached to the classification results of each text to be classified during the classification phase, indicating the degree of confidence, such as high confidence or low confidence. Confidence labels can help identify boundary cases that require human review, thereby improving the reliability of the classification results.

[0028] Currently, in text classification scenarios, with the rapid increase in data scale and semantic complexity, how to efficiently and accurately automate the classification of large-scale text has become a key issue. Existing text classification methods mainly employ techniques such as... Figure 1 The method shown. See also Figure 1 , Figure 1 A flowchart of an existing text classification method is shown, which includes the following steps: Step 102: Obtain multiple initial texts.

[0029] In real-world business scenarios, these initial texts can take the form of system prompts, business instructions, news reports, or dialogue templates. Each initial text typically contains text content and a unique identifier. For example, in the scenario of preparing training data for a dialogue system, the initial text could be a family of system prompt templates.

[0030] Step 104: Invoke the intelligent agent to generate corresponding classification information based on the multiple initial texts.

[0031] In this specification, classification information refers to a hierarchical classification structure primarily comprising at least two levels, with each level including at least one category. Classification information is the core intermediate product of the methods described herein, used to characterize the classification system of text units. In one or more embodiments of this specification, classification information and classification system can be considered equivalent. Each category in the classification information may have a category identifier and a category description. The classification information can be used to classify each initial text or text unit to at least one label path from the top-level category to the bottom-level category. A text unit refers to the basic processing granularity extracted from the initial text. Each text unit represents a set of semantically similar content and may include a unique identifier, representative text content, and frequency statistics. In this specification, multiple initial texts are processed to form text units, which can serve as input for subsequent classification processing.

[0032] Specifically, a single large language model agent is invoked, taking all initial texts as input. This agent constructs classification information in one go. First, all initial texts or their summaries are arranged in descending order of frequency, forming a text list, which serves as input to the large language model. Second, the agent is explicitly instructed in the prompts to read all initial texts and, based on its own analytical framework, generate a set of classification information from the bottom up. This classification information is typically a hierarchical structure, such as containing primary categories and secondary subcategories, each with a category name and descriptive text. Then, based on the constructed classification information, the agent assigns each initial text to a specific category within the classification information. In this step, the construction of classification information and text classification may occur simultaneously or in separate steps, but both are completed independently by the same agent without the participation or intervention of other agents.

[0033] Step 106: Based on the classification information, classify the text to be classified to obtain the target text category of the text to be classified.

[0034] Specifically, the classification information constructed in step 104 is used as a fixed classification standard to classify newly input text to be classified. The text to be classified is input into the same agent, which determines the category to which the text should belong based on the defined category name, category description, and hierarchical relationship in the classification information, and outputs the corresponding target text category. In practical applications, this step is essentially the same in technical logic as the classification operation in step 104. The difference lies in that step 104 classifies text in the initial text set, its purpose being to complete the construction and verification of classification information, while step 106 performs classification prediction on newly input unknown text, its purpose being to label new data using the constructed classification information.

[0035] While the aforementioned existing technical solutions are simple and direct in implementation, and can utilize the semantic understanding capabilities of large language models to complete end-to-end classification tasks from constructing classification information to text categorization, they suffer from the following technical drawbacks due to their reliance on a single intelligent agent for analysis. First, there is a single-perspective bias. The agent can only operate within its own inherent analytical framework, such as analyzing from a functional type perspective or an application scenario perspective. It cannot simultaneously consider multiple different classification dimensions, nor can it detect potential classification differences from other perspectives, resulting in inherent blind spots in the constructed classification information. Second, there is a lack of verification mechanisms. The construction of classification information relies entirely on the accuracy of the agent's single inference. The entire process lacks any form of cross-validation, adversarial review, or self-verification. Therefore, potential issues such as category omissions, misclassifications, or inappropriate granularity in the classification information cannot be automatically detected and corrected within the process, requiring manual post-processing verification. Third, the construction of classification information and text classification are highly coupled, both completed by the same agent in the same processing flow. When the initial amount of text is large, exceeding the processing capacity of a single context window of a large language model, parallel processing cannot be achieved through simple data splitting, because each subtask after splitting cannot independently complete the complete closed loop from construction of classification information to text classification. Fourth, this scheme only outputs classification results without any decision-making reasons or audit traces during the classification process. When it is necessary to trace back why a text was classified into a specific category, there is a lack of queryable evidence, making it difficult to meet the requirements of interpretability and auditability of classification results.

[0036] Besides the aforementioned single LLM direct classification method, existing text classification techniques also include vector clustering methods based on text embeddings and slice-merge multi-agent classification methods. Vector clustering based on text embeddings encodes text into high-dimensional vectors using a text embedding model before clustering. This method has limited semantic understanding of long texts, lacks interpretable category labels in the clustering results, has uncontrollable clustering granularity, and lacks adversarial testing mechanisms. Slice-merge multi-agent classification methods split the text into multiple parts, which are then independently classified by multiple agents and merged step-by-step. In this method, each agent names the text independently, leading to inconsistent category names. Each agent relies on local data and lacks a global perspective. Information is lost during the step-by-step merging process, and similarly, there is a lack of adversarial testing mechanisms between agents.

[0037] Therefore, given the problems of single-perspective bias, lack of cross-validation mechanism, and untraceable decision-making process in the existing technologies, there is an urgent need for a text classification method that can independently construct classification information from multiple different classification dimensions, introduce a difference analysis mechanism between agents to automatically discover and correct problems in the classification information, and at the same time ensure that the classification results are interpretable.

[0038] Based on this, this specification provides a text classification method, and also relates to a text classification device, a computing device, and a computer-readable storage medium, which will be described in detail in the following embodiments.

[0039] See Figure 2 , Figure 2 A flowchart of a text classification method provided in one embodiment of this specification is shown, which specifically includes the following steps.

[0040] Step 202: Obtain multiple initial texts.

[0041] In real-world business scenarios, these initial texts can be in the form of ordinary text such as system prompts, business instructions, news reports, or magazine articles (this example uses system prompts in a dialogue scenario with a large language model as an example). Each initial text is an independent piece of original text content, and to facilitate subsequent processing and recording of correspondences, it can be assigned a unique identifier, such as "ID_0001". Taking the large language model training data preparation scenario of an internet company as an example, 587 system prompts are obtained as the initial text set. These system prompts cover various business scenarios such as educational tutoring, customer service dialogue, role-playing, and content production, such as "You are a primary school math tutoring assistant, providing step-by-step explanations for addition and subtraction word problems", "You are a customer service robot, handling user inquiries about order refunds", "You are a medieval knight in a role-playing game, engaging in adventurous dialogues with users", etc. All 587 initial texts are arranged in a preset order and then merged into a complete input sequence or document for subsequent processing.

[0042] Step 204: Invoke at least two first agents and generate classification information corresponding to each first agent based on multiple initial texts. The classification information includes a hierarchical classification structure with at least two levels, each level including at least one category. The classification dimensions of each first agent are different.

[0043] First, let's further explain the key terms involved in this step: As mentioned earlier, an agent refers to a large language model instance that is given specific task instructions. In this step, the first agent is specifically designed to generate classification information. Each first agent is assigned a specific role and behavioral constraints through preset prompts. For example, a first agent can be constructed and given the instruction, "You are a text classification expert and need to classify the input text from a functional type perspective, outputting hierarchical classification information in JSON format." This agent will strictly follow this instruction to perform the classification task. For ease of understanding, this embodiment uses two first agents as an example, namely first agent A and first agent B, which operate independently and do not interfere with each other.

[0044] As mentioned earlier, classification information refers to a hierarchical classification structure with at least two levels. In this step, classification information is the core output of the first intelligent agent. Taking the first intelligent agent A as an example, its output classification information may include the first-level category "Educational Tutoring," and the second-level subcategories "Mathematical Problem Solving," "Chinese Reading," and "English Practice." Each category has a readable category name (e.g., "Mathematical Problem Solving") and descriptive text (e.g., "Provides step-by-step derivation or answer verification for K12 or advanced mathematics problems"), making the classification results not only structured but also highly interpretable. It should be noted that this specification does not limit the number of levels of classification information or the number of categories at each level. Classification information can contain two, three, or more levels, and each level can contain one, two, or any number of categories, which can be configured according to the actual application scenario and the complexity of the text data. For example, in scenarios requiring finer-grained text segmentation, a three-tiered classification system can be constructed: the first tier is "Educational Tutoring," the second tier is "Math Tutoring," and the third tier is "Elementary School Math," "Middle School Math," and "High School Math." Another example is "Customer Support" at the first tier, "After-Sales Refund" at the second tier, and "Refund Progress Inquiry," "Refund Receipt Confirmation," and "Refund Failure Handling" at the third tier. Those skilled in the art can flexibly set the number of tiers and the number of categories at each tier according to actual needs; this specification does not impose any limitations on this.

[0045] The classification dimension refers to the focus that the intelligent agent pays attention to when constructing classification information, such as the function type dimension. In this step, the classification dimension is configured through classification prompts. For example, the function type dimension focuses on the core task essence described by the text, and the classification prompt can be set to: "Please construct classification information from the dimension of 'What is the core task that the text requires the AI ​​to complete?', focusing on what the AI ​​needs to do, such as problem-solving tutoring, text generation, scoring and grading, role-playing, data processing, etc." The application scenario dimension focuses on the product scenario and target user group served by the text, and the classification prompt can be set to: "Please construct classification information from the dimension of 'What is the product scenario and target user group served by the text?', focusing on in what scenario and for whom it serves, such as K12 education, enterprise customer service, sales training, children's companionship, etc." By configuring different classification dimensions, it is ensured that the two first intelligent agents produce classification information with structural differences, providing a valuable comparative basis for subsequent difference analysis.

[0046] The following is a detailed explanation of the process of invoking the first agent and generating classification information in this step: In one implementation, at least two first agents are invoked to generate classification information corresponding to each first agent based on multiple initial texts, including: obtaining classification prompt words corresponding to each first agent, wherein the classification prompt words are used to prompt the corresponding first agent to classify the classification dimension and hierarchical classification structure; inputting multiple initial texts and classification prompt words into the corresponding first agents to obtain the classification information output by the first agents.

[0047] Specifically, in this embodiment, two first agents are first constructed, namely first agent A and first agent B. Based on a large language model, classification prompts are used to construct the first agents, and different classification dimensions are configured for each first agent. The classification prompts for first agent A are obtained. These prompts are used to indicate the classification dimension (functional type dimension) and hierarchical classification structure (at least two levels, with the first level being the task category and the second level being the sub-categories) for first agent A. The classification prompts for first agent A are configured as follows: "Please construct classification information from the dimension of 'What is the core task that the text requires the AI ​​to complete?', such as problem-solving guidance, text generation, scoring and grading, role-playing, data processing, etc., focusing on what the AI ​​needs to do. The output format is JSON, containing a first-level category and a second-level sub-category, with each category including a name and description." The classification prompts for first agent B are then obtained. These prompts are used to indicate the classification dimension (application scenario dimension) and hierarchical classification structure for first agent B. The classification prompts for the first intelligent agent B are configured as follows: "Please construct classification information from the dimension of 'what product scenario and target user group the text serves,' such as K12 education, enterprise customer service, sales training, and child companionship, focusing on the scenario and the target user group. The output format is JSON, containing first-level categories and second-level subcategories, with each category containing a name and description."

[0048] Then, the multiple initial texts obtained in step 202 are used as input data and input to the first agent A and the first agent B respectively. It should be noted that this application does not limit the specific form of input to the first agents and can be flexibly configured according to the actual application scenario and data processing requirements. In one embodiment, the original initial texts can be directly input to the first agents; that is, both first agents A and B receive the entire initial text, rather than just a subset. Each first agent has a global perspective and can make optimal classification decisions based on the distribution characteristics of the full dataset, avoiding classification bias caused by incomplete data.

[0049] In another implementation, to reduce the complexity of subsequent classification processing and semantic redundancy, the initial text can be preprocessed before input. Specifically, based on the semantic information of the text statements in the multiple initial texts, multiple initial texts with the same natural language structure are aggregated into text units. A text unit is a data structure defined in this specification, and the specific information fields it contains can be flexibly configured according to the actual application scenario. This embodiment does not limit this. Generally, a text unit can be configured to include, but is not limited to, the following: a text unit identifier for uniquely distinguishing different text units, a text summary or representative text content for summarizing the core semantics of the text unit, frequency statistics for indicating the number of original initial texts corresponding to the text unit, and an optional source scenario code for identifying the business source of the text unit. In this embodiment, as an optional specific implementation, each text unit is configured to contain the above four information fields. However, it should be noted that in other implementations, a text unit may also contain more or fewer information fields, such as adding timestamp information, version information, confidence scores, etc. This specification does not limit this.

[0050] For example, consider the following three initial texts: "You are a primary school math tutor, providing step-by-step explanations of addition and subtraction word problems," "You are a middle school math tutor, providing step-by-step explanations of quadratic equations," and "You are a high school math tutor, providing step-by-step explanations of functions and derivatives." Although the specific subjects and knowledge points differ, they share the same natural language structure ("You are a math tutor for XX, providing step-by-step explanations of XX"). Based on semantic information, these three initial texts are aggregated into a single text unit. This text unit can be identified as "MATH_TUTOR_001," with a text summary of "Math tutor, providing step-by-step explanations of different math knowledge points," a frequency record of 3, and a source scenario code labeled "educational tutoring." For example, the following two initial texts, "You are a customer service robot, handling user inquiries about order refunds" and "You are a customer service robot, handling user inquiries about product quality complaints," have the same natural language structure ("You are a customer service robot, handling user inquiries about XX"). After aggregation, they form a text unit with the identifier "CUSTOMER_SERVICE_001", the text summary is "Customer service robot handles various business inquiries from users", the frequency statistics are recorded as 2, and the source scenario code is labeled as "e-commerce customer service".

[0051] Through the above processing, initial texts that are semantically similar but have different surface forms can be normalized and preprocessed. This aggregates a large number of initial texts that differ in surface form but have highly similar semantic structures into structured text units, thereby significantly reducing the complexity of subsequent classification processing. Taking this embodiment as an example, although the 587 system prompt words originally acquired have been processed to some extent, there are still many texts that are semantically similar but have different expressions. After the above normalization preprocessing, these 587 initial texts are aggregated into 65 text units, each representing a set of texts with the same natural language structure. In actual business scenarios, this aggregation effect is even more significant. For example, in a large-scale dataset containing 13.92 million original dialogue records, the number of original system prompt words may reach hundreds of thousands. After the above preprocessing, they can be compressed to hundreds of text units, with a compression ratio of more than one-thousandth. This significant data dimensionality reduction not only reduces the amount of data processed by the subsequent intelligent agent, but more importantly, it allows the classification system to be established at the semantic granularity rather than the surface form of the text, avoiding the problem of over-segmentation of categories caused by template parameterization. Meanwhile, by using the frequency statistics carried by the text units, the distribution characteristics of the original data can be preserved during classification, providing a weighting basis for subsequent stratified sampling. This ensures that the classification results are both semantically reasonable and reflect the data distribution in real business scenarios.

[0052] Optionally, in practical implementation, all the original initial text can be used directly as the input to the first agent, or all the text units obtained in the above steps can be used, or a portion of the initial text or a portion of the text units can be used (for example, a representative subset of initial text or a subset of text units can be selected based on the frequency of occurrence). The specific input data selected can be flexibly determined according to computing resources, accuracy requirements, and data distribution characteristics. In this embodiment, text units are preferably used as input because text units have undergone normalization preprocessing, resulting in a better data structure and lower complexity.

[0053] Furthermore, the preprocessed text units are input into first agent A and first agent B, respectively. Specifically, multiple text units and classification prompts from first agent A are input into first agent A to obtain the classification information Tax_A output by first agent A; multiple text units and classification prompts from first agent B are input into first agent B to obtain the classification information Tax_B output by first agent B. Each first agent executes independently, without visibility or communication with others. This avoids the anchoring effect between agents, meaning that a later-executed agent is not affected by the classification framework of an earlier-executed agent, ensuring the independence of each classification information. Simultaneously, the first agents can execute in parallel, fully utilizing computing resources and improving processing efficiency.

[0054] In this embodiment, after reading all text units, the first intelligent agent A generates a set of classification information Tax_A from the functional type dimension. This classification information includes a first-level category and a second-level sub-category. For example, the first level includes categories such as "Educational Tutoring," "Customer Service Support," "Role-Playing," and "Content Creation." The second level under the "Educational Tutoring" category includes sub-categories such as "Mathematical Problem Solving," "Chinese Reading," and "English Tutoring." Each category has a unique identifier, a readable category name, and a descriptive text, such as "Mathematical Problem Solving: Provides step-by-step derivation or answer verification for K12 or higher mathematics problems." After reading all text units, the first intelligent agent B generates a set of hierarchical classification information Tax_B from the application scenario dimension. For example, the first level includes categories such as "K12 Education," "E-commerce Services," "News Media," and "Games and Entertainment." The second level under the "K12 Education" category includes sub-categories such as "Primary School Tutoring," "Secondary School Enrichment," and "Exam Preparation."

[0055] In this way, the two first agents generate two sets of classification information, Tax_A and Tax_B, with structural differences based on their different classification dimensions, in parallel, providing rich input materials for subsequent difference analysis and merging processing.

[0056] Step 206: Call each first agent to perform difference analysis on at least two categories of information and generate an analysis report for each first agent; First, let's further explain the key terms involved in this step: Discrepancy analysis refers to the process by which a first agent compares and evaluates the classification information generated by other first agents from its own classification perspective. Discrepancy analysis can be performed using pairwise cross-validation, fully connected methods, round-robin methods, or random pairing methods. The core of discrepancy analysis lies in identifying points of consensus and divergence among the classification information through multi-perspective cross-examination, recognizing potential issues such as category omissions, overly coarse or fine granularity, or overlap, thus providing a basis for subsequent merging processes. Discrepancy analysis can be performed using pairwise cross-validation, fully connected methods, round-robin methods, or random pairing methods. Among them, the pairwise cross method refers to pairing multiple first agents in pairs, with each pair of agents performing differential analysis on the other's classification information. This method is suitable for scenarios with a small number of agents (such as 2 or 3). The fully connected method refers to each first agent performing differential analysis on the classification information generated by all other first agents. That is, when the number of agents is M, each agent will analyze the other M-1 sets of classification information. This method has the most comprehensive review but requires a large amount of computation. The round-robin method refers to arranging the first agents in sequence, with each agent performing differential analysis on the classification information of the next (or previous) agent only. The last agent analyzes the first agent's classification information, forming a closed loop. This method is suitable for scenarios with a large number of agents to control the number of reviews. The random pairing method refers to randomly pairing first agents in pairs for differential analysis. The pairing relationship can be randomly generated each time. This method is suitable for scenarios that need to introduce randomness to avoid review bias.

[0057] It should be noted that the specific selection of the above-mentioned discrepancy analysis methods can be flexibly determined according to the actual application scenario. As a preferred implementation method, to ensure the completeness and fairness of the review coverage, it is recommended that, where conditions permit, each first agent should perform discrepancy analysis on at least the classification information generated by another first agent, and each piece of classification information should be discrepant analyzed by at least one other first agent. For example, in a preferred implementation method, a pairwise cross-analysis method can be used to perform discrepancy analysis, which achieves a good balance between review coverage and computational cost. This embodiment does not limit this; even if the above-mentioned recommended conditions are not met, as long as the discrepancy analysis can be completed and a valid basis is provided for subsequent merging processing, it is acceptable.

[0058] An analysis report is a structured text output by the first intelligent agent after performing a difference analysis on at least two categories of information. It records the process and conclusions of the difference analysis. The core function of the analysis report is to present the problems and conclusions discovered in the difference analysis in a structured form, facilitating direct reference and parsing by the second intelligent agent in subsequent merging processing. The analysis report may include consensus point information, divergence point information, statements of the other party's advantages, and fusion suggestions. Consensus point information records semantically consistent categories among the categories, while divergence point information records category divisions where differences exist between the categories. The analysis report can use various formats such as JSON, XML, key-value pairs, or a combination of natural language and structured formats; this embodiment does not limit the format.

[0059] In detail, functionally, the analysis report systematically answers the following questions: What semantically consistent categories exist among the various classification information (i.e., consensus categories in subsequent merging processing); What differentiated category divisions exist among the various classification information (i.e., divergent categories in subsequent merging processing), and what are the specific manifestations of these divergences—whether they are too coarse-grained, too fine-grained, overlapping, or omitted; What advantages does the analyzed classification information have compared to the analyst's own classification information; and how can the advantages of each set of classification information be effectively integrated to form a better classification information?

[0060] In terms of content, the analysis report can be configured with, but is not limited to, the following fields: First, consensus points are used to record semantically consistent category correspondences among various classification information. These semantically consistent categories will be identified as consensus categories in subsequent merging processing. For each consensus point, the analysis report can further explain which categories in the classification information are semantically highly consistent and the reasons for this consistency. Consensus categories are the most stable classification signals that have undergone multi-perspective cross-validation and can be directly retained as components of the target classification information during merging processing.

[0061] Second, discrepancies are recorded as category divisions where differences exist between various classification information. These discrepancies will be identified as discrepancies in the subsequent merging process. Discrepancies can be further subdivided into the following subtypes: "Should be split," indicating a category in the other party's classification information that is too coarse-grained and should be split into multiple independent categories, along with the basis for the split; "Should be merged," indicating two or more categories in the other party's classification information that are too fine-grained or overlap and should be merged, along with the basis for the merge; "Omission," indicating independent scenarios or functional types not covered in the other party's classification information but present in the original data; and "Self-criticism," where the reviewer reflects on the shortcomings of their own classification information and acknowledges areas for improvement in category division. In the subsequent merging process, these discrepancies need to be identified, filtered, or repaired in conjunction with multiple initial texts before being merged with the consensus category to generate the target classification information.

[0062] Third, the advantages of the other party are used to record the advantages of the analyzed object compared to the analyst's own classification information. For example, the granularity of a certain category in the other party's classification information is more reasonable, the category naming is clearer, or the coverage is more comprehensive.

[0063] Fourth, integration suggestions, which record the specific integration solutions proposed by the reviewers, explaining how to combine the advantages of different sets of classification information to form better classification information. For example, it is suggested to use one classification framework as a basis and absorb the subcategories of another to supplement it.

[0064] It should be noted that the fields described above are merely illustrative examples, and the specific content fields of the analysis report can be flexibly configured according to the actual application scenario. In one implementation, the analysis report may only include consensus points and points of disagreement; in another implementation, the analysis report may additionally include the other party's advantages and integration suggestions; in yet another implementation, the analysis report may also include more fields such as confidence scores, priority indicators, and dispute level markers. This specification does not impose any limitations on these, as long as the analysis report can provide a decision-making basis for subsequent merging processes.

[0065] refer to Figure 3 The following is a detailed explanation of the difference analysis process in step 206: In this embodiment, two first agents are used for difference analysis. First agent A receives the classification information Tax_B generated by first agent B, as well as all the initial text obtained in step 202, and performs difference analysis on Tax_B from the perspective of functional type. First agent B receives the classification information Tax_A generated by first agent A, as well as all the initial text, and performs difference analysis on Tax_A from the perspective of application scenario. The difference analysis processes of the two first agents are executed in parallel, with each agent independently reading the data and unaware of the other's review content, to ensure the independence of the difference analysis.

[0066] In one implementation, each first agent is invoked to perform differential analysis on at least two categories of information and generate an analysis report corresponding to each first agent. This includes: obtaining analysis prompts for each first agent, wherein the analysis prompts are used to prompt the corresponding first agent to perform differential analysis on the differential analysis dimensions, and the differential analysis dimensions correspond to the classification dimensions; inputting multiple initial texts, at least two categories of information and analysis prompts into the corresponding first agent to obtain the analysis report output by the first agent.

[0067] Specifically, in this embodiment, the first agent A obtains analysis prompts corresponding to its functional type dimension. These prompts are used to guide the first agent A to perform a difference analysis on Tax_B from the functional type dimension. The content of these prompts can be configured as follows: "You are a text classification expert. Please perform a difference analysis on the input classification information Tax_B from the functional type dimension. You need to read all the initial text and evaluate whether each category in Tax_B is reasonable, complete, and consistent. The output should include: consensus points (categories semantically consistent with Tax_A), divergence points (should be split, should be merged, omitted, self-criticism), the other party's advantages, and fusion suggestions." The first agent B obtains analysis prompts corresponding to its application scenario dimension, which guides it to perform a difference analysis on Tax_A from the application scenario dimension. All the initial text, Tax_A, Tax_B, and the corresponding analysis prompts are input into the first agent A and the first agent B, respectively, triggering the reasoning process of the large language model and obtaining the analysis report Report_A output by the first agent A and the analysis report Report_B output by the first agent B.

[0068] In this embodiment, the analysis report Report_A output by the first intelligent agent A includes the following: Regarding consensus points, Report_A identifies a strong semantic correspondence between "K12 education" in Tax_B and "educational tutoring" in Tax_A, both pointing to student-oriented teaching and tutoring scenarios. Based on this, the correspondence is recorded as a consensus point, and the corresponding "K12 education" and "educational tutoring" will be identified as consensus categories in subsequent merging processes, directly retained as components of the target classification information.

[0069] Regarding the points of disagreement, Report_A identified the following discrepancies: For the need for splitting: The "E-commerce Services" category in Tax_B is too coarse-grained, actually encompassing different functions such as pre-sales consultation, after-sales service, and logistics tracking. "E-commerce Services" should be split into three independent categories: "Pre-sales Consultation," "After-sales Service," and "Logistics Tracking." Report_A provided the basis for this split (the initial text contained customer service prompts for these three different functions). For omissions: Tax_B did not cover the "Content Creation" category, while the initial text contained numerous prompts for product description generation and advertising copywriting, which should be supplemented. For self-criticism: Report_A acknowledged in its self-criticism section that its "Role-playing" category was too broad, mixing different subcategories such as game NPCs, story characters, and virtual companions. It could refer to Tax_B's "Games & Entertainment" category for further subdivision.

[0070] Regarding the other party's advantages, Report_A points out that Tax_B's "News Media" is divided into "Local News", "National News" and "International News" by region, which is a suitable granularity and easy for business understanding. This is better than its own coarse-grained method of classifying news media into only "Social News" and "Technology News".

[0071] Regarding the integration recommendations, Report_A suggests using the scenario classification of Tax_B as the first layer, and then attaching the functional subclasses of Tax_A below, forming a two-layer classification structure of "scenario-function".

[0072] The analysis report Report_B output by the first agent B includes the following: Regarding consensus points, Report_B identified a semantic correspondence between "educational tutoring" in Tax_A and "K12 education" in Tax_B, thus confirming the consensus category.

[0073] Regarding the points of disagreement, Report_B identified the following differences: For those that should be merged: The three subcategories "Math Problem Solving," "Chinese Reading," and "English Tutoring" in Tax_A essentially belong to the category of "Subject Tutoring" and should be merged into a single "Subject Tutoring" subcategory. Report_B provided the rationale for this merger (all three are subject knowledge tutoring, and overly fine-grained subcategories would lead to sample dispersion). For those that were omitted: Tax_A did not distinguish between the "Personal Assistant" scenario, while the initial text contained prompts such as schedule management and email composition; a "Personal Assistant" category should be added. For those who need self-criticism: Report_B acknowledged in its self-criticism field that its "Games & Entertainment" category did not distinguish between role-playing and storytelling; it could be refined by referencing Tax_A's "Role-Playing" subcategory.

[0074] Regarding the advantages of the other party, Report_B points out that Tax_A's functional classification is very atomized. For example, it treats "mathematical problem solving", "Chinese reading", and "English tutoring" as independent subcategories. This fine granularity facilitates accurate sampling and is superior to its own coarse-grained approach of dividing education into only "primary school tutoring", "middle school enrichment", and "exam preparation".

[0075] Regarding the integration recommendations, Report_B suggests adopting a scenario-based perspective in the first layer and a functional perspective in the second layer, forming a two-level classification structure of "scenario-function", which is basically consistent with the integration recommendations of Report_A.

[0076] Through the above method, the two first agents, based on their respective different difference analysis dimensions, completed a structured review of each other's classification information in parallel, generating two structured analysis reports, Report_A and Report_B. These reports clearly identified consensus categories (such as "educational tutoring" and "K-12 education") and disagreement categories (such as "e-commerce services" should be split, "mathematical problem-solving, Chinese reading, and English tutoring" should be merged, "content creation" was omitted, and "personal assistant" was omitted), and provided specific fusion suggestions for subsequent merging processing, laying the decision-making foundation for the merging process in step 208.

[0077] Step 208: Invoke the second intelligent agent, and based on the classification information and analysis report corresponding to each first intelligent agent, merge the classification information to obtain the target classification information.

[0078] First, let's further explain the key concepts involved in this step: The second agent, as mentioned above, refers to a large language model instance assigned specific task instructions. In this step, the second agent is specifically used to merge and process the classification information and analysis reports generated by the first agents. The second agent receives multiple sets of classification information and multiple analysis reports, resolves conflicts and merges them according to preset decision rules, and produces the final consensus classification information. The second agent and the first agent can be different instances built based on the same large language model, or they can be different instances of the same large language model; this embodiment does not limit this. For example, in this embodiment, the second agent receives classification information Tax_A and Tax_B, and analysis reports Report_A and Report_B, comprehensively judges the consensus categories and divergent categories present therein, and produces the target classification information Target_Tax. Here, the consensus category refers to the category that is consistently recognized by different first agents in multiple classification information and has a high semantic correspondence. The consensus category is the most stable classification signal after multi-perspective cross-validation and can be directly used as a component of the target classification information in the merging process; the divergent category refers to the category division that is identified as different by different first agents in multiple classification information. Disagreement categories can be further subdivided into categories that are too coarse-grained and should be split, categories that are too fine-grained or have overlaps and should be merged, and categories that have been omitted. For disagreement categories, multiple initial texts need to be identified, filtered, or repaired before merging.

[0079] Target classification information refers to the final classification system obtained by the second agent after merging and processing the classification information generated by each first agent. Target classification information is used to classify text to be classified, and can integrate metadata from different classification dimensions, allowing a single classification information to carry multi-dimensional information.

[0080] refer to Figure 4 The merging process in this step will be explained in detail below: In this embodiment, a second intelligent agent is invoked to merge Tax_A and Tax_B based on the classification information Tax_A and Tax_B generated by the first intelligent agent A and the first intelligent agent B respectively, as well as the analysis reports Report_A and Report_B generated in the difference analysis stage, to obtain the target classification information.

[0081] In one implementation, a second intelligent agent is invoked to merge the classification information based on the classification information and analysis reports corresponding to each first intelligent agent to obtain target classification information. This includes: inputting the classification information and analysis reports corresponding to each first intelligent agent into the second intelligent agent; identifying the consensus category in each classification information based on each analysis report; and merging the classification information based on the consensus category to obtain target classification information.

[0082] The second agent performs merging processing according to a preset decision priority framework. It should be noted that the specific number of levels and the order of each level in this decision priority framework can be flexibly configured according to the actual application scenario; this embodiment does not limit this. Generally, the decision priority framework can be configured to include, but is not limited to, the following levels, arranged from highest to lowest priority: The first priority is consensus retention, meaning that all categories marked as consensus in all analysis reports are directly retained in the target classification information. Consensus categories are the most stable classification signals that have undergone multi-perspective cross-validation, possessing the highest credibility in the merging process and can be directly adopted without further review. In one implementation, if a category is only marked as consensus in some analysis reports and not mentioned in others, its retention can be determined based on the proportion of consensus reports.

[0083] The second priority is disagreement adjudication, which involves reviewing each disagreement marked in the analysis report, determining whether to adopt it based on the original text data, and recording the reasons for the adjudication. Disagreements can include types such as those that should be split, those that should be merged, and those that are omitted. In one implementation, for disagreements raised by multiple analysis reports simultaneously, their adoption priority can be appropriately increased; for disagreements raised only by a single analysis report, more rigorous verification is required.

[0084] The third priority is self-criticism correction, which involves correcting the shortcomings acknowledged by each first agent in its self-criticism within the target classification information. Since self-criticism is a proactive admission by the first agent rather than an accusation from another party, it has high credibility and therefore has a higher priority than general fusion suggestions. In one implementation, if multiple first agents point out the same problem in their self-criticisms, the credibility of that problem is further increased, and it should be corrected first.

[0085] The fourth priority is adoption, which involves selectively adopting the fusion recommendations in the analysis report after assessing their reasonableness. Fusion recommendations are subjective suggestions from reviewers, and their credibility is lower than consensus points, disagreement resolutions, and self-criticism corrections; therefore, they have the lowest priority. In one implementation, only fusion recommendations jointly recommended by multiple analysis reports can be adopted, or a selection process can be conducted based on the confidence score of the first agent.

[0086] It should be noted that the four priority levels described above are merely illustrative. In other implementations, more priority levels may be added, some levels may be reduced or merged, and the execution order of each level may be adjusted. This specification does not limit the specific settings of the decision priority framework, as long as it can provide a clear decision basis for the merging process.

[0087] Specifically, in this embodiment, Tax_A, Tax_B, Report_A, and Report_B are input into the second intelligent agent. The second intelligent agent first reads the consensus point information in Report_A and Report_B, and identifies "educational tutoring" in Tax_A and "K12 education" in Tax_B as consensus categories. This consensus category has been cross-validated by the two first intelligent agents from different dimensions and is the most stable classification signal. The second intelligent agent directly retains it as part of the target classification information.

[0088] While consensus categories are directly retained, the divergence categories marked in the analysis reports require further processing. Some divergence categories are verified to be reasonable and should be retained; others need adjustment or removal. Therefore, in one implementation, based on consensus categories, the classification information is merged to obtain target classification information, including: identifying categories to be retained from the divergence categories in each analysis report by combining multiple initial texts; merging consensus categories and categories to be retained to generate target classification information.

[0089] Specifically, in this embodiment, the second agent reads the divergence information in Report_A and Report_B and identifies the following divergence categories. Regarding the suggestion in Report_A that "e-commerce services" should be split into "pre-sales consultation," "after-sales service," and "logistics inquiry," the second agent verifies this using the initial text. It finds that the initial text does indeed contain three different types of customer service prompts, corresponding to pre-sales consultation, after-sales service, and logistics inquiry, respectively. Therefore, this splitting suggestion is adopted, and "pre-sales consultation," "after-sales service," and "logistics inquiry" are included as categories to be retained in the target classification information. Regarding the suggestion in Report_B that "mathematical problem-solving," "Chinese reading," and "English tutoring" should be merged into "subject tutoring," the second agent verifies this using the initial text. It finds that all three subcategories fall under the category of subject knowledge tutoring. Fine-grained segmentation would lead to scattered subsequent sampling. Therefore, this merging suggestion is adopted, and "subject tutoring" is included as a category to be retained in the target classification information.

[0090] For issues such as excessively coarse, excessively fine, or overlapping granularity in the divergent categories, direct retention or removal may not be precise enough, requiring corrective adjustments to make the final classification system more reasonable in granularity. Therefore, in one implementation, based on consensus categories, the classification information is merged to obtain target classification information, including: identifying categories to be corrected for divergent categories in each analysis report, and correcting the categories to be corrected; merging consensus categories and corrected categories to be corrected to generate target classification information.

[0091] Specifically, in this embodiment, the second agent reads the self-criticism information in Report_A and Report_B and identifies the following categories to be repaired. Regarding the issue of the "role-playing" category being too broad, as pointed out in the self-criticism of Report_A, the second agent, referring to the "games and entertainment" category in Tax_B, splits "role-playing" into two subcategories: "game characters" and "storytelling." Regarding the issue of the "games and entertainment" category not distinguishing between role-playing and storytelling, as pointed out in the self-criticism of Report_B, the second agent, referring to the "role-playing" category in Tax_A, adds two subcategories: "role-playing" and "storytelling" under "games and entertainment." The repaired categories are then incorporated into the target classification information along with the consensus categories.

[0092] In addition, regarding the omission of the "Content Creation" category in Tax_B as pointed out in Report_A, and the omission of the "Personal Assistant" category in Tax_A as pointed out in Report_B, the second agent verified the information by combining the initial text and confirmed that there was a large amount of relevant content in the initial text. Therefore, "Content Creation" and "Personal Assistant" were added as new categories and included in the target classification information.

[0093] After completing the merging and repair at the category level, to further improve the usability of the classification information, metadata from different classification dimensions can be attached to each category, enabling single classification information to carry multi-dimensional information, facilitating downstream tasks to sample and analyze according to different dimensions. Therefore, in one implementation, a second intelligent agent is invoked to merge the classification information based on the classification information and analysis reports corresponding to each first intelligent agent to obtain the target classification information. This includes: invoking the second intelligent agent to merge the classification information based on the classification information and analysis reports corresponding to each first intelligent agent; obtaining metadata for each classification dimension; and fusing the merged classification information and the metadata for each classification dimension to obtain the target classification information.

[0094] Metadata refers to auxiliary data that describes the attributes of data. In this specification, metadata is used to describe the additional characteristic information of each category in the classification information, such as the target user group, interaction mode, domain, and applicable scenarios of the category. Metadata can originate from the classification dimension information generated by the first intelligent agent when constructing the classification information, or from the source scenario code or business tags carried in the initial text, or from supplementary information from external knowledge bases. This specification does not limit the specific source and content of metadata, as long as it can provide supplementary descriptions of the dimensions for each category of the target classification information.

[0095] Metadata fusion, as mentioned above, refers to merging classification metadata generated from multiple different classification dimensions into each category of the target classification information. The core function of metadata fusion is to enable a single classification information to carry multi-dimensional information, providing richer decision-making basis for downstream tasks. The specific method of metadata fusion can be flexibly configured according to the actual application scenario, and this embodiment does not limit it. In one implementation, metadata fusion can use a field merging method, storing metadata from different dimensions as additional attribute fields of that category in the target classification information; in another implementation, metadata fusion can use a weighted aggregation method, comprehensively calculating a comprehensive value after combining metadata of the same category from different dimensions; in yet another implementation, metadata fusion can use a tag appending method, associating metadata from different dimensions as tags for that category. This specification does not limit the specific implementation method of metadata fusion.

[0096] Specifically, in this embodiment, after completing the above-mentioned category merging and repair, the second intelligent agent obtains the metadata of each category dimension and integrates it into the corresponding category of the target category information. For example, for the merged "subject tutoring" category, its interaction mode metadata is obtained as "step-by-step explanation, answer verification" from the function type dimension, its target user metadata is obtained as "K12 students" from the application scenario dimension, and its domain metadata is obtained as "education"; for the split "pre-sales consultation" category, its interaction mode metadata is obtained as "product introduction, question answering" from the function type dimension, its target user metadata is obtained as "potential customers" from the application scenario dimension, and its domain metadata is obtained as "e-commerce"; for the newly added "content creation" category, its interaction mode metadata is obtained as "text generation, creative output" from the function type dimension, its target user metadata is obtained as "content operators, marketing personnel" from the application scenario dimension, and its domain metadata is obtained as "advertising and marketing". The final target classification information, Target_Tax, includes the following categories: The first level includes "Educational Tutoring," "E-commerce Services," "News Media," "Games & Entertainment," "Content Creation," and "Personal Assistant," among others. The second level under the "Educational Tutoring" category includes subcategories such as "Subject Tutoring" (a fusion of "Math Problem Solving," "Chinese Reading," and "English Practice") and "Exam Preparation." The second level under the "E-commerce Services" category includes three subcategories: "Pre-sales Consulting," "After-sales Service," and "Logistics Tracking." The second level under the "Games & Entertainment" category includes two subcategories: "Game Characters" and "Story Narration." Each category carries metadata that integrates functional and scenario dimensions.

[0097] Through the aforementioned metadata fusion, each category in the target classification information can carry information from different classification dimensions, providing a rich foundation for downstream multi-dimensional hierarchical sampling. For example, downstream tasks can choose to sample by the "interaction mode" dimension to cover different types of interaction methods, or by the "target user" dimension to cover different types of user groups, or choose to perform refined sampling by a combination of multiple dimensions. This ability to fuse multi-dimensional information is something that single-view classification schemes cannot achieve, significantly improving the practical value and flexibility of the classification results in downstream tasks.

[0098] To ensure the transparency and auditability of the merging process and facilitate subsequent tracing of the basis for each decision, it is necessary to record the key decisions made by the second agent during the merging process and the reasons behind them. Therefore, in one implementation, this step further includes: invoking the second agent to generate a decision log, wherein the decision log is used to record the process of generating target classification information.

[0099] The specific content fields of the decision log can be flexibly configured according to the actual application scenario, and this embodiment does not limit this. Generally, the decision log can be configured to include, but is not limited to, the following: specific suggestions in the adopted analysis report and their source agents, specific suggestions in the rejected analysis report and their reasons for rejection, priority rules used in the merging process, the final processing method of conflict categories in each classification information, decision timestamp, decision confidence level, etc. In one embodiment, the decision log can be stored in key-value pair format for easy programmatic parsing and querying; in another embodiment, it can be stored in natural language paragraph format for easy human reading and understanding; in yet another embodiment, it can be stored in structured table format for easy batch export and analysis. This specification does not limit the specific format and content fields of the decision log, as long as it can record the decision basis in the merging process.

[0100] Specifically, in this embodiment, the second intelligent agent generates a decision log during the merging process, recording the basis and reason for each decision. For example, the decision log records: "Decision 1: Retain 'Educational Tutoring' and 'K12 Education' as consensus categories, based on: Report_A and Report_B both mark this correspondence as a consensus point, and the two sets of classification information are highly semantically consistent." "Decision 2: Adopt the 'E-commerce Service' splitting suggestion, based on: Report_A proposed a splitting suggestion, and after initial text verification, there are three types of customer service prompts with different functions." "Decision 3: Adopt the merging suggestion for 'Mathematical Problem Solving, Chinese Reading, and English Tutoring,' based on: Report_B proposed a merging suggestion, and all three belong to subject knowledge tutoring, with fine-grained division leading to sample dispersion." "Decision 4: Repair the 'Role-Playing' category, based on: Report_A self-criticized that this category is too broad, and referring to Tax_B, it is split into 'Game Roles' and 'Story Narration.'" The decision log records a total of 10 key decisions, making the entire merging process auditable and traceable.

[0101] Using the above method, the second agent, based on two sets of classification information and two analysis reports, completed the merging of classification information according to the decision priority of consensus preservation, disagreement resolution, and self-criticism correction, obtaining the target classification information Target_Tax that integrates multi-dimensional metadata, and generating a complete decision log. This target classification information can be used to classify text to be classified.

[0102] On the other hand, see Figure 5 , Figure 5 This specification shows a flowchart of a text classification method according to an embodiment, which specifically includes the following steps: Step 502: Obtain the text to be classified.

[0103] Specifically, the text to be classified is obtained. The text to be classified is text data that needs to be classified using the target classification information obtained in the aforementioned embodiments. The text to be classified may have the same data format and source as the initial text in the aforementioned embodiments, or it may be newly input unknown text.

[0104] Step 504: Invoke the target classification agent to perform classification operations on the text to be classified and obtain the target text category of the text to be classified. The target classification agent is constructed based on the target classification information generated in the aforementioned method embodiment.

[0105] Specifically, a target classification agent refers to a large language model agent built based on target classification information, used to perform classification operations on text to be classified. The target classification agent receives the text to be classified as input, determines the category to which the text should belong based on the category hierarchy, category name, and category description defined in the target classification information, and outputs the corresponding target text category.

[0106] The following is in conjunction with the appendix Figure 6 Taking the application of the text classification method provided in this specification in the automatic classification of press releases as an example, the text classification method will be further explained. Figure 6 The flowchart of a text classification method provided in one embodiment of this specification is shown, which specifically includes the following steps.

[0107] Step 602: Obtain 1000 press releases.

[0108] Specifically, in this embodiment, taking a news platform as an example, 1,000 news articles collected by the platform in the past month are used as the initial text. These news articles cover multiple fields such as technology, finance, sports, and entertainment. Each news article is an independent plain text content without any identifiers, statistical information, or source tags. For example, one news article reads: "A company today released a new generation language model, which has achieved a major breakthrough in mathematical reasoning and code generation capabilities, supporting context windows of 1 million tokens." Another news article reads: "In a recently concluded tennis final, a player defeated his opponent 2-1, winning his first Grand Slam title in his career." All 1,000 news articles are arranged in chronological order of inclusion and merged into a complete input document for subsequent processing.

[0109] Step 604: Invoke the first intelligent agent A, the first intelligent agent B, and the first intelligent agent C to generate classification information Tax_A, Tax_B, and Tax_C respectively based on the press release.

[0110] In this step, the first agent is specifically designed to generate classification information. Classification information refers to a hierarchical classification structure with at least two levels. The classification dimension determines the focus of the agent when constructing the classification information. In this embodiment, three first agents are invoked: First Agent A, First Agent B, and First Agent C, each configured with a different classification dimension.

[0111] In one implementation, at least two first agents are invoked to generate classification information corresponding to each first agent based on multiple initial texts, including: obtaining classification prompt words corresponding to each first agent, wherein the classification prompt words are used to prompt the corresponding first agent to classify the classification dimension and hierarchical classification structure; inputting multiple initial texts and classification prompt words into the corresponding first agents to obtain the classification information output by the first agents.

[0112] Specifically, in this embodiment, the first intelligent agent A is configured as the function type dimension, and its classification prompt is: "Please construct a three-level classification information based on the dimension of 'What is the core content type of the press release?', such as product launch, event reporting, etc., focusing on the core event type reported in the press release. The output format is JSON, containing first-level, second-level, and third-level categories, each category containing a name and description." The first intelligent agent B is configured as the application scenario dimension, and its classification prompt is: "Please construct a three-level classification information based on the dimension of 'What is the reader group and application scenario served by the press release?', such as new product launches that technology enthusiasts are interested in, event results that sports fans are interested in, etc., focusing on the scenario and for whom the report is being made. The output format is JSON, containing first-level, second-level, and third-level categories." The first intelligent agent C is configured as the geographic dimension, and its classification prompt is: "Please construct a three-level classification information based on the dimension of 'What is the geographical scope covered by the press release?', such as domestic news, international news, local news, etc., focusing on the geographical coverage of the news report. The output format is JSON, containing first-level, second-level, and third-level categories."

[0113] The 1000 initial texts obtained in step 602 are input into the first agent A, first agent B, and first agent C, respectively. Each first agent receives all the initial texts as input and has a global perspective. After reading all the news releases, first agent A generates a three-level classification information Tax_A based on the functional type dimension. The first level of this classification information includes "technology product releases," "sports event reports," etc. First agent B generates classification information Tax_B based on the application scenario dimension, with the first level including "technology enthusiasts' concerns," "sports fans' concerns," etc. First agent C generates classification information Tax_C based on the geographical dimension, with the first level including "international news," "local news," etc. In this way, the three first agents generate three sets of classification information Tax_A, Tax_B, and Tax_C with structural differences in parallel based on their different classification dimensions.

[0114] It should be noted that the three-agent approach used in this embodiment is merely an exemplary implementation. In other alternatives, two, four, or more first agents can be used, each with its own analytical perspective, such as functional, scenario, user, and difficulty dimensions. More perspectives can further reduce the probability of blind spots in the classification system. Changing the number of agents does not affect the core architecture of this specification. The specific selection of analytical perspectives can also be flexibly adjusted according to the data domain and downstream task requirements. For example, a combination of a "text structure / format" perspective and a "business domain" perspective can be used, or a combination of an "interaction mode" (single-turn / multi-turn, generation / discrimination) perspective and a "content domain" (Chinese / mathematics / English / general) perspective can be used. This specification does not limit this approach.

[0115] Step 606: Invoke the first agent A, the first agent B and the first agent C to perform differential analysis on at least two categories of information (Tax_A, Tax_B, Tax_C) and generate analysis reports Report_A, Report_B and Report_C respectively.

[0116] In this step, difference analysis refers to the process by which the first agent compares and evaluates the classification information generated by other first agents based on its own classification dimensions. The analysis report is a structured text output by the first agent after completing the difference analysis, used to record the process and conclusions of the difference analysis.

[0117] In one implementation, each first agent is invoked to perform differential analysis on at least two categories of information and generate an analysis report corresponding to each first agent. This includes: obtaining analysis prompts for each first agent, wherein the analysis prompts are used to prompt the corresponding first agent to perform differential analysis on the differential analysis dimensions, and the differential analysis dimensions correspond to the classification dimensions; inputting multiple initial texts, at least two categories of information and analysis prompts into the corresponding first agent to obtain the analysis report output by the first agent.

[0118] In this embodiment, a polling method is used for difference analysis. First agent A receives classification information Tax_B from first agent B and classification information Tax_C from first agent C, and performs difference analysis on Tax_B and Tax_C from a functional type perspective. First agent B receives Tax_A and Tax_C and performs difference analysis from an application scenario perspective. First agent C receives Tax_A and Tax_B and performs difference analysis from a geographic perspective. Each first agent receives all 1000 initial texts as review reference data.

[0119] The analysis report can be configured with fields including, but not limited to, the following: points of consensus, points of disagreement (including those that should be split, merged, omitted, and self-criticism), the other party's strengths, and suggestions for integration. The self-criticism section of the points of disagreement requires reviewers to reflect on the shortcomings in their own classification information and acknowledge areas for improvement in their category divisions.

[0120] Specifically, in this embodiment, the analysis report Report_A output by the first intelligent agent A includes the following: Regarding the points of divergence, Report_A points out that the granularity of "Tech Enthusiast Focus - New Product Releases" in Tax_B is too fine and should be split into two subcategories: "Hardware Releases" and "Software Releases," and provides the basis for the split (the initial text contains two different categories of technology products: chip releases and model releases). Report_A points out that Tax_C omits the "Sports Events" category, while the initial text contains a large number of sports event reports, which should be added. Regarding the strengths of the counterpart, Report_A points out that the "Investor Focus - Company Financial Reports" in Tax_B is subdivided into "Annual Reports," "Quarterly Reports," and "Forecasts" according to the type of financial report, which is a reasonable granularity and better than the coarse-grained division of its own category, which only has one "Company Finances" category. Regarding the integration suggestions, Report_A suggests using the functional classification of Tax_A as the framework and incorporating the scenario tags of Tax_B and the regional tags of Tax_C for integration.

[0121] The analysis report Report_B output by the first intelligent agent B includes the following: Regarding consensus points, Report_B identifies a semantic correspondence between "technology product releases" in Tax_A and "international news - technology trends" in Tax_C. Regarding disagreements, Report_B points out that "sports event reporting" in Tax_A is too coarse-grained and should be broken down into subcategories such as "football," "basketball," and "tennis." Report_B also points out that Tax_A omitted the "natural disasters" category, which should be added. Regarding the other party's strengths, Report_B points out that the province-based segmentation of "local news" in Tax_C facilitates regionalized delivery. Regarding integration suggestions, Report_B recommends a three-layer classification structure: the first layer is function type, the second layer is geographical scope, and the third layer is application scenario.

[0122] The analysis report Report_C output by the first agent C includes the following: Regarding the points of divergence, Report_C points out that both Tax_A and Tax_B omitted the "Entertainment News" category. In its self-criticism, Report_C admits that its own "International News" category is too general and should be further subdivided. Regarding the strengths of the other party, Report_C points out that Tax_A's three-level classification structure is clearly hierarchical, facilitating drill-down analysis. In terms of integration suggestions, Report_C recommends using functional type as the first level, geographical scope as the second level, and application scenario as the third level.

[0123] Through the polling method described above, the three first agents completed the difference analysis of each other's classification information and generated three structured analysis reports, Report_A, Report_B and Report_C, which clearly identified the consensus category and the disagreement category.

[0124] It should be noted that the polling review method used in this embodiment is only one example. In other alternatives, the review structure can be simplified to only include three fields: "Support," "Oppose," and "Suggestion," but valuable information such as self-criticism may be lost. Multi-round iterative review can also be used, where, based on a single round of cross-review, the agent "refutes" the review opinions of other parties, forming multiple rounds of debate. This can improve the granularity of the classification system, but it will significantly increase the computational cost. This specification does not limit this approach.

[0125] Step 608: Invoke the second agent to merge the classification information (Tax_A, Tax_B, Tax_C) and analysis reports (Report_A, Report_B, and Report_C) to obtain the target classification information Target_Tax.

[0126] In this step, the second agent refers to the large language model instance used to merge and process the classification information and analysis reports generated by the first agents. The decision log refers to the structured records generated during the merging process, used to record the basis and reasons for each decision made by the second agent. Metadata fusion refers to merging the classification metadata generated from multiple different classification dimensions into each category of the target classification information.

[0127] In one implementation, a second intelligent agent is invoked to merge the classification information based on the classification information and analysis reports corresponding to each first intelligent agent to obtain target classification information. This includes: inputting the classification information and analysis reports corresponding to each first intelligent agent into the second intelligent agent; identifying the consensus category in each classification information based on each analysis report; and merging the classification information based on the consensus category to obtain target classification information.

[0128] Specifically, in this embodiment, Tax_A, Tax_B, Tax_C, Report_A, Report_B, and Report_C are input into the second intelligent agent. The second intelligent agent first reads the consensus point information from the three analysis reports and identifies the following consensus categories: the semantic correspondence of "technology product release" in Tax_A, "technology enthusiasts' attention - new product release" in Tax_B, and "international news - technology trends" in Tax_C, which are directly retained as consensus categories.

[0129] In one implementation, classification information is merged based on consensus categories to obtain target classification information, including: identifying the categories to be retained among the divergent categories in each analysis report by combining multiple initial texts; merging consensus categories and categories to be retained to generate target classification information.

[0130] The second agent reads the points of disagreement in the three analysis reports and verifies them in conjunction with the initial text. Regarding Report_A's suggestion that "Tech Enthusiast Focus - New Product Releases" in Tax_B should be split into "Hardware Releases" and "Software Releases," the second agent verifies that the initial text contains two different types of technology products: chip releases and model releases, and adopts this splitting suggestion. Regarding Report_B's suggestion that "Sports Event Reporting" in Tax_A should be split into subcategories such as "Football," "Basketball," and "Tennis," the second agent verifies that the initial text contains a considerable amount of reports on football, basketball, and tennis events, and adopts this splitting suggestion. Regarding Report_C's suggestion that both Tax_A and Tax_B omit the "Entertainment News" category, the second agent verifies that the initial text contains a large amount of entertainment news, and "Entertainment News" is added as a new category.

[0131] In one implementation, based on consensus categories, classification information is merged to obtain target classification information, including: identifying categories to be repaired for the divergent categories in each analysis report, and repairing the categories to be repaired; merging consensus categories and the repaired categories to be repaired to generate target classification information.

[0132] The second agent reads the self-criticism information from the three analysis reports and identifies the categories to be corrected. Addressing the issue of overly fine-grained classification pointed out in Report_A, the second agent merges the subcategories. Addressing the issue of overly coarse-grained classification pointed out in Report_B, the second agent splits it. The corrected categories are then incorporated into the target classification information along with the consensus categories.

[0133] In one implementation, a second intelligent agent is invoked to merge the classification information based on the classification information and analysis reports corresponding to each first intelligent agent to obtain target classification information. This includes: invoking the second intelligent agent to merge the classification information based on the classification information and analysis reports corresponding to each first intelligent agent; obtaining metadata for each classification dimension; and fusing the merged classification information and the metadata for each classification dimension to obtain target classification information.

[0134] After completing the aforementioned category merging, splitting, and repair, the second agent obtains metadata for each category dimension. For example, the geographic scope metadata obtained from the geographic dimension is "domestic / international". The second agent integrates this metadata into the corresponding category of the target classification information. The final target classification information Target_Tax adopts a three-layer structure: the first layer is the function type (such as "technology product release", "sports event report", "entertainment news"), the second layer is the geographic scope (such as "domestic" and "international"), and the third layer is the application scenario (such as "technology enthusiasts' focus" and "sports fans' focus"). Each category carries the integrated metadata.

[0135] Furthermore, the second intelligent agent generates a decision log during the merging process, recording the basis and reasoning for each decision. For example: "Adopt the 'Tech Enthusiast Focus - New Product Release' split suggestion, based on: Report_A proposed the split suggestion, and after initial text verification, there are two different types of technology products: chip release and model release." The decision log records a total of 15 key decisions, making the entire merging process auditable and traceable.

[0136] It should be noted that the use of an independent second intelligent agent for arbitration and merging in this embodiment is merely an example. Other alternatives include voting-based arbitration, where the arbitration power is delegated to the three first intelligent agents themselves, allowing them to vote on each point of disagreement after reviewing all the review reports, with the majority winning. Rule-based arbitration can also be used, with automatic adjudication through predefined procedural rules, such as "if both parties mark it as consensus, retain it; if one party marks it as omitted, supplement it." Alternatively, human arbitration can be employed, presenting multiple classification systems and review reports to domain experts for a final human decision. This specification does not limit this approach.

[0137] Using the above method, based on three sets of three-level classification information constructed by three first-level agents from three dimensions—functional type, application scenario, and region—three analysis reports are generated through polling-based difference analysis. These reports are then merged by a second-level agent according to the decision priorities of consensus retention, disagreement resolution, and self-criticism correction. Finally, the target classification information Target_Tax, which integrates multi-dimensional metadata, is obtained, and a complete decision log is generated. This target classification information can be used for automatic classification of new press releases.

[0138] In one implementation, a target classification agent is invoked to perform a classification operation on the text to be classified, thereby obtaining the target text category of the text to be classified. This includes: processing the text to be classified in batches to obtain multiple batches of text to be classified; inputting each batch of text to be classified into a target classification agent to obtain the text category output by each target classification agent; and concatenating the text categories output by each target classification agent to obtain the target text category.

[0139] Specifically, in this embodiment, when there are a large number of texts to be classified, such as 1,000 news articles to be classified, various methods can be used for classification. The specific method can be flexibly configured according to the actual application scenario, classification accuracy requirements and computing resources. This embodiment does not limit this.

[0140] In one implementation, a serial processing method can be used, where 1000 news articles are input into the target classification agent one by one, and the classification result for each news article is obtained sequentially. This method is simple to implement, has high classification accuracy, and is suitable for scenarios with a small number of texts to be classified or where real-time requirements are not high.

[0141] In another implementation, a batch parallel processing approach can be adopted, whereby the 1000 news articles are evenly divided into 5 batches of 200 articles each, and 5 target classification agents are invoked to perform classification operations in parallel. Each target classification agent is constructed based on the target classification information Target_Tax obtained in the previous embodiment. Each target classification agent reads the news articles in its assigned batch one by one, determines the primary, secondary, and tertiary categories to which each news article should belong according to the category definitions in the target classification information, and outputs the corresponding classification results. This approach can make full use of computing resources and significantly improve classification efficiency, especially suitable for scenarios with a large number of texts to be classified or with high requirements for processing timeliness.

[0142] In another implementation, a batch-based serial processing approach can be used, where the 1000 news articles are divided into multiple batches, and each batch is processed sequentially, while the news articles within each batch are classified in parallel. This approach strikes a balance between controlling computational resource consumption and ensuring processing efficiency.

[0143] Furthermore, alternative solutions can be used for the classification stage in this specification. For example, classification can be performed based on vector matching described by the classification system. This involves encoding the description of each category in the target classification information and each text to be classified into vectors, and then performing nearest neighbor classification based on cosine similarity. This approach is faster and less costly, suitable for scenarios where classification speed is critical and accuracy requirements are relatively lenient. Alternatively, LLM batch classification can be used. Instead of classifying text line by line, the agent receives a batch of texts to be classified and classifies the entire batch at once. This reduces the number of LLM calls and is suitable for scenarios where API call costs need to be controlled. This specification does not limit the specific implementation method of the classification stage; whether line-by-line classification, batch parallel processing, vector matching, or batch classification is used, all are within the scope of protection of this specification.

[0144] In this embodiment, a batch parallel processing method is used as an example. 1000 news articles are evenly divided into 5 batches of 200 articles each. Five target classification agents are invoked, each constructed based on the target classification information Target_Tax obtained in the previous embodiment. The 5 batches are input into the 5 target classification agents, and each agent performs the classification operation in parallel. Each agent reads the news articles in its assigned batch one by one, determines the primary, secondary, and tertiary categories of each news article according to the category definitions in the target classification information, and outputs the corresponding classification results. After parallel processing by the 5 target classification agents, the classification results output by each agent are concatenated in their original order to obtain the complete classification results for all 1000 news articles. Since all target classification agents use the same target classification information, the classification results between different batches are consistent. The concatenation process does not require category name alignment or granularity unification; the complete classification results can be obtained directly by combining them in their original order.

[0145] Optionally, each target classification agent can also attach a confidence level label to each classification result when outputting the classification result. The confidence level label is used to indicate the reliability of the classification result, such as high confidence or low confidence. For text to be classified that has ambiguous boundaries or is difficult to classify clearly, the target classification agent can mark its confidence level as low, indicating that manual review is required. By using confidence level labels, boundary cases that require manual processing can be effectively identified, improving the credibility and usability of the classification results.

[0146] It should be noted that the method for constructing target classification information in this embodiment has been described in detail in the preceding embodiments and will not be repeated here. The target classification agent performs classification operations based on this target classification information. Since the classification system is unified, the classification results output by each target classification agent can be directly concatenated without additional merging or alignment steps. Even when using a batch parallel processing method, there will be no problems with inconsistent category names or inconsistent granularity.

[0147] By utilizing the target classification information obtained in the aforementioned embodiments, and employing a target classification agent to perform classification operations on the text to be classified, efficient and consistent text classification is achieved. When the number of texts to be classified is large, batch parallel processing can significantly improve classification efficiency. Furthermore, since all target classification agents use the same target classification information, the consistency of classification results is guaranteed.

[0148] Corresponding to the embodiments of the first text classification method described above, this specification also provides corresponding embodiments of text classification devices. Figure 7 A schematic diagram of a text classification device according to one embodiment of this specification is shown. Figure 7 As shown, the device includes: The first acquisition module 702 is configured to acquire multiple initial texts.

[0149] The generation module 704 is configured to invoke at least two first agents to generate classification information corresponding to each first agent based on the plurality of initial texts. The classification information includes a hierarchical classification structure with at least two levels, each level including at least one category, and the classification dimensions of each first agent are different.

[0150] The analysis module 706 is configured to invoke each of the first intelligent agents to perform difference analysis on at least two categories of information and generate an analysis report corresponding to each first intelligent agent.

[0151] The merging module 708 is configured to invoke a second intelligent agent to merge the classification information based on the classification information and analysis report corresponding to each of the first intelligent agents, thereby obtaining target classification information, wherein the target classification information is used to classify the text to be classified.

[0152] Optionally, the device may further include: a text unit extraction module, configured to extract text units from multiple initial texts based on the semantic information of text statements in multiple initial texts, and input all extracted text units into a classification information generation module as input data for generating classification information.

[0153] The above is an illustrative scheme of a text classification device according to this embodiment. It should be noted that the technical solution of this text classification device and the technical solution of the above-described text classification method belong to the same concept. For details not described in detail in the technical solution of the text classification device, please refer to the description of the technical solution of the above-described text classification method.

[0154] Corresponding to the second text classification method embodiment described above, this specification also provides another text classification device embodiment. Figure 8 A schematic diagram of a text classification device according to one embodiment of this specification is shown. Figure 8 As shown, the device includes: The second acquisition module 802 is configured to acquire the text to be classified.

[0155] The classification module 804 is configured to call the target classification agent to perform classification operations on the text to be classified and obtain the target text category of the text to be classified. The target classification agent is constructed based on the target classification information generated in the aforementioned method embodiment.

[0156] Optionally, the device may further include: a batch processing module configured to process the texts to be classified in batches when there are a large number of texts to be classified, thereby obtaining multiple batches of texts to be classified; a parallel classification module configured to input each batch of texts to be classified into each target classification agent to obtain the text category output by each target classification agent; and a splicing module configured to splice the text categories output by each target classification agent to obtain the target text category.

[0157] Optionally, the classification output module can also be configured to attach a confidence tag to each classification result when outputting the target text category, to indicate the reliability of the classification result.

[0158] The above is an illustrative scheme of another text classification device according to this embodiment. It should be noted that the technical solution of this text classification device and the technical solution of the above-described text classification method belong to the same concept. For details not described in detail in the technical solution of this device, please refer to the description of the technical solution of the above-described text classification method.

[0159] Figure 9 A structural block diagram of a computing device according to one embodiment of this specification is shown. The components of the computing device 900 include, but are not limited to, a memory 910 and a processor 920. The processor 920 is connected to the memory 910 via a bus 930, and a database 950 is used to store data.

[0160] The computing device 900 also includes an access device 940, which enables the computing device 900 to communicate via one or more networks 960. Examples of these networks include a Public Switched Telephone Network (PSTN), a Local Area Network (LAN), a Wide Area Network (WAN), a Personal Area Network (PAN), or a combination of communication networks such as the Internet. The access device 940 may include one or more of any type of wired or wireless network interface (e.g., a Network Interface Controller (NIC)), such as an IEEE 802.11 Wireless Local Area Network (WLAN) interface, a Worldwide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, or a Near Field Communication (NFC) interface.

[0161] In one embodiment of this specification, the above-described components of the computing device 900 and Figure 9 Other components, not shown, can also be connected to each other, for example, via a bus. It should be understood that... Figure 9 The block diagram of the computing device shown is for illustrative purposes only and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.

[0162] The computing device 900 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or personal computers (PCs). The computing device 900 can also be a mobile or stationary server.

[0163] The processor 920 is used to execute the following computer program / instructions, which, when executed by the processor, implement the steps of the above-described text classification method.

[0164] The above is an illustrative scheme of a computing device according to this embodiment. It should be noted that the technical solution of this computing device and the technical solution of the above-described text classification method belong to the same concept. For details not described in detail in the technical solution of the computing device, please refer to the description of the technical solution of the above-described text classification method.

[0165] An embodiment of this specification also provides a computer-readable storage medium storing a computer program / instructions that, when executed by a processor, implement the steps of the above-described text classification method.

[0166] The above is an illustrative scheme of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium belongs to the same concept as the technical solution of the text classification method described above. For details not described in detail in the technical solution of the storage medium, please refer to the description of the technical solution of the text classification method described above.

[0167] An embodiment of this specification also provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of the above-described text classification method.

[0168] The above is an illustrative scheme of a computer program product according to this embodiment. It should be noted that the technical solution of this computer program product and the technical solution of the above-described text classification method belong to the same concept. For details not described in detail in the technical solution of the computer program product, please refer to the description of the technical solution of the above-described text classification method.

[0169] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0170] The computer instructions include computer program code, which may be in the form of source code, object code, executable file, or certain intermediate forms. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium may be appropriately added or removed according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media may not include electrical carrier signals and telecommunication signals.

[0171] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments in this specification are not limited to the described order of actions, because according to the embodiments in this specification, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the embodiments in this specification.

[0172] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0173] The preferred embodiments disclosed above are merely illustrative of this specification. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the embodiments described herein. These embodiments are selected and specifically described in this specification to better explain the principles and practical applications of the embodiments, thereby enabling those skilled in the art to better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.

Claims

1. A text classification method, characterized in that, include: Get multiple initial texts; At least two first agents are invoked to generate classification information corresponding to each first agent based on the plurality of initial texts. The classification information includes a hierarchical classification structure with at least two levels, each level including at least one category. The classification dimensions of each first agent are different. Each of the first intelligent agents is invoked to perform difference analysis on at least two categories of information, and an analysis report corresponding to each first intelligent agent is generated. The second intelligent agent is invoked to merge the classification information based on the classification information and analysis report corresponding to each of the first intelligent agents, thereby obtaining target classification information, wherein the target classification information is used to classify the text to be classified.

2. The method according to claim 1, characterized in that, Before invoking at least two first agents to generate classification information corresponding to each first agent based on the plurality of initial texts, the method further includes: Based on the semantic information of the text statements in the multiple initial texts, text units are extracted from the multiple initial texts; The process involves invoking at least two first agents, generating classification information for each first agent based on the plurality of initial texts, including: The at least two first agents are invoked to generate classification information corresponding to each first agent based on each text unit.

3. The method according to claim 2, characterized in that, The invocation of the at least two first agents, based on each text unit, generates classification information corresponding to each first agent, including: All the extracted text units are input into the at least two first agents to obtain the classification information output by each first agent.

4. The method according to any one of claims 1-3, characterized in that, The process involves invoking at least two first agents, generating classification information for each first agent based on the plurality of initial texts, including: Obtain the classification prompt words corresponding to each first agent, wherein the classification prompt words are used to prompt the corresponding first agent to classify the classification dimension and hierarchical classification structure; The initial texts and classification prompts are input into the corresponding first agent to obtain the classification information output by the first agent.

5. The method according to claim 1, characterized in that, The step of calling each of the first intelligent agents to perform difference analysis on at least two categories of information and generate an analysis report corresponding to each first intelligent agent includes: Obtain the analysis prompt words corresponding to each first agent, wherein the analysis prompt words are used to prompt the corresponding first agent to perform difference analysis on the difference analysis dimension, and the difference analysis dimension corresponds to the classification dimension; Input the multiple initial texts, at least two classification information, and the analysis prompt words into the corresponding first agent to obtain the analysis report output by the first agent.

6. The method according to claim 1, characterized in that, The invocation of the second intelligent agent involves merging the classification information based on the classification information and analysis reports corresponding to each of the first intelligent agents to obtain target classification information, including: The second intelligent agent is invoked to merge the classification information based on the classification information and analysis reports corresponding to each of the first intelligent agents. Obtain the metadata for each of the aforementioned classification dimensions; The target classification information is obtained by merging and combining the processed classification information and the metadata of each classification dimension.

7. The method according to any one of claims 1, 5, and 6, characterized in that, The invocation of the second intelligent agent involves merging the classification information based on the classification information and analysis reports corresponding to each of the first intelligent agents to obtain target classification information, including: The classification information and analysis report corresponding to each of the first intelligent agents are input into the second intelligent agent, and the consensus category in each of the classification information is identified based on each of the analysis reports. Based on the consensus category, the classification information is merged to obtain the target classification information.

8. The method according to claim 7, characterized in that, The step of merging the classification information based on the consensus category to obtain the target classification information includes: For the discrepancy categories in each of the aforementioned analysis reports, the categories to be retained are identified by combining the multiple initial texts; The consensus category and the category to be retained are merged to generate target classification information.

9. The method according to claim 8, characterized in that, The step of merging the classification information based on the consensus category to obtain the target classification information includes: For each category of discrepancy in the analysis reports, identify the category to be repaired, and repair the category to be repaired. The consensus category and the repaired category to be repaired are merged to generate target classification information.

10. The method according to claim 9, characterized in that, Also includes: The second intelligent agent is invoked to generate a decision log, wherein the decision log is used to record the process of generating the target classification information.

11. A text classification method, characterized in that, include: Get the text to be categorized; The target classification agent is invoked to perform a classification operation on the text to be classified, thereby obtaining the target text category of the text to be classified, wherein the target classification agent is constructed based on the target classification information generated by the method as described in any one of claims 1 to 10.

12. The method according to claim 11, characterized in that, The process of invoking the target classification agent to perform classification operations on the text to be classified and obtain the target text category of the text to be classified includes: The text to be classified is processed in batches to obtain multiple batches of text to be classified; Each batch of texts to be classified is input into each target classification agent to obtain the text category output by each target classification agent; The text categories output by each target classification agent are concatenated to obtain the target text category.

13. A text classification device, characterized in that, include: The first acquisition module is configured to acquire multiple initial texts; The generation module is configured to invoke at least two first agents to generate classification information corresponding to each first agent based on the plurality of initial texts. The classification information includes a hierarchical classification structure with at least two levels, each level including at least one category, and the classification dimensions of each first agent are different. The analysis module is configured to invoke each of the first intelligent agents to perform difference analysis on at least two categories of information and generate an analysis report corresponding to each first intelligent agent. The merging module is configured to invoke a second agent to merge the classification information based on the classification information and analysis reports corresponding to each of the first agents, thereby obtaining target classification information, wherein the target classification information is used to classify the text to be classified.

14. A text classification device, characterized in that, include: The second acquisition module is configured to acquire the text to be classified. The classification module is configured to invoke a target classification agent to perform a classification operation on the text to be classified and obtain the target text category of the text to be classified, wherein the target classification agent is constructed based on the target classification information generated by the method as described in any one of claims 1 to 10.

15. A computing device, characterized in that, include: Memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions, characterized in that, when the computer programs / instructions are executed by the processor, they implement the steps of the method according to any one of claims 1 to 12.

16. A computer-readable storage medium storing a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method according to any one of claims 1 to 12.

17. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method according to any one of claims 1 to 12.