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

Through a large language model combining matter classification prompt words and low-rank adaptive algorithm, the event type catalog is dynamically updated, which solves the accuracy and timeliness of event type prediction in government hotlines, and realizes efficient government hotline event type classification.

CN119128148AActive Publication Date: 2024-12-13CHONGQING UNIV

Patent Information

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

AI Technical Summary

Technical Problem

It is difficult for the existing technology to achieve accurate prediction of the types of matters in government hotlines, especially due to the wide variety of matters, the complex classification levels and continuous development with changes in policies, regulations and social hotspots, making it difficult for the classification catalog of large language models to remain consistent.

Method used

Using the self-growth and self-evolution and classification method of matter types based on large models, the large language model combines the matter classification prompt words to realize the prediction of government hotline matter types, and fine-tune the model through low-rank adaptive algorithm to dynamically update the event type directory. to adapt to environmental changes.

Benefits of technology

It improves the accuracy and timeliness of government hotline item type prediction, reduces manual intervention, improves processing speed and work efficiency, and enhances the flexibility and adaptability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119128148A_ABST
    Figure CN119128148A_ABST
Patent Text Reader

Abstract

The invention discloses an item type self-growth and self-evolution and classification method based on a large model. The method comprises the steps that item type catalogs are added to a large language model, and corresponding item classification cues are constructed; inputting the government affair hotline work order text and the item classification prompt word into the fine-tuned large language model, and quoting an item type directory to output an item type corresponding to the government affair hotline work order text; and outputting the item type output by the large language model as a classification result of the to-be-classified government affair hotline work order text. The item type catalog needs to be periodically updated based on the large language model. Prediction of government affair hotline item types is achieved in the mode that the large language model is combined with the item classification prompt words, meanwhile, fine adjustment is conducted on the large language model so that the large language model can be more focused on the field of government affair hotlines, and item type self-growth and self-evolution of the item type catalog are achieved through the large language model. Therefore, the timeliness and accuracy of government affair hotline item type prediction are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence and large model technology, and in particular to a method for self-growth, self-evolution and classification of event types based on large models. Background Art

[0002] On the government service hotline, citizens report their demands by making phone calls, leaving messages on WeChat mini-programs, apps, portals, etc. The operator classifies the cases according to the content of the demands and then distributes them to the relevant responsible units and handling departments. With the widespread use of government service hotlines, on the one hand, the number of hotline cases is increasing day by day, and the cost of manual handling is increasing day by day. When social hot issues occur, the seats are often busy and it is difficult to meet the needs of the general public. On the other hand, due to the large number of case classifications and unclear distinctions between categories on the convenient government service hotline, the wide range of case-related departments and the complex hierarchy, the realization of fast and accurate prediction of the type of matters has become a difficult problem that needs to be solved urgently.

[0003] At present, the methods for predicting the types of government hotline items mainly include rule-based decision tree methods, machine learning methods, and neural network methods. The existing rule-based decision tree methods have poor accuracy in classifying and allocating cases with complex or similar categories. The existing machine learning-based methods and neural network-based methods are not accurate enough in allocating different categories of cases to departments at different administrative levels.

[0004] With the development of artificial intelligence, large language models (LLM) have entered people's field of vision. Large language models use deep learning algorithms and large-scale text data for training to understand and generate human language. Applying them to the prediction of the types of items in government hotlines can bring unexpected results. However, the applicant found that there are still the following problems when applying large language models to the prediction of the types of items in government hotlines: 1) The types of items involved in government hotlines are numerous, the classification levels are complex and the number is large, and the existing large language models are difficult to adapt, resulting in poor accuracy in the classification of government hotline item types. 2) The types of government items will continue to develop and evolve with changes in policies, regulations, social hotspots and other factors, making it difficult for the item classification catalog of the large language model to be consistent with the actual situation, which also leads to poor accuracy in the classification of government hotline item types. Therefore, how to improve the accuracy of the classification of government hotline item types is a technical problem that needs to be solved urgently. Summary of the invention

