Label identification method, device and system based on scene and medium

By adopting a scenario-based label recognition method in the insurance industry, using LoRA structure and few-shot learning strategy, the pre-trained model is fine-tuned, which solves the problem of low label recognition accuracy in different scenarios and improves the accuracy of label recognition and saturation.

CN119127969APending Publication Date: 2024-12-13CHINA PING AN PROPERTY INSURANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411193760.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-28
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

In the insurance industry, due to the limitations of label definition and contextual factors, the identification saturation of labels in different insurance scenarios is affected, making it difficult for label identification to adapt to different scenarios and has low recognition accuracy.

Method used

Using a scenario-based label recognition method, fine-tune the pre-trained backbone model under the LoRA structure to generate label recognition models for different scenarios. Using few-shot learning strategies and meta-learning strategies, quickly adapt to new tasks and improve labels. Accuracy and saturation of identification.

Benefits of technology

It effectively improves the accuracy of tag recognition in different scenarios, explores the scenario tags of all customers as much as possible, improves the saturation of tag recognition, and ensures the flexibility and adaptability of tag recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119127969A_ABST
    Figure CN119127969A_ABST
Patent Text Reader

Abstract

The invention discloses a scene-based label identification method, device and system and a medium. The method comprises the following steps: acquiring a to-be-identified text in a target scene; calling a corresponding scene label identification model according to the target scene, wherein the scene label identification model is obtained by performing model fine adjustment on a pre-trained trunk model under a LoRA structure of the target scene; and inputting the to-be-recognized text into a scene label recognition model corresponding to the target scene to generate a corresponding label recognition result. The tag identification models in different scenes are obtained through fine adjustment of the trunk model and the LoRA structure corresponding to the scene, so that the corresponding models can be flexibly called based on the target scene to perform tag mining, the tag identification accuracy in different scenes is effectively improved, the scene tags of all clients are mined as much as possible, and the tag identification saturation is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of financial technology, and in particular to a scenario-based tag recognition method, device, system and medium. Background Art

[0002] In the insurance industry, tagging is an important tool for identifying customer portraits in insurance scenarios. It usually refers to a classification or labeling method used to segment customers. These tags help insurance companies better understand customer needs, preferences, and risk characteristics, and provide customers with personalized services and products.

[0003] However, due to limitations of factors such as label definition and context, the saturation of labels identified in different insurance scenarios may be affected, that is, the labels of some customers cannot be clearly and accurately identified, resulting in label recognition being difficult to adapt to different scenarios and low recognition accuracy. Summary of the invention

[0004] In view of the above-mentioned deficiencies in the prior art, the purpose of the present invention is to provide a scenario-based tag recognition method, device, system and medium that can be applied to financial technology or other related fields, the main purpose of which is to improve the accuracy of tag recognition in different scenarios.

[0005] The technical solution of the present invention is as follows:

[0006] A first aspect of the present invention provides a scenario-based tag recognition method, comprising:

[0007] Get the text to be recognized in the target scene;

[0008] Calling a corresponding scene label recognition model according to the target scene, wherein the scene label recognition model is obtained by fine-tuning a pre-trained backbone model under the LoRA structure of the target scene;

[0009] The text to be recognized is input into the scene label recognition model corresponding to the target scene to generate a corresponding label recognition result.

[0010] In one embodiment, before obtaining the text to be recognized in the target scene, the method further includes:

[0011] The corresponding scene label recognition model is trained based on business data from various scenarios.

[0012] In one embodiment, the training of the corresponding scenario label recognition model based on the customer communication data of various scenarios includes:

[0013] Collect customer communication data in various scenarios;

[0014] Performing data conversion processing on the customer communication data according to a preset data structure to generate a training set for each scenario;

[0015] The training set for each scenario is input into the pre-trained backbone model, and the backbone model is fine-tuned for the label recognition task through the LoRA structure corresponding to each scenario;

[0016] The original weights of the backbone model and the LoRA weights obtained by fine-tuning the model in each scenario are merged to obtain a scene label recognition model for multiple scenarios.

[0017] In one embodiment, the data conversion process is performed on the customer communication data according to a preset data structure to generate a training set for each scenario, including:

[0018] Obtaining a preset data structure, the preset data structure including an instruction definition, an input text, and a classification output;

[0019] Corresponding input text is extracted from the customer communication data and corresponding classification output is generated according to the instruction definition, thereby generating a training set for each scenario.

[0020] In one embodiment, fine-tuning the model of the tag recognition task on the backbone model by using the LoRA structure corresponding to each scenario specifically includes:

[0021] Through the LoRA structure and training set corresponding to each scenario, the backbone model is fine-tuned for the label recognition task according to the few-shot learning strategy.

[0022] In one embodiment, after inputting the text to be recognized into the scene label recognition model corresponding to the target scene and generating the corresponding label recognition result, the method further includes:

