Text classification method and related device

WO2026189490A1PCT designated stage Publication Date: 2026-09-17HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2026/083100
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2025-03-14
Filing Date
2026-03-12
Publication Date
2026-09-17

Smart Images

  • Figure CN2026083100_17092026_PF_FP_ABST
    Figure CN2026083100_17092026_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present application are a text classification method and a related device. The method comprises: acquiring first input text, and generating a first prompt, wherein the first prompt comprises the first input text, task label information described in the form of a graph, and prompt information used for instructing to classify the first input text on the basis of the task label information so as to determine a target task label; and sending the first prompt to a first language model, and receiving the target task label that is returned by the first language model and represents a classification result of the first input text, wherein a node corresponding to the target task label has no child node in the graph. In the method, multi-level and detailed task label information is customized, and a language model is used to achieve fine-grained and flexible text classification.
Need to check novelty before this filing date? Find Prior Art

Description

A text classification method and related equipment

[0001] This application claims priority to Chinese Patent Application No. 202510319464.7, filed on March 14, 2025, entitled "A Text Classification Method and Related Equipment", the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of artificial intelligence (AI) technology, and in particular to a text classification method, apparatus, computing device, computing device cluster, computer-readable storage medium, and computer program product. Background Technology

[0003] With the continuous development of AI technology, language models have emerged. Language models, such as large language models (LLMs), have natural language processing capabilities, can understand the meaning of natural language text, generate natural language content, and can be applied to various natural language tasks, such as translation, content generation, and content recommendation.

[0004] Typically, language models can provide natural language processing services in the form of dialogues. Specifically, users can converse with virtual objects such as digital assistants or chatbots. These virtual objects receive the input text sent by the user, invoke the language model to perform natural language processing on the input text, and return the corresponding response text to the user.

[0005] The input text received in the aforementioned dialogues between users and virtual objects has significant application value in certain scenarios. For example, when virtual objects such as digital assistants or chatbots are associated with a product, the input text can be used for product analysis. Furthermore, the input text can also be used as training data for fine-tuning language models.

[0006] Before applying input text to other scenarios, text classification is usually required to improve the application effect. In related technologies, the natural language processing capabilities of language models can be used to classify input text. However, text classification of input text is usually too general and it is difficult to achieve fine-grained and flexible text classification. Summary of the Invention

[0007] This application provides a text classification method that can achieve fine-grained and flexible text classification using a language model. This application also provides a text classification apparatus, computing device, computing device cluster, computer-readable storage medium, and computer program product corresponding to this method.

[0008] Firstly, this application provides a text classification method, which can be executed by a text classification device. The text classification device can be a software system deployed in a computing device cluster. The computing device cluster executes the program code of the software system, thereby executing the text classification method of this application. In some examples, the text classification device can be a hardware system; for example, the text classification device can be a computing device cluster with text classification functionality. The aforementioned hardware system executes the text classification method of this application during operation.

[0009] Specifically, firstly, the text classification device acquires a first input text, which indicates at least one natural language task. Then, the text classification device generates a first prompt word, which includes: the first input text, task label information described in a graph, and prompt information indicating that the first input text is classified based on the task label information to determine a target task label. The graph includes at least one of the following: independent nodes and a tree structure composed of multiple nodes, where each node corresponds to a task label, and each task label is associated with a task annotation describing that task label. In the tree structure, the task label corresponding to a child node is a child label of the task label corresponding to its parent node. The text classification device sends the first prompt word to a first language model and receives the target task label returned by the first language model, representing the classification result of the first input text. The node corresponding to the target task label has no child nodes in the graph.

[0010] In this method, by adding task label information to the prompt words input to the language model, the language model can classify the input text based on the prompt words' prompting capabilities and the task label information. The task label information is described in a graph form. On the one hand, business users can customize the task labels corresponding to each node; on the other hand, the tree structure composed of multiple nodes in the graph can reflect the hierarchical relationship between the task labels, enabling refined task labeling. Furthermore, task labels are associated with task annotations, allowing business users to configure the specific definitions of each task label based on actual text classification needs. Thus, by customizing multi-level, detailed task label information, fine-grained and flexible text classification can be achieved using the language model.

[0011] In some possible implementations, the prompting information in the first prompt word used to indicate classifying the first input text based on the task tag information and determining the target task tag may include prompting information to indicate performing the following steps: performing meta-task recognition on the first input text, determining the natural language task indicated by the first input text, determining the first task tag based on the natural language task indicated by the first input text and the task tag information, and determining the target task tag based on the first task tag.

[0012] In this method, by configuring the aforementioned prompt information in the first prompt word, the first language model can perform meta-task recognition on the first input text, distinguish the task instruction content in the first input text from other content (such as modifiers, background information, etc.), prevent other content in the first input text from interfering with text classification, and thus determine the natural language task indicated by the first input text, complete the preliminary text classification, and then combine the recognized meta-task to perform detailed text classification, thereby realizing a hierarchical and logical text classification process.

[0013] In some possible implementations, the first task label is determined as the target task label in response to the fact that the node corresponding to the first task label has no child nodes in the graph.

[0014] In this method, when the first task label is already the lowest and most detailed classification result in the graph, there is no need to further subdivide the first task label. The first language model can directly output the first task label as the target task label to complete fast and direct text classification.

[0015] In some possible implementations, in response to the existence of child nodes in the graph of the node corresponding to the first task label, natural language processing is performed on the first input text to generate a first response to the first input text. Based on the first response to the first input text, the target task label is determined from the child nodes of the node corresponding to the first task label.

[0016] In this method, when the first task label is not the lowest and most detailed classification result in the graph, the first task label needs to be further subdivided. By pre-executing the first input text, the general classification result is subdivided to determine a more granular classification result.

[0017] In some possible implementations, the first prompt word may also include prompt information for instructing the following steps to be performed: based on the task label information, perform a reconfirmation of the target task label to obtain a reconfirmation result; in response to the reconfirmation result indicating that the target task label is correct, output the target task label; in response to the reconfirmation result indicating that the target task label has an error, update the target task label according to the reconfirmation result.

[0018] In this method, by configuring the above prompt information in the first prompt word, the first language model can combine the task label information to confirm whether the obtained target task label is correct, further verify and correct the confirmed target task label, exclude unsuitable task labels, so that the final output target task label is more in line with the business party's text classification requirements, and improve the accuracy of text classification.

