Transaction type self-growth and self-evolution and classification method based on large model

By combining a large language model with a catalog of service item types and classification prompts, the types of service items for government hotlines are dynamically updated. This solves the problems of accuracy and timeliness in predicting service item types for government hotlines, and enables efficient and automated classification and personalized services for service item types.

CN119128148BActive Publication Date: 2026-02-10CHONGQING UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411152685.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-21
Publication Date
2026-02-10
Estimated Expiration
2044-08-21

AI Technical Summary

Technical Problem

Existing technologies struggle to achieve rapid and accurate prediction of service type in government hotlines, especially in the complex and numerous categories of government hotline service types. The accuracy and timeliness of the classification are insufficient, and large language models are difficult to adapt to the development and evolution of government service types.

Method used

By combining a large language model with a list of item types and classification prompts, the text of government hotline work orders is classified. The model is then fine-tuned using a low-rank adaptive algorithm to achieve self-growth, self-evolution, and classification of item types, and to dynamically update the item type list to adapt to policy and social changes.

Benefits of technology

It improved the accuracy and flexibility of predicting the types of matters handled by the government hotline, reduced manual intervention, increased processing speed and work efficiency, and enhanced the responsiveness of government services and user satisfaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119128148B_ABST
    Figure CN119128148B_ABST
Patent Text Reader

Abstract

The application discloses a matter type self-growth and self-evolution and classification method based on a large model, which comprises the following steps: externally connecting a matter type directory to a large language model and constructing corresponding matter classification prompt words; inputting government hotline work order texts and the matter classification prompt words into the fine-tuned large language model, referencing the matter type directory to output the matter types corresponding to the government hotline work order texts; and outputting the matter types output by the large language model as the classification results of the government hotline work order texts to be classified. The matter type directory needs to be updated based on the large language model on a regular basis. The application realizes the prediction of government hotline matter types by the large language model in combination with the matter classification prompt words, fine-tunes the large language model to make it more focused on the government hotline field, and realizes the self-growth and self-evolution of the matter types in the matter type directory by the large language model, so that the timeliness and accuracy of the prediction of government hotline matter types are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of artificial intelligence and large model technology, in particular to a matter type self-growth and self-evolution and classification method based on a large model. BACKGROUND

[0002] In the government service hotline, citizens report their demands by calling, leaving messages in WeChat applets, APPs, and portal websites, etc. The operators complete the case classification according to the demand content, and then distribute it to the relevant responsible units and disposal departments. With the wide application of government service hotline, on the one hand, the number of hotline cases accepted increases day by day, and the cost of manual disposal increases day by day. When social hot issues occur, the operators are often busy and cannot meet the needs of the general public. On the other hand, due to the multiple case classification of the convenient government hotline, the distinction between classes is not obvious, the related departments of the case are wide, and the hierarchy is complex, making it difficult to achieve fast and accurate matter type prediction.

[0003] At present, the methods of matter type prediction of government hotline mainly include rule-based decision tree method, machine learning-based method and neural network-based method. The existing rule-based decision tree method has poor accuracy in case classification and distribution for complex or similar categories. The existing machine learning-based method and neural network-based method are not ideal for the accuracy of distributing cases of different categories to different administrative level departments.

[0004] With the development of artificial intelligence, large language models (LLM) have entered the field of vision. Large language models use deep learning algorithms and large-scale text data to understand and generate human language. Applying them to matter type prediction of government hotline can bring unexpected results. However, the applicant found that there are still the following problems when applying large language models to matter type prediction of government hotline: 1) Government hotline involves a large number of matter types, with complex classification levels and large quantities. Existing large language models are difficult to adapt, resulting in poor accuracy of government hotline matter type classification. 2) Government matter types will continue to develop and evolve with changes in policies, regulations, social hotspots, etc., making it difficult for large language models to keep their matter classification directory consistent with the actual situation, which also leads to poor accuracy of government hotline matter type classification. Therefore, how to improve the accuracy of government hotline matter type classification is a technical problem that needs to be solved. SUMMARY

[0005] In view of the above problems of the prior art, the technical problem to be solved by the present application is how to provide a big model-based matter type self-growth and self-evolution and classification method, realize prediction of government hotline matter types by means of a big language model combined with prompt words, fine-tune the big language model to make it more focused on the government hotline field, and realize self-growth and self-evolution of matter types in the matter type directory by the big language model, that is, update, so as to improve the timeliness and accuracy of the government hotline matter type prediction.