[0005] In view of the deficiencies of the above-mentioned prior art, the technical problem to be solved by the present invention is: how to provide a self-growth and self-evolution and classification method of matter types based on a large model, realize the prediction of government hotline matter types by combining a large language model with prompt words, and at the same time fine-tune the large language model to make it more focused on the field of government hotlines, and realize the self-growth and self-evolution of matter types in the matter type directory through the large language model, that is, update, so as to improve the timeliness and accuracy of government hotline matter type prediction.

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

[0007] The self-growth, self-evolution and classification methods of event types based on large models include:

[0008] S1: Obtain the text of the government hotline work order to be classified;

[0009] S2: Give the large language model an external event type directory and construct corresponding event classification prompt words;

[0010] S3: Input the government hotline work order text and the item classification prompt words into the fine-tuned large language model, and the large language model references the item type directory to output the item type corresponding to the government hotline work order text;

[0011] 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;

[0012] It is necessary to regularly update the item type catalog based on the large language model. The specific steps for updating the item type catalog are as follows:

[0013] S501: Obtaining a catalog of item types constructed based on a classification tree;

[0014] S502: Obtain the text of historical work orders that have not been assigned or answered and the corresponding matter update prompt words;

[0015] S503: Inputting the historical work order text and the item update prompt words into the large language model to generate potential classification keywords;

[0016] S504: Perform the following update operations on the item type catalog using the potential classification keywords:

[0017] S5041: Match the corresponding target classification subtree 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 lexical relationship judgment prompt word: if the semantic relationship is very 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: Generate a new classification node in parallel with the corresponding parent-child classification node in the target classification subtree based on the potential classification keyword;

[0020] S5044: when the semantics of the potential classification keyword covers the corresponding parent-child classification node, the corresponding parent-child classification node is updated by the potential classification keyword, and a new parent classification node is generated for the corresponding parent-child classification node;

[0021] S5045: No operation is performed.

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

[0023] Preferably, in step S5041, a corresponding target classification subtree is matched for potential classification keywords from the matter type directory through a hierarchical perception global model.

[0024] Preferably, 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.

[0025] Preferably, in step S5042, the potential classification keywords and the corresponding parent-child classification nodes and the lexical relationship judgment prompt words are input into the large language model to generate semantic relationships between the potential classification keywords and the corresponding parent-child classification nodes, and the semantic relationships include large semantic relationship differences, close semantic relationships, and identical semantic relationships.

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

[0027] Preferably, in step S3, the following agent is constructed for updating the item type directory:

[0028] Agent 1: reads the item type directory through the large language model, and determines whether it is necessary to update the item type directory according to 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;

[0029] Agent 2: After generating a new classification node of a certain level in steps S5043 and S5044, it determines whether the new classification node is more suitable as a parent classification node through the large language model; if the new classification node is more suitable as a parent classification node, it adjusts the item type directory accordingly;

[0030] Agent 3: Use the large language model to regularly check and delete classification nodes in the event type directory that have not been matched for a long time.

[0031] Preferably, in step S3, the steps of fine-tuning the large language model by 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: obtaining a text sample of a government hotline work order and its real item type as training data; wherein the real item type is determined and generated by the updated item type catalog;

[0036] S305: Inputting the government hotline work order text sample into the large language model, and outputting the corresponding predicted event type;

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

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

[0039] S308: Add the update amounts of each original weight matrix of the large language model and its corresponding weight matrices A and B to obtain a final weight matrix, thereby fine-tuning 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 large model-based item type self-growth, self-evolution and classification method of the present invention is implemented.

[0043] The present invention also discloses a computer-readable storage medium on which a computer program is stored. When the computer program is executed, the method for self-growth, self-evolution and classification of event types based on a large model in the present invention is implemented.

[0044] Compared with the prior art, the method of self-growth, self-evolution and classification of event types based on a large model in the present invention has the following beneficial effects:

[0045] The present invention realizes the prediction of the item type of the government hotline through a large language model combined with item classification prompt words. First, the large language model is pre-trained on massive text data, and has mastered rich language knowledge and context understanding ability. Combined with specific item classification prompt words, it can more accurately capture the key information in the government hotline work order text, so as to more accurately classify the government hotline work order into the corresponding item type. Secondly, the large language model has good generalization ability and can effectively handle various complex language phenomena. When new government items appear, it only needs to update the item classification prompt words and the item type directory to quickly adapt to the new classification requirements without retraining the entire model, thereby improving the flexibility and effectiveness of the prediction of the government hotline item type. Finally, the large language model is used to automatically classify the types of government hotline items, which can greatly improve the processing speed, reduce manual intervention, and improve the overall work efficiency; and through fast and accurate item type prediction, the government hotline system can respond to user needs more quickly and provide more personalized services, which can not only improve user satisfaction, but also enhance the public's trust in government services.

[0046] The present invention further fine-tunes the large language model through a low-rank adaptive algorithm. First, the low-rank adaptive algorithm freezes the original model parameters and adds a small number of trainable parameters, so that the model can maintain a certain accuracy while reducing the amount of trainable parameters of the model, thereby reducing computing and storage resource overhead. Secondly, the fine-tuned large language model is more focused on specific tasks in the field of government hotlines, and can better capture the language features and contextual information in this field, thereby improving the generalization ability of the model when processing related tasks.

[0047] The present invention realizes the self-growth and self-evolution of the item type directory, i.e., the update, through a large language model. First, the types of government affairs will continue to develop and evolve with the changes in policies, regulations, social hot spots and other factors. By continuously updating the item type directory, it can be ensured that the classification system is always consistent with the actual situation, thereby ensuring the timeliness and accuracy of the government hotline item type prediction. Secondly, with the emergence of new item categories and the elimination of old item categories, the original classification system may no longer be applicable. By updating the item type directory, the present invention can introduce new classification standards and categories, eliminate outdated categories, and thus improve the accuracy of the government hotline item type prediction. Furthermore, the historical work order text that has not been assigned and answered may contain categories that do not exist in the current item type directory, and it belongs to the field of government hotlines. Therefore, the present invention uses the historical work order text that has not been assigned and answered as the basic data for updating the item type directory, which can effectively update the item type directory while ensuring that the item type directory is still applicable to the government hotline field. Finally, the large language model is used to realize the self-growth and self-evolution, i.e., updating, of the item types in the item type catalog. This is actually a process of dynamically adjusting the classification capabilities 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. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to make the purpose, technical solution and advantages of the invention more clear, the present invention will be further described in detail below with reference to the accompanying drawings, in which:

[0049] Figure 1 , Figure 2 and Figure 3 They are all logical diagrams of the self-growth and self-evolution of event types and classification methods;

[0050] Figure 4 and Figure 5 An instance of an update for the item type catalog;

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

[0052] Figure 7 , Figure 8 , Fig. 9 , Fig.10 They are examples of matter classification prompt words, matter update prompt words, vocabulary relationship judgment prompt words and agent construction prompt words. DETAILED DESCRIPTION

[0053] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. The components of the embodiments of the present invention generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but only represents selected embodiments of the present invention. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work belong to the scope of protection of the present invention.

[0054] The following is a further detailed description through specific implementation methods:

[0055] Embodiment 1:

[0056] This embodiment discloses a method for self-growth, self-evolution and classification of event types based on a large model.

[0057] like Figure 1 As shown, the self-growth, self-evolution and classification methods of event types based on the big model include:

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

[0059] S2: Give the large language model an external event type directory and construct corresponding event classification prompt words;

[0060] In this embodiment, the task classification prompt words include 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. Figure 7 Instance of .

[0061] S3: Input the government hotline work order text and the item classification prompt words into the fine-tuned large language model, and the large language model references 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 an open source large model LLama3-8B. The Fiass vector database is used to store the vectorized item classification directory.

