A user semantic analysis method in IT operation and maintenance service field
The BERT-BiLSTM-CRF multi-task model is used to perform semantic analysis on mixed Chinese and English texts in the field of IT operation and maintenance. Combining BERT encoding and language features solves the problem of inaccurate English word segmentation, improves the accuracy of semantic analysis, and supports IT Automation and intelligence of operation and maintenance services.
Patent Information
- Application Number
- CN202111466944.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-03
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2041-12-03
AI Technical Summary
In the field of IT operation and maintenance, there are a large number of English words in Chinese demand texts. When the existing BERT pre-training model uses the WordPiece method to segment words, due to the limitations of the Chinese dictionary, the English word segmentation is inaccurate, affecting the accuracy of user semantic analysis.
The BERT-BiLSTM-CRF multi-task model is used to perform BERT coding, word segmentation boundary annotation and Chinese and English language feature coding on Chinese and English mixed texts, and then combine the BERT coding vector, word segmentation boundary feature vector and Chinese and English language feature vectors for fusion, using It is used for intent recognition and named entity recognition to enhance the recognition effect of the model.
It improves the semantic parsing accuracy of mixed Chinese and English texts in the field of IT operation and maintenance services, can more accurately identify user intentions and extract key information in requirements, and supports the automation and intelligence of IT operation and maintenance services.
Smart Images