[0019] In some possible implementations, the graph includes nodes corresponding to key task labels, which are associated with key task annotations. These annotations describe that the task label for text related to the target entity is the key task label. When the first input text is related to the target entity, the target task label returned by the first language model is the key task label.

[0020] In this method, considering that the business may have specific text classification requirements related to the target entity, the key task annotation associated with the key task tag in the task tag information is configured as "the task tag of the text related to the target entity is the key task tag", so that the text classification is not limited to natural language tasks and text classification is carried out in the dimension of the target entity.

[0021] Secondly, this application provides a text classification device, which includes:

[0022] An acquisition module is used to acquire a first input text; wherein the first input text indicates at least one natural language task;

[0023] A generation module is used to generate a first prompt word; wherein the first prompt word includes: the first input text, task tag information described in the form of a graph, and prompt information for instructing the first input text to be classified based on the task tag information to determine the target task tag; the graph includes at least one of the following: independent nodes and a tree structure composed of multiple nodes, one node corresponds to one task tag, each task tag is associated with a task annotation for describing the task tag, and the task tag corresponding to the child node in the tree structure is a child tag of the task tag corresponding to the parent node;

[0024] The communication module is used to send the first prompt word to the first language model and receive the target task label returned by the first language model, which represents the classification result of the first input text; wherein the node corresponding to the target task label has no child nodes in the graph.

[0025] In some possible implementations, the prompting information in the first prompt word used to instruct the classification of the first input text based on the task tag information to determine the target task tag includes:

[0026] Prompt information used to instruct you to perform the following steps:

[0027] Meta-task recognition is performed on the first input text to determine the natural language task indicated by the first input text;

[0028] The first task label is determined based on the natural language task indicated by the first input text and the task label information;

[0029] Determine the target task label based on the first task label.

[0030] In some possible implementations, determining the target task label based on the first task label includes:

[0031] In response to the fact that the node corresponding to the first task label has no child nodes in the graph, the first task label is determined as the target task label.

[0032] In some possible implementations, determining the target task label based on the first task label includes:

[0033] In response to the fact that the node corresponding to the first task label has child nodes in the graph, natural language processing is performed on the first input text to generate a first response to the first input text.

[0034] Based on the first response to the first input text, the target task label is determined from the child nodes of the node corresponding to the first task label.

[0035] In some possible implementations, the first prompt word may also include:

[0036] Prompt information used to instruct you to perform the following steps:

[0037] Based on the task tag information, the target task tag is reconfirmed to obtain a reconfirmation result;

[0038] In response to the repeated confirmation result indicating that the target task label is correct, the target task label is output;

[0039] In response to the duplicate confirmation result indicating that the target task label has an error, the target task label is updated according to the duplicate confirmation result.

[0040] In some possible implementations, the graph includes nodes corresponding to key task labels, and the key task labels are associated with key task annotations, which describe that the task labels of the text related to the target entity are the key task labels.

[0041] The first input text is related to the target entity, and the target task label returned by the first language model is the key task label.

[0042] Thirdly, this application provides a computing device, the computing device including a chip system, the chip system including a processor and a power supply circuit, the power supply circuit being used to supply power to the processor, the processor being used to execute the text classification method as described in the first aspect or any implementation thereof.

[0043] Fourthly, this application provides a computing device cluster, the computing device cluster including at least one computing device, the at least one computing device including a chip system, the chip system including a processor and a power supply circuit, the power supply circuit being used to supply power to the processor, the processor being used to execute the text classification method as described in the first aspect or any implementation thereof.

[0044] Fifthly, this application provides a computer-readable storage medium including computer-readable instructions for implementing the text classification method as described in the first aspect or any implementation thereof.

[0045] In a sixth aspect, this application provides a computer program product comprising computer-readable instructions for implementing the text classification method as described in the first aspect or any implementation thereof.

[0046] Based on the implementation methods provided in the above aspects, this application can be further combined to provide more implementation methods. Attached Figure Description

[0047] To more clearly illustrate the technical method of this application, the accompanying drawings used will be briefly described below.

[0048] Figure 1 is a schematic diagram of the architecture of a text classification device provided in this application;

[0049] Figure 2 is a schematic diagram of the architecture of another text classification device provided in this application;

[0050] Figure 3 is a flowchart illustrating a text classification method provided in this application;

[0051] Figure 4 is a schematic diagram of a task tag information provided in this application;

[0052] Figure 5 is a structural schematic diagram of a text classification device provided in this application;

[0053] Figure 6 is a schematic diagram of the structure of a computing device provided in this application;

[0054] Figure 7 is a schematic diagram of the structure of a computing device cluster provided in this application;

[0055] Figure 8 is a schematic diagram of another computing device cluster provided in this application. Detailed Implementation

[0056] The terms "first" and "second" in this application are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, the features defined as "first" or "second" may explicitly or implicitly include one or more of that feature.

[0057] First, let me introduce some of the technical terms used in this application.

[0058] AI technology refers to the technology of simulating human intelligence through computers. Natural language processing (NLP) is an important branch of AI technology, which aims to enable computers to understand, generate, and process human language.

[0059] A language model is a machine learning model with natural language processing capabilities. It can understand the meaning of natural language text and generate natural language content. For example, a language model can be an LLM (Language Model). Compared to non-LLM language models, LLMs use much richer data for training and have a large number of model parameters, enabling them to process more complex and diverse texts.

[0060] Language models can be applied to various natural language tasks, such as translation, content generation, content recommendation, and question answering. In some examples, language models can provide natural language processing services in the form of dialogues. Specifically, users interact with virtual objects such as digital assistants or chatbots; that is, users interact with virtual objects through human-computer dialogue. In one round of dialogue, the user sends input text (query) to the virtual object. The virtual object receives the input text, calls the language model to perform natural language processing on the input text, obtains the response text returned by the language model, and sends the response text back to the user.

[0061] The input text received during the dialogue between the user and the virtual object has high application value in some scenarios. The following two scenarios are used as examples to illustrate this.

[0062] The first scenario: product analysis scenario.

[0063] Virtual objects such as digital assistants and chatbots can be associated with a specific product. Taking the example of a virtual object providing consultation services for multiple products developed by a company, the virtual object can be a digital assistant or chatbot deployed on the company's website, online store, or application (APP). When a user has a question related to multiple products developed by the company, they can consult the virtual object. The virtual object uses a language model to perform natural language processing on the user's input text and provides a corresponding response. In this way, product consultation services are provided to users without the need for human customer service intervention.