[0023] The saturation of tag recognition is calculated based on the tag recognition results of all customers to be identified in the database.

[0024] In one embodiment, the backbone model is the ChatGLM2-6b model.

[0025] A second aspect of the present invention provides a scene-based tag recognition device, comprising:

[0026] An acquisition module is used to acquire the text to be recognized in the target scene;

[0027] A model calling module, used to call a corresponding scene label recognition model according to the target scene, wherein the scene label recognition model is obtained by fine-tuning a pre-trained backbone model under the LoRA structure of the target scene;

[0028] The recognition module is used to input the text to be recognized into the scene label recognition model corresponding to the target scene to generate a corresponding label recognition result.

[0029] A third aspect of the present invention provides a scene-based tag recognition system, the system comprising at least one processor; and

[0030] a memory communicatively connected to the at least one processor; wherein,

[0031] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform the above-mentioned scene-based tag recognition method.

[0032] A fourth aspect of the present invention provides a non-volatile computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are executed by one or more processors, the one or more processors can execute the above-mentioned scene-based tag recognition method.

[0033] Beneficial effects: The present invention discloses a scene-based label recognition method, device, system and medium. Compared with the prior art, the embodiments of the present invention obtain the text to be recognized in the target scene; call the corresponding scene label recognition model according to the target scene, and the scene label recognition model is obtained by fine-tuning the pre-trained backbone model under the LoRA structure of the target scene; input the text to be recognized into the scene label recognition model corresponding to the target scene to generate the corresponding label recognition result. The label recognition models for different scenes are obtained by fine-tuning the backbone model and the LoRA structure corresponding to the scene, so that the corresponding model can be flexibly called based on the target scene for label mining, effectively improving the accuracy of label recognition in different scenes, mining the scene labels of all customers as much as possible, and thus improving the saturation of label recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] The present invention will be further described below with reference to the accompanying drawings and embodiments, in which:

[0035] Figure 1 A flow chart of a scenario-based tag recognition method provided by an embodiment of the present invention;

[0036] Figure 2 A flow chart of model training in a scenario-based tag recognition method provided by an embodiment of the present invention;

[0037] Figure 3 A flow chart of step S202 in the scene-based tag recognition method provided by an embodiment of the present invention;

[0038] Figure 4 A schematic diagram of functional modules of a scene-based tag recognition device provided by an embodiment of the present invention;

[0039] Figure 5 A schematic diagram of the hardware structure of a scene-based tag recognition system provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0040] In order to make the purpose, technical solution and effect of the present invention clearer and more specific, the present invention is further described in detail below. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. The embodiments of the present invention are described below in conjunction with the accompanying drawings.

[0041] In the insurance industry, tagging is an important tool for identifying customer portraits in insurance scenarios. It usually refers to a classification or labeling method used to segment customers. These tags help insurance companies better understand customer needs, preferences, and risk characteristics, and provide customers with personalized services and products.

[0042] However, due to limitations of factors such as label definition and context, the saturation of labels identified in different insurance scenarios may be affected, that is, the labels of some customers cannot be clearly and accurately identified, resulting in label recognition being difficult to adapt to different scenarios and low recognition accuracy.

[0043] In order to solve the above problems, the present invention proposes a scene-based tag recognition method, see Figure 1 , Figure 1 A flow chart of an embodiment of a scenario-based tag identification method provided by the present invention. The system architecture of the scenario-based tag identification method provided in this embodiment may include a first terminal device, a second terminal device, a third terminal device, a network and a server. The network is used to provide a medium for a communication link between the first terminal device, the second terminal device, the third terminal device and the server. The network may include various connection types, such as wired and / or wireless communication links, etc.

[0044] The user may use the first terminal device, the second terminal device, and the third terminal device to interact with the server through the network to receive or send messages, etc. Various communication client applications may be installed on the first terminal device, the second terminal device, and the third terminal device, such as knowledge reading applications, web browser applications, search applications, instant messaging tools, email clients, and / or social platform software, etc. (only as examples).

[0045] The first terminal device, the second terminal device, and the third terminal device may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.

[0046] The server may be a server that provides various services, such as a background management server that provides support for the content browsed by the user using the first terminal device, the second terminal device, and the third terminal device (for example only). The background management server may analyze and process the received data such as the user request, and feed back the processing results (such as web pages, information, or data obtained or generated according to the user request) to the terminal device. The server may be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server may also be a server for a distributed system, or a server combined with a blockchain.

[0047] It should be noted that the scenario-based tag recognition method provided in the embodiment of the present invention can generally be executed by the first terminal device, the second terminal device or the third terminal device. Correspondingly, the scenario-based tag recognition device provided in the embodiment of the present invention can also be set in the first terminal device, the second terminal device or the third terminal device.