[0006] In order to solve the above technical problems, the present application adopts the following technical solutions:

[0007] The big model-based matter type self-growth and self-evolution and classification method comprises the following steps:

[0008] S1: obtaining government hotline work order text to be classified;

[0009] S2: externally connecting a matter type directory to the big language model and constructing corresponding matter classification prompt words;

[0010] S3: inputting the government hotline work order text and the matter classification prompt words into the fine-tuned big language model, and outputting the matter type corresponding to the government hotline work order text by the big language model referring to the matter type directory;

[0011] S4: outputting the matter type output by the big language model as the classification result of the government hotline work order text to be classified;

[0012] The matter type directory needs to be updated based on the big language model periodically, and the specific steps of updating the matter type directory are as follows:

[0013] S501: obtaining a matter type directory constructed based on a classification tree;

[0014] S502: obtaining historical work order texts and corresponding matter update prompt words which are not assigned and answered;

[0015] S503: inputting the historical work order texts and the matter update prompt words into the big language model to generate potential classification keywords;

[0016] S504: performing the following update operation on the matter type directory by the potential classification keywords:

[0017] S5041: matching a corresponding target classification sub-tree from the matter type directory according to the potential classification keywords;

[0018] S5042: Determine the parent-child classification node corresponding to the potential classification keyword from the target classification subtree; determine the semantic relationship between the potential classification keyword and the corresponding parent-child classification node through the large language model and the vocabulary relationship judgment prompt word: if the semantic relationship is different, execute step S5043; if the semantic relationship is close, execute step S5044; if the semantic relationship is the same, execute step S5045;

[0019] S5043: Based on the potential classification keyword in the target classification subtree, generate a new classification node parallel to the corresponding parent-child classification node;

[0020] S5044: When the semantic of the potential classification keyword covers the corresponding parent-child classification node, update the corresponding parent-child classification node through the potential classification keyword, and generate a new parent classification node for the corresponding parent-child classification node;

[0021] S5045: Do nothing.

[0022] Preferably, in step S5041, if the target classification subtree corresponding to the potential classification keyword is not matched from the transaction type directory, a new classification subtree is generated according to the potential classification keyword and written into the transaction type directory.

[0023] Preferably, in step S5041, the target classification subtree corresponding to the potential classification keyword is matched from the transaction type directory through the hierarchical perception global model.

[0024] Preferably, in step S5042, when the semantic of the potential classification keyword does not cover the corresponding parent-child classification node, a new child node parallel to the corresponding parent-child classification node is generated based on the potential classification keyword.

[0025] Preferably, in step S5042, the potential classification keyword and the corresponding parent-child classification node and the vocabulary relationship judgment prompt word are input into the large language model to generate the semantic relationship between the potential classification keyword and the corresponding parent-child classification node, and the semantic relationship includes semantic relationship difference, semantic relationship close and semantic relationship same.

[0026] Preferably, in step S3, for the classification node in the transaction type directory that has not been matched for a long time, the node deletion operation is performed.

[0027] Preferably, in step S3, the following intelligent agent is constructed for the update of the transaction type directory:

[0028] Intelligent agent one: read the transaction type directory through the large language model, and determine whether the update of the transaction type directory needs to be performed according to the potential classification keyword generated in step S503; when the update of the transaction type directory needs to be performed, the large language model calls the corresponding tool to execute the workflow of steps S5043 to S5045.

[0029] Agent 2: After generating a new category node at a certain level in steps S5043 and S5044, the large language model is used to determine whether the new category node is more suitable as a parent category node; if the new category node is more suitable as a parent category node, the item type directory is adjusted accordingly.

[0030] Agent 3: Regularly checks and deletes category nodes in the item type directory that have not been matched for a long time through a large language model.

[0031] Preferably, in step S3, the steps for fine-tuning the large language model using a low-rank adaptive algorithm are as follows:

[0032] S301: Determine the rank r of the low-rank matrix;

[0033] S302: Create two weight matrices A and B of rank r for each original weight matrix of the large language model;

[0034] S303: Freeze the original weight matrix of the large language model;

[0035] S304: Obtain government hotline work order text samples and their actual item types as training data; wherein the actual item types are generated by determining the updated item type catalog.

[0036] S305: Input the government hotline work order text sample into the large language model and output the corresponding predicted item type;