[0064] Since the virtual object is related to multiple products developed by the company, the input text is also related to multiple products developed by the company. The input text can be used in the company's product analysis. For example, by combining the input text, we can analyze users' interests, shortcomings, feedback and so on regarding the multiple products developed by the company, and then improve the products developed by the company.

[0065] The second scenario: language model training scenario.

[0066] The training process of a language model is typically divided into a pre-training phase and a post-training phase. In the pre-training phase, the language model is trained to acquire grammatical knowledge and semantic understanding, enabling it to generate coherent text. In the post-training phase, the inference performance of the language model in specific natural language tasks is improved. For example, supervised fine-tuning (SFT) allows the language model to learn the style of a specific natural language task, understand the task requirements, and improve its performance on that task.

[0067] In the post-training stage of a language model, question-answer pairs for a specific natural language task are needed as training data. These pairs consist of input text and corresponding response text. Therefore, the input text can be used for fine-tuning the language model.

[0068] Before applying input text to other scenarios, text classification is typically necessary to improve application effectiveness. Continuing with the two scenarios mentioned above, in product analysis, text classification determines which product or aspect of a product the user is inquiring about, allowing for targeted product improvements. In language model training, text classification identifies training data for different natural language tasks. This training data is then used to fine-tune different language models, improving their performance on their respective natural language tasks.

[0069] In related technologies, considering that the process of classifying input text falls under natural language processing, the natural language processing capabilities of language models can be utilized for text classification. For example, by pre-configuring the mapping relationship between keywords and classification results, the language model determines whether keywords exist in the input text. If keywords exist, it outputs the classification result that maps to those keywords, thus achieving text classification. Another example is determining the classification result of the input text based on the embedding vector of the input text output from the input layer of the language model.

[0070] However, the above methods typically provide a general classification of the input text. The language model can only provide a general classification result for the input text and cannot output a custom classification result. This makes it difficult to meet the personalized classification needs of business users for the input text and to achieve fine-grained and flexible text classification.

[0071] In view of this, this application provides a text classification method. Specifically, firstly, a first input text is obtained, which indicates at least one natural language task. Then, a first prompt word is generated, which includes: the first input text, task label information described in the form of a graph, and prompt information for instructing the classification of the first input text based on the task label information to determine the target task label. The graph includes at least one of the following: independent nodes and a tree structure composed of multiple nodes, where each node corresponds to a task label, and each task label is associated with a task annotation describing the task label. The task label corresponding to a child node in the tree structure is a child label of the task label corresponding to the parent node. The first prompt word is sent to a first language model, and the target task label representing the classification result of the first input text is received from the first language model. The node corresponding to the target task label has no child nodes in the graph.

[0072] In this method, by adding task label information to the prompt words input to the language model, the language model can classify the input text based on the prompt words' prompting capabilities and the task label information. The task label information is described in a graph form. On the one hand, business users can customize the task labels corresponding to each node; on the other hand, the tree structure composed of multiple nodes in the graph can reflect the hierarchical relationship between the task labels, enabling refined task labeling. Furthermore, task labels are associated with task annotations, allowing business users to configure the specific definitions of each task label based on actual text classification needs. Thus, by customizing multi-level, detailed task label information, fine-grained and flexible text classification can be achieved using the language model.

[0073] To make the technical solution of this application clearer and easier to understand, the system architecture of this application will be described below with reference to the accompanying drawings.

[0074] Referring to the schematic diagram of the text classification device shown in Figure 1, the first input text is text input by the user that indicates at least one natural language task. For example, the first input text may be text input by the user during a dialogue with a virtual object.

[0075] The text classification device 10 can acquire a first input text and generate a first prompt word. The first prompt word may include the following three parts: the first input text, task label information described in the form of a diagram, and prompt information used to instruct the first input text to be classified based on the task label information to determine the target task label.

[0076] The text classification device 10 can call a first language model. By sending a first prompt word to the first language model, the first language model returns a target task label representing the classification result of the first input text based on the prompting capability of the first prompt word, thereby realizing text classification for the first input text.

[0077] In this embodiment, the graph includes at least one of the following: independent nodes and a tree structure composed of multiple nodes, where each node corresponds to a task label. That is, different nodes in the graph represent different task labels. The graph may include a tree structure composed of multiple nodes, where the task label corresponding to a child node in the tree structure is a child label of the task label corresponding to its parent node. Thus, the tree structure represents the hierarchical relationship between multiple task labels. When the first language model performs text classification on the first input text, the node corresponding to the output target task label does not have child nodes in the graph. In other words, the first language model performs detailed classification of the first input text based on the task label information described in the form of a graph, until the task label corresponding to the lowest-level node in the graph is determined, achieving fine-grained text classification.

[0078] Furthermore, each task label is associated with a task annotation that describes that task label. These annotations, written in natural language, provide a basis for the first language model to classify the first input text. Additionally, business units with text classification needs can customize the task annotations based on their specific requirements, ensuring that the task labels align with these needs and enhancing the flexibility of text classification.

[0079] In some embodiments, referring to the schematic diagram of the text classification device shown in FIG2, the text classification device 10 can be divided according to the functions that the first language model can achieve. It may include a meta-task recognizer, a pre-executor, and a reflector. The meta-task recognizer can be used to perform meta-task recognition on the first input text to determine the natural language task indicated by the first input text. The natural language task may correspond to the first task label in the task label information. If the node corresponding to the first task label has no child nodes in the graph, it indicates that the first task label is the finest granular task label, and the first language model can directly output the first task label as the target task label.

[0080] If the node corresponding to the first task label has child nodes in the graph, it indicates that the first task label can still be subdivided. In this case, the pre-executor can be used to perform natural language processing on the first input text. That is, it pre-executes the natural language task indicated by the first input text, combines it with the first response to the first input text, and determines the target task label from the child nodes of the node corresponding to the first task label, thus achieving task label subdivision. The reflector can be used to repeatedly confirm the target task label. Through the process of repeated confirmation, the accuracy of text classification for the first input text is improved.

[0081] The text classification device 10 can take different forms. In some embodiments, the text classification device 10 can be deployed locally; for example, it can be downloaded to a local server or local computing device and run. Alternatively, it can be deployed in a private enterprise environment. In other embodiments, the text classification device 10 can be deployed in a middleware platform; for example, it can be deployed as a business service providing text classification capabilities in a technology middleware platform for use by other services. In still other embodiments, the text classification device 10 can be deployed in a cloud service; for example, it can be deployed on a cloud platform, utilizing the computing resources provided by the cloud platform to implement the text classification function.