[0048] Alternatively, the scenario-based tag identification method provided by the embodiment of the present invention may also be generally executed by a server. Accordingly, the scenario-based tag identification device provided by the embodiment of the present invention may generally be arranged in a server. The scenario-based tag identification method provided by the embodiment of the present invention may also be executed by a server or server cluster that is different from the server and can communicate with the first terminal device, the second terminal device, the third terminal device and / or the server. Accordingly, the scenario-based tag identification device provided by the embodiment of the present invention may also be arranged in a server or server cluster that is different from the server and can communicate with the first terminal device, the second terminal device, the third terminal device and / or the server.

[0049] It should be understood that the numbers of the above terminal devices, networks and servers are only illustrative. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0050] like Figure 1 As shown, the scene-based tag recognition method provided in this embodiment specifically includes the following steps:

[0051] S101: Obtain text to be recognized in a target scene.

[0052] In this embodiment, multiple scenarios are set according to the needs of tag mining. When it is necessary to mine customer tags in the target scenario, the text to be identified of the customer in the target scenario is obtained to achieve targeted tag identification in different scenarios. The specific target scenario can be, for example, a pet identification scenario, a real estate identification scenario, a purchase behavior identification scenario, a health identification scenario, a family structure identification scenario, etc. The specific text to be identified can be, for example, customer consultation records, including telephone or online chat records between customers and customer service personnel, consultation forms or emails submitted by customers, etc.; claim application materials, including claim applications submitted by customers, medical records, accident reports and related supporting materials, etc.; customer feedback and evaluation, including customer evaluation and feedback on insurance products or services, responses to online questionnaires, etc.; customer service records, including customer service logs and case records, customer complaints and solution records, etc.; social media and forum discussion records, including customer discussions and comments on insurance products or services on social media, etc.

[0053] S102. Calling a corresponding scene label recognition model according to the target scene, wherein the scene label recognition model is obtained by fine-tuning a pre-trained backbone model under the LoRA structure of the target scene.

[0054] Based on the different currently recognized scenes, the scene label recognition model corresponding to the target scene is called, and the scene label recognition model is obtained by fine-tuning the pre-trained backbone model under the LoRA structure of the target scene. LoRA (Low-Rank Adaptation) is a technology for fine-tuning large language models. It introduces a low-rank structure in the weight matrix of the model to update parameters, so that it can adapt to new tasks by adjusting the low-rank approximation of the weight matrix without significantly increasing the number of model parameters. It not only reduces the computing requirements, but also makes the training resources much smaller than directly training the original model. In this embodiment, different LoRA structures are trained according to the label recognition tasks in different scenes. When deploying reasoning, only one copy of the same backbone model needs to be deployed, and different LoRA structures obtained by scene usage training are used as the scene label recognition model in the current scene, so that a label recognition model with high scene adaptability can still be obtained in limited resources to maximize the accuracy of label recognition in different scenes.

[0055] S103: input the text to be recognized into a scene label recognition model corresponding to the target scene to generate a corresponding label recognition result.

[0056] After calling the scene label recognition model with the corresponding LoRA structure according to the target scene, the text to be recognized can be input into the scene label recognition model corresponding to the target scene to generate the corresponding label recognition result. For example, in the pet recognition scene, the text to be recognized is the customer's consulting dialogue "Customer: My child is in school. Yesterday, he was bitten by my dog, so I want to see what the claim terms are." At this time, after calling the scene label recognition model corresponding to the pet recognition scene, the dialogue text is input into the model, and the model outputs the label recognition result: customer pet classification category ==>: "Yes", of course, other related label recognition results can be further mined and output, for example: customer room classification category ==> "Unknown"; customer children classification category: "Yes", specifically, the learning content and strategy of the model can be flexibly set when training the model. In this embodiment, the label recognition model under different scenes is obtained by fine-tuning the backbone model and the LoRA structure corresponding to the scene, so that the corresponding model can be flexibly called based on the target scene for label mining, effectively improving the accuracy of label recognition under different scenes, mining all customer scene labels as much as possible, and then improving the saturation of label recognition.

[0057] In one embodiment, before obtaining the text to be recognized in the target scene, the method further includes:

[0058] The corresponding scene label recognition model is trained based on business data from various scenarios.

[0059] In this embodiment, different LoRA modules are set according to the characteristics of label mining in different scenarios, and business data training in various scenarios is collected to obtain multiple scenario label recognition models based on the same pre-trained backbone model through LoRA parameter fine-tuning, thereby ensuring that customer labels in different scenarios can be clearly and accurately identified, avoiding the saturation of label recognition due to limitations such as label definition and context.

[0060] In one embodiment, Figure 2 As shown, the corresponding scenario label recognition model is obtained by training customer communication data of various scenarios, including:

[0061] Collect customer communication data in various scenarios;