[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 catalog of item types needs to be updated regularly based on the large language model. Figure 2 As shown, the specific steps to update the event type directory are as follows:

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

[0066] S502: Obtain the text of historical work orders that have not been assigned or answered and the corresponding matter update prompt words;

[0067] In this embodiment, the reminder words for updating matters include task description and instructions. The task description clearly defines the tasks that the large model needs to complete, and the instructions include examples of output results. Figure 8 Instance of .

[0068] S503: Inputting the historical work order text and the item update prompt words into the large language model to generate potential classification keywords;

[0069] S504: Perform the following update operation on the item type directory using the potential classification keywords (such as Figure 3 shown):

[0070] S5041: Match the corresponding target classification subtree from the matter type directory according to the potential classification keywords;

[0071] In this embodiment, Figure 4 and Figure 5 The following is a classification tree with "People's Livelihood" as the root node. Figure 4 The target classification subtree matched in is "people's livelihood-commerce-tourism / retail"; Figure 5 The target classification subtree matched in is "people's livelihood-medical insurance-outpatient / hospitalization".

[0072] 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 lexical relationship judgment prompt word: if the semantic relationship is very different, execute step S5043; if the semantic relationship is close, execute step S5044; if the semantic relationship is the same, execute step S5045;

[0073] In this embodiment, the lexical relationship judgment prompt words include task descriptions and instructions. The task description clearly defines the tasks that the large model needs to complete, and the instructions include examples of output results. Fig. 9 Instance of .

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

[0075] S5043: Generate a new classification node in parallel with the corresponding parent-child classification node in the target classification subtree based on the potential classification keyword;

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

[0077] S5044: when the semantics of the potential classification keyword covers the corresponding parent-child classification node, the corresponding parent-child classification node is updated by the potential classification keyword, and a new parent classification node is generated for the corresponding parent-child classification node;

[0078] In this embodiment, Figure 5 As shown, the potential classification keywords include "insurance, life", and the semantics of "insurance" covers the same parent-child classification node "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 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.

[0080] In this embodiment, Figure 5 As shown, the potential classification keywords include "insurance, life insurance", and the semantics of "life insurance" is not covered by the same parent-child classification node "medical insurance", so "life insurance" is used as a new classification node parallel to the parent-child classification node "medical insurance".

[0081] S5045: No operation 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] The present invention realizes the prediction of the item type of the government hotline through a large language model combined with item classification prompt words. First, the large language model is pre-trained on massive text data, and has mastered rich language knowledge and context understanding ability. Combined with specific item classification prompt words, it can more accurately capture the key information in the government hotline work order text, so as to more accurately classify the government hotline work order into the corresponding item type. Secondly, the large language model has good generalization ability and can effectively handle various complex language phenomena. When new government items appear, it only needs to update the item classification prompt words and the item type directory to quickly adapt to the new classification requirements without retraining the entire model, thereby improving the flexibility and effectiveness of the prediction of the government hotline item type. Finally, the large language model is used to automatically classify the types of government hotline items, which can greatly improve the processing speed, reduce manual intervention, and improve the overall work efficiency; and through fast and accurate item type prediction, the government hotline system can respond to user needs more quickly and provide more personalized services, which can not only improve user satisfaction, but also enhance the public's trust in government services.

[0084] The present invention further fine-tunes the large language model through a low-rank adaptive algorithm. First, the low-rank adaptive algorithm freezes the original model parameters and adds a small number of trainable parameters, so that the model can maintain a certain accuracy while reducing the amount of trainable parameters of the model, thereby reducing computing and storage resource overhead. Secondly, the fine-tuned large language model is more focused on specific tasks in the field of government hotlines, and can better capture the language features and contextual information in this field, thereby improving the generalization ability of the model when processing related tasks.