[0082] Based on the text classification device 10 shown in Figure 1, this application also provides a text classification method. The text classification method of this application will be described below with reference to embodiments.

[0083] Referring to the flowchart of the text classification method shown in Figure 3, the method includes the following steps:

[0084] S301: The text classification device 10 acquires the first input text.

[0085] In this embodiment of the application, the first input text can be understood as text that has a text classification requirement and is to be classified, and the first input text can indicate at least one natural language task.

[0086] In other words, the first input text can be the text sent by the user to the virtual object during a conversation with a digital assistant, chatbot, or other virtual object. Since the first input text indicates a natural language task, the virtual object can perform natural language processing on the first input text by calling a language model, thereby enabling human-computer dialogue between the user and the virtual object.

[0087] This application does not limit the method by which the user sends the first input text to the virtual object. For example, the user can converse with the virtual object by text input, in which case the first input text is the text input by the user. Alternatively, the user can converse with the virtual object by voice input, in which case the text obtained from the voice input is used as the first input text through voice recognition.

[0088] The following are three examples of the first input text for illustration.

[0089] First example:

[0090] "At a press conference yesterday, tech giant A unveiled their latest artificial intelligence model B. This model is said to possess unprecedented capabilities in text generation and understanding, marking a major breakthrough in AI technology."

[0091] Model B demonstrated significantly improved performance in natural language tasks, showcasing outstanding capabilities in dialogue understanding, article generation, and complex sentiment analysis. Company A presented several application examples of Model B at the launch event, including news writing, poetry creation, and even coding. These impressive demonstrations showcased the potential future applications of AI.

[0092] Company A stated that they will continue to focus on improving the performance of Model B and expanding its breadth and depth of application. They also emphasized that while Model B is powerful, it is necessary to ensure that AI technology, while bringing convenience to humanity, also protects human interests…

[0093] Please create a headline and a summary for the above news article.

[0094] In the first example of the first input text, the first input text consists of the first three paragraphs of news content and the fourth paragraph of task instructions. The user sends the first input text to the virtual object, hoping that the virtual object can create a headline and a summary for the first three paragraphs of news content. Therefore, the natural language tasks indicated by the first input text are "creating a headline" and "creating a summary".

[0095] Second example:

[0096] "Please help me revise the following paragraph and tell me the corresponding changes in the original text in the form of an analysis."

[0097] After repeated persuasion from his classmates, his anger gradually subsided, and a weak smile finally appeared on his face.

[0098] In the second example of the first input text, the first input text consists of a first paragraph of task instructions and a second paragraph of content to be modified. The user sends the first input text to the virtual object, hoping that the virtual object can modify the content to be modified in the second paragraph and provide the basis for the modification. Therefore, the natural language task indicated by the first input text is "error correction task".

[0099] The third example:

[0100] "What is the size of Company B's product C?"

[0101] In the third example of the first input text, the first input text consists of a question to be answered. The user sends the first input text to the virtual object, hoping that the virtual object can provide the answer to the question. Therefore, the natural language task indicated by the first input text is a "question-answering task".

[0102] This application does not limit the method of obtaining the first input text. For example, the text classification device 10 can obtain the first input text from a database of virtual objects, wherein the database of virtual objects can be used to store text received within a historical time period. Alternatively, the text classification device 10 can also obtain the first input text from a corpus, wherein the corpus can be used to store text generated during user interaction with virtual objects.

[0103] S302: The text classification device 10 generates the first prompt word.

[0104] In natural language tasks, prompts can be used to guide language models to produce specific outputs. By configuring prompts, language models can be helped to understand the context and requirements of natural language tasks, enabling them to handle different types of natural language processing tasks without retraining, thus increasing the scalability and flexibility of language models.

[0105] In this embodiment, a first language model is used to classify the first input text. The first language model can be any language model with natural language processing capabilities; for example, the first language model can be an LLM. By generating first prompt words, the first language model understands the text classification requirements, enabling it to classify the first input text according to those requirements.

[0106] Specifically, the first prompt may include: the first input text, task label information described in the form of a diagram, and prompt information for instructing the first input text to be classified based on the task label information to determine the target task label.

[0107] In other words, the first prompt word can include three parts. The first part is the first input text. Since this embodiment requires text classification of the first input text, configuring the first input text in the first prompt word informs the first language model of the object to be classified. The second part is task label information, which can be understood as information related to task labels. Configuring task label information in the first prompt word informs the first language model of the text classification requirements, such as informing the first language model of the task labels representing the classification results and the classification criteria corresponding to each task label. The third part is a prompt message used to instruct the first language model to classify the first input text based on the task label information and determine the target task label. Configuring the above prompt message in the first prompt word informs the first language model of the text classification task to be performed.

[0108] In this embodiment, the task label information can be configured by the business party with text classification requirements. In other words, the business party with text classification requirements can customize the task label information based on the actual text classification requirements, so that the first language model can classify the first input text according to the actual text classification requirements. Different business parties can have different text classification requirements for the same input text, which can meet the personalized needs of the business parties and realize flexible text classification.

[0109] Specifically, the diagram includes at least one of the following: independent nodes and a tree structure composed of multiple nodes, where each node corresponds to a task label, and the task label corresponding to a child node in the tree structure is a child label of the task label corresponding to the parent node.

[0110] In other words, in this embodiment, task labels are represented in the form of nodes, and multiple nodes form a graph. The task labels corresponding to the nodes in this graph are the classification results that the first language model can provide. That is, the classification results for text classification of the first input text need to be selected from the task labels corresponding to the nodes in the graph. In this way, the task label information is described in the form of a graph, informing the first language model what classification results are available.

[0111] The diagram can include two types of nodes: independent nodes and tree structures composed of multiple nodes. Independent nodes can be understood as nodes that are not connected to any other nodes, while tree structures composed of multiple nodes can be understood as multiple nodes that are connected. The connections between nodes can be used to represent the hierarchical relationship of task labels; that is, there is a hierarchical relationship between the task label corresponding to a parent node and the task label corresponding to a child node, and the task label corresponding to a child node is a child label of the task label corresponding to the parent node.