[0037] S306: Calculate the loss based on the predicted event type and the corresponding real event type, combined with the loss function, and then optimize the weight matrices A and B in the large language model in reverse.

[0038] S307: Repeat steps S304 to S306 until the large language model converges or reaches the preset number of iterations;

[0039] S308: Add the update amounts of each original weight matrix of the large language model to its corresponding weight matrices A and B to obtain the final weight matrix, thereby achieving fine-tuning of the large language model.

[0040] The present invention also discloses a computer device, comprising: one or more processors;

[0041] The processor is used to store one or more programs;

[0042] When the one or more programs are executed by the one or more processors, the self-increasing and self-evolving classification method for event types based on a large model in this invention is implemented.

[0043] The present invention also discloses a computer-readable storage medium having a computer program stored thereon, which, when executed, implements the self-growing and self-evolving method for item types and classification based on a large model as described in the present invention.

[0044] Compared with existing technologies, the self-growing and self-evolving classification method for item types based on a large model in this invention has the following advantages:

[0045] This invention uses a large language model combined with item classification prompts to predict the type of service requests in government hotlines. First, the large language model is pre-trained on massive amounts of text data, possessing rich linguistic knowledge and contextual understanding capabilities. Combined with specific item classification prompts, it can more accurately capture key information in government hotline work order texts, thus more accurately classifying them into the corresponding item type. Second, the large language model has excellent generalization ability, effectively handling various complex linguistic phenomena. When new government service requests arise, only the item classification prompts and item type catalog need to be updated to quickly adapt to new classification requirements, without retraining the entire model, thereby improving the flexibility and effectiveness of government hotline item type prediction. Finally, using the large language model for automated classification of government hotline item types can significantly improve processing speed, reduce manual intervention, and improve overall work efficiency. Furthermore, through fast and accurate item type prediction, the government hotline system can respond to user needs more quickly and provide more personalized services, not only improving user satisfaction but also enhancing public trust in government services.

[0046] This invention further refines the large language model using a low-rank adaptive algorithm. First, the low-rank adaptive algorithm freezes the original model parameters and adds a small number of trainable parameters, reducing the number of trainable parameters while maintaining a certain level of accuracy, thus lowering computational and storage resource costs. Second, the refined large language model is more focused on specific tasks within the government hotline domain, better capturing the linguistic features and contextual information of that domain, thereby improving the model's generalization ability when handling related tasks.

[0047] This invention achieves self-growth and self-evolution of the item type catalog through a large language model. Firstly, government item types continuously evolve with changes in policies, regulations, and social hotspots. Continuously updating the item type catalog ensures the classification system remains consistent with reality, guaranteeing the timeliness and accuracy of hotline item type predictions. Secondly, with the emergence of new item categories and the elimination of old ones, the original classification system may become inapplicable. This invention, by updating the item type catalog, introduces new classification standards and categories while removing outdated ones, thereby improving the accuracy of hotline item type predictions. Furthermore, historical work order texts that have not been assigned or responded to may contain categories not currently in the item type catalog, but which belong to the hotline domain. Therefore, this invention uses historical work order texts that have not been assigned or responded to as the basis for updating the item type catalog, ensuring that the catalog remains applicable to the hotline domain while effectively updating it. Finally, the large language model is used to realize the self-increase and self-evolution of the item type catalog, which is actually a process of dynamically adjusting the classification ability of the large language model. This dynamic adjustment enables the large language model to better adapt to changes in the external environment and enhance its adaptability in the complex and ever-changing government environment. Attached Figure Description

[0048] To make the objectives, technical solutions, and advantages of the invention clearer, the invention will now be described in further detail with reference to the accompanying drawings, wherein:

[0049] Figure 1 , Figure 2 and Figure 3 These are all logical flowcharts of the self-evolution and classification methods of item types;

[0050] Figure 4 and Figure 5 An instance of updating the item type catalog;

[0051] Figure 6 A logical framework diagram for fine-tuning a large language model;

[0052] Figure 7 , Figure 8 , Figure 9 , Figure 10 Examples of prompts for item classification, item update, lexical relationship judgment, and agent construction, respectively. Detailed Implementation

[0053] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but only to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0054] The following detailed explanation illustrates the specific implementation methods:

[0055] Example 1:

[0056] This embodiment discloses a method for self-growing and self-evolving item types and classification based on a large model.

[0057] like Figure 1 As shown, the self-evolving and classification methods for item types based on large models include:

[0058] S1: Obtain the text of the government hotline work order to be categorized;

[0059] S2: Add a list of item types to the large language model and construct corresponding item category prompts;

[0060] In this embodiment, the task classification prompts include task descriptions and instructions. The task descriptions clearly state the tasks that the large model needs to complete, and the instructions include examples of output results. Specific task classification prompts can be found in [reference needed]. Figure 7 Examples.

[0061] S3: Input the government hotline work order text and the item classification prompts into the finely tuned large language model. The large language model uses the item type directory to output the item type corresponding to the government hotline work order text.

[0062] In this embodiment, the large language model is the open-source LLama3-8B model. The vectorized item category directory is stored using the Fiass vector database.

[0063] S4: Output the item type output by the large language model as the classification result of the government hotline work order text to be classified.

[0064] The item type catalog needs to be updated regularly based on the large language model, combined with... Figure 2 As shown, the specific steps for updating the item type catalog are as follows:

[0065] S501: Obtain a catalog of item types based on a classification tree;

[0066] S502: Obtain the text of historical work orders that have not been dispatched or responded to, and the corresponding item update prompts;

[0067] In this embodiment, the update prompt includes a task description and an instruction. The task description clearly states the task that the large model needs to complete, and the instruction includes examples of the output results. Specific update prompts can be found in [reference needed]. Figure 8 Examples.

[0068] S503: Input historical work order texts and task update prompts into the large language model to generate potential classification keywords;

[0069] S504: Perform the following update operations on the item type catalog based on potential category keywords (e.g., Figure 3 As shown):

[0070] S5041: Match the corresponding target category subtree from the item type directory based on potential category keywords;

[0071] In this embodiment, Figure 4 and Figure 5 The image shown is a classification tree with "people's livelihood" as the root node. Figure 4 The target classification subtree obtained by matching is "People's Livelihood - Commerce - Tourism / Retail"; Figure 5 The target classification subtree obtained by matching is "People's Livelihood - Medical Insurance - Outpatient / Inpatient".

[0072] S5042: Determine the parent-child classification nodes corresponding to the potential classification keywords from the target classification subtree; determine the semantic relationship between the potential classification keywords and the corresponding parent-child classification nodes through the large language model and lexical relationship judgment prompts: if the semantic relationship is large, proceed to step S5043; if the semantic relationship is close, proceed to step S5044; if the semantic relationship is the same, proceed to step S5045.

[0073] In this embodiment, the lexical relationship judgment prompts include a task description and instructions. The task description clearly defines the task that the large model needs to complete, and the instructions include examples of output results. Specific lexical relationship judgment prompts can be found in [reference needed]. Figure 9 Examples.

[0074] In this embodiment, Figure 4 The parent-child category node corresponding to the potential category keyword "express delivery and logistics" is "tourism"; Figure 5 The parent-child category node corresponding to the potential category keywords "insurance, life insurance" is "medical insurance".

[0075] S5043: Generate a new classification node in the target classification subtree that is parallel to the corresponding parent-child classification node based on the potential classification keywords;

[0076] In this embodiment, taking "express delivery and logistics" as an example, a new category node "express delivery" is generated in the target category subtree "people's livelihood-commerce-tourism / retail" and is parallel to the parent-child category node "tourism".

[0077] S5044: When the semantics of a potential classification keyword covers the corresponding parent-child classification node, update the corresponding parent-child classification node through the potential classification keyword and generate a new parent classification node for the corresponding parent-child classification node;

[0078] In this embodiment, as Figure 5 As shown, the potential classification keywords include "insurance, life insurance". The semantics of "insurance" cover the parent and child classification nodes "medical insurance". Therefore, "insurance" is connected to the root node "people's livelihood" as the new classification parent node of "medical insurance".

[0079] Specifically, when the semantics of a potential classification keyword do not cover the corresponding parent-child classification node, a new child node is generated based on the potential classification keyword and is parallel to the corresponding parent-child classification node.

[0080] In this embodiment, as Figure 5 As shown, the potential classification keywords include "insurance, life insurance". Since the semantics of "life insurance" do not cover the parent-child classification node "medical insurance", "life insurance" will be treated as a new classification node parallel to the parent-child classification node "medical insurance".

[0081] S5045: No action is performed;

[0082] S4: Output the item type output by the large language model as the classification result of the government hotline work order text to be classified.