[0062] Performing data conversion processing on the customer communication data according to a preset data structure to generate a training set for each scenario;

[0063] The training set for each scenario is input into the pre-trained backbone model, and the backbone model is fine-tuned for the label recognition task through the LoRA structure corresponding to each scenario;

[0064] The original weights of the backbone model and the LoRA weights obtained by fine-tuning the model in each scenario are merged to obtain a scene label recognition model for multiple scenarios.

[0065] In this embodiment, during model training, customer communication data is used as the data basis for constructing a training set, and customer communication data in various scenarios are collected to construct a data set suitable for model training. For example, customer communication data collected in scenarios such as pet identification, real estate identification, purchase behavior identification, health identification, and family structure identification are collected. The customer communication data may be, for example, telephone call records, online chat records, email exchanges, face-to-face meeting records, customer consultation records, social media interaction records, and the like.

[0066] After collecting customer communication data related to various scenarios, since the original data is relatively messy and difficult to be understood and accepted by the model, this embodiment performs data conversion processing on the collected customer communication data according to the preset data structure, constructs it into a data structure that can be accepted by the large model, and then generates a training set for each scenario. Specifically, the original customer communication data can be processed in sequence for data cleaning, data integration, data conversion, etc., where data cleaning is to remove invalid or erroneous data records, such as null values, duplicate records or data with incorrect formats, and data integration is to integrate data from different sources (such as phone records, emails, social media, etc.) into a unified data set; data conversion is to convert the integrated data according to the preset data structure to obtain a data structure suitable for model training. The accuracy and consistency of the data are ensured by cleaning and integration, providing high-quality input for the model, and the model can better learn and identify predictions based on the converted data, thereby improving model performance.

[0067] After the training set is constructed, the training set for each scenario is input into the pre-trained backbone model, and the backbone model is fine-tuned for the label recognition task through the LoRA structure corresponding to each scenario. Among them, the pre-trained backbone model is the ChatGLM2-6b model. ChatGLM2-6B is a large pre-trained language model with a large number of parameters, which enables the model to capture and understand the complexity of language and improve the ability to understand language. Large pre-trained models can usually handle a variety of natural language processing tasks, such as text generation, dialogue systems, text summarization, etc. At the same time, the ChatGLM2-6b model can be pre-trained on a large amount of data from different fields, so that the model has good generalization ability and can adapt to different tasks and fields. For example, when applied in the insurance industry, it can be pre-trained through data alignment in the insurance field to adapt to the data characteristics of the insurance field.

[0068] In this embodiment, the same pre-trained backbone model is used for label recognition tasks in different scenarios. On the basis of the same backbone model, the backbone model is fine-tuned for the label recognition task through the LoRA structure corresponding to different scenarios. When fine-tuning the model based on the LoRA structure, a low-rank matrix is ​​specifically introduced into the weight matrix of the model as an update item of the weight, that is, LoRA introduces two low-rank matrices A and B, and multiplies them to generate an updated weight matrix W, so that even in the fine-tuning stage, the performance of the original model can be maintained, while quickly adapting to new tasks or data. In addition, by initializing matrix B to all zeros and matrix A to random values ​​(usually normally distributed), it can be ensured that the fine-tuning process starts from the state of the original model, avoiding instability in the early stage of training. After the fine-tuning is completed, LoRA structures with different weights can be obtained in different scenarios. The original weights of the backbone model and the LoRA weights obtained by fine-tuning the model in each scenario are merged to obtain scene label recognition models in multiple scenarios.

[0069] That is to say, this embodiment trains multiple different LoRA modules for label recognition tasks in multiple different scenarios. The LoRA modules trained in each scenario are different. When deploying reasoning, only one ChatGLM2-6b backbone model needs to be deployed, and different LoRA modules are used according to the recognition tasks in different scenarios, thereby greatly saving video memory. Through the model supervised fine-tuning method, large language models can be fine-tuned more quickly and efficiently to meet the label recognition requirements in different scenarios, and by simplifying the complexity of the fine-tuning process, it can help save computing resources, energy and time.

[0070] Specifically, the backbone model is fine-tuned for the label recognition task through the LoRA structure corresponding to each scenario, including:

[0071] Through the LoRA structure and training set corresponding to each scenario, the backbone model is fine-tuned for the label recognition task according to the few-shot learning strategy.