[0112] Referring to Figure 4, which illustrates a task tag information diagram, this task tag information includes 7 nodes, each corresponding to a task tag. Nodes 1 and 2 are independent nodes. Nodes 3 to 7 form a tree structure, with node 3 as the root node. The task tag corresponding to node 3 is the top-level task tag in this tree structure. Nodes 4 and 5 are child nodes of node 3, and the task tags corresponding to node 4 and 5 are child tags of the task tag corresponding to node 3. Nodes 6 and 7 are child nodes of node 4, and the task tags corresponding to node 6 and 7 are child tags of the task tag corresponding to node 4. Nodes 6 and 7 do not have child nodes; therefore, the task tags corresponding to node 6 and 7 cannot be further subdivided and are the bottom-level task tags in this tree structure.

[0113] By describing task label information in the form of a graph, which includes a tree structure composed of multiple nodes, a task label can have sub-labels. This constructs a multi-level task label system from general classification to detailed classification. In the text classification process, it is no longer limited to the general classification of the first input text, but can find the lowest level and most detailed classification results through the tree structure, thereby achieving a finer subdivision of task labels and improving the level of detail in text classification.

[0114] Each task tag is associated with a task annotation that describes that task tag. The task annotation can be understood as natural language content used to describe and define the task tag; for example, it can describe the scope and attributes of the task tag. In other words, business units with text classification needs can configure task annotations for each task tag, detailing their text classification requirements and clearly distinguishing different task tags. This allows the first language model to understand the classification criteria for each task tag based on the task annotations, providing specific and detailed evidence for text classification. On the one hand, through task annotations, different business units can configure personalized classification criteria for the same task tag (e.g., task tags with the same name), ensuring that the text classification process matches the actual text classification needs. On the other hand, the detailed descriptions of each task tag through task annotations make the first language model's understanding of each task tag more accurate, improving the accuracy of text classification.

[0115] S303: The text classification device 10 sends the first prompt word to the first language model and receives the target task label returned by the first language model, which represents the classification result of the first input text.

[0116] By sending the first prompt word to the first language model, the first language model can classify the first input text based on the prompt word's prompting ability and the task label information. From the task labels included in the task label information, it selects the target task label that matches the first input text and outputs the target task label as the classification result of the first input text, thus completing the text classification.

[0117] In this embodiment, the node corresponding to the target task label has no child nodes in the graph. That is, the target task label is a task label that does not have child labels and cannot be further subdivided. For example, in the task label information shown in Figure 4, the task labels corresponding to node 1, node 2, node 6, and node 7 can be output as the target task label.

[0118] In this way, the first language model can perform detailed classification of the first input text based on task label information until the classification result cannot be further subdivided, avoiding only a general classification of the first input text.

[0119] In the text classification method provided in this application embodiment, business users can configure task label information based on actual text classification needs. Furthermore, the task labels can have a hierarchical relationship, enabling fine-grained text classification. Simultaneously, by configuring task annotations in the task label information, the first language model's understanding of each classification result becomes more accurate and detailed, improving the accuracy of text classification.

[0120] In some embodiments, considering that the first input text can indicate a natural language task, the prompt information in the first prompt word used to indicate classifying the first input text based on task label information and determining the target task label can be used to indicate the prompt information for performing the following steps: performing meta-task recognition on the first input text, determining the natural language task indicated by the first input text, determining the first task label based on the natural language task indicated by the first input text and the task label information, and determining the target task label based on the first task label.

[0121] Meta-task recognition can be understood as the process of extracting the natural language task from the first input text. By configuring the aforementioned prompt information in the first prompt word, the first language model can perform meta-task recognition on the first input text, distinguishing the task instruction content in the first input text from other content (such as modifiers, background information, etc.), preventing other content in the first input text from interfering with text classification, and thus determining the natural language task indicated by the first input text.

[0122] The natural language task obtained through meta-task identification is also the task label corresponding to the node in the task label information. It is understandable that the natural language task indicated by the first input text can, to some extent, reflect the type of the first input text; therefore, the natural language task can exist as a task label in the task label information. In this embodiment, the natural language task indicated by the first input text can correspond to the first task label. That is, the task label information described in the form of a graph includes a node representing the natural language task indicated by the first input text, and this node corresponds to the first task label.

[0123] For example, if the natural language task indicated by the first input text is task A, and the task label information described in the form of a graph includes node A, and the task label corresponding to node A is task A, then the first task label is the task label corresponding to node A.

[0124] By configuring the aforementioned prompt information in the first prompt word, the first language model first performs meta-task recognition on the first input text to complete preliminary text classification, and then combines the recognized meta-tasks to perform detailed text classification, thus achieving a hierarchical and logical text classification process.

[0125] The following explains the two possible scenarios for the first task label.

[0126] The first scenario: In response to the fact that the node corresponding to the first task label has no child nodes in the graph, the first task label is determined as the target task label.

[0127] In other words, when the first task label is already the lowest and most detailed classification result in the graph, there is no need to further subdivide the first task label. In this case, the first language model can directly output the first task label as the target task label, that is, the classification result of the first input text is the first task label.

[0128] Taking the first example mentioned above and the task label information shown in Figure 4 as examples, in the first example, the natural language tasks indicated by the first input text are "title creation task" and "summarization task". If "title creation task" corresponds to node 1 in Figure 4 and "summarization task" corresponds to node 2 in Figure 4, that is, the first task label is the task label corresponding to node 1 and the task label corresponding to node 2. Since neither node 1 nor node 2 has child nodes, the target task label of the first input text is the task label corresponding to node 1 and the task label corresponding to node 2.

[0129] The second scenario: In response to the existence of child nodes in the graph of the node corresponding to the first task label, natural language processing is performed on the first input text to generate a first response to the first input text. Based on the first response to the first input text, the target task label is determined from the child nodes of the node corresponding to the first task label.

[0130] In other words, when the first task label is not the lowest and most detailed classification result in the graph, the first task label needs to be further subdivided. In this case, the first language model can perform natural language processing on the first input text and combine the reasoning result of the first input text (i.e. the first response) to determine the target task label from the sub-labels of the first task label.

[0131] Thus, by identifying the meta-task, the approximate classification result of the first input text (i.e., the first task label) is determined. Then, by pre-executing the first input text, the approximate classification result is further subdivided to determine a more granular classification result.