[0085] The present invention realizes the self-growth and self-evolution of the item type directory, i.e., the update, through a large language model. First, the types of government affairs will continue to develop and evolve with the changes in policies, regulations, social hot spots and other factors. By continuously updating the item type directory, it can be ensured that the classification system is always consistent with the actual situation, thereby ensuring the timeliness and accuracy of the government hotline item type prediction. Secondly, with the emergence of new item categories and the elimination of old item categories, the original classification system may no longer be applicable. By updating the item type directory, the present invention can introduce new classification standards and categories, eliminate outdated categories, and thus improve the accuracy of the government hotline item type prediction. Furthermore, the historical work order text that has not been assigned and answered may contain categories that do not exist in the current item type directory, and it belongs to the field of government hotlines. Therefore, the present invention uses the historical work order text that has not been assigned and answered as the basic data for updating the item type directory, which can effectively update the item type directory while ensuring that the item type directory is still applicable to the government hotline field. Finally, the large language model is used to realize the self-growth and self-evolution, i.e., updating, of the item types in the item type catalog. This is actually a process of dynamically adjusting the classification capabilities 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 the target classification subtree corresponding to the potential classification keyword is not matched in the event type directory, a new classification subtree is generated according to the potential classification keyword and written into the event type directory. For example, the potential classification keywords include "football" and "basketball", and the corresponding target classification subtree is not matched in the event type directory, then a new classification subtree of "people's livelihood-sports-football / basketball" is constructed and written into the event type directory.

[0087] When the target classification subtree corresponding to the potential classification keyword does not exist in the matter type directory, the present invention generates a new classification subtree according to the potential classification keyword, which is conducive to better improving and supplementing the matter type directory.

[0088] During the specific implementation process, in step S5041, the hierarchical perception global model is used to match the corresponding target classification subtree for the potential classification keywords from the matter 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. The model transforms the hierarchy into a directed graph, and then uses the prior probability of label dependency to aggregate node information, while using label structure features to enhance text information.

[0090] The present 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 realizing the update of the item type directory.

[0091] During the specific implementation process, in step S5042, the potential classification keywords and the corresponding parent-child classification nodes and the lexical relationship judgment prompt words are input into the large language model to generate semantic relationships between the potential classification keywords and the corresponding parent-child classification nodes. The semantic relationships include semantic relationships with large differences, close semantic relationships, and identical semantic relationships.

[0092] The present invention uses the powerful understanding and generation capabilities of the large language model to analyze the semantic relationship between potential classification keywords and corresponding parent-child classification nodes, which is conducive to more accurate updating of the matter type directory, thereby assisting in improving the accuracy of subsequent government hotline matter type predictions.

[0093] During the specific implementation process, for the classification nodes in the matter type directory that have not been matched for a long time (for example, three months), a node deletion operation is performed.

[0094] The present invention can ensure that the classification system is always consistent with the actual situation by deleting classification nodes that have not been matched for a long time and eliminating outdated categories, thereby ensuring the timeliness and accuracy of the prediction of government hotline item types.

[0095] In the specific implementation process, the following agent is constructed for updating the event type directory:

[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 according to 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 classification node of a certain level in steps S5043 and S5044, it determines whether the new classification node is more suitable as a parent classification node through the large language model; if the new classification node is more suitable as a parent classification node, it adjusts the item type directory accordingly;

[0098] Agent 3: Use the large language model to regularly check and delete classification nodes in the event type directory that have not been matched for a long time (e.g., three months).

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

[0100] The specific steps to construct an agent are as follows:

[0101] 1) Determine the database operation toolkit for the item classification catalog (encapsulate the codes for adding, deleting, modifying and checking into a set of functions).

[0102] 2) The agent constructs prompt word configuration, including: a. Tool definition system prompt (tool name, description, parameter definition), the tool definition is executed according to the toolkit in 1); b. Problem definition user prompt (system prompt word, user input, model reply, tool call). For example: let the large language model read the item classification catalog database, and determine whether it is necessary to perform an update operation on the item classification catalog database according to the potential classification keywords generated in step S503. If necessary, the large language model will call the library function in the item classification catalog database operation toolkit through the tool in the tool definition to complete the addition, deletion and modification operations on the item classification catalog database. The agent constructs prompt words for reference Fig.10 Instance of .

[0103] The present invention constructs an intelligent agent to assist in the updating of the item type catalog. By integrating the toolkit, the intelligent agent can enable the large language model to automatically call relevant tools to perform corresponding functions, thereby further improving the timeliness and intelligence of the government hotline item type prediction.

[0104] Combination Figure 6 As shown in Figure 1, 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: obtaining a text sample of a government hotline work order and its real item type as training data; wherein the real item type is determined and generated by the updated item type catalog;

[0109] In this embodiment, the following steps are used to construct a sample of the government hotline work order text as training data:

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

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

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

[0113] S3044: Use natural language processing tools to automatically label 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 to implement syntactic analysis. Since government hotline work orders often only contain simple event description information, 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, place and people in an event. Part-of-speech tagging is to distinguish the part of speech of a word, 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, predicate and object. Named entity recognition, part-of-speech tagging and syntactic analysis will help us better classify the work orders to be classified.

[0115] S305: Inputting the government hotline work order text sample into the large language model, and outputting the corresponding predicted event type;

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

[0117] In this embodiment, the loss is calculated by a cross entropy loss function.

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

[0119] S308: Add the update amounts of each original weight matrix of the large language model and its corresponding weight matrices A and B to obtain a final weight matrix, thereby fine-tuning 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 the large language model through performance evaluation tools and collect basic performance data to evaluate the effect of fine-tuning the large language model;

[0122] In this embodiment, SuperCLUE is selected as the performance evaluation tool. The basic performance data collected include basic ability scores (10 abilities such as meaning understanding, dialogue, logical reasoning, role simulation, code, generation and creation), professional ability scores (middle school, university and professional examinations, covering more than 50 abilities from mathematics, physics, geography to social sciences.) and Chinese characteristic ability scores (10 abilities such as Chinese idioms, poetry, literature, and character shapes.). 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 items;

[0124] In this embodiment, the accuracy of the large language model is analyzed by macro-average, 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 growing volume of work orders and service requirements;

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

[0128] The present invention further fine-tunes the large language model through a low-rank adaptive algorithm. First, the low-rank adaptive algorithm freezes the original model parameters and adds a small number of trainable parameters, so that the model can maintain a certain accuracy while reducing the amount of trainable parameters of the model, thereby reducing computing and storage resource overhead. Secondly, the fine-tuned large language model is more focused on specific tasks in the field of government hotlines, and can better capture the language features and contextual information in this field, thereby improving the generalization ability of the model when processing related tasks.

[0129] Embodiment 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, the steps in the above-mentioned embodiments of the self-growth and self-evolution and classification method of event types based on a large model are implemented.

[0132] Exemplarily, the computer program may 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 may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program in the power system dynamic reactive power compensation device.

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

[0134] Embodiment three:

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

[0136] A computer-readable storage medium having a computer program stored thereon, which, when executed, performs the steps in each of the above-mentioned large-model-based event type self-growth, self-evolution and classification method embodiments.

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

[0138] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit the technical solution. Those skilled in the art should understand that those modifications or equivalent substitutions of the technical solution of the present invention that do not depart from the purpose and scope of the technical solution should be included in the scope of the claims of the present invention.

Claims

1. Based on the large model, the self-growth, self-evolution and classification method of event types, It is characterized in that include: S1: Obtain the text of the government hotline work order to be classified; S2: Give the large language model an external event type directory and construct corresponding event classification prompt words; S3: Input the government hotline work order text and the item classification prompt words into the fine-tuned large language model, and the large language model references 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; It is necessary to regularly update the item type catalog based on the large language model. The specific steps for updating the item type catalog are as follows: S501: Obtaining a catalog of item types constructed based on a classification tree; S502: Obtain the text of historical work orders that have not been assigned or answered and the corresponding matter update prompt words; S503: Inputting the historical work order text and the item update prompt words into the large language model to generate potential classification keywords; S504: Perform the following update operations on the item type catalog using the potential classification keywords: S5041: Match the corresponding target classification subtree from the matter type directory according to the potential classification keywords; 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 lexical relationship judgment prompt word: if the semantic relationship difference is large, execute step S5043; If the semantic relationship is close, then execute step S5044; if the semantic relationship is the same, then execute step S5045; S5043: Generate a new classification node in parallel with the corresponding parent-child classification node in the target classification subtree based on the potential classification keyword; S5044: when the semantics of the potential classification keyword covers the corresponding parent-child classification node, the corresponding parent-child classification node is updated by the potential classification keyword, and a new parent classification node is generated for the corresponding parent-child classification node; S5045: No operation is performed.