[0083] This invention uses a large language model combined with item classification prompts to predict the type of service requests in government hotlines. First, the large language model is pre-trained on massive amounts of text data, possessing rich linguistic knowledge and contextual understanding capabilities. Combined with specific item classification prompts, it can more accurately capture key information in government hotline work order texts, thus more accurately classifying them into the corresponding item type. Second, the large language model has excellent generalization ability, effectively handling various complex linguistic phenomena. When new government service requests arise, only the item classification prompts and item type catalog need to be updated to quickly adapt to new classification requirements, without retraining the entire model, thereby improving the flexibility and effectiveness of government hotline item type prediction. Finally, using the large language model for automated classification of government hotline item types can significantly improve processing speed, reduce manual intervention, and improve overall work efficiency. Furthermore, through fast and accurate item type prediction, the government hotline system can respond to user needs more quickly and provide more personalized services, not only improving user satisfaction but also enhancing public trust in government services.

[0084] This invention further refines the large language model using a low-rank adaptive algorithm. First, the low-rank adaptive algorithm freezes the original model parameters and adds a small number of trainable parameters, reducing the number of trainable parameters while maintaining a certain level of accuracy, thus lowering computational and storage resource costs. Second, the refined large language model is more focused on specific tasks within the government hotline domain, better capturing the linguistic features and contextual information of that domain, thereby improving the model's generalization ability when handling related tasks.

[0085] This invention achieves self-growth and self-evolution of the item type catalog through a large language model. Firstly, government item types continuously evolve with changes in policies, regulations, and social hotspots. Continuously updating the item type catalog ensures the classification system remains consistent with reality, guaranteeing the timeliness and accuracy of hotline item type predictions. Secondly, with the emergence of new item categories and the elimination of old ones, the original classification system may become inapplicable. This invention, by updating the item type catalog, introduces new classification standards and categories while removing outdated ones, thereby improving the accuracy of hotline item type predictions. Furthermore, historical work order texts that have not been assigned or responded to may contain categories not currently in the item type catalog, but which belong to the hotline domain. Therefore, this invention uses historical work order texts that have not been assigned or responded to as the basis for updating the item type catalog, ensuring that the catalog remains applicable to the hotline domain while effectively updating it. Finally, the large language model is used to realize the self-increase and self-evolution of the item type catalog, which is actually a process of dynamically adjusting the classification ability of the large language model. This dynamic adjustment enables the large language model to better adapt to changes in the external environment and enhance its adaptability in the complex and ever-changing government environment.

[0086] In the specific implementation process, in step S5041, if no target category subtree corresponding to the potential category keywords is matched from the item type directory, a new category subtree is generated based on the potential category keywords and written into the item type directory. For example, if the potential category keywords include "football" and "basketball", and no corresponding target category subtree is matched in the item type directory, then a new category subtree "People's Livelihood - Sports - Football / Basketball" is constructed and written into the item type directory.

[0087] When there is no target category subtree corresponding to a potential category keyword in the item type directory, the present invention generates a new category subtree based on the potential category keyword, which is beneficial for better improving and supplementing the item type directory.

[0088] In the specific implementation process, in step S5041, the hierarchical perception global model is used to match the corresponding target classification subtree for potential classification keywords from the item type directory.

[0089] In this embodiment, a Hierarchy-Aware Global Model (HiAGM) is used, which includes a traditional text encoder for extracting text information and a hierarchical perceptual structure encoder for modeling hierarchical label relationships. This model transforms the hierarchical structure into a directed graph, then utilizes prior probabilities of label dependencies to aggregate node information, while simultaneously leveraging label structural features to enhance text information.

[0090] This invention accurately matches potential classification keywords with corresponding target classification subtrees through a hierarchical perception global model, and then performs classification node addition and deletion operations on the target classification subtree, thereby more accurately updating the item type directory.

[0091] In the specific implementation process, in step S5042, the potential classification keywords, corresponding parent-child classification nodes, and word relationship judgment prompts are input into the large language model to generate the semantic relationship between the potential classification keywords and the corresponding parent-child classification nodes. The semantic relationship includes semantic relationship with large difference, semantic relationship with similarity, and semantic relationship with the same.

[0092] This invention leverages the powerful understanding and generation capabilities of large language models to analyze the semantic relationships between potential classification keywords and corresponding parent-child classification nodes, which facilitates more accurate updates to the item type catalog and thus helps improve the accuracy of subsequent predictions of government hotline item types.