Figure CN114186565B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of natural language processing and deep machine learning, and more specifically, to a user semantic parsing method in the field of IT operation and maintenance services. Background Art
[0002] As the breadth and depth of new-generation IT applications continue to increase, IT operations and maintenance have gradually become a common concern for enterprises and information service departments, but they are still overwhelmed. Among them, the IT operations and maintenance service desk serves as a bridge between service providers and users. Its main functions include: providing timely identification, analysis and response to user needs, or assigning them to reasonable operations and maintenance personnel for disposal, and finally forming a service task list. However, the service mode of traditional manual customer service seats has the characteristics of untimely service, low efficiency, and high repetitiveness, which limits the improvement of service levels. Through intelligent semantic analysis of IT operations and maintenance services, the service level of enterprises can be greatly improved, the work pressure of customer service personnel can be reduced, and the operating efficiency of enterprises can be improved.
[0003] There are a large number of English words in the Chinese IT operation and maintenance demand texts. The original word segmentation method of the commonly used BERT pre-trained model is WordPiece, which segments each demand text using a pre-provided dictionary and the longest match method, removing blank characters such as spaces and line breaks by default. The dictionary contains most Chinese characters and some commonly used English words or morphemes. However, if the original WordPiece method is used to segment the text, since the predefined Chinese dictionary cannot cover all English words in the IT operation and maintenance field, it will cause inaccurate English word segmentation, thereby affecting the accuracy of user semantic analysis. Summary of the invention
[0004] In view of the above defects or improvement needs of the prior art, the present invention provides a user semantic parsing method in the field of IT operation and maintenance services, thereby solving the technical problem of low parsing accuracy when the demand text is a mixed text of Chinese and English.
[0005] To achieve the above object, according to a first aspect of the present invention, a user semantic parsing method in the field of IT operation and maintenance services is provided, comprising:
[0006] S1, segment the Chinese-English mixed text to be parsed and perform BERT encoding to obtain a BERT encoding vector;
[0007] S2, segmenting the Chinese-English mixed text to be parsed, marking the word boundaries after the segmentation, and performing embedding encoding on the marked results to obtain a segmentation boundary feature vector;
[0008] S3, after marking the Chinese, English and other characters in the Chinese-English mixed text to be parsed, embedding the marking results to obtain Chinese-English language feature vectors;
[0009] S4, input the BERT encoding vector, word segmentation boundary feature vector and Chinese and English language feature vectors into a pre-trained BERT-BiLSTM-CRF multi-task model to obtain intent recognition information and named entity recognition information.
[0010] Preferably, a word segmenter is used to segment the mixed Chinese and English text to be parsed, and the word boundaries after segmentation are marked by SBE tags.
[0011] Preferably, Chinese, English and other characters in the Chinese-English mixed text to be parsed are marked by CEX tags.
[0012] Preferably, the BERT-BiLSTM-CRF multi-task model is obtained by supervised training using BERT encoding vectors, word segmentation boundary feature vectors and Chinese and English language feature vectors of Chinese and English mixed text as samples and intent recognition information and named entity recognition information as labels.
[0013] Preferably, it is characterized in that the BERT-BiLSTM-CRF multi-task model includes a fully connected layer for decoding the [CLS] bit encoding in the BERT encoding vector to obtain intent recognition information.
[0014] The calculation formula of the fully connected layer is:
[0015] y intent =Softmax(W intent ·x CLS +b intent )
[0016]
[0017] Among them, W intent and b intent is the trainable model parameter, y intent is the output intent label, x CLS is the encoding vector of the [CLS] bit.
[0018] Preferably, the BERT-BiLSTM-CRF multi-task model includes a feature fusion layer, a BiLSTM layer, a Dropout layer, a Dense layer and a CRF layer connected in sequence;
[0019] The feature fusion layer fuses the BERT encoding vector, word segmentation boundary feature vector and Chinese and English language feature vectors to obtain an input feature vector and inputs it to the BiLSTM layer. The input feature vector is decoded by the BiLSTM layer, Dropout layer, Dense layer and CRF layer to obtain named entity recognition information.
[0020] Preferably, the feature fusion layer concatenates the word segmentation boundary feature vector and the Chinese and English language feature vector with the result of excluding the [CLS] bit and the [SEP] bit in the BERT encoding vector to obtain an input feature vector.
[0021] Preferably, the loss function of the BERT-BiLSTM-CRF multi-task model is:
[0022] L=a1×L intent +a2×L entites ;
[0023] Among them, L intent represents the intention recognition loss function, L entites represents the named entity recognition loss function, a1 and a2 are the weights of the intent recognition task and the named entity recognition task, respectively.
[0024] According to a second aspect of the present invention, there is provided a user semantic parsing system in the field of IT operation and maintenance services, comprising: a computer-readable storage medium and a processor;
[0025] The computer-readable storage medium is used to store executable instructions;
[0026] The processor is used to read the executable instructions stored in the computer-readable storage medium to execute a user semantic parsing method in the IT operation and maintenance service field as described in the first aspect.
[0027] In general, the above technical solutions conceived by the present invention can achieve the following beneficial effects compared with the prior art:
[0028] 1. The user semantic parsing method in the field of IT operation and maintenance services provided by the present invention converts the user's demand text into a structured semantic expression, and further decision-making and reasoning can be performed based on the results of semantic parsing. The method is specifically divided into two subtasks: intent recognition and named entity recognition. Intent recognition is used to determine the user's basic needs and belongs to the text classification task, while named entity recognition is a type of sequence labeling task, which is used to extract key information from the needs to achieve automation and intelligence of IT operation and maintenance services.
[0029] 2. The user semantic parsing method in the IT operation and maintenance service field provided by the present invention aims at semantic parsing in the IT operation and maintenance field in the Chinese language environment, taking into full consideration that due to the particularity of this field, there are a large number of English words in the demand text to be parsed. The existing BERT will first use the WordPiece method to segment the text before encoding it, and the Chinese BERT pre-trained model cannot accurately segment English due to the limitation of the dictionary. In view of the particularity of Chinese and English mixed texts in the IT operation and maintenance field and the limitations of the Chinese BERT pre-trained model on English text processing, the present invention fuses the word segmentation boundary feature vector, Chinese and English language feature vector and BERT encoding vector together as the input feature vector of the model when the BiLSTM-CRF model in the BERT-BiLSTM-CRF multi-task learning model performs named entity recognition, thereby enhancing the recognition effect of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 A flowchart of the method for user semantic parsing in the IT operation and maintenance service field provided by the present invention;
[0031] Figure 2 Schematic diagram of the BERT-BiLSTM-CRF multi-task model structure provided by the present invention. DETAILED DESCRIPTION
[0032] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. 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. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0033] The embodiment of the present invention provides a user semantic parsing method in the IT operation and maintenance service field, such as Figure 1 As shown, including:
[0034] S1, split the Chinese-English mixed text to be parsed and perform BERT encoding to obtain a BERT encoding vector.
[0035] Specifically, Chinese text is segmented by character, and English text is segmented by morpheme. The segmented results are encoded by BERT to obtain the input BERT encoding vector. Where N is the length of the sentence.
[0036] For example, the result of segmenting "SAP system is often offline" is "SAP / system / often / offline".
[0037] S2, segmenting the Chinese-English mixed text to be parsed, marking the word boundaries after the segmentation, and performing embedding encoding on the marked results to obtain a segmentation boundary feature vector.
[0038] Furthermore, a word segmenter is used to segment the Chinese-English mixed text to be parsed, and the word boundaries after segmentation are marked by SBE tags.
[0039] Specifically, after the Chinese-English mixed text is cut at the minimum granularity in step S1, the word segmentation feature may be lost, so the feature is added through the SBE tag, specifically:
[0040] Use the word segmenter to segment the text, and use the SBE tag to mark the word boundaries after segmentation, where S represents a Chinese word with a length of 1 or an English word with a word count of 1, B represents the beginning of a word, and E represents the middle and end of a word. Embed the annotation results as the input word segmentation boundary feature vector Where N is the length of the sentence.
[0041] For example, the word segmentation result of "SAP system often disconnects" by Jieba word segmenter is "SAP / system / often / disconnected", and the word boundary annotation result is shown in Table 1:
[0042] Table 1
[0043] text SAP Tie System through often Lose Wire Word boundary marking S B E B E B E
[0044] In the embodiment of the present invention, there is no restriction on the word segmenter, and user-defined words may also be added to the word segmentation dictionary to enhance the recognition of unregistered words.
[0045] S3, after marking the Chinese, English and other characters in the Chinese-English mixed text to be parsed, embedding encoding is performed on the marking results to obtain Chinese-English language feature vectors.
[0046] Furthermore, Chinese, English and other characters in the Chinese-English mixed text to be parsed are marked by CEX tags.
[0047] Specifically, the Chinese, English and other characters in the text are annotated by CEX tags, where C represents Chinese characters, E represents English characters, and X represents numbers, punctuation marks, special symbols and other characters. The annotated results are embedded as the input Chinese and English language feature vectors. Where N is the length of the sentence.
[0048] The results of "SAP system often disconnects" after Chinese and English language annotation are shown in Table 2:
[0049] Table 2
[0050] text SAP Tie System through often Lose Wire Chinese and English language annotation E C C C C C C
[0051] S4, input the BERT encoding vector, word segmentation boundary feature vector and Chinese and English language feature vectors into a pre-trained BERT-BiLSTM-CRF multi-task model to obtain intent recognition information and named entity recognition information.
[0052] Furthermore, the BERT-BiLSTM-CRF multi-task model is obtained by supervised training using BERT encoding vectors, word segmentation boundary feature vectors and Chinese and English language feature vectors of Chinese and English mixed text as samples and intent recognition information and named entity recognition information as labels.
[0053] Specifically, the BERT encoding vector, word segmentation boundary feature vector, and Chinese and English language feature vectors of historical user demand texts, as well as the intent and entity information corresponding to each text, are obtained to form a training data set.
[0054] By constructing a multi-task learning model based on BERT-BiLSTM-CRF, the two tasks of intent recognition and named entity recognition are jointly modeled, the preset BERT-BiLSTM-CRF multi-task model is trained with the training data set, and the semantic analysis of the user needs to be recognized is performed with the trained model.
[0055] Further, in the embodiment of the present invention, the training data set is formed by acquiring historical user demand texts and the intent and entity information corresponding to each text, and the specific method is as follows:
[0056] Take the sentence "SAP system often disconnects" as an example. Its corresponding intent is "software anomaly", and the entities it contains are "SAP system" and "disconnection", and the corresponding entity categories are "software" and "fault phenomenon" respectively. The entity information needs to be converted into BIO sequence annotation format.
[0057] The BIO notation method labels each bit in the input sequence with a label BX, where B represents the beginning of the entity, I represents the middle and end of the entity, O represents non-entity, and X represents the type of entity.
[0058] Therefore, the original form of the label corresponding to "SAP system often disconnects" is as shown in Table 3:
[0059] Table 3
[0060]
[0061] Furthermore, the BERT-BiLSTM-CRF multi-task model includes a fully connected layer for decoding the [CLS] bit encoding in the BERT encoding vector to obtain intent recognition information.
[0062] Furthermore, the calculation formula of the fully connected layer is:
[0063] y intent =Softmax(W intent ·x CLS +b intent )
[0064]
[0065] Among them, W intent and b intent is the trainable model parameter, y intent is the output intent label.
[0066] Specifically, by constructing a multi-task learning model based on BERT-BiLSTM-CRF, the two tasks of intent recognition and named entity recognition are jointly modeled. The model diagram is shown in Figure 2 Shown include:
[0067] The intent recognition output is obtained by decoding the [CLS] bit encoding in the BERT encoding vector through a fully connected layer with a Softmax activation function;
[0068] Decoding the fused input feature vector through a BiLSTM-CRF model to obtain a named entity recognition output;
[0069] The weighted sum of the loss functions output by the two types of tasks is used as the model optimization target.
[0070] The calculation formula of the fully connected layer is:
[0071] y intent =Softmax(W intent ·x CLS +b intent );
[0072]
[0073] Among them, W intent and b intent is the trainable model parameter, y intent is the output intent label, x CLS is the encoding vector of the [CLS] bit.
[0074] Furthermore, the BERT-BiLSTM-CRF multi-task model includes a feature fusion layer, a BiLSTM layer, a Dropout layer, a Dense layer and a CRF layer connected in sequence;
[0075] The feature fusion layer fuses the BERT encoding vector, word segmentation boundary feature vector and Chinese and English language feature vectors to obtain an input feature vector and inputs it to the BiLSTM layer. The input feature vector is decoded by the BiLSTM layer, Dropout layer, Dense layer and CRF layer to obtain named entity recognition information.
[0076] Specifically, the BiLSTM-CRF model in the BERT-BiLSTM-CRF multi-task model includes a BiLSTM layer, a Dropout layer, a Dense layer, and a CRF layer.
[0077] Specifically, the Bi-directional Long Short-Term Memory (BiLSTM), as a variant of the Recurrent Neural Network (RNN), linearly concatenates sequence features in two different directions, which can better capture the contextual features of the sentence.
[0078] The Dropout layer discards the learned parameter update values at a certain ratio to prevent the model from overfitting.
[0079] The Dense layer reduces the output dimension of the previous layer.
[0080] Conditional Random Field (CRF) is a probabilistic model used to capture the constraints between sequence labels.
[0081] In the embodiment of the present invention, there is no restriction on the number of BiLSTM hidden layer units and the dropout layer loss ratio, which can be set according to the characteristics and scale of the actual data set.
[0082] Furthermore, the feature fusion layer concatenates the word segmentation boundary feature vector and the Chinese and English language feature vector with the result of excluding the [CLS] bit and the [SEP] bit in the BERT encoding vector to obtain an input feature vector.
[0083] Specifically, the feature fusion layer concatenates the word segmentation boundary feature vector and the Chinese and English language feature vector with the result of excluding the [CLS] bit and [SEP] bit in the BERT encoding vector to obtain the fused input feature vector in:
[0084]
[0085] Furthermore, the two types of tasks in the IT operation and maintenance service field, intent recognition and named entity recognition, are related to a certain extent. Therefore, a multi-task learning model is used to jointly train the two types of tasks. The specific method is to take the weighted sum of the loss functions of the two types of tasks as the model optimization target, that is, the loss function of the BERT-BiLSTM-CRF multi-task model is:
[0086] L=a1×L intent +a2×L entites ;
[0087] Among them, L intent represents the intention recognition loss function, L entites represents the named entity recognition loss function, a1 and a2 are the weights of the intent recognition task and the named entity recognition task, respectively.
[0088] In the embodiment of the present invention, a1 and a2 are set according to the importance of the two types of tasks. intent and L entites No specific restrictions are imposed. Preferably, since there is no distinction between the two types of tasks, the ratio of a1 to a2 is set to 1:1. intent The cross entropy loss function is used, L entites is the negative logarithm of the sequence output probability.
[0089] Furthermore, the BERT pre-trained model is a Chinese BERT pre-trained model provided by Google, with a total of 12 encoding layers, 768 hidden units and 12 self-attention heads. It is pre-trained on a large-scale unlabeled People's Daily dataset and needs to be downloaded locally for use.
[0090] The user semantic parsing system in the IT operation and maintenance service field provided by the present invention is described below. The user semantic parsing system in the IT operation and maintenance service field described below and the user semantic parsing method in the IT operation and maintenance service field described above can be referenced to each other.
[0091] The embodiment of the present invention provides a user semantic parsing system in the field of IT operation and maintenance services.
[0092] comprising: a computer readable storage medium and a processor;
[0093] The computer-readable storage medium is used to store executable instructions;
[0094] The processor is used to read the executable instructions stored in the computer-readable storage medium and execute a user semantic parsing method in the IT operation and maintenance service field as described in any of the above embodiments.
[0095] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A user semantic analysis method in IT operation and maintenance service field, It is characterized in that include: S1, segment the Chinese-English mixed text to be parsed and perform BERT encoding to obtain a BERT encoding vector; S2, segmenting the Chinese-English mixed text to be parsed, marking the word boundaries after the segmentation, and performing embedding encoding on the marked results to obtain a segmentation boundary feature vector; S3, after marking the Chinese, English and other characters in the Chinese-English mixed text to be parsed, embedding the marking results to obtain Chinese-English language feature vectors; S4, inputting the BERT encoding vector, word segmentation boundary feature vector, and Chinese and English language feature vectors into a pre-trained BERT-BiLSTM-CRF multi-task model to obtain intent recognition information and named entity recognition information; The BERT-BiLSTM-CRF multi-task model includes a fully connected layer for decoding the [CLS] bit encoding in the BERT encoding vector to obtain intent recognition information; The calculation formula of the fully connected layer is: y intent =Softmax(W intent ·x CLS +b intent ) Among them, W intent and b intent is the trainable model parameter, y intent is the output intent label, x CLS is the encoding vector of the [CLS] bit; The BERT-BiLSTM-CRF multi-task model includes a feature fusion layer, a BiLSTM layer, a Dropout layer, a Dense layer and a CRF layer connected in sequence; The feature fusion layer fuses the BERT encoding vector, word segmentation boundary feature vector and Chinese and English language feature vectors to obtain an input feature vector and inputs it to the BiLSTM layer. The input feature vector is decoded by the BiLSTM layer, Dropout layer, Dense layer and CRF layer to obtain named entity recognition information.
2. The method for user semantic parsing in the IT operation and maintenance service field as claimed in claim 1, It is characterized in that A word segmenter is used to segment the Chinese-English mixed text to be parsed, and the word boundaries after segmentation are marked by SBE tags.
3. The method for user semantic parsing in the IT operation and maintenance service field as claimed in claim 1, It is characterized in that The Chinese, English and other characters in the Chinese-English mixed text to be parsed are marked by CEX tags.
4. The method for user semantic parsing in the IT operation and maintenance service field as claimed in claim 1, It is characterized in that The BERT-BiLSTM-CRF multi-task model is obtained by supervised training using BERT encoding vectors, word segmentation boundary feature vectors, and Chinese and English language feature vectors of Chinese and English mixed text as samples and intent recognition information and named entity recognition information as labels.
5. The method for user semantic parsing in the IT operation and maintenance service field according to claim 1, It is characterized in that The feature fusion layer concatenates the word segmentation boundary feature vector and the Chinese and English language feature vector with the result of excluding the [CLS] bit and the [SEP] bit in the BERT encoding vector to obtain an input feature vector.
6. The method for user semantic parsing in the IT operation and maintenance service field as claimed in claim 1, It is characterized in that The loss function of the BERT-BiLSTM-CRF multi-task model is: L=a 1 ×L intent +a 2 ×L entites ; Among them, L intent represents the intention recognition loss function, L entites represents the named entity recognition loss function, a 1 and a 2 are the weights of the intent recognition task and the named entity recognition task, respectively.
7. A user semantic analysis system in the field of IT operation and maintenance services, It is characterized in that include: A computer readable storage medium and a processor; The computer-readable storage medium is used to store executable instructions; The processor is used to read the executable instructions stored in the computer-readable storage medium and execute the user semantic parsing method in the IT operation and maintenance service field as described in any one of claims 1-6.
Citation Information
Patent Citations
Chinese named entity extraction method based on multi-annotation framework and fusion features
CN113190656A
Identifying entities in electronic medical records
WO2019137562A2