[0072] In this embodiment, a few-shot learning strategy is used when fine-tuning the model. The few-shot learning strategy is a machine learning paradigm that defines how data is processed, how the model is trained, and how to evaluate the performance of the model. In traditional machine learning, such as supervised learning strategies, a large amount of labeled data is usually required to train a model so that it can accurately identify or predict. However, in the few-shot learning strategy, the model needs to be able to quickly adapt to and learn new tasks or categories with only a few samples. When the few-shot learning strategy is specifically used for model fine-tuning, after defining the recognition tasks in different scenarios and preparing the training set, the LoRA structure, i.e., the low-rank structure, is introduced into the weight matrix of the model, and the low-rank update mechanism of LoRA is used to adapt to the new task. The low-rank parameters of LoRA are iteratively optimized according to the model output results to improve the performance of the model in the recognition tasks of different scenarios. Preferably, it can also be combined with a meta-learning strategy, such as MAML (Model-Agnostic Meta-Learning), to further optimize the initialization parameters of the model, so that the model learns how to extract useful knowledge from previous experience and apply it to new problems, so that it can adapt faster to new tasks. Therefore, this embodiment adopts a few-shot learning strategy to enable the model to quickly learn new tasks or new categories using very few samples, so that when the training set data samples collected in different scenarios are limited, a reliable scene label recognition model can still be trained.

[0073] In one embodiment, Figure 3 As shown, the customer communication data is converted according to a preset data structure to generate a training set for each scenario, including:

[0074] Obtaining a preset data structure, the preset data structure including an instruction definition, an input text, and a classification output;

[0075] Corresponding input text is extracted from the customer communication data and corresponding classification output is generated according to the instruction definition, thereby generating a training set for each scenario.

[0076] In this embodiment, when the collected customer communication data is converted, the instruction definition, input text and classification output are constructed accordingly to obtain a data structure that the model can accept. Specifically, the corresponding input text is extracted from the customer communication data and the corresponding classification output is generated according to the instruction definition, thereby generating a training set for each scenario. Extracting input text from actual customer communication data helps the model learn the characteristics of real-world data and enhances the generalization ability of the model in practical applications. Clear instruction definitions can ensure that the model understands its task objectives, such as identifying specific information or labels in customer conversations, and can reduce dependence on manual annotations and improve the efficiency of data preparation; the collected customer communication data is converted according to a unified preset data structure so that the model can clearly know the expected input and output, forming a structured training set, and providing necessary data for model training, thereby ensuring the training effect.

[0077] In the specific implementation, taking the pet recognition scenario as an example, after collecting a large amount of customer communication data related to the pet scenario, the process of establishing the training set includes:

[0078] (1) instruction: instruction. The instruction definition in the training set is:

[0079] You are an artificial intelligence assistant who is good at analyzing conversation content to determine customer portraits. You can classify user portraits based on user input conversation content and classification requirements.

[0080] Category classification labels are: "yes", "no" or "unknown"

[0081] Among them, as long as the words "cat", "dog", "pet" and other similar expressions are mentioned, it can be determined that the customer has a pet.

[0082] For example, if the text input of the conversation content is "Customer: What kind of insurance does my son who is in preschool need to buy?", only the category labels "yes", "no", and "unknown" need to be output, without any other redundant content.

[0083] The customer's child classification category corresponding to the above text ==> "Yes"

[0084] The customer pet classification category corresponding to the above text ==> "Unknown"

[0085] The customer room classification category corresponding to the above text ==> "Unknown"

[0086] The current dialogue text is as follows:

[0087] (2) Input: prompt. The prompt text in the label recognition task is the communication content extracted from the customer communication data, such as the conversation between the customer and the operator. The prompt is used as the input text of the model.

[0088] (3) output (classification output): response:

[0089] The customer children classification category corresponding to the above text ==> "Result"

[0090] The customer pet classification category corresponding to the above text ==> "Result"

[0091] The customer room classification category corresponding to the above text ==> "Result"

[0092] (4) Finally, add the dataset to the json file in the corresponding directory.

[0093] The format is: [

[0095] {

[0096] "instruction":"You are an artificial intelligence assistant who is good at analyzing conversation content to determine customer portraits. You can classify user portraits based on the user's input conversation content and classification requirements.

[0097] Category classification labels are: "yes", "no" or "unknown"

[0098] Among them, as long as the words "cat", "dog", "pet" and other similar expressions are mentioned, it can be determined that the customer has a pet.

[0099] For example, if the text input of the conversation content is "Customer: What kind of insurance does my son who is in preschool need to buy?", only the category labels "yes", "no", and "unknown" need to be output, without any other redundant content.

[0100] The customer's child classification category corresponding to the above text ==> "Yes"

[0101] The customer pet classification category corresponding to the above text ==> "Unknown"

[0102] The customer room classification category corresponding to the above text ==> "Unknown"

[0103] The current dialogue text is as follows:

[0104] "

[0105] ,

[0106] "input":"Customer: My child is at school and was bitten by my dog ​​yesterday, so I want to see what the compensation terms are",

[0107] "output":"

[0108] The customer room classification category corresponding to the above text ==> "Unknown",

[0109] The above text corresponds to the customer's children classification category: "Yes",

[0110] The above text corresponds to the customer's pet classification category ==>: "Yes"

[0111] }

[0112] … ]