[0132] Taking the second example mentioned above and the task label information shown in Figure 4 as examples, in the second example, the natural language task indicated by the first input text is "error correction task". It is understandable that the "error correction task" is used to correct errors in the input text. However, there can be many reasons why the input text contains errors. The "error correction task" obtained by meta-task identification alone cannot achieve detailed text classification. Natural language processing is required to determine the specific classification result. Therefore, the node corresponding to the "error correction task" can be configured with child nodes.

[0133] If the "error correction task" corresponds to node 3 in Figure 4, that is, the first task label is the task label corresponding to node 3, since node 3 has child nodes, the first language model performs natural language processing on the first input text based on the prompting capability of the first prompt word to obtain a first reply, as follows:

[0134] "Corrected sentence: After the students repeatedly persuaded him, his anger gradually subsided, and finally a faint smile reluctantly appeared on his face.

[0135] Analysis:

[0136] 1. In the original sentence, "才使他怒气逐渐平息" uses "才使" to express the sequence and result, but this usage is slightly stiff. Changing it to "his anger gradually subsided" is more natural while maintaining the causal relationship intended by the original sentence.

[0137] 2. In the part "finally a faint smile reluctantly appeared on his face", the original sentence is correct and does not need to be modified. It is kept as it is here because it properly describes the final emotional change."

[0138] Based on the above first reply, the first language model determines from the child nodes of node 3 (i.e., node 4 and node 5) that the task label corresponding to node 5 (e.g., "chaotic structure") matches the first reply, and node 5 has no child nodes, therefore, the target task label of the first input text is the task label corresponding to node 5.

[0139] In some embodiments, the task tag information described in the form of a graph may include a node corresponding to a key task tag, the key task tag is associated with a key task annotation, and the key task annotation is used to describe that the task tag of the text related to the target entity is the key task tag.

[0140] In other words, considering that the service provider may have specific text classification requirements related to the target entity, for example, in the product analysis scenario, the service provider's text classification requirement may be classification according to product types. In this case, by configuring the key task annotation associated with the key task tag in the task tag information as "the task tag of the text related to the target entity is the key task tag", during the classification process of the first input text by the first language model, if the first input text is related to the target entity, based on the prompting capability of the first prompt word, the first language model can output the classification result of the first input text as the key task tag. In this way, text classification is not limited to natural language tasks, and text classification based on the dimension of the target entity is achieved.

[0141] Taking the third example above as an illustration, the key task annotation associated with the key task label can be "All queries related to Company B's products are categorized under 3C," meaning the target entity is Company B's products. In the third example, the first input text queries Company B's product C. Therefore, the first input text is related to the target entity, and thus, the target task label of the first input text output by the first language model can be this key task label.

[0142] Furthermore, the text classification method provided in this application embodiment can also introduce a reflection mechanism. Specifically, the first prompt word can also include prompt information for instructing the execution of the following steps: based on task label information, repeatedly confirm the target task label to obtain a repeated confirmation result; in response to the repeated confirmation result indicating that the target task label is correct, output the target task label; in response to the repeated confirmation result indicating that the target task label has an error, update the target task label according to the repeated confirmation result.

[0143] By configuring the above prompt information in the first prompt word, after confirming the target task label of the first input text, the first language model will also perform a "re-confirmation" step. That is, the first language model can combine the task label information to confirm whether the obtained target task label is correct.

[0144] Continuing with the third example mentioned above, the target task label for the first input text initially confirmed by the first language model can be a task label representing "question and answer" and a task label representing "3C". Since the first prompt word contains the aforementioned prompt information, the first language model re-confirms the target task label. Because a key task label exists in the task label information, the key task annotation associated with this key task label can be "Inquiries related to Company B's products are all classified as 3C". The first language model determines that Company B's product C in the first input text belongs to the target entity. Therefore, it corrects the target task label, updating the target task label from the task label representing "question and answer" and the task label representing "3C" to the task label representing "3C".

[0145] Thus, by configuring the first prompt word to instruct the first language model to perform secondary confirmation and reflection on the target task labels, the first language model can further verify and correct the confirmed target task labels, eliminate unsuitable task labels, and make the final output target task labels more consistent with the business's text classification requirements, thereby improving the accuracy of text classification.

[0146] Based on the text classification method described above, this application also provides a text classification device 10 as described above. The text classification device 10 will be described below with reference to the accompanying drawings.

[0147] Referring to the structural schematic diagram of the text classification device 10 shown in Figure 5, the text classification device 10 includes:

[0148] The acquisition module 101 is used to acquire a first input text; wherein the first input text indicates at least one natural language task;

[0149] The generation module 102 is used to generate a first prompt word; wherein, the first prompt word includes: a first input text, task label information described in the form of a graph, and prompt information for instructing the first input text to be classified based on the task label information to determine the target task label; the graph includes at least one of the following: independent nodes and a tree structure composed of multiple nodes, one node corresponds to one task label, each task label is associated with a task annotation for describing the task label, and the task label corresponding to the child node in the tree structure is a child label of the task label corresponding to the parent node;

[0150] The communication module 103 is used to send the first prompt word to the first language model and receive the target task label returned by the first language model, which represents the classification result of the first input text; wherein the node corresponding to the target task label has no child nodes in the graph.

[0151] The acquisition module 101, generation module 102, and communication module 103 can all be implemented in software or in hardware. For example, the implementation of the acquisition module 101 will be described below. Similarly, the implementation of the generation module 102 and communication module 103 can refer to the implementation of the acquisition module 101.

[0152] As an example of a software functional unit, module 101 may include code running on a computing instance. The computing instance may include at least one of a physical host (computing device), a virtual machine, or a container. Further, the aforementioned computing instance may be one or more. For example, module 101 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code may be distributed within the same region or in different regions. Further, the multiple hosts / virtual machines / containers used to run the code may be distributed within the same availability zone (AZ) or in different AZs, each AZ including one or more geographically proximate data centers. Typically, a region may include multiple AZs.

[0153] Similarly, multiple hosts / virtual machines / containers used to run this code can be distributed within the same Virtual Private Cloud (VPC) or across multiple VPCs. Typically, a VPC is set up within a region. Communication between two VPCs within the same region, as well as between VPCs in different regions, requires a communication gateway to be set up within each VPC to enable interconnection between VPCs.

[0154] As an example of a hardware functional unit, the acquisition module 101 may include at least one computing device, such as a server. Alternatively, the acquisition module 101 may be implemented using a central processing unit (CPU), an application-specific integrated circuit (ASIC), or a programmable logic device (PLD). The PLD may be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), a data processing unit (DPU), a neural network processing unit (NPU), a system-on-chip (SoC), an offload card, an accelerator card, or any combination thereof.