[0093] In practice, for category nodes in the item type directory that have not been matched for a long period of time (e.g., three months), the node deletion operation is performed.

[0094] This invention ensures that the classification system always remains consistent with the actual situation by deleting long-term unmatched classification nodes and eliminating outdated categories, thereby guaranteeing the timeliness and accuracy of predictions for government hotline matters.

[0095] In the specific implementation process, the following intelligent agent is constructed for updating the item type catalog:

[0096] Agent 1: Reads the item type directory through the large language model and determines whether it is necessary to update the item type directory based on the potential classification keywords generated in step S503; when it is necessary to update the item type directory, the large language model calls the corresponding tool to execute the workflow of steps S5043 to S5045.

[0097] Agent 2: After generating a new category node at a certain level in steps S5043 and S5044, the large language model is used to determine whether the new category node is more suitable as a parent category node; if the new category node is more suitable as a parent category node, the item type directory is adjusted accordingly.

[0098] Agent 3: Regularly check and delete category nodes in the item type directory that have not been matched for a long time (e.g., three months) through a large language model.

[0099] In this embodiment, the Fiass vector database is used to store the vectorized item category directory.

[0100] The specific steps for constructing an intelligent agent are as follows:

[0101] 1) Determine the database operation toolkit for the category directory of items (encapsulate the code for adding, deleting, modifying, and querying into a set of functions).

[0102] 2) Agent construction prompt configuration, including: a. Tool definition system prompt (tool name, description, parameter definition), the tool definition is executed according to the toolkit in 1); b. Question definition user prompt (system prompt, user input, model response, tool call). For example: the large language model reads the item category directory database and determines whether it needs to perform an update operation on the item category directory database based on the potential category keywords generated in step S503. If so, the large language model will call the library functions in the item category directory database operation toolkit through the tool in the tool definition to complete the add, delete, and modify operations on the item category directory database. The agent construction prompt can be found in [reference needed]. Figure 10 Examples.

[0103] This invention constructs an intelligent agent to assist in updating the catalog of service item types. By integrating a toolkit, the intelligent agent enables a large language model to automatically call relevant tools to perform corresponding functions, thereby further improving the timeliness and intelligence of predicting the types of service items for government hotlines.

[0104] Combination Figure 6 As shown, the steps for fine-tuning a large language model using a low-rank adaptive algorithm are as follows:

[0105] S301: Determine the rank r of the low-rank matrix;

[0106] S302: Create two weight matrices A and B of rank r for each original weight matrix of the large language model;

[0107] S303: Freeze the original weight matrix of the large language model;

[0108] S304: Obtain government hotline work order text samples and their actual item types as training data; wherein the actual item types are generated by determining the updated item type catalog.

[0109] In this embodiment, the government hotline work order text samples used as training data are constructed through the following steps:

[0110] S3041: Use data collection tools to collect text data of government hotline work orders from different regions and channels;

[0111] S3042: Identify and delete duplicate or incorrectly formatted government hotline work order text data through automated scripts and algorithms;

[0112] S3043: Standardize the format of the collected government hotline work order text data;

[0113] S3044: Utilize natural language processing tools to automatically tag government hotline work order text data, including named entity recognition, part-of-speech tagging, and syntactic analysis.

[0114] In this embodiment, the Chinese text segmentation tool library jieba is used to implement named entity recognition and part-of-speech tagging. Probabilistic Context-Free Grammar (PCFG) is used for syntactic analysis. Since government hotline work orders often only contain simple event descriptions, this embodiment uses named entity recognition, part-of-speech tagging, and syntactic analysis to construct structured work orders. Named entity recognition can identify the time, location, and people involved in an event. Part-of-speech tagging distinguishes the parts of speech of words, such as verbs, nouns, and prepositions. Syntactic analysis uses the results of part-of-speech tagging to analyze the relationship between people and events, such as subject, verb, and object. Named entity recognition, part-of-speech tagging, and syntactic analysis will help us better classify the work orders to be categorized.

[0115] S305: Input the government hotline work order text sample into the large language model and output the corresponding predicted item type;

[0116] S306: Calculate the loss based on the predicted event type and the corresponding real event type, combined with the loss function, and then optimize the weight matrices A and B in the large language model in reverse.

[0117] In this embodiment, the loss is calculated using the cross-entropy loss function.

