A method, system and medium for classifying user tag information
By cleaning and serializing user-labeled text using an LSTM classifier and iteratively classifying and predicting using word vector matrices, the problem of low matching accuracy of user-labeled information for insurance products is solved, achieving efficient data mining and analysis of label information.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGDONG WANZHANG JINSHU INFORMATION TECH CO LTD
- Filing Date
- 2022-08-26
- Publication Date
- 2026-04-21
AI Technical Summary
Existing technologies suffer from low matching accuracy, high performance consumption, and inability to effectively handle multiple tags, fine-grained text descriptions, and question-and-answer formats when processing user tag information for insurance products.
An LSTM classifier is used to clean and serialize user-labeled text. Iterative classification and prediction are performed using word vector matrices, and cosine similarity is used to filter out label information with a correlation coefficient greater than a threshold.
It improves the accuracy of user tag information matching and the efficiency of data mining analysis, and can efficiently calculate the matching degree between input tags and tags in the model, and filter out classification tag information that meets preset conditions.
Smart Images

Figure CN115470346B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of information data processing technology, and in particular to a method, system and medium for classifying user tag information. Background Technology
[0002] User tagging information varies significantly across different scenarios and channels. It primarily includes text descriptions, keywords, and question-and-answer dialogues, and is mainly stored under a specific field. Currently, fuzzy matching is primarily used based on keywords, which require manual maintenance. For example, if new text content is added to a product, the keyword database needs to be updated. If the text contains questions / answers or long text content, the corresponding keywords cannot be matched.
[0003] Keyword fuzzy matching can only match a single tag, which is a coarse-grained classification. However, insurance products typically use multiple tags, fine-grained tags, and various text descriptions and question-and-answer formats as tags. In subsequent use, when tags are provided by the client, only a single tag can often be matched. Tags that are highly relevant to the client may not be retrieved, and large data volumes can easily lead to low matching accuracy and high performance consumption. Summary of the Invention
[0004] In view of this, embodiments of the present invention provide a highly accurate method, system, and medium for classifying user tag information.
[0005] On one hand, embodiments of the present invention provide a method for classifying user tag information, including:
[0006] Get the label text of the target object;
[0007] The tag text is cleaned and serialized to obtain a word vector matrix;
[0008] Each word vector in the word vector matrix is sequentially input into the LSTM classifier, and iterative classification prediction is performed in combination with the training set to obtain classification label information;
[0009] The output saves the category label information that meets the preset conditions.
[0010] Optionally, the tag text includes a first tag text and a second tag text, and obtaining the tag text of the target object includes:
[0011] Retrieve the first tag text under the information tag field in the registration data of the target object and the second tag text in the text description data;
[0012] The first tag text and the second tag text are organized and summarized using a preset data table.
[0013] Optionally, the step of cleaning and serializing the tagged text to obtain a word vector matrix includes:
[0014] The tag text is cleaned by normalizing it using regular expression matching.
[0015] The cleaned tagged text is segmented into words, and a weighted algorithm is used to construct a set of text feature vectors.
[0016] The text feature vector set is serialized using an encoding / decoding model to obtain a word vector matrix.
[0017] Optionally, the step of performing word segmentation on the cleaned tagged text and constructing a text feature vector set using a weighted algorithm includes:
[0018] The cleaned tagged text is segmented using the jieba word segmenter, and a text feature vector set is constructed using the TF-IDF algorithm.
[0019] Optionally, the encoding / decoding model includes an encoder and a decoder, and the step of serializing the text feature vector set through the encoding / decoding model to obtain a word vector matrix includes:
[0020] The text feature vector set is encoded and decoded using the encoder and the decoder.
[0021] The word vector matrix is obtained by iteratively looping through the encoded and decoded text feature vector set using the seq2seq embedding method.
[0022] Optionally, the step of sequentially inputting each word vector in the word vector matrix into an LSTM classifier and performing iterative classification prediction in conjunction with the training set to obtain classification label information includes:
[0023] The first word vector in the word vector matrix is taken as the current word vector;
[0024] Input the current word vector into the LSTM classifier, and use the LSTM classifier to perform classification prediction on the current word vector to obtain classification label information;
[0025] The correlation coefficient of each label in the classification label information is calculated using the cosine similarity calculation principle.
[0026] Labels with a correlation coefficient less than a preset threshold are placed into the training set to train word vectors;
[0027] The training word vector is embedded into the next word vector as the current word vector. Then, the current word vector is returned to the LSTM classifier. The LSTM classifier performs classification prediction on the current word vector to obtain classification label information. This process continues until the word vector matrix completes classification prediction.
[0028] Optionally, the output saves classification label information that meets preset conditions, including:
[0029] Output tag data with a correlation coefficient greater than a preset threshold to the business object;
[0030] Alternatively, save tag data with correlation coefficients greater than a preset threshold to the tag library.
[0031] On the other hand, embodiments of the present invention provide a classification system for user tag information, including:
[0032] The first module is used to obtain the label text of the target object;
[0033] The second module is used to clean and serialize the tag text to obtain a word vector matrix.
[0034] The third module is used to input each word vector in the word vector matrix into the LSTM classifier in sequence, and perform iterative classification prediction in combination with the training set to obtain classification label information.
[0035] The fourth module is used to output and save category label information that meets preset conditions.
[0036] On the other hand, embodiments of the present invention provide an electronic device, including a processor and a memory;
[0037] The memory is used to store programs;
[0038] The processor executes the program to implement the method described above.
[0039] On the other hand, embodiments of the present invention provide a computer-readable storage medium storing a program that is executed by a processor to implement the methods described above.
[0040] This invention also discloses a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium and execute the computer instructions, causing the computer device to perform the aforementioned method.
[0041] This invention first obtains the tag text of the target object; then cleans and serializes the tag text to obtain a word vector matrix; each word vector in the word vector matrix is sequentially input into an LSTM classifier, and iterative classification prediction is performed using the training set to obtain classification tag information; finally, the classification tag information that meets preset conditions is output and saved. This invention facilitates large-scale / quantitative data processing by cleaning and serializing the tag text; furthermore, by using an LSTM classifier and iterative classification prediction using the training set, it can efficiently calculate the matching degree between the input tags and the tags in the model, thereby filtering classification tag information that meets preset conditions and improving the accuracy of data mining and analysis based on tag information. Attached Figure Description
[0042] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0043] Figure 1 A schematic diagram of the overall process of the user tag information classification method provided in the embodiments of the present invention;
[0044] Figure 2 This is a schematic diagram of the overall process of the user tag information classification method provided in the embodiments of the present invention;
[0045] Figure 3 This is a schematic diagram of the classification process of the LSTM classifier provided in an embodiment of the present invention;
[0046] Figure 4 This is a schematic diagram of a user tag information classification system provided in an embodiment of the present invention;
[0047] Figure 5 This is a schematic diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0048] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0049] It should be noted that although functional modules are divided in the system diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the system or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, and the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0050] Given the numerous tags present in user information about insurance products obtained from different scenarios, and the potential common issues among these tags across different products, it is necessary to de-label and categorize this information to improve the accuracy of the tags for subsequent user data mining and analysis.
[0051] Based on the company's data mining of user tag information to extract user groups that meet business needs, it is necessary to extract data that matches the input tag information from the collected user source tag information. This tag information data is then input into a multi-tag classification algorithm model to obtain the tag correlation coefficient value with the tag information system. If the tag correlation coefficient is greater than a set threshold, the data is classified into the tag library and output to the business side.
[0052] In view of this, embodiments of the present invention provide a method, system, and medium for classifying user tag information. The method includes: first, acquiring tag text of a target object; cleaning and serializing the tag text to obtain a word vector matrix; sequentially inputting each word vector in the word vector matrix into an LSTM classifier, and performing iterative classification prediction using a training set to obtain classification tag information; and outputting and saving classification tag information that meets preset conditions. The present invention facilitates large-scale / quantitative data processing through cleaning and serializing the tag text; furthermore, by using an LSTM classifier and iterative classification prediction using a training set, it can efficiently calculate the matching degree between the input tags and the tags within the model, thereby filtering classification tag information that meets preset conditions and improving the accuracy of data mining and analysis based on tag information.
[0053] The embodiments of the present invention will be further described below with reference to the accompanying drawings.
[0054] refer to Figure 1 and Figure 2 , Figure 1 This is a flowchart illustrating the steps of the optical cable testing equipment control method proposed in this embodiment of the invention, including but not limited to steps S100 to S600:
[0055] S100, Obtain the label text of the target object;
[0056] It should be noted that the tag text includes the first tag text and the second tag text. First, the first tag text under the information tag field in the registration data of the target object and the second tag text in the text description data are obtained; then, the first tag text and the second tag text are organized and summarized through a preset data table.
[0057] Specifically, the user information tag field containing tag values and user text descriptions from user registration data in different scenarios and channels is extracted into a data warehouse, and the tag values under each field are transferred to the same data table.
[0058] S200. Clean and serialize the tag text to obtain a word vector matrix;
[0059] It should be noted that, firstly, the tagged text is normalized and cleaned using regular expression matching; then, the cleaned tagged text is segmented into words, and a weighted algorithm is used to construct a text feature vector set; finally, an encoding / decoding model is used to serialize the text feature vector set to obtain a word vector matrix. In some embodiments, the jieba word segmenter is used to segment the cleaned tagged text, and the TF-IDF algorithm is used to construct the text feature vector set. In other embodiments, an encoder and decoder are used to encode and decode the text feature vector set; the seq2seq embedding method is used to iteratively cycle the encoded and decoded text feature vector set to obtain the word vector matrix.
[0060] Specifically, data cleaning involves using regular expression matching to normalize the label values, removing illegal characters and garbled text. Then, jieba is used to segment the label values, and the TF-IDF algorithm is used to construct text feature vectors. Next, a seq2seq framework (belonging to a many-to-one structure, also known as an Encoder-Decoder model) is used to serialize the text feature vectors as input (the input is the text feature vector of each user's label, and the output is a series of text label predictions; the processing steps are: first, the Encoder maps the input to the semantic space, obtaining fixed-dimensional vectors that represent the semantics of the input; then, the Decoder decodes the input to obtain the desired output). The seq2seq embedding method iterates the output of the previous step as input to the next step until completion, outputting a word vector matrix containing the vocabulary information corresponding to each input label.
[0061] S300. Input each word vector in the word vector matrix into the LSTM classifier in sequence, and perform iterative classification prediction in combination with the training set to obtain classification label information;
[0062] It should be noted that the process begins by using the first word vector in the word vector matrix as the current word vector. This current word vector is then input into an LSTM classifier, which performs classification prediction to obtain the classification label information. The correlation coefficient of each label in the classification label information is calculated using the cosine similarity principle. Labels with correlation coefficients less than a preset threshold are placed into the training set to train and obtain training word vectors. These training word vectors are then embedded into the next word vector as the current word vector. The process continues until the word vector matrix completes its classification prediction.
[0063] Specifically, refer to Figure 3 In a single prediction, the LSTM classifier performs an embedding operation on the original text sequence and training set labels whose previous prediction results are below a set threshold. This yields word vectors and a training set result vector sequence. The training set result vector sequence, based on the result set sequence that did not meet the threshold after the previous classification, is used as input for the next classification, performing classification prediction with the current input word vector. In other words, when a label that does not meet the threshold enters the training set for training and obtains its corresponding training result (e.g., yt-1), it is embedded with the current xt word vector for the next classification. This process iterates until completion. The LSTM outputs classification label information for each user, which may include (label 1, label 2, label 3, ...). The cosine similarity calculation principle is used to calculate the correlation coefficient between each pair of labels, and then a threshold is set to compare the correlation coefficient.
[0064] Among them, the classifier (LSTM (Long Short-Term Memory) model) uses the "gate" design structure to remove or add information about the "cell state", thus retaining important content and removing unimportant content. The Sigmoid layer outputs a probability value between 0 and 1, describing how many quantities of each part can pass through. 0 means "task variables are not allowed to pass", and 1 means "all variables are allowed to pass", thereby improving accuracy and iteration efficiency.
[0065] In practical applications, a user's various tags or question-and-answer pairs may be related. For example, the design of subsequent questions and answers may be influenced by previous questions or answers. Therefore, it is necessary to consider them in a related manner. First, tag classification and prediction are performed individually. If a tag does not meet a set threshold, it is trained and used as input for word vector serialization in the next question, and this process is repeated. Because tags below the threshold may also affect subsequent tags, the results of training this part are also used to assist in the next prediction, which helps improve accuracy. In other words, a user's tags cannot be isolated; the user's tags or question-and-answer content must be considered related.
[0066] S400: Output and save category label information that meets preset conditions;
[0067] Specifically, based on the correlation coefficient calculated in the previous step, if the correlation coefficient is greater than the threshold, the corresponding part of the data will be stored in the tag library or output to the business side.
[0068] On the other hand, refer to Figure 4 An embodiment of the present invention provides a user tag information classification system 100, comprising: a first module 110 for acquiring tag text of a target object; a second module 120 for cleaning and serializing the tag text to obtain a word vector matrix; a third module 130 for sequentially inputting each word vector in the word vector matrix into an LSTM classifier, combining iterative classification prediction with a training set to obtain classification tag information; and a fourth module 140 for outputting and storing classification tag information that meets preset conditions.
[0069] The content of the method embodiments of the present invention is applicable to the system embodiments. The specific functions implemented in the system embodiments are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above methods.
[0070] Reference Figure 5 Another aspect of the present invention provides an electronic device 200, including a processor 210 and a memory 220;
[0071] The memory is used to store programs;
[0072] The processor executes the program to implement the method described above.
[0073] The content of the method embodiments of the present invention is applicable to the embodiments of the present electronic device. The specific functions implemented by the embodiments of the present electronic device are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above methods.
[0074] Another aspect of this invention provides a computer-readable storage medium storing a program that is executed by a processor to implement the methods described above.
[0075] The content of the method embodiments of the present invention is applicable to the computer-readable storage medium embodiments. The specific functions implemented by the computer-readable storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above methods.
[0076] This invention also discloses a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium and execute the computer instructions, causing the computer device to perform the aforementioned method.
[0077] In summary, the embodiments of the present invention classify and process tags in user information of insurance products. It is applicable to a wide range of tag categories, can efficiently calculate the matching degree between input tags and tags in the model, determine the correlation among each tag, classify and summarize tags, and improve the accuracy of data mining and analysis.
[0078] In some alternative embodiments, the functions / operations mentioned in the block diagrams may not occur in the order shown in the operation diagrams. For example, depending on the functions / operations involved, two consecutively shown blocks may actually be executed substantially simultaneously, or the blocks may sometimes be executed in reverse order. Furthermore, the embodiments presented and described in the flowcharts of this invention are provided by way of example to provide a more comprehensive understanding of the technology. The disclosed methods are not limited to the operations and logic flows presented herein. Alternative embodiments are contemplated in which the order of various operations is altered and sub-operations described as part of a larger operation are executed independently.
[0079] Furthermore, although the invention has been described in the context of functional modules, it should be understood that, unless otherwise stated, one or more of the described functions and / or features may be integrated into a single physical device and / or software module, or one or more functions and / or features may be implemented in a separate physical device or software module. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the invention. Rather, given the properties, functions, and internal relationships of the various functional modules in the apparatus disclosed herein, the actual implementation of the module will be understood within the scope of conventional skill of an engineer. Therefore, those skilled in the art can implement the invention as set forth in the claims using ordinary techniques without excessive experimentation. It is also understood that the specific concepts disclosed are merely illustrative and not intended to limit the scope of the invention, which is determined by the full scope of the appended claims and their equivalents.
[0080] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0081] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution means, apparatus, or device (such as a computer-based device, a processor-including device, or other means that can fetch and execute instructions from, or in conjunction with, an instruction execution means, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution means, apparatus, or device.
[0082] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0083] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution device. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0084] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0085] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.
[0086] The above is a detailed description of the preferred embodiments of the present invention. However, the present invention is not limited to the embodiments described. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention. All such equivalent modifications or substitutions are included within the scope defined by the claims of the present invention.
Claims
1. A method for classifying user tag information, characterized in that, include: Get the label text of the target object; The tag text is cleaned and serialized to obtain a word vector matrix; Each word vector in the word vector matrix is sequentially input into the LSTM classifier, and iterative classification prediction is performed in combination with the training set to obtain classification label information; The step of sequentially inputting each word vector in the word vector matrix into an LSTM classifier and performing iterative classification prediction in conjunction with the training set to obtain classification label information includes: The first word vector in the word vector matrix is taken as the current word vector; Input the current word vector into the LSTM classifier, and use the LSTM classifier to perform classification prediction on the current word vector to obtain classification label information; The correlation coefficient of each label in the classification label information is calculated using the cosine similarity calculation principle. Labels with a correlation coefficient less than a preset threshold are placed into the training set to train word vectors; The training word vector is embedded into the next word vector as the current word vector, and then the input current word vector is returned to the LSTM classifier. The LSTM classifier performs classification prediction on the current word vector to obtain classification label information. This step continues until the word vector matrix completes classification prediction. The output saves the category label information that meets the preset conditions.
2. The method for classifying user tag information according to claim 1, characterized in that, The tag text includes a first tag text and a second tag text, and obtaining the tag text of the target object includes: Retrieve the first tag text under the information tag field in the registration data of the target object and the second tag text in the text description data; The first tag text and the second tag text are organized and summarized using a preset data table.
3. The method for classifying user tag information according to claim 1, characterized in that, The step of cleaning and serializing the tagged text to obtain a word vector matrix includes: The tag text is cleaned by normalizing it using regular expression matching. The cleaned tagged text is segmented into words, and a weighted algorithm is used to construct a set of text feature vectors. The text feature vector set is serialized using an encoding / decoding model to obtain a word vector matrix.
4. The method for classifying user tag information according to claim 3, characterized in that, The process involves segmenting the cleaned tagged text into words and constructing a text feature vector set using a weighted algorithm, including: The cleaned tagged text is segmented using the jieba word segmenter, and a text feature vector set is constructed using the TF-IDF algorithm.
5. The method for classifying user tag information according to claim 3, characterized in that, The encoding / decoding model includes an encoder and a decoder. The step of serializing the text feature vector set using the encoding / decoding model to obtain a word vector matrix includes: The text feature vector set is encoded and decoded using the encoder and the decoder. The word vector matrix is obtained by iteratively looping through the encoded and decoded text feature vector set using the seq2seq embedding method.
6. The method for classifying user tag information according to claim 1, characterized in that, The output stores classification label information that meets preset conditions, including: Output tag data with a correlation coefficient greater than a preset threshold to the business object; Alternatively, save tag data with correlation coefficients greater than a preset threshold to the tag library.
7. A classification system for user tag information, characterized in that, include: The first module is used to obtain the label text of the target object; The second module is used to clean and serialize the tag text to obtain a word vector matrix. The third module is used to input each word vector in the word vector matrix into the LSTM classifier in sequence, and perform iterative classification prediction in combination with the training set to obtain classification label information. The step of sequentially inputting each word vector in the word vector matrix into an LSTM classifier and performing iterative classification prediction in conjunction with the training set to obtain classification label information includes: The first word vector in the word vector matrix is taken as the current word vector; Input the current word vector into the LSTM classifier, and use the LSTM classifier to perform classification prediction on the current word vector to obtain classification label information; The correlation coefficient of each label in the classification label information is calculated using the cosine similarity calculation principle. Labels with a correlation coefficient less than a preset threshold are placed into the training set to train word vectors; The training word vector is embedded into the next word vector as the current word vector, and then the input current word vector is returned to the LSTM classifier. The LSTM classifier performs classification prediction on the current word vector to obtain classification label information. This step continues until the word vector matrix completes classification prediction. The fourth module is used to output and save category label information that meets preset conditions.
8. An electronic device, comprising a processor and a memory; The memory is used to store programs; The processor executes the program to implement the method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The storage medium stores a program that is executed by a processor to implement the method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Professional field system cold start recommendation method based on knowledge graph
CN110427563A
Multi-label text classification method based on seq2seq
CN110442707A
Data label recommendation method based on machine learning
CN113591476A
Chinese named body recognition method based on vocabulary enhancement
CN114065761A