[0155] The multiple computing devices included in the acquisition module 101 can be distributed in the same region or in different regions. Similarly, the multiple computing devices included in the acquisition module 101 can be distributed in the same Availability Zone (AZ) or in different AZs. Likewise, the multiple computing devices included in the acquisition module 101 can be distributed in the same Virtual Private Cloud (VPC) or in multiple VPCs. These multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, GALs, DPUs, NPUs, SoCs, offloading cards, and accelerator cards.

[0156] It should be noted that, in other embodiments, the acquisition module 101 can be used to execute any step in the text classification method, the generation module 102 can be used to execute any step in the text classification method, and the communication module 103 can be used to execute any step in the text classification method. The steps implemented by the acquisition module 101, the generation module 102, and the communication module 103 can be specified as needed. By implementing different steps in the text classification method through the acquisition module 101, the generation module 102, and the communication module 103, all functions of the text classification device 10 can be realized.

[0157] In some possible implementations, the first prompt word includes prompt information used to indicate the classification of the first input text based on task label information to determine the target task label, including:

[0158] Prompt information used to instruct you to perform the following steps:

[0159] Meta-task recognition is performed on the first input text to determine the natural language task indicated by the first input text;

[0160] The first task label is determined based on the natural language task and task label information indicated by the first input text;

[0161] Determine the target task label based on the first task label.

[0162] In some possible implementations, the target task label is determined based on the first task label, including:

[0163] If the node corresponding to the first task label has no child nodes in the graph, the first task label is determined as the target task label.

[0164] In some possible implementations, the target task label is determined based on the first task label, including:

[0165] In response to the fact that the node corresponding to the first task label has child nodes in the graph, natural language processing is performed on the first input text to generate the first response to the first input text.

[0166] Based on the first response to the first input text, the target task label is determined from the child nodes of the node corresponding to the first task label.

[0167] In some possible implementations, the first prompt word also includes:

[0168] Prompt information used to instruct you to perform the following steps:

[0169] Based on the task tag information, the target task tag is repeatedly confirmed to obtain the repeated confirmation result;

[0170] In response to the confirmation result indicating that the target task label is correct, output the target task label;

[0171] In response to the duplicate confirmation result indicating an error in the target task label, the target task label is updated based on the duplicate confirmation result.

[0172] In some possible implementations, the diagram includes nodes corresponding to key task labels, and key task labels are associated with key task annotations. The key task annotations are used to describe: the task labels of the text related to the target entity are key task labels.

[0173] The first input text is related to the target entity, and the target task label returned by the first language model is the key task label.

[0174] This application also provides a computing device 600. As shown in FIG6, the computing device 600 includes: a bus 602, a processor 604, a memory 606, and a communication interface 608. The processor 604, the memory 606, and the communication interface 608 communicate with each other via the bus 602. The computing device 600 may be a server or a terminal device. It should be understood that this application does not limit the number of processors and memories in the computing device 600.

[0175] Bus 602 can be a Peripheral Component Interconnect Express (PCIe) bus, an Extended Industry Standard Architecture (EISA) bus, a Unified Bus (Ubus or UB), a Compute Express Link (CXL), a Cache Coherent Interconnect for Accelerators (CCIX), etc. The Unified Bus is also known as the Lingqu Bus. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, only one line is used in Figure 6, but this does not imply that there is only one bus or one type of bus. Bus 602 can include pathways for transmitting information between various components of computing device 600 (e.g., memory 606, processor 604, communication interface 608).

[0176] Processor 604 may include any one or more computing devices such as central processing unit (CPU), graphics processing unit (GPU), microprocessor (MP) or digital signal processor (DSP), ASIC, FPGA, CPLD, NPU, SoC, offload card, accelerator card, etc.

[0177] Memory 606 may include volatile memory, such as random access memory (RAM). Memory 606 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD). Furthermore, memory 606 may also be implemented using storage class memory (SCM), phase change memory (PCM), or other types of storage media.

[0178] It is worth noting that the same type of storage medium can be configured in the same computing device to realize the function of memory 606, or two or more types of storage media can be configured to realize the function of memory 606. This application does not limit this.

[0179] The memory 606 stores executable program code, which the processor 604 executes to implement the functions of the aforementioned acquisition module 101, generation module 102, and communication module 103, thereby realizing the text classification method. In other words, the memory 606 stores instructions for executing the text classification method.

[0180] The communication interface 608 uses transceiver modules, such as, but not limited to, network interface cards and transceivers, to enable communication between the computing device 600 and other devices or communication networks.

[0181] The computing device 600 provided in this application can be used to execute the method described in FIG3 of this application, and the above and other operations and / or functions of each unit in the computing device 600 are respectively for implementing the corresponding processes of each method in FIG3. For the sake of brevity, they will not be described in detail here.

[0182] This application also provides a computing device cluster. The computing device cluster includes at least one computing device. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smartphone.

[0183] As shown in Figure 7, the computing device cluster includes at least one computing device 600. The memory 606 of one or more computing devices 600 in the computing device cluster may store the same instructions for executing the text classification method.

[0184] In some possible implementations, the memory 606 of one or more computing devices 600 in the computing device cluster may also store partial instructions for executing the text classification method. In other words, a combination of one or more computing devices 600 can jointly execute the instructions for executing the text classification method.

[0185] It should be noted that the memory 606 in different computing devices 600 within the computing device cluster can store different instructions, each used to execute a portion of the functions of the text classification system. That is, the instructions stored in the memory 606 of different computing devices 600 can implement the functions of one or more modules among the acquisition module 101, generation module 102, and communication module 103.

[0186] In some possible implementations, one or more computing devices in a computing device cluster can be connected via a network. This network can be a wide area network (WAN) or a local area network (LAN), etc. Figure 8 illustrates one possible implementation. As shown in Figure 8, two computing devices 600A and 600B are connected via a network. Specifically, they are connected to the network through communication interfaces in each computing device. In this type of possible implementation, the memory 606 in computing device 600A stores instructions for executing the functions of the acquisition module 101 and the generation module 102. Simultaneously, the memory 606 in computing device 600B stores instructions for executing the functions of the communication module 103.