[0118] S307: Repeat steps S304 to S306 until the large language model converges or reaches the preset number of iterations;

[0119] S308: Add the update amounts of each original weight matrix of the large language model to its corresponding weight matrices A and B to obtain the final weight matrix, thereby achieving fine-tuning of the large language model.

[0120] In the specific implementation process, after fine-tuning, the large language model is evaluated and tested through the following steps:

[0121] S3081: Automatically test large language models using performance evaluation tools, collect basic performance data to evaluate the effect of fine-tuning large language models;

[0122] In this embodiment, SuperCLUE is selected as the performance evaluation tool. The collected basic performance data includes scores for basic abilities (10 abilities including semantic understanding, dialogue, logical reasoning, role-playing, coding, generation, and creation), professional abilities (high school, university, and professional exams, covering more than 50 abilities from mathematics, physics, geography to social sciences), and Chinese characteristic abilities (more than 10 abilities including Chinese idioms, poetry, literature, and character forms). This embodiment focuses more on the evaluation of basic abilities.

[0123] S3082: Analyze the accuracy of large language models, including the ability to correctly identify and classify government hotline matters;

[0124] In this embodiment, the accuracy of the large language model is analyzed by macro averaging, average precision, and weighted average precision.

[0125] S3083: Evaluate the efficiency of large language models, especially the speed and response time when processing a large number of work orders;

[0126] S3084: Test the scalability of the model to ensure it can adapt to the increasing volume of work orders and service demands.

[0127] In this embodiment, key performance indicators in government services, such as error rate and user satisfaction, are quantitatively analyzed using preset performance evaluation rules. Taking error rate and user satisfaction as examples, different scores are assigned to different score ranges for the error rate; for example, an error rate of 0-30% is worth 3 points. User satisfaction is divided into high, medium, and low, corresponding to 3 points, 2 points, and 1 point, respectively.

[0128] This invention further refines the large language model using a low-rank adaptive algorithm. First, the low-rank adaptive algorithm freezes the original model parameters and adds a small number of trainable parameters, reducing the number of trainable parameters while maintaining a certain level of accuracy, thus lowering computational and storage resource costs. Second, the refined large language model is more focused on specific tasks within the government hotline domain, better capturing the linguistic features and contextual information of that domain, thereby improving the model's generalization ability when handling related tasks.

[0129] Example 2:

[0130] This embodiment discloses a computer device.

[0131] The computer device includes a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps described in the embodiments of the various large-model-based self-growing, self-evolving, and classification methods for event types.

[0132] For example, the computer program can be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units can be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program in the dynamic reactive power compensation device of the power system.

[0133] The computer device may be a desktop computer, laptop, handheld computer, or cloud server, etc. The computer device may include, but is not limited to, a processor and memory.

[0134] Example 3:

[0135] This embodiment discloses a computer-readable storage medium.

[0136] A computer-readable storage medium having a computer program thereon, wherein when the computer program is executed, the steps in the embodiments of the above-described large-model-based event type self-incrementing and self-evolution and classification methods are performed.

[0137] The computer program can be stored in a computer-readable storage medium. When executed by a processor, the computer program can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable file, or some intermediate form. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.

[0138] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit the technical solutions. Those skilled in the art should understand that any modifications or equivalent substitutions to the technical solutions of the present invention without departing from the spirit and scope of the present invention should be covered within the scope of the claims of the present invention.

Claims

1. A method for self-growing, self-evolving, and classifying item types based on a large model, characterized in that: include: S1: Obtain the text of the government hotline work order to be categorized; S2: Add a list of item types to the large language model and construct corresponding item category prompts; S3: Input the government hotline work order text and the item classification prompt words into the large language model that has been fine-tuned by the low-rank adaptive algorithm. The large language model uses the item type directory to output the item type corresponding to the government hotline work order text. S4: Output the item type output by the large language model as the classification result of the government hotline work order text to be classified; The item type catalog needs to be updated periodically based on the large language model. The specific steps for updating the item type catalog are as follows: S501: Obtain a catalog of item types based on a classification tree; S502: Obtain the text of historical work orders that have not been dispatched or responded to, and the corresponding item update prompts; S503: Input historical work order texts and task update prompts into the large language model to generate potential classification keywords; S504: Perform the following update operation on the item type catalog based on potential category keywords: S5041: Match the corresponding target category subtree from the item type directory based on potential category keywords; S5042: Determine the parent-child classification nodes corresponding to potential classification keywords from the target classification subtree; determine the semantic relationship between potential classification keywords and corresponding parent-child classification nodes through the large language model and lexical relationship judgment prompts; if the semantic relationship is large, proceed to step S5043. If the semantic relationships are similar, proceed to step S5044; if the semantic relationships are the same, proceed to step S5045. S5043: Generate a new classification node in the target classification subtree that is parallel to the corresponding parent-child classification node based on the potential classification keywords; S5044: When the semantics of a potential classification keyword covers the corresponding parent-child classification node, update the corresponding parent-child classification node through the potential classification keyword and generate a new parent classification node for the corresponding parent-child classification node; S5045: No action is taken.