2. The method for self-growth, self-evolution and classification of event types based on a large model as claimed in claim 1, Features: In step S5041, if the target classification subtree corresponding to the potential classification keyword is not matched from the matter type directory, a new classification subtree is generated according to the potential classification keyword and written into the matter type directory.

3. The method for self-growth, self-evolution and classification of event types based on a large model as claimed in claim 1, Features: In step S5041, the hierarchical perception global model is used to match the corresponding target classification subtree for the potential classification keywords from the matter type directory.

4. The method for self-growth, self-evolution and classification of event types based on a large model as claimed in claim 1, Features: 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 method for self-growth, self-evolution and classification of event types based on a large model as claimed in claim 1, Features: In step S5042, the potential classification keywords and the corresponding parent-child classification nodes and the lexical relationship judgment prompt words are input into the large language model to generate semantic relationships between the potential classification keywords and the corresponding parent-child classification nodes. The semantic relationships include semantic relationships with large differences, close semantic relationships, and identical semantic relationships.

6. The method for self-growth, self-evolution and classification of event types based on a large model as claimed in claim 1, Features: In step S3, a node deletion operation is performed for classification nodes in the matter type directory that have not been matched for a long time.

7. The method for self-growth, self-evolution and classification of event types based on a large model as claimed in claim 1, Features: In step S3, the database operation toolkit required by the agent is created, and the following agent is constructed for updating the event type directory: Agent 1: reads the item type directory through the large language model, and determines whether it is necessary to update the item type directory according to 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 classification node of a certain level in steps S5043 and S5044, it determines whether the new classification node is more suitable as a parent classification node through the large language model; if the new classification node is more suitable as a parent classification node, it adjusts the item type directory accordingly; Agent 3: Use the large language model to regularly check and delete classification nodes in the event type directory that have not been matched for a long time.

8. The method for self-growth, self-evolution and classification of event types based on a large model as claimed in claim 1, Features: In step S3, the steps of fine-tuning the large language model by 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: Obtaining a text sample of a government hotline work order and its actual event type as training data; The actual event type is determined and generated through the updated event type catalog; S305: Inputting the government hotline work order text sample into the large language model, and outputting the corresponding predicted event type; S306: Calculate the loss based on the predicted event type and the corresponding real event type in combination with the loss function, and reversely optimize the weight matrices A and B in the large language model; S307: Repeat steps S304 to S306 until the large language model converges or reaches a preset number of iteration rounds; S308: Add the update amounts of each original weight matrix of the large language model and its corresponding weight matrices A and B to obtain a final weight matrix, thereby fine-tuning the large language model.

9. A computer device, It is 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 large model-based matter type self-growth, self-evolution and classification method as described in any one of claims 1 to 8 is implemented.

10. A computer-readable storage medium, It is characterized in that A computer program is stored thereon, which, when executed, implements the large-model-based self-growth, self-evolution and classification method of event types 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

  • Policy question and answer method and system based on large language model and knowledge graph technology

    CN117725170A

  • Large language model cue word generation method and system, terminal equipment and medium

    CN118093838A

  • A method for threat detection in a threat detection system and a threat detection system

    GB202318846D0

Cited By

  • Construction system of standard system model

    CN119379039A

  • Flight table data generation method and system, computer equipment and medium

    CN119886079A

  • Government affair hotline work order intelligent allocation method based on large language model

    CN120011865A

  • Hotline work order classification method and system based on large model

    CN120632097A