[0187] The connection method between the computing device clusters shown in Figure 8 can be considered as follows: considering that the text classification method provided in this application needs to generate prompt words for the first input text and call the first language model to process the first prompt words, it is considered that the functions implemented by the acquisition module 101 and the generation module 102 are executed by the computing device 600A, and the functions implemented by the communication module 103 are executed by the computing device 600B.

[0188] It should be understood that the functions of computing device 600A shown in Figure 8 can also be performed by multiple computing devices 600. Similarly, the functions of computing device 600B can also be performed by multiple computing devices 600.

[0189] This application also provides a computer program product containing instructions. The computer program product may be a software or program product containing instructions, capable of running on a computing device or stored on any usable medium. When the computer program product is run on at least one computing device, it causes the at least one computing device to perform a text classification method.

[0190] This application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium capable of being stored by a computing device, or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive). The computer-readable storage medium includes instructions that instruct the computing device to perform a text classification method, or instruct the computing device to perform a text classification method.

[0191] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of this application.

Claims

1. A text classification method, characterized in that, The method includes: Obtain a first input text; wherein the first input text indicates at least one natural language task; Generate a first prompt word; wherein the first prompt word includes: the first input text, task tag information described in the form of a graph, and prompt information for instructing the first input text to be classified based on the task tag information to determine the target task tag; the graph includes at least one of the following: independent nodes and a tree structure composed of multiple nodes, one node corresponds to one task tag, each task tag is associated with a task annotation for describing the task tag, and the task tag corresponding to the child node in the tree structure is a child tag of the task tag corresponding to the parent node; The first prompt word is sent to the first language model, and the target task label representing the classification result of the first input text is received from the first language model; wherein the node corresponding to the target task label has no child nodes in the graph.

2. The method according to claim 1, characterized in that, The prompting information in the first prompt, used to instruct the classification of the first input text based on the task tag information and to determine the target task tag, includes: Prompt information used to instruct you to perform the following steps: Meta-task recognition is performed on the first input text to determine the natural language task indicated by the first input text; The first task label is determined based on the natural language task indicated by the first input text and the task label information; Determine the target task label based on the first task label.

3. The method according to claim 2, characterized in that, The step of determining the target task tag based on the first task tag includes: In response to the fact that the node corresponding to the first task label has no child nodes in the graph, the first task label is determined as the target task label.

4. The method according to claim 2, characterized in that, The step of determining the target task tag based on the first task tag includes: In response to the fact that the node corresponding to the first task label has child nodes in the graph, natural language processing is performed on the first input text to generate a first response to the first input text. Based on the first response to the first input text, the target task label is determined from the child nodes of the node corresponding to the first task label.

5. The method according to any one of claims 1 to 4, characterized in that, The first prompt word also includes: Prompt information used to instruct you to perform the following steps: Based on the task tag information, the target task tag is reconfirmed to obtain a reconfirmation result; In response to the repeated confirmation result indicating that the target task label is correct, the target task label is output; In response to the duplicate confirmation result indicating that the target task label has an error, the target task label is updated according to the duplicate confirmation result.

6. The method according to any one of claims 1 to 5, characterized in that, The diagram includes nodes corresponding to key task labels, and each key task label is associated with a key task annotation. The key task annotation is used to describe that the task label of the text related to the target entity is the key task label. The first input text is related to the target entity, and the target task label returned by the first language model is the key task label.

7. A text classification device, characterized in that, The device includes: An acquisition module is used to acquire a first input text; wherein the first input text indicates at least one natural language task; A generation module is used to generate a first prompt word; wherein the first prompt word includes: the first input text, task tag information described in the form of a graph, and prompt information for instructing the first input text to be classified based on the task tag information to determine the target task tag; the graph includes at least one of the following: independent nodes and a tree structure composed of multiple nodes, one node corresponds to one task tag, each task tag is associated with a task annotation for describing the task tag, and the task tag corresponding to the child node in the tree structure is a child tag of the task tag corresponding to the parent node; The communication module is used to send the first prompt word to the first language model and receive the target task label returned by the first language model, which represents the classification result of the first input text; wherein the node corresponding to the target task label has no child nodes in the graph.

8. The apparatus according to claim 7, characterized in that, The prompting information in the first prompt, used to instruct the classification of the first input text based on the task tag information and to determine the target task tag, includes: Prompt information used to instruct you to perform the following steps: Meta-task recognition is performed on the first input text to determine the natural language task indicated by the first input text; The first task label is determined based on the natural language task indicated by the first input text and the task label information; Determine the target task label based on the first task label.

9. The apparatus according to claim 8, characterized in that, The step of determining the target task tag based on the first task tag includes: In response to the fact that the node corresponding to the first task label has no child nodes in the graph, the first task label is determined as the target task label.

10. The apparatus according to claim 8, characterized in that, The step of determining the target task tag based on the first task tag includes: In response to the fact that the node corresponding to the first task label has child nodes in the graph, natural language processing is performed on the first input text to generate a first response to the first input text. Based on the first response to the first input text, the target task label is determined from the child nodes of the node corresponding to the first task label.

11. The apparatus according to any one of claims 7 to 10, characterized in that, The first prompt word also includes: Prompt information used to instruct you to perform the following steps: Based on the task tag information, the target task tag is reconfirmed to obtain a reconfirmation result; In response to the repeated confirmation result indicating that the target task label is correct, the target task label is output; In response to the duplicate confirmation result indicating that the target task label has an error, the target task label is updated according to the duplicate confirmation result.

12. The apparatus according to any one of claims 7 to 11, characterized in that, The diagram includes nodes corresponding to key task labels, and each key task label is associated with a key task annotation. The key task annotation is used to describe that the task label of the text related to the target entity is the key task label. The first input text is related to the target entity, and the target task label returned by the first language model is the key task label.

13. A computing device, characterized in that, The computing device includes at least one processor and at least one memory, wherein the at least one memory stores computer-readable instructions; the at least one processor executes the computer-readable instructions to cause the computing device to perform the method as described in any one of claims 1 to 6.

14. A computing device cluster, characterized in that, The computing device cluster includes at least one computing device, the at least one computing device including at least one processor and at least one memory, the at least one memory storing computer-readable instructions; the at least one processor executes the computer-readable instructions to cause the computing device cluster to perform the method as described in any one of claims 1 to 6.

15. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes computer-readable instructions for implementing the method according to any one of claims 1 to 6.

16. A computer program product, characterized in that, The computer program product includes computer-readable instructions for implementing the method according to any one of claims 1 to 6.