2. The self-growing, self-evolving, and classification method for event types based on a large model as described in claim 1, characterized in that: In step S5041, if no target category subtree corresponding to the potential category keyword is matched from the item type directory, a new category subtree is generated based on the potential category keyword and written into the item type directory.

3. The self-growing, self-evolving, and classification method for event types based on a large model as described in claim 1, characterized in that: In step S5041, the hierarchical perception global model is used to match the corresponding target classification subtree for potential classification keywords from the item type directory.

4. The self-growing, self-evolving, and classification method for event types based on a large model as described in claim 1, characterized in that: In step S5042, when the semantics of the potential classification keyword does not cover the corresponding parent-child classification node, a new child node is generated based on the potential classification keyword and is parallel to the corresponding parent-child classification node.

5. The self-growing, self-evolving, and classification method for event types based on a large model as described in claim 1, characterized in that: In step S5042, the potential classification keywords, corresponding parent-child classification nodes, and word relationship judgment prompts are input into the large language model to generate semantic relationships between potential classification keywords and corresponding parent-child classification nodes. The semantic relationships include those with large differences, similar semantic relationships, and identical semantic relationships.

6. The self-growing, self-evolving, and classification method for event types based on a large model as described in claim 1, characterized in that: In step S3, for category nodes in the item type directory that have not been matched for a long time, a node deletion operation is performed.

7. The self-growing, self-evolving, and classification method for event types based on a large model as described in claim 1, characterized in that: In step S3, the database operation toolkit required for creating the agent is used to construct the following agent for updating the item type catalog: Agent 1: Reads the item type directory through the large language model and determines whether it is necessary to update the item type directory based on the potential classification keywords generated in step S503; when it is necessary to update the item type directory, the large language model calls the corresponding tool to execute the workflow of steps S5043 to S5045. Agent 2: After generating a new category node at a certain level in steps S5043 and S5044, the large language model is used to determine whether the new category node is more suitable as a parent category node; if the new category node is more suitable as a parent category node, the item type directory is adjusted accordingly. Agent 3: Regularly checks and deletes category nodes in the item type directory that have not been matched for a long time through a large language model.

8. The self-growing, self-evolving, and classification method for event types based on a large model as described in claim 1, characterized in that: In step S3, the steps for fine-tuning the large language model using the low-rank adaptive algorithm are as follows: S301: Determine the rank r of the low-rank matrix; S302: Create two weight matrices A and B of rank r for each original weight matrix of the large language model; S303: Freeze the original weight matrix of the large language model; S304: Obtain government hotline work order text samples and their actual item types as training data; The actual item type is determined and generated based on the updated item type catalog; S305: Input the government hotline work order text sample into the large language model and output the corresponding predicted item type; S306: Calculate the loss based on the predicted event type and the corresponding real event type, combined with the loss function, and then optimize the weight matrices A and B in the large language model in reverse. S307: Repeat steps S304 to S306 until the large language model converges or reaches the preset number of iterations; S308: Add the update amounts of each original weight matrix of the large language model to its corresponding weight matrices A and B to obtain the final weight matrix, thereby achieving fine-tuning of the large language model.

9. A computer device, characterized in that, include: One or more processors; The processor is used to store one or more programs; When the one or more programs are executed by the one or more processors, the self-growing, self-evolving, and classification method for event types based on a large model as described in any one of claims 1 to 8 is implemented.

10. A computer-readable storage medium, characterized in that, It contains a computer program that, when executed, implements the self-growing, self-evolving, and classification method for event types based on a large model as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Highway congestion dissipation time prediction method based on deep meta-learning

    CN117012031A

  • Event type induction method and system based on comparative learning and iterative optimization

    CN117390187A