User Label Recognition Method and Device Based on Session Scenario
By extracting and processing semantic tags in user session scenarios, and using pre-trained tag recognition models for vector transformation and recognition, the problem of inaccurate tag recognition in the prior art is solved, and more efficient tag recognition is achieved.
Patent Information
- Application Number
- CN202111294221.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-03
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2041-11-03
AI Technical Summary
The existing tag recognition methods cannot extract the user's semantic tags from the perspective of context perception, resulting in insufficient text feature extraction, loss of information, and inconsistent tag types, which cannot be identified using a unified model.
By obtaining user session scene information, text preprocessing is performed to obtain the minimum semantic unit, the pre-trained first-level label recognition model is used for vector transformation and semantic recognition, the first-level label recognition results are obtained, and the corresponding second-level label recognition model is inputted separately through the attributes of the second-level label list for label recognition.
It improves the accuracy of tag recognition, takes into account context-aware information, adapts to different tag types, enhances the utilization of text feature information, and improves the accuracy of tag recognition.
Smart Images

Figure CN114020930B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data processing, and particularly to a method, device, computer device, and storage medium for identifying user tags based on a session scenario. Background Art
[0002] Generally, most customer service systems, including artificial intelligence customer services, will accumulate a large amount of user session data. Effectively extracting key information from the session data facilitates accurate positioning of users, and the personalized needs of users are also clear at a glance. Customer service staff can understand the customer background and needs at any time, helping to recall topics and key information. To the greatest extent possible, more potential users can be mined and the core value of users can be extracted.
[0003] However, existing tag recognition methods cannot extract semantic tags of users from the perspective of context awareness. There are problems of insufficient text feature extraction and loss of text feature information in the process of using tag semantic information. In addition, inconsistent tag types also lead to the inability to use a unified model for recognition. Summary of the Invention
[0004] Based on this, in view of the above technical problems, it is necessary to provide a method, device, computer device, and storage medium for identifying user tags based on a session scenario that can improve the accuracy of tag recognition.
[0005] A method for identifying user tags based on a session scenario, the method comprising:
[0006] Obtain user session scenario information; the user session scenario information includes a plurality of dialogue short texts;
[0007] Perform text preprocessing on the dialogue short texts to obtain minimum semantic units; the minimum semantic units include a plurality of first-level tags;
[0008] Input the minimum semantic units into a pre-trained first-level tag recognition model; the first-level tag recognition model includes: a vector conversion module and a semantic recognition module;
[0009] Perform vector conversion on the minimum semantic units through the vector conversion module to obtain a one-dimensional vector group; the one-dimensional vector group includes word vectors, text vectors, and position vectors;
[0010] Fuse the word vectors, text vectors, and position vectors and then input them into the semantic recognition module to obtain semantic vectors; the semantic vectors are the first-level tag recognition results;
[0011] Obtain a second-level tag list from the semantic vectors, and input them into corresponding trained second-level tag recognition models for tag recognition according to the attributes of the second-level tag list to obtain second-level tag recognition results;
[0012] The recognition results of the first-level tags and the second-level tags are the user tag recognition results.
[0013] In one embodiment, a session sample is obtained; the session sample contains multiple first-level tags, and each of the first-level tags contains multiple second-level tags; the first-level tag recognition model is trained using the session sample and the first-level tags in the session sample to obtain a trained first-level tag recognition model; the second-level tag recognition model is trained according to the predicted first-level tags output during the training of the first-level tags and the second-level tags in the session sample to obtain a trained second-level tag recognition model.
[0014] In one embodiment, the vector conversion module is a BERT model.
[0015] In one embodiment, the semantic recognition module is a Dense+softmax network unit or a BiLSTM+softmax network unit or a CNN+softmax network unit.
[0016] In one embodiment, the word vector, text vector, and position vector are fused and then input into the semantic recognition module to obtain a semantic vector, including: adding the word vector, text vector, and position vector, and inputting the sum into the semantic recognition module to obtain a semantic vector; the semantic vector is a vector representation that fuses all the semantic information of the smallest semantic unit.
[0017] In one embodiment, the vector conversion module performs vector conversion on the smallest semantic unit to obtain a one-dimensional vector group, including: the vector conversion module performs vector conversion on the smallest semantic unit by querying a word vector table to obtain a one-dimensional vector group.
[0018] In one embodiment, the preprocessing includes removing special symbols, punctuation marks, rich text information, and stop words.
[0019] A user tag recognition device based on a session scenario, characterized in that the device includes:
[0020] A data processing module, configured to obtain user session scenario information; the user session scenario information contains multiple dialogue short texts; perform text preprocessing on the dialogue short texts to obtain the smallest semantic unit; the smallest semantic unit contains multiple first-level tags;
[0021] The first-level label recognition module is used to input the minimum semantic unit into a pre-trained first-level label recognition model; the first-level label recognition model includes: a vector conversion module and a semantic recognition module; the minimum semantic unit is vector-converted through the vector conversion module to obtain a one-dimensional vector group; the one-dimensional vector group includes a word vector, a text vector, and a position vector; the word vector, the text vector, and the position vector are fused and then input into the semantic recognition module to obtain a semantic vector; the semantic vector is the first-level label recognition result.
[0022] The second-level label recognition module is used to obtain a second-level label list from the semantic vector, and respectively input it into the corresponding trained second-level label recognition model according to the attributes of the second-level label list for label recognition to obtain the second-level label recognition result; the first-level label recognition result and the second-level label recognition result are the user label recognition results.
[0023] A computer device includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0024] Obtain user session scenario information; the user session scenario information contains multiple dialogue short texts.
[0025] Perform text preprocessing on the dialogue short texts to obtain the minimum semantic unit; the minimum semantic unit contains multiple first-level labels.
[0026] Input the minimum semantic unit into a pre-trained first-level label recognition model; the first-level label recognition model includes: a vector conversion module and a semantic recognition module.
[0027] The minimum semantic unit is vector-converted through the vector conversion module to obtain a one-dimensional vector group; the one-dimensional vector group includes a word vector, a text vector, and a position vector.
[0028] The word vector, the text vector, and the position vector are fused and then input into the semantic recognition module to obtain a semantic vector; the semantic vector is the first-level label recognition result.
[0029] Obtain a second-level label list from the semantic vector, and respectively input it into the corresponding trained second-level label recognition model according to the attributes of the second-level label list for label recognition to obtain the second-level label recognition result.
[0030] The first-level label recognition result and the second-level label recognition result are the user label recognition results.
[0031] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0032] Obtain user session scenario information; the user session scenario information contains multiple dialogue short texts.
[0033] Perform text preprocessing on the short conversation text to obtain the minimum semantic units; multiple first-level tags are included in the minimum semantic units;
[0034] Input the minimum semantic units into a pre-trained first-level tag recognition model; the first-level tag recognition model includes: a vector conversion module and a semantic recognition module;
[0035] Perform vector conversion on the minimum semantic units through the vector conversion module to obtain a one-dimensional vector group; the one-dimensional vector group includes word vectors, text vectors, and position vectors;
[0036] Fuse the word vectors, text vectors, and position vectors and then input them into the semantic recognition module to obtain semantic vectors; the semantic vectors are the first-level tag recognition results;
[0037] Obtain a list of second-level tags from the semantic vectors, and input them into the correspondingly trained second-level tag recognition models for tag recognition according to the attributes of the second-level tag list to obtain the second-level tag recognition results;
[0038] The first-level tag recognition results and the second-level tag recognition results are the user tag recognition results.
[0039] The above user tag recognition method, device, computer device, and storage medium based on the conversation scenario first perform text preprocessing on the short conversation text, use the obtained minimum semantic units that fully consider context awareness information as the input of the pre-trained first-level tag recognition model, obtain a list of second-level tags from the obtained semantic vectors, and input them into the correspondingly pre-trained second-level tag recognition models for tag recognition according to the attributes of the second-level tag list. On the one hand, in this application, a large number of samples are used to pre-train the first-level tag recognition model, integrate the semantic information in the samples, and obtain multiple first-level tags. The first-level tags are structured and contain multiple second-level tags. The second-level tag recognition model is trained according to the predicted first-level tags output during the training of the first-level tags, making the trained second-level tag recognition model more accurate. On the other hand, by constructing a hierarchical tag model and using the first-level tag recognition results as the input of the second-level tag recognition model, the recognition results will be more accurate. Moreover, the models in the second-level tag recognition model are independent of each other, can flexibly adapt to the addition and deletion of tags in the tag system, and respectively adapt different tag recognition models according to different tag types, fully considering the text feature information, and improving the recognition accuracy of tags. Brief Description of the Drawings
[0040] Figure 1 It is a schematic flowchart of a user tag recognition method based on the conversation scenario in an embodiment;
[0041] Figure 2 It is a structural block diagram of a user tag recognition device based on the conversation scenario in an embodiment;
[0042] Figure 3 It is the internal structure diagram of a computer device in an embodiment. Detailed implementation manners
[0043] In order to make the objectives, technical solutions and advantages of the present application clearer and more understandable, the present application 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 only used to explain the present application and are not used to limit the present application.
[0044] In one embodiment, as Figure 1 shown, a method for identifying user tags based on a conversation scenario is provided, including the following steps:
[0045] Step 102, obtaining user conversation scenario information; the user conversation scenario information includes multiple dialogue short texts; performing text preprocessing on the dialogue short texts to obtain minimum semantic units; the minimum semantic units include multiple first-level tags.
[0046] In the user conversation scenario information, a single role may generate multiple sentences. The consecutive expressions of the same role are merged into one sentence to form a conversation text in which different roles appear alternately. The conversation text has role information. In order to completely represent the complete intention of this conversation, a single-round conversation is used as the dialogue short text. During the preprocessing process of the dialogue short text, such as removing special symbols, punctuation marks, rich text information and stop words, etc., the preprocessed dialogue short text is the minimum semantic unit. The minimum semantic unit fully considers the context awareness information and includes multiple first-level tags.
[0047] Step 104, inputting the minimum semantic unit into a pre-trained first-level tag recognition model; the first-level tag recognition model includes: a vector conversion module and a semantic recognition module.
[0048] The minimum semantic unit generally includes multiple first-level tags. For example, the sentence "My daughter is a lawyer" contains the child tag and the occupation tag. Therefore, the first-level tag recognition model is a multi-label classification model.
[0049] Step 106, performing vector conversion on the minimum semantic unit through the vector conversion module to obtain a one-dimensional vector group; the one-dimensional vector group includes word vectors, text vectors and position vectors.
[0050] The vector conversion module is a BERT model. The word vectors are the vector representations of each word after fusing the full-text semantic information. The value of the text vector is automatically learned during the model training process, used to depict the global semantic information of the text, and fused with the semantic information of single words / terms. At the same time, since the semantic information carried by words / terms in different positions of the text is different, the BERT model attaches a position vector to words / terms in different positions for distinction.
[0051] Step 108, after fusing the word vectors, text vectors, and position vectors, input them into the semantic recognition module to obtain semantic vectors; the semantic vectors are the recognition results of the first-level labels.
[0052] The semantic vectors are vector representations containing more accurate semantic information, that is, the first-level labels in the semantic information.
[0053] Step 110, obtain the list of second-level labels from the semantic vectors, and input them into the correspondingly trained second-level label recognition models for label recognition according to the attributes of the list of second-level labels to obtain the recognition results of the second-level labels; the recognition results of the first-level labels and the recognition results of the second-level labels are the user label recognition results.
[0054] The second-level label recognition models include multi-classification models, multi-label classification models, and named entity recognition models. In the list of second-level labels, for example, label information such as occupation and education level has only one option and will not generate multiple choices, so the models corresponding to such second-level labels belong to multi-classification models. For example, label information such as children's information and purchased daily necessities can include multiple choices, so the models corresponding to such second-level labels belong to multi-label classification models. For example, label information such as home address and work unit requires identifying specific address information, so the models corresponding to such second-level labels belong to named entity recognition models. Use the corresponding second-level label recognition models for recognition respectively to make the recognition results of the second-level labels more accurate.
[0055] In the above user label recognition method based on the conversation scenario, first, text preprocessing is performed on the short conversation text, and the obtained minimum semantic unit that fully considers context awareness information is used as the input of the pre-trained first-level label recognition model. A list of second-level labels is obtained from the semantic vectors, and according to the attributes of the second-level label list, they are respectively input into the corresponding pre-trained second-level label recognition models for label recognition. In this application, a large number of samples are used to pre-train the first-level label recognition model, and the semantic information in the samples is integrated to obtain multiple first-level labels. The first-level labels are structured and contain multiple second-level labels. The second-level label recognition models are trained based on the predicted first-level labels output during the training of the first-level labels, making the trained second-level label recognition models more accurate. By constructing a hierarchical label model and using the first-level label recognition results as the input of the second-level label recognition models, the recognition results will be more accurate. Moreover, the models in the second-level label recognition models are independent of each other, can flexibly adapt to the addition and deletion of labels in the label system, and different label recognition models are respectively adapted according to different label types, fully considering the text feature information, and improving the recognition accuracy of labels.
[0056] In one embodiment, conversation samples are obtained; the conversation samples contain multiple first-level labels, and each first-level label contains multiple second-level labels; the first-level label recognition model is trained using the conversation samples and the first-level labels in the conversation samples to obtain a trained first-level label recognition model; the second-level label recognition model is trained based on the predicted first-level labels output during the training of the first-level labels and the second-level labels in the conversation samples to obtain a trained second-level label recognition model.
[0057] A large number of samples are used to pre-train the first-level label recognition model, and the semantic information in the samples is integrated to obtain multiple first-level labels. The first-level labels are structured. The second-level label recognition models are trained based on the predicted first-level labels output during the training of the first-level labels, making the trained second-level label recognition models more accurate and improving the recognition accuracy of labels.
[0058] In another embodiment, the second-level label recognition models include a multi-classification model, a multi-label classification model, and a named entity recognition model.
[0059] The multi-classification model includes a vector conversion module and a semantic recognition module. The vector conversion module is a BERT model, and the semantic recognition module is a Dense+sigmod network unit or a BiLSTM+sigmod network unit or a CNN+sigmod network unit. The named entity recognition model includes a vector conversion module and a semantic recognition module. The vector conversion module is a BERT model or a BiLSTM model, and the semantic recognition module is a CRF network unit or a Dense network unit.
[0060] In one embodiment, the vector conversion module is a BERT model.
[0061] BERT is a method for pre-training language representations. A general language understanding model is trained on a large amount of text corpora, and this model is used to perform various NLP tasks. BERT is the first unsupervised, deep bidirectional system used in pre-training NLP. Using the pre-trained BERT model for new word discovery has better performance.
[0062] Specifically, input the sentences of the dataset to be recognized into the BERT layer of the BERT+CRF model to obtain the encoded vectors of the words in the sentences; then, input the encoded vectors of the words in the sentences into the CRF layer of the BERT+CRF model to obtain the probability matrix of the sentence composed of the probability sequences of all labels corresponding to all words in the sentence; secondly, the CRF layer of the BERT+CRF model processes the probability matrix of each sentence using the Viterbi algorithm to obtain the optimal annotation sequence; obtain the labels of each word in the sentence from the optimal annotation sequence as the named entity recognition result, that is, the discovered new labels.
[0063] In one embodiment, the semantic recognition module is a Dense+softmax network unit or a BiLSTM+softmax network unit or a CNN+softmax network unit.
[0064] In one embodiment, after the word vector, text vector, and position vector are fused, they are input into the semantic recognition module to obtain a semantic vector, including: adding the word vector, text vector, and position vector, and inputting the sum into the semantic recognition module to obtain a semantic vector; the semantic vector is a vector representation that fuses all the semantic information of the minimum semantic unit.
[0065] Inputting the word vector, text vector, and position vector into the semantic recognition module after fusion can fully consider all the semantic information of the minimum semantic unit, and the obtained semantic vector is more accurate, making the secondary label list obtained from the semantic vector more accurate.
[0066] In one embodiment, the vector conversion module performs vector conversion on the minimum semantic unit to obtain a one-dimensional vector group, including: the vector conversion module performs vector conversion on the minimum semantic unit by querying the word vector table to obtain a one-dimensional vector group.
[0067] In one embodiment, the preprocessing includes removing special symbols, removing punctuation marks, removing rich text information, and removing stop words.
[0068] It should be understood that although Figure 1Each step in the flowchart is displayed in sequence according to the arrow's indication. However, these steps do not necessarily execute in the order indicated by the arrows. Unless explicitly stated in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1 at least a portion of the steps in Figure 1 may include multiple sub-steps or multiple stages. These sub-steps or stages do not necessarily execute and complete at the same time, but can execute at different times. The execution order of these sub-steps or stages is not necessarily sequential either, but can execute alternately or in rotation with at least a portion of other steps or sub-steps or stages of other steps.
[0069] In one embodiment, as Figure 2 shown, a user label recognition device based on a session scenario is provided, including: a data processing module 202, a first-level label recognition module 204, and a second-level label recognition module 206, where:
[0070] The data processing module 202 is configured to obtain user session scenario information; the user session scenario information includes multiple dialogue short texts; perform text preprocessing on the dialogue short texts to obtain minimum semantic units; the minimum semantic units include multiple first-level labels.
[0071] The first-level label recognition module 204 is configured to input the minimum semantic units into a pre-trained first-level label recognition model; the first-level label recognition model includes: a vector conversion module and a semantic recognition module; perform vector conversion on the minimum semantic units through the vector conversion module to obtain a one-dimensional vector group; the one-dimensional vector group includes word vectors, text vectors, and position vectors; fuse the word vectors, text vectors, and position vectors and then input them into the semantic recognition module to obtain a semantic vector; the semantic vector is the first-level label recognition result.
[0072] The second-level label recognition module 206 is configured to obtain a second-level label list from the semantic vectors, and respectively input the second-level label list into corresponding trained second-level label recognition models for label recognition to obtain second-level label recognition results; the first-level label recognition result and the second-level label recognition result are the user label recognition results.
[0073] In one of the embodiments, a model training module is further included, which is configured to obtain session samples; the session samples include multiple first-level labels, and each of the first-level labels includes multiple second-level labels; use the session samples and the first-level labels in the session samples to train the first-level label recognition model to obtain a trained first-level label recognition model; train the second-level label recognition model according to the predicted first-level labels output during the training of the first-level labels and the second-level labels in the session samples to obtain a trained second-level label recognition model.
[0074] In one embodiment, the primary tag recognition module 204 is further used to add the word vector, the text vector and the position vector, and input the sum into the semantic recognition module to obtain a semantic vector; the semantic vector is a vector representation of all semantic information integrating the smallest semantic unit.
[0075] In one embodiment, the primary tag identification module 204 is also used in the vector conversion module to perform vector conversion on the minimum semantic unit by querying the word vector table to obtain a one-dimensional vector group.
[0076] In one embodiment, the data processing module 202 is further used to remove special symbols, remove punctuation marks, remove rich text information, and remove stop words.
[0077] For the specific definition of a user tag identification device based on a conversation scenario, please refer to the definition of a user tag identification method based on a conversation scenario above, which will not be repeated here. Each module in the above-mentioned user tag identification device based on a conversation scenario can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0078] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 3 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a user tag recognition method based on a session scenario is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0079] Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0080] In one embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the steps of the method in the above embodiment are implemented.
[0081] In one embodiment, a computer storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method in the above embodiment are implemented.
[0082] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the various embodiments provided in the present application can include non-volatile and / or volatile memories. Non-volatile memories can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memories can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.
[0083] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this specification.
[0084] The above-described embodiments merely represent several implementation manners of the present application. The description is relatively specific and detailed, but it should not be construed as a limitation on the scope of the invention patent. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application should be subject to the appended claims.
Claims
1. A method for identifying user tags based on session scenarios, characterized in that, the method includes: Obtaining user session scenario information; the user session scenario information contains multiple dialogue short texts; Performing text preprocessing on the dialogue short texts to obtain minimum semantic units; the minimum semantic units contain multiple first-level tags; Inputting the minimum semantic units into a pre-trained first-level tag recognition model; the first-level tag recognition model includes: a vector conversion module and a semantic recognition module; Performing vector conversion on the minimum semantic units through the vector conversion module to obtain a one-dimensional vector group; the one-dimensional vector group includes word vectors, text vectors, and position vectors; Fusing the word vectors, text vectors, and position vectors and then inputting them into the semantic recognition module to obtain a semantic vector; the semantic vector is the first-level tag recognition result; Obtaining a second-level tag list from the semantic vector, and respectively inputting the second-level tag list according to its attributes into corresponding trained second-level tag recognition models for tag recognition to obtain second-level tag recognition results; The first-level tag recognition result and the second-level tag recognition result are the user tag recognition results; Obtaining session samples; the session samples contain multiple first-level tags, and each first-level tag contains multiple second-level tags; Using the session samples and the first-level tags in the session samples to train the first-level tag recognition model to obtain a trained first-level tag recognition model; Training the second-level tag recognition model according to the predicted first-level tags output during the training of the first-level tags and the second-level tags in the session samples to obtain a trained second-level tag recognition model.
2. The method according to claim 1, characterized in that, the vector conversion module is a BERT model.
3. The method according to claim 2, characterized in that, the semantic recognition module is a Dense+softmax network unit or a BiLSTM+softmax network unit or a CNN+softmax network unit.
4. The method according to claim 1, characterized in that, Fusing the word vectors, text vectors, and position vectors and then inputting them into the semantic recognition module to obtain a semantic vector, including: Adding the word vectors, text vectors, and position vectors, and inputting the sum into the semantic recognition module to obtain a semantic vector; the semantic vector is a vector representation that fuses all the semantic information of the minimum semantic unit.
5. The method according to claim 1, characterized in that, Performing vector conversion on the minimum semantic units through the vector conversion module to obtain a one-dimensional vector group, including: The vector conversion module performs vector conversion on the minimum semantic units by querying a word vector table to obtain a one-dimensional vector group.
6. The method according to claim 1, characterized in that, The preprocessing includes removing special symbols, removing punctuation marks, removing rich text information, and removing stop words.
7. A device for identifying user tags based on session scenarios, characterized in that, the device includes: A data processing module for obtaining user session scenario information; the user session scenario information includes multiple dialogue short texts; performing text preprocessing on the dialogue short texts to obtain minimum semantic units; the minimum semantic units include multiple first-level tags; obtaining session samples; the session samples include multiple first-level tags, and each first-level tag includes multiple second-level tags; using the session samples and the first-level tags in the session samples to train a first-level tag recognition model to obtain a trained first-level tag recognition model; training a second-level tag recognition model according to the predicted first-level tags output during the training of the first-level tags and the second-level tags in the session samples to obtain a trained second-level tag recognition model; A first-level tag recognition module for inputting the minimum semantic units into a pre-trained first-level tag recognition model; the first-level tag recognition model includes: a vector conversion module and a semantic recognition module; performing vector conversion on the minimum semantic units through the vector conversion module to obtain a one-dimensional vector group; the one-dimensional vector group includes word vectors, text vectors, and position vectors; fusing the word vectors, text vectors, and position vectors and then inputting them into the semantic recognition module to obtain a semantic vector; the semantic vector is the first-level tag recognition result; A second-level tag recognition module for obtaining a second-level tag list from the semantic vector, and respectively inputting the attributes of the second-level tag list into the corresponding trained second-level tag recognition model for tag recognition to obtain a second-level tag recognition result; the first-level tag recognition result and the second-level tag recognition result are user tag recognition results.
8. A computer device, including a memory and a processor, the memory stores a computer program, characterized in that, when the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium, on which a computer program is stored, characterized in that, when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Intention recognition method and device for terminal, equipment and storage medium
CN111274797A
Text data multi-label classification method and device
CN113297379A