[0114] By generating training sets in different scenarios for model fine-tuning of corresponding scenario label recognition tasks, the model can adapt to the data characteristics of different scenarios, thereby identifying the customer's scenario labels as accurately as possible, improving the accuracy of label recognition in different scenarios, and the saturation of label recognition.

[0115] In one embodiment, after inputting the text to be recognized into the scene label recognition model corresponding to the target scene and generating the corresponding label recognition result, the method further includes:

[0116] The saturation of tag recognition is calculated based on the tag recognition results of all customers to be identified in the database.

[0117] In this embodiment, based on the tag recognition results of the customer to be identified, the saturation of tag recognition in different scenarios can be calculated. The calculation of tag saturation is specifically to divide the identified by all that should be identified. For example, there are 5 customers in the database, and in the pet recognition scenario, they are respectively identified as having a pet tag. The first identification is "yes", the second identification is "no", and the last three are "unknown", then the saturation is ("yes" + "no") / ("yes" + "no" + "unknown"), that is, 2 / 5 = 40%. By calculating the saturation of tag recognition, the performance of the scene tag recognition model in different scenarios can be evaluated. Based on the tag saturation, the model parameters are fed back and updated to achieve the effect of maximizing the tag saturation. While adapting to the tag recognition of different scenarios, it can also ensure that the tag saturation meets the recognition requirements of the scene, thereby improving the scene business efficiency.

[0118] It should be noted that there is not necessarily a certain order between the above-mentioned steps. A person skilled in the art can understand, based on the description of the embodiments of the present invention, that in different embodiments, the above-mentioned steps may have different execution orders, that is, they may be executed in parallel, may be executed interchangeably, and so on.

[0119] Another embodiment of the present invention provides a scene-based tag recognition device, such as Figure 4 As shown, the device 1 comprises:

[0120] An acquisition module 11 is used to acquire the text to be recognized in the target scene;

[0121] A model calling module 12 is used to call a corresponding scene label recognition model according to the target scene, wherein the scene label recognition model is obtained by fine-tuning a pre-trained backbone model under the LoRA structure of the target scene;

[0122] The recognition module 13 is used to input the text to be recognized into the scene label recognition model corresponding to the target scene to generate a corresponding label recognition result.

[0123] The module referred to in the present invention refers to a series of computer program instruction segments that can perform specific functions, which are more suitable for describing the scene-based tag recognition execution process than programs. For the specific implementation of each module, please refer to the corresponding method embodiment above, which will not be repeated here.

[0124] In one embodiment, the device 1 further comprises:

[0125] The model training module is used to train the business data of various scenarios to obtain the corresponding scenario label recognition model.

[0126] In one embodiment, the model training module includes:

[0127] A collection unit, used to collect customer communication data in various scenarios;

[0128] A data conversion unit, used to perform data conversion processing on the customer communication data according to a preset data structure to generate a training set for each scenario;

[0129] A model fine-tuning unit, used to input the training set under each scenario into the pre-trained backbone model, and fine-tune the model of the backbone model for the label recognition task through the LoRA structure corresponding to each scenario;

[0130] The model saving unit is used to merge the original weight of the backbone model and the LoRA weight obtained by fine-tuning the model in each scenario to obtain a scene label recognition model for multiple scenarios.

[0131] In one embodiment, the data conversion unit includes:

[0132] A structure acquisition unit, used to acquire a preset data structure, wherein the preset data structure includes an instruction definition, an input text, and a classification output;

[0133] The training set generation unit is used to extract corresponding input text from the customer communication data and generate corresponding classification output according to the instruction definition, so as to generate a training set for each scenario.

[0134] In one embodiment, the model fine-tuning unit is specifically used to:

[0135] Through the LoRA structure and training set corresponding to each scenario, the backbone model is fine-tuned for the label recognition task according to the few-shot learning strategy.

[0136] In one embodiment, the device 1 further comprises:

[0137] The saturation calculation module is used to calculate the saturation of tag recognition based on the tag recognition results of all customers to be identified in the database.

[0138] In one embodiment, the backbone model is the ChatGLM2-6b model.

[0139] Another embodiment of the present invention provides a scene-based tag recognition system, such as Figure 5 As shown, the system 10 includes:

[0140] One or more processors 110 and memory 120, Figure 5 A processor 110 is used as an example for description. The processor 110 and the memory 120 may be connected via a bus or other means. Figure 5 The example of connecting through bus is taken in the following.

[0141] The processor 110 is used to complete various control logics of the system 10, and it can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), a single-chip microcomputer, an ARM (Acorn RISC Machine) or other programmable logic device, a discrete gate or transistor logic, a discrete hardware component, or any combination of these components. In addition, the processor 110 can also be any traditional processor, microprocessor or state machine. The processor 110 can also be implemented as a combination of computing devices, for example, a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors combined with a DSP and / or any other such configuration.

[0142] The memory 120 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as program instructions corresponding to the scenario-based tag recognition method in the embodiment of the present invention. The processor 110 executes various functional applications and data processing of the system 10 by running the non-volatile software programs, instructions and units stored in the memory 120, that is, implementing the scenario-based tag recognition method in the above method embodiment.

[0143] The memory 120 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required by at least one function; the data storage area may store data created according to the use of the system 10, etc. In addition, the memory 120 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 120 may optionally include a memory remotely arranged relative to the processor 110, and these remote memories may be connected to the system 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0144] One or more units are stored in the memory 120, and when executed by one or more processors 110, the scene-based tag recognition method in any of the above method embodiments is executed, for example, the following steps are executed:

[0145] Get the text to be recognized in the target scene;

[0146] Calling a corresponding scene label recognition model according to the target scene, wherein the scene label recognition model is obtained by fine-tuning a pre-trained backbone model under the LoRA structure of the target scene;

[0147] The text to be recognized is input into the scene label recognition model corresponding to the target scene to generate a corresponding label recognition result.

[0148] In one embodiment, before obtaining the text to be recognized in the target scene, the method further includes:

[0149] The corresponding scene label recognition model is trained based on business data from various scenarios.

[0150] In one embodiment, the training of the corresponding scenario label recognition model based on the customer communication data of various scenarios includes:

[0151] Collect customer communication data in various scenarios;

[0152] Performing data conversion processing on the customer communication data according to a preset data structure to generate a training set for each scenario;

[0153] The training set for each scenario is input into the pre-trained backbone model, and the backbone model is fine-tuned for the label recognition task through the LoRA structure corresponding to each scenario;

[0154] The original weights of the backbone model and the LoRA weights obtained by fine-tuning the model in each scenario are merged to obtain a scene label recognition model for multiple scenarios.

[0155] In one embodiment, the data conversion process is performed on the customer communication data according to a preset data structure to generate a training set for each scenario, including:

[0156] Obtaining a preset data structure, the preset data structure including an instruction definition, an input text, and a classification output;

[0157] Corresponding input text is extracted from the customer communication data and corresponding classification output is generated according to the instruction definition, thereby generating a training set for each scenario.

[0158] In one embodiment, fine-tuning the model of the tag recognition task on the backbone model by using the LoRA structure corresponding to each scenario specifically includes:

[0159] Through the LoRA structure and training set corresponding to each scenario, the backbone model is fine-tuned for the label recognition task according to the few-shot learning strategy.

[0160] In one embodiment, after inputting the text to be recognized into the scene label recognition model corresponding to the target scene and generating the corresponding label recognition result, the method further includes:

[0161] The saturation of tag recognition is calculated based on the tag recognition results of all customers to be identified in the database.

[0162] In one embodiment, the backbone model is the ChatGLM2-6b model.

[0163] An embodiment of the present invention provides a non-volatile computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are executed by one or more processors, the scene-based tag recognition method in any of the above method embodiments is executed, for example, the following steps are performed:

[0164] Get the text to be recognized in the target scene;

[0165] Calling a corresponding scene label recognition model according to the target scene, wherein the scene label recognition model is obtained by fine-tuning a pre-trained backbone model under the LoRA structure of the target scene;

[0166] The text to be recognized is input into the scene label recognition model corresponding to the target scene to generate a corresponding label recognition result.

[0167] In one embodiment, before obtaining the text to be recognized in the target scene, the method further includes:

[0168] The corresponding scene label recognition model is trained based on business data from various scenarios.

[0169] In one embodiment, the training of the corresponding scenario label recognition model based on the customer communication data of various scenarios includes:

[0170] Collect customer communication data in various scenarios;

[0171] Performing data conversion processing on the customer communication data according to a preset data structure to generate a training set for each scenario;

[0172] The training set for each scenario is input into the pre-trained backbone model, and the backbone model is fine-tuned for the label recognition task through the LoRA structure corresponding to each scenario;

[0173] The original weights of the backbone model and the LoRA weights obtained by fine-tuning the model in each scenario are merged to obtain a scene label recognition model for multiple scenarios.

[0174] In one embodiment, the data conversion process is performed on the customer communication data according to a preset data structure to generate a training set for each scenario, including:

[0175] Obtaining a preset data structure, the preset data structure including an instruction definition, an input text, and a classification output;

[0176] Corresponding input text is extracted from the customer communication data and corresponding classification output is generated according to the instruction definition, thereby generating a training set for each scenario.

[0177] In one embodiment, fine-tuning the model of the tag recognition task on the backbone model by using the LoRA structure corresponding to each scenario specifically includes:

[0178] Through the LoRA structure and training set corresponding to each scenario, the backbone model is fine-tuned for the label recognition task according to the few-shot learning strategy.

[0179] In one embodiment, after inputting the text to be recognized into the scene label recognition model corresponding to the target scene and generating the corresponding label recognition result, the method further includes:

[0180] The saturation of tag recognition is calculated based on the tag recognition results of all customers to be identified in the database.

[0181] In one embodiment, the backbone model is the ChatGLM2-6b model.

[0182] As an example, non-volatile storage media can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) as external cache memory. By way of illustration and not limitation, RAM can be obtained in many forms such as synchronous RAM (SRAM), dynamic RAM, (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), and direct Rambus RAM (DRRAM). The disclosed memory components or memories of the operating environment described herein are intended to include one or more of these and / or any other suitable types of memory.

[0183] In summary, the present invention discloses a scene-based label recognition method, device, system and medium, the method includes: obtaining the text to be recognized in the target scene; calling the corresponding scene label recognition model according to the target scene, the scene label recognition model is obtained by fine-tuning the pre-trained backbone model under the LoRA structure of the target scene; inputting the text to be recognized into the scene label recognition model corresponding to the target scene to generate the corresponding label recognition result. The label recognition models for different scenes are obtained by fine-tuning the backbone model and the LoRA structure corresponding to the scene, so that the corresponding model can be flexibly called based on the target scene for label mining, effectively improving the accuracy of label recognition in different scenes, mining the scene labels of all customers as much as possible, and thus improving the saturation of label recognition.

[0184] Of course, those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware (such as a processor, a controller, etc.) through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium, and the computer program can include the processes of the above-mentioned method embodiments when executed. The storage medium can be a memory, a disk, a floppy disk, a flash memory, an optical storage device, etc.

[0185] It should be understood that the application of the present invention is not limited to the above examples. For ordinary technicians in this field, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.

Claims

1. A scene-based tag recognition method, characterized in that: include: Get the text to be recognized in the target scene; Calling a corresponding scene label recognition model according to the target scene, wherein the scene label recognition model is obtained by fine-tuning a pre-trained backbone model under the LoRA structure of the target scene; The text to be recognized is input into the scene label recognition model corresponding to the target scene to generate a corresponding label recognition result.

2. The scene-based tag recognition method according to claim 1, characterized in that: Before obtaining the text to be recognized in the target scene, the method further includes: The corresponding scene label recognition model is trained based on business data from various scenarios.

3. The scene-based tag recognition method according to claim 2, characterized in that: The corresponding scenario label recognition model is obtained by training the customer communication data of various scenarios, including: Collect customer communication data in various scenarios; Performing data conversion processing on the customer communication data according to a preset data structure to generate a training set for each scenario; The training set for each scenario is input into the pre-trained backbone model, and the backbone model is fine-tuned for the label recognition task through the LoRA structure corresponding to each scenario; The original weights of the backbone model and the LoRA weights obtained by fine-tuning the model in each scenario are merged to obtain a scene label recognition model for multiple scenarios.

4. The scene-based tag recognition method according to claim 3, characterized in that: The data conversion process is performed on the customer communication data according to the preset data structure to generate a training set for each scenario, including: Obtaining a preset data structure, the preset data structure including an instruction definition, an input text, and a classification output; Corresponding input text is extracted from the customer communication data and corresponding classification output is generated according to the instruction definition, thereby generating a training set for each scenario.

5. The scene-based tag recognition method according to claim 3, characterized in that: The model fine-tuning of the label recognition task of the backbone model is performed respectively by using the LoRA structure corresponding to each scenario, specifically including: Through the LoRA structure and training set corresponding to each scenario, the backbone model is fine-tuned for the label recognition task according to the few-shot learning strategy.

6. The scene-based tag recognition method according to claim 5, characterized in that: After inputting the text to be recognized into the scene label recognition model corresponding to the target scene and generating the corresponding label recognition result, the method further includes: The saturation of tag recognition is calculated based on the tag recognition results of all customers to be identified in the database.

7. The scene-based tag recognition method according to any one of claims 1 to 6, characterized in that: The backbone model is the ChatGLM2-6b model.

8. A scene-based tag recognition device, characterized in that: include: An acquisition module is used to acquire the text to be recognized in the target scene; A model calling module, used to call a corresponding scene label recognition model according to the target scene, wherein the scene label recognition model is obtained by fine-tuning a pre-trained backbone model under the LoRA structure of the target scene; The recognition module is used to input the text to be recognized into the scene label recognition model corresponding to the target scene to generate a corresponding label recognition result.

9. A scene-based tag recognition system, characterized in that: The system includes at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the scene-based tag recognition method described in any one of claims 1-7.

10. A non-volatile computer-readable storage medium, characterized in that: The non-volatile computer-readable storage medium stores computer-executable instructions, which, when executed by one or more processors, enable the one or more processors to execute the scene-based tag recognition method described in any one of claims 1-7.