Method, device, electronic device and storage medium for identifying operation and maintenance instruction intention

By distinguishing common word segmentation and domain word segmentation in operation and maintenance instructions, and using inverse text frequency index to construct instruction vectors, the reliability and accuracy of intention recognition of operation and maintenance robots is solved, efficient intention recognition of operation and maintenance is achieved, and cost and Computing power demand.

CN115081441BActive Publication Date: 2025-01-07CHINA MOBILE GROUP JIANGSU +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110267018.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-11
Publication Date
2025-01-07
Estimated Expiration
2041-03-11

AI Technical Summary

Technical Problem

The existing operation and maintenance instruction intention recognition method has poor reliability and high error rate in operation and maintenance robot scenarios. Especially in the case of short text input, non-keywords affect the accuracy of similarity matching, and deep networks require a large amount of operation and maintenance data. Support, manual finishing costs are high.

Method used

By determining the common word segmentation and domain word segmentation in operation and maintenance instructions, determining the word vector weight based on the inverse text frequency index, constructing the instruction vector, and identifying intentions through similarity matching, reducing computing power requirements and saving costs.

Benefits of technology

It improves the reliability and efficiency of intention recognition in the operation and maintenance field, highlights semantic characteristics, reduces labor and machine costs, and is suitable for intention recognition that does not rely heavily on operation and maintenance corpus.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115081441B_ABST
    Figure CN115081441B_ABST
Patent Text Reader

Abstract

The present invention provides a method, device, electronic device and storage medium for recognizing the intention of operation and maintenance instructions, wherein the method includes: determining the general participle and domain participle in the operation and maintenance instructions to be recognized; based on the general weight of each general participle and the domain weight of each domain participle, weighted fusion is performed on the word vector of each general participle and the word vector of each domain participle to obtain the instruction vector of the operation and maintenance instruction, the general weight and the domain weight are determined based on the inverse text frequency index dictionary in the general scenario, and the domain weight is greater than the general weight; the instruction vector of the operation and maintenance instruction is matched with the instruction vector of the instruction corresponding to each candidate intention, and the intention of the operation and maintenance instruction is selected from each candidate intention based on the matching result. The method, device, electronic device and storage medium provided by the present invention, while highlighting the meaning of the proper nouns in the operation and maintenance field, ensure the accuracy of the semantic features, and help to improve the recognition reliability and recognition efficiency of the intention recognition in the operation and maintenance field.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of operation and maintenance business support technology, and in particular to an operation and maintenance instruction intention recognition method, device, electronic device and storage medium. Background Art

[0002] With the development of natural language processing (NLP) technology, chatbots have been extended to the field of operation and maintenance. Through human-machine interaction with operation and maintenance robots, operation and maintenance actions can be easily completed in a question-and-answer manner, which can greatly improve the work efficiency of operation and maintenance personnel and free them from complicated and repetitive work.

[0003] At present, the execution process of the operation and maintenance robot includes understanding the intention of the user input command and executing the action corresponding to the intention. Among them, the intention understanding task is mostly implemented through text classification or similarity matching. However, in the robot scenario, users may enter a large number of unpredictable questions of other categories during use, which makes text classification extremely difficult to implement. And because the operation and maintenance instructions are mostly short texts, one or two non-keywords may directly affect the reliability of similarity matching, resulting in poor accuracy of similarity matching in the operation and maintenance scenario. Summary of the invention

[0004] The present invention provides a method, device, electronic device and storage medium for identifying operation and maintenance instruction intentions, so as to solve the problems of poor reliability and high error rate of existing operation and maintenance instruction intention identification methods.

[0005] The present invention provides a method for identifying operation and maintenance instruction intentions, comprising:

[0006] Determine the common segmentation words and domain segmentation words in the operation and maintenance instructions to be identified;

[0007] Based on the general weight of each general participle and the domain weight of each domain participle, the word vectors of each general participle and the word vectors of each domain participle are weightedly fused to obtain the instruction vector of the operation and maintenance instruction, wherein the general weight and the domain weight are determined based on the inverse text frequency index dictionary in a general scenario, and the domain weight is greater than the general weight;

[0008] The instruction vector of the operation and maintenance instruction is matched with the instruction vectors of the instructions corresponding to each candidate intention, and the intention of the operation and maintenance instruction is selected from each candidate intention based on the matching result.

[0009] According to a method for recognizing operation and maintenance instruction intentions provided by the present invention, operation and maintenance entity recognition is performed on the operation and maintenance instruction to obtain operation and maintenance entity segmentations in the operation and maintenance instruction;

[0010] The operation and maintenance entity segmentation is deleted from all the segmentations of the operation and maintenance instruction, and domain word matching is performed on the remaining segmentations, and the segmentations that successfully match are used as domain segmentations, and the segmentations that fail to match are used as general segmentations.

[0011] According to a method for recognizing operation and maintenance instruction intent provided by the present invention, the operation and maintenance entity recognition is performed on the operation and maintenance instruction to obtain the operation and maintenance entity segmentation in the operation and maintenance instruction, including:

[0012] Based on a proper noun dictionary, segment the operation and maintenance instructions to obtain a segmentation sequence;

[0013] Inputting the segmentation sequence into an operation and maintenance entity recognition model to obtain operation and maintenance entity segmentations output by the operation and maintenance entity recognition model;

[0014] The operation and maintenance entity recognition model is obtained by training based on a sample word segmentation sequence and its operation and maintenance recognition label, and the sample word segmentation sequence is obtained by segmenting sample instructions based on the proper noun dictionary.

[0015] According to a method for recognizing operation and maintenance instruction intentions provided by the present invention, the word vector is determined based on the following steps:

[0016] Based on the distributed word vector dictionary, determine the distributed word vector of any word segmentation;

[0017] Determine a position encoding vector of any word segmentation based on the position of any word segmentation in the operation and maintenance instruction;

[0018] Based on the distributed word vector and the position encoding vector of any word segmentation, determine the word vector of any word segmentation.

[0019] According to a method for identifying operation and maintenance instruction intentions provided by the present invention, the domain weight is determined based on the following steps:

[0020] Sorting the inverse text frequency indexes of all the word segments in the inverse text frequency index dictionary from large to small to obtain an inverse text frequency index sequence;

[0021] The upper quartile of the inverse text frequency index series is used as the domain weight.

[0022] According to a method for identifying operation and maintenance instruction intentions provided by the present invention, matching the instruction vector of the operation and maintenance instruction with the instruction vectors of instructions corresponding to each candidate intention, and selecting the intention of the operation and maintenance instruction from each candidate intention based on the matching result, includes:

[0023] Calculating the similarity between the instruction vector of the operation and maintenance instruction and the instruction vector of the instruction corresponding to each candidate intention respectively;

[0024] Based on the similarities corresponding to the candidate intentions, the intention of the operation and maintenance instruction is determined.

[0025] The present invention also provides an operation and maintenance instruction intention recognition device, comprising:

[0026] A word segmentation unit, used to determine common word segmentations and domain word segmentations in the operation and maintenance instructions to be identified;

[0027] A weighted fusion unit, configured to perform weighted fusion on the word vectors of each general word segment and the word vectors of each field word segment based on the general weight of each general word segment and the field weight of each field word segment to obtain the instruction vector of the operation and maintenance instruction, wherein the general weight and the field weight are determined based on an inverse text frequency index dictionary under a general scenario, and the field weight is greater than the general weight;

[0028] The intention recognition unit is used to match the instruction vector of the operation and maintenance instruction with the instruction vector of the instruction corresponding to each candidate intention, and select the intention of the operation and maintenance instruction from each candidate intention based on the matching result.

[0029] According to an operation and maintenance instruction intention recognition device provided by the present invention, the word segmentation unit includes:

[0030] An entity recognition subunit, used to perform operation and maintenance entity recognition on the operation and maintenance instruction to obtain operation and maintenance entity segmentations in the operation and maintenance instruction;

[0031] The domain matching subunit is used to delete the operation and maintenance entity segmentation from all the segmentations of the operation and maintenance instruction, and perform domain word matching on the remaining segmentations, taking the segmentations that successfully match as the domain segmentations, and taking the segmentations that fail to match as the general segmentations.

[0032] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any of the above-described operation and maintenance instruction intention recognition methods when executing the computer program.

[0033] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of any of the above-mentioned operation and maintenance instruction intention identification methods are implemented.

[0034] The operation and maintenance instruction intention recognition method, device, electronic device and storage medium provided by the present invention determine the general weight of each general participle and the field weight of each field participle in the operation and maintenance instruction through the inverse text frequency index, thereby constructing an instruction vector, highlighting the meaning of the proper nouns in the operation and maintenance field while ensuring the accuracy of the semantic features. On this basis, the intention recognition is performed by similarity matching, which effectively reduces the computing power requirements for intention recognition, saves a lot of labor and machine costs, and helps to improve the recognition reliability and recognition efficiency of intention recognition in the operation and maintenance field. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0036] Figure 1 It is one of the flow charts of the operation and maintenance instruction intention recognition method provided by the present invention;

[0037] Figure 2 It is a flowchart of the word vector determination method provided by the present invention;

[0038] Figure 3 It is a structural schematic diagram of the corresponding model of the distributed word vector dictionary provided by the present invention;

[0039] Figure 4 This is the second flow chart of the operation and maintenance instruction intention recognition method provided by the present invention;

[0040] Figure 5 It is a structural schematic diagram of the operation and maintenance instruction intention recognition device provided by the present invention;

[0041] Figure 6 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0042] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0043] At present, the intent understanding task is mostly achieved through text classification or similarity matching. Traditional text classification algorithms include classic linear support vector machines (LinearSVM), logistic regression, etc. Similarity matching usually requires neural network algorithms such as LSTM, TextCNN, etc. to extract features and perform matching calculations on this basis. Similarity matching algorithms have many indicators, including distance-based methods such as Euclidean distance and Manhattan distance, and angle-based methods such as cosine similarity.

[0044] The above existing algorithms have the following defects when used directly in the operation and maintenance robot scenario:

[0045] Regarding text classification algorithms, there is a common problem with using classification algorithms for intent recognition. The classification model needs to be optimized for the judgment of other categories (non-operation robot built-in intent), which is difficult and has high manual debugging costs. Classification algorithms are supervised algorithms and can easily classify the data categories contained in the training samples. However, in the robot scenario, users will enter a large number of unpredictable questions of other categories during use. How to accurately identify these categories is the difficulty in implementing text classification algorithms.

[0046] Regarding the similarity matching algorithm, although similarity combined with thresholds can effectively solve other types of problems, compared with the supervised classification algorithm, the similarity matching algorithm is less effective in recognizing built-in intents. The main influencing factors are:

[0047] First, in the operation and maintenance robot scenario, user input is all short text sentences, and one or two non-keywords may affect the similarity matching;

[0048] Second, out-of-the-box (OOV) words and words specific to the operation and maintenance field need to be handled specially, otherwise their impact will be highlighted in short texts;

[0049] Third, some existing deep networks, such as twin networks, can learn the similarity between texts, but they require the support of a large amount of operation and maintenance data. Manually organizing data is costly and time-consuming.

[0050] In view of the above problems, an embodiment of the present invention provides a method for identifying the intent of operation and maintenance instructions, which can quickly and efficiently realize intent recognition in short text scenarios and without heavy reliance on operation and maintenance corpus.

[0051] Figure 1 is one of the flow charts of the operation and maintenance instruction intention recognition method provided by the present invention, such as Figure 1 As shown, the method includes:

[0052] Step 110: determine the common segmentation words and domain segmentation words in the operation and maintenance instructions to be identified.

[0053] Specifically, the operation and maintenance instructions to be identified are operation and maintenance instructions that require intent recognition, such as instructions obtained by users through text input or voice input and then transcribed. The operation and maintenance instructions referred to here are in text form, such as "help me restart a certain system" or "query the resource configuration status of a certain node."

[0054] The operation and maintenance instructions in text form can be divided into multiple participles through word segmentation. On this basis, the individual participles contained in the operation and maintenance instructions can be divided according to whether they belong to special vocabulary in the operation and maintenance field, thereby obtaining common participles and field participles in the operation and maintenance instructions.

[0055] The domain segmentation referred to here refers to the special vocabulary in the operation and maintenance field contained in the operation and maintenance instructions, such as the abbreviation of a certain system name, the name of a certain device, the abbreviation of a certain technology, the abbreviation of a certain operation, etc. The general segmentation refers to the segmentation other than the domain segmentation contained in the operation and maintenance instructions.

[0056] Step 120, based on the general weight of each general word segmentation and the domain weight of each domain word segmentation, the word vectors of each general word segmentation and the word vectors of each domain word segmentation are weightedly fused to obtain the instruction vector of the operation and maintenance instruction, the general weight and the domain weight are determined based on the inverse text frequency index dictionary under general scenarios, and the domain weight is greater than the general weight.

[0057] Specifically, in order to distinguish the contribution of each word segment in the operation and maintenance instructions to intent recognition, especially the contribution to operation and maintenance intent recognition in the specific scenario of operation and maintenance, the embodiment of the present invention distinguishes between common word segmentations and domain word segmentations in the operation and maintenance instructions, and introduces the inverse document frequency (IDF) to determine their corresponding common weights and domain weights respectively.

[0058] Furthermore, the inverse text frequency index dictionary in common scenarios contains each word segmentation in common scenarios, that is, the inverse text frequency index of each common word segmentation. Therefore, by querying the inverse text frequency index dictionary in common scenarios, the inverse text frequency index of each common word segmentation in the operation and maintenance instructions can be directly obtained, and the common weight of each common word segmentation can be determined accordingly. Here, the common weight of each common word segmentation can be the inverse text frequency index itself, or it can be obtained by multiplying the inverse text frequency index by a preset coefficient or normalizing it. It should be noted that the higher the inverse text frequency index of each common word segmentation, the higher the corresponding common weight.

[0059] Different from general participles, domain participles have a very small probability of appearing in general scenarios due to their domain specificity. Therefore, the inverse text frequency index dictionary in general scenarios does not include the inverse text frequency index of domain participles. However, considering that in operation and maintenance instructions, domain participles usually contribute more to the recognition of operation and maintenance intentions than general participles, a weight value higher than the general weight can be determined as the weight value of the domain participle based on the general weight of each general participle. For example, the inverse text frequency index dictionary can be used to determine the mean, median and other statistical values ​​of the inverse text frequency index of general participles, and then use this as a reference to set a domain weight higher than the general weight.

[0060] On this basis, we can perform weighted summation on the word vectors of each general word segmentation and the word vectors of each field word segmentation based on the general weight of each general word segmentation and the field weight of each field word segmentation, and use the result of the weighted summation as the instruction vector of the operation and maintenance instruction. Here, by distinguishing the instruction vector obtained by weighted summation of general weights and field weights, the meaning of the proper nouns in the operation and maintenance field is highlighted while ensuring the accuracy of the semantic features.

[0061] Step 130, matching the instruction vector of the operation and maintenance instruction with the instruction vectors of the instructions corresponding to each candidate intention, and selecting the intention of the operation and maintenance instruction from each candidate intention based on the matching result.

[0062] Here, each candidate intention is an operation and maintenance intention that may appear in a pre-set operation and maintenance scenario. The staff can determine in advance the sample operation and maintenance instructions corresponding to each candidate intention, and extract the instruction vector of each sample operation and maintenance instruction based on steps 110 and 120, so as to obtain the instruction vector of the instruction corresponding to each candidate intention.

[0063] After that, the instruction vector of the operation and maintenance instruction can be matched with the instruction vector of the instruction corresponding to each candidate intention. For example, the similarity between the instruction vector of the operation and maintenance instruction and the instruction vector of the instruction corresponding to each candidate intention can be calculated by similarity matching, and the matching result can be determined according to the similarity. The matching result obtained here can be that there is no matching candidate intention, or it matches the instruction vector of the instruction corresponding to a candidate intention, and the intention of the operation and maintenance instruction can be determined according to the matching result.

[0064] The method provided by the embodiment of the present invention determines the general weight of each general word segmentation and the field weight of each field word segmentation in the operation and maintenance instruction by inverse text frequency index, thereby constructing an instruction vector, which highlights the meaning of the proper nouns in the operation and maintenance field while ensuring the accuracy of the semantic features. On this basis, intent recognition is performed by similarity matching, which effectively reduces the computing power requirements for intent recognition, saves a lot of labor and machine costs, and helps to improve the recognition reliability and efficiency of intent recognition in the operation and maintenance field.

[0065] Based on the above embodiment, step 110 includes:

[0066] Performing operation and maintenance entity recognition on the operation and maintenance instruction to obtain operation and maintenance entity segmentations in the operation and maintenance instruction;

[0067] The operation and maintenance entity segmentation is deleted from all the segmentations of the operation and maintenance instruction, and domain word matching is performed on the remaining segmentations, and the segmentations that successfully match are used as domain segmentations, and the segmentations that fail to match are used as general segmentations.

[0068] Specifically, the operation and maintenance entity is the object that needs specific operation in the operation and maintenance scenario, such as the job object, operation target, execution scope, and characters representing these objects, targets, and scopes. In the actual operation and maintenance scenario, the operation and maintenance entity has many variations, and sometimes it may be very long or even contain Chinese words. If it is directly vectorized, this part will seriously affect the vectorization representation effect of the entire operation and maintenance instruction. The operation and maintenance entity itself does not play a big role in identifying the intent of the operation and maintenance instruction. Therefore, after the operation and maintenance entity is identified, the word segmentation corresponding to the operation and maintenance entity can be deleted and does not participate in the subsequent vectorization operation.

[0069] Furthermore, after deleting the operation and maintenance entity segmentation from all the segmentations of the operation and maintenance instructions, the domain segmentation and the general segmentation can be distinguished, thereby saving the amount of calculation.

[0070] Based on any of the above embodiments, in step 110, performing operation and maintenance entity recognition on the operation and maintenance instruction to obtain operation and maintenance entity segmentation in the operation and maintenance instruction includes:

[0071] Based on a proper noun dictionary, segment the operation and maintenance instructions to obtain a segmentation sequence;

[0072] Inputting the segmentation sequence into an operation and maintenance entity recognition model to obtain operation and maintenance entity segmentations output by the operation and maintenance entity recognition model;

[0073] The operation and maintenance entity recognition model is obtained by training based on a sample word segmentation sequence and its operation and maintenance recognition label, and the sample word segmentation sequence is obtained by segmenting sample instructions based on the proper noun dictionary.

[0074] Here, the proper noun dictionary further includes the special word segmentation in the operation and maintenance scenario on the basis of including various word segmentations in general scenarios. The special word segmentation referred to here can be the abbreviation of a system name, the name of a device, the abbreviation of a technology, the abbreviation of an operation, etc.

[0075] By segmenting the operation and maintenance instructions using a proper noun dictionary, the reliability and accuracy of the segmentation results can be ensured. Furthermore, the database corresponding to the proper noun dictionary can be input into the segmenter, thereby building a special segmenter for the operation and maintenance scenario, and applying the special segmenter to perform segmentation processing.

[0076] Then, the segmented word sequence obtained by the segmentation is input into the operation and maintenance entity recognition model, and the operation and maintenance entity recognition model performs operation and maintenance entity recognition on each segmented word in the segmented word sequence and outputs the operation and maintenance entity segmentation.

[0077] In addition, before executing the above steps, the operation and maintenance entity recognition model can be pre-trained. The training steps include: first, collecting the operation and maintenance instructions in the operation and maintenance scenario as sample instructions, and then using the proper noun dictionary to segment each sample instruction to obtain the segmentation results of each sample instruction, that is, the sample segmentation sequence of each sample instruction, and the operation and maintenance identification label of each sample instruction. On this basis, the training set constructed by the sample segmentation sequence and its operation and maintenance identification label can be used to train the NER (Named Entity Recognition) model based on the BiLSTM+CRF algorithm to obtain the operation and maintenance entity recognition model.

[0078] Based on any of the above embodiments, Figure 2 It is a flow chart of the word vector determination method provided by the present invention. Figure 2 As shown, the method for determining the word vector includes:

[0079] Step 210, based on the distributed word vector dictionary, determine the distributed word vector of any word segmentation.

[0080] Here, the distributed word vector dictionary is a dictionary that includes the distributed word vectors of each word segmentation. The distributed word vector dictionary trained with open source large-scale Chinese corpus can be selected. The training of the distributed word vector dictionary can be implemented by the CBOW (Continuous Bag-of-Word Model) type Word2Vec algorithm.

[0081] In actual use, for the word segments existing in the distributed word vector dictionary, the corresponding word vector can be directly obtained as the distributed word vector. For the word segments not included in the distributed word vector dictionary, that is, unregistered words, each character vector of the word segment can be obtained, and the character vectors are added and averaged as its distributed word vector.

[0082] The introduction of a distributed word vector dictionary can improve the generalization ability of the operation and maintenance robot to recognize the intent of user input sentences. Even when the robot has limited built-in samples, the distributed word vector dictionary can also be used to obtain word vectors not included in the samples, thereby achieving the purpose of accurately identifying user intent.

[0083] Step 220: Determine a position encoding vector of any word segment based on the position of any word segment in the operation and maintenance instruction.

[0084] Here, the position of each word segment in the operation and maintenance instruction can be the first, last or middle position, or can be a specific order, which is not specifically limited in the embodiment of the present invention. The position of each word segment can be encoded to obtain the position encoding vector of each word segment. The encoding of the position here can be implemented by a Position Embedding algorithm or other types of encoding algorithms, which is not specifically limited in the embodiment of the present invention.

[0085] Step 230, determining the word vector of any word segmentation based on the distributed word vector and the position encoding vector of any word segmentation.

[0086] Here, for any word segmentation, its word vector can be obtained by integrating the distributed word vector and the position encoding vector. For example, it can be obtained by adding the distributed word vector and the position encoding vector, or it can be obtained by concatenating the distributed word vector and the position encoding vector.

[0087] The method provided by the embodiment of the present invention ensures the generalization ability of intent recognition by applying a distributed word vector dictionary, thereby achieving fast and efficient intent recognition without heavy reliance on operation and maintenance corpus; on this basis, the position of each word segment in the operation and maintenance instruction is encoded in the word vector, which improves the sensitivity of intent recognition to word order and helps to improve the accuracy of intent recognition.

[0088] Based on any of the above embodiments, Figure 3 It is a schematic diagram of the structure of the corresponding model of the distributed word vector dictionary provided by the present invention, such as Figure 3 As shown in the figure, w(t) represents the word or character in each sample instruction. The CBOW type infers the word w(t) based on the context of the word segmentation w(t) (w(t-2), w(t-1), w(t+1), w(t+2)). As a result of this calculation, similar words in the training samples will have similar representations on the vector, such as "execute" and "operate", "close" and "end", etc.

[0089] Based on any of the above embodiments, the domain weight is determined based on the following steps:

[0090] Sorting the inverse text frequency indexes of all the word segments in the inverse text frequency index dictionary from large to small to obtain an inverse text frequency index sequence;

[0091] The upper quartile of the inverse text frequency index series is taken as the domain weight.

[0092] Here, considering that in operation and maintenance instructions, domain segmentation words usually contribute more to the recognition of operation and maintenance intentions than general segmentation words, a weight value higher than the general weight can be determined as the weight value of the domain segmentation word according to the general weight of each general segmentation word. Specifically, the inverse text frequency index of all segmentations in the inverse text frequency index dictionary can be sorted in descending order, and the upper quartile can be selected as the domain weight.

[0093] Based on any of the above embodiments, step 130 includes:

[0094] Calculating the similarity between the instruction vector of the operation and maintenance instruction and the instruction vector of the instruction corresponding to each candidate intention respectively;

[0095] Based on the similarities corresponding to the candidate intentions, the intention of the operation and maintenance instruction is determined.

[0096] Specifically, the similarity calculation here can be implemented by cosine similarity, Euclidean distance, Manhattan distance, etc. For example, the cosine similarity cosθ can be calculated by the following formula:

[0097]

[0098] In the formula, a and b are the instruction vector of the operation and maintenance instruction and the instruction vector of the instruction corresponding to the candidate intent, respectively. The similarity result obtained in this way ranges from [-1, +1], and the closer it is to 1, the closer it is.

[0099] Based on the similarities corresponding to the candidate intentions, the candidate intention with the highest similarity can be selected as the intention of the operation and maintenance instruction, or a similarity threshold can be set in advance and the candidate intention with a similarity greater than the similarity threshold can be used as the intention of the operation and maintenance instruction.

[0100] Based on any of the above embodiments, Figure 4 This is the second flow chart of the operation and maintenance instruction intention recognition method provided by the present invention, such as Figure 4 As shown, the method includes:

[0101] Step 410, prepare different types of sample instructions, operation and maintenance entity annotations, proper noun dictionaries, and train an operation and maintenance entity recognition model:

[0102] Here, different types of sample instructions are instructions used in different operation and maintenance scenarios or different fields, and the above instructions are used as basic "seed" samples. Specifically, the types of sample instructions can be divided according to different execution actions and different execution objects. For example, "help me restart a certain system" and "query the resource configuration of a certain node". The execution actions of these two instructions are "restart" and "query" respectively, so they can be judged as different intent types.

[0103] The dictionary of proper nouns includes unique words in specific operation and maintenance scenarios, such as the abbreviation of a system name, the name of a device, the abbreviation of a technology, the abbreviation of an operation, etc.

[0104] O&M entity annotation: Organize the O&M entities in a specific O&M scenario. For example, an O&M entity can refer to a job name, such as "test123" or "server_test".

[0105] Operation and maintenance entity recognition model: a named entity recognition model (NER) obtained based on the above operation and maintenance entity annotation training, which can be used to identify operation and maintenance entity segmentations in the input sentence text.

[0106] Step 420: perform word segmentation processing on the operation and maintenance instruction to be recognized:

[0107] The database corresponding to the proper noun dictionary in step 410 may be input into a word segmenter to construct a custom word segmenter, and the input operation and maintenance instruction text may be segmented based on the word segmenter to obtain a segmented text.

[0108] For example, the input text is: Execute the xxx job of the ** system. After word segmentation, the segmented text is as follows: execute, **, system, xxx job.

[0109] Step 430, perform operation and maintenance entity recognition on the segmented word sequence obtained after the segmentation; after deleting the operation and maintenance entity, perform general word and domain word recognition on each segmented word:

[0110] First, the operation and maintenance instructions are identified through the operation and maintenance entity recognition model to obtain the operation and maintenance entity segmentations in the operation and maintenance instructions. On this basis, the segmentations corresponding to the operation and maintenance entities are removed, and the remaining segmentations are matched with the segmentations in the proper noun dictionary to divide them into general segmentations and domain segmentations.

[0111] Step 440, based on the distributed word vector dictionary, vectorize each word and introduce position features:

[0112] The CBOW-type Word2Vec is applied to determine the distributed word vector of each word segment, and the position of each word segment in the operation and maintenance instruction is encoded to obtain the position encoding vector of each word segment. Then, the distributed word vector of each word segment is added to its corresponding position encoding vector to obtain a word vector with position information corresponding to each word segment.

[0113] Step 450, determine the general weight and domain weight based on the IDF, and then weight the instruction vector:

[0114] The inverse text frequency index dictionary in the general scenario can be determined based on the text in the general scenario, wherein the inverse text frequency index IDF of each general word segment can be determined by the following formula:

[0115]

[0116] It should be noted that TF-IDF is usually used for vectorization rather than IDF itself. However, considering that most instructions in operation and maintenance scenarios are in the form of short text, the value of word frequency TF is basically 1, so the TF value is no longer calculated. For general word segmentation, the IDF of the general word segmentation can be directly used as the general weight of the word segmentation. For domain word segmentation, the upper quartile of the IDF of the general word segmentation or other pre-set values ​​are used as the domain weight of the domain word segmentation.

[0117] On this basis, the word vectors of each general word segmentation and the word vectors of each field word segmentation are weighted and summed, and the result of the weighted sum is used as the instruction vector of the operation and maintenance instruction.

[0118] Step 460: Instruction vector similarity matching to determine the intent corresponding to the operation and maintenance instruction:

[0119] The candidate intention with the highest similarity can be selected as the intention of the operation and maintenance instruction, or a similarity threshold can be set in advance and the candidate intention with a similarity greater than the similarity threshold can be used as the intention of the operation and maintenance instruction.

[0120] Based on any of the above embodiments, Figure 5 is a schematic diagram of the structure of the operation and maintenance instruction intention recognition device provided by the present invention, such as Figure 5 As shown, the device comprises:

[0121] A word segmentation unit 510 is used to determine common word segments and domain word segments in the operation and maintenance instructions to be identified;

[0122] A weighted fusion unit 520 is used to perform weighted fusion on the word vectors of each general word segment and the word vectors of each field word segment based on the general weight of each general word segment and the field weight of each field word segment to obtain the instruction vector of the operation and maintenance instruction, wherein the general weight and the field weight are determined based on the inverse text frequency index dictionary in a general scenario, and the field weight is greater than the general weight;

[0123] The intention recognition unit 530 is used to match the instruction vector of the operation and maintenance instruction with the instruction vectors of the instructions corresponding to each candidate intention, and select the intention of the operation and maintenance instruction from each candidate intention based on the matching result.

[0124] The device provided by the embodiment of the present invention determines the general weight of each general participle and the field weight of each field participle in the operation and maintenance instruction by inverse text frequency index, thereby constructing an instruction vector, which highlights the meaning of the proper nouns in the operation and maintenance field while ensuring the accuracy of the semantic features. On this basis, intent recognition is performed by similarity matching, which effectively reduces the computing power requirements for intent recognition, saves a lot of labor and machine costs, and helps to improve the recognition reliability and efficiency of intent recognition in the operation and maintenance field.

[0125] Based on any of the above embodiments, the word segmentation unit includes:

[0126] An entity recognition subunit, used to perform operation and maintenance entity recognition on the operation and maintenance instruction to obtain operation and maintenance entity segmentations in the operation and maintenance instruction;

[0127] The domain matching subunit is used to delete the operation and maintenance entity segmentation from all the segmentations of the operation and maintenance instruction, and perform domain word matching on the remaining segmentations, taking the segmentations that successfully match as the domain segmentations, and taking the segmentations that fail to match as the general segmentations.

[0128] Based on any of the above embodiments, the entity identification subunit is used for:

[0129] Based on a proper noun dictionary, segment the operation and maintenance instructions to obtain a segmentation sequence;

[0130] Inputting the segmentation sequence into an operation and maintenance entity recognition model to obtain operation and maintenance entity segmentations output by the operation and maintenance entity recognition model;

[0131] The operation and maintenance entity recognition model is obtained by training based on a sample word segmentation sequence and its operation and maintenance recognition label, and the sample word segmentation sequence is obtained by segmenting sample instructions based on the proper noun dictionary.

[0132] Based on any of the above embodiments, the device further includes a word vector determination unit, which is used to:

[0133] Based on the distributed word vector dictionary, determine the distributed word vector of any word segmentation;

[0134] Determine a position encoding vector of any word segmentation based on the position of any word segmentation in the operation and maintenance instruction;

[0135] Based on the distributed word vector and the position encoding vector of any word segmentation, determine the word vector of any word segmentation.

[0136] Based on any of the above embodiments, the device further includes a weight determination unit, configured to:

[0137] Sorting the inverse text frequency indexes of all the word segments in the inverse text frequency index dictionary from large to small to obtain an inverse text frequency index sequence;

[0138] The upper quartile of the inverse text frequency index series is taken as the domain weight.

[0139] Based on any of the above embodiments, the intention recognition unit is used to:

[0140] Calculating the similarity between the instruction vector of the operation and maintenance instruction and the instruction vector of the instruction corresponding to each candidate intention respectively;

[0141] Based on the similarities corresponding to the candidate intentions, the intention of the operation and maintenance instruction is determined.

[0142] Figure 6 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 6 As shown, the electronic device may include: a processor 610, a communication interface 620, a memory 630 and a communication bus 640, wherein the processor 610, the communication interface 620 and the memory 630 communicate with each other through the communication bus 640. The processor 610 may call the logic instructions in the memory 630 to execute the operation and maintenance instruction intention recognition method, which includes: determining the general participle and the domain participle in the operation and maintenance instruction to be identified; based on the general weight of each general participle and the domain weight of each domain participle, weighted fusion of the word vector of each general participle and the word vector of each domain participle is performed to obtain the instruction vector of the operation and maintenance instruction, wherein the general weight and the domain weight are determined based on the inverse text frequency index dictionary in the general scenario, and the domain weight is greater than the general weight; matching the instruction vector of the operation and maintenance instruction with the instruction vector of the instruction corresponding to each candidate intention, and selecting the intention of the operation and maintenance instruction from each candidate intention based on the matching result.

[0143] In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0144] On the other hand, the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the operation and maintenance instruction intention recognition method provided by the above methods, and the method includes: determining the general participles and domain participles in the operation and maintenance instructions to be identified; based on the general weight of each general participle and the domain weight of each domain participle, weighted fusion of the word vectors of each general participle and the word vectors of each domain participle is performed to obtain the instruction vector of the operation and maintenance instruction, the general weight and the domain weight are determined based on the inverse text frequency index dictionary in a general scenario, and the domain weight is greater than the general weight; matching the instruction vector of the operation and maintenance instruction with the instruction vector of the instruction corresponding to each candidate intention, and selecting the intention of the operation and maintenance instruction from each candidate intention based on the matching result.

[0145] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the above-mentioned operation and maintenance instruction intention recognition methods, the method comprising: determining the general participles and domain participles in the operation and maintenance instructions to be identified; based on the general weights of each general participle and the domain weights of each domain participle, weightedly fusing the word vectors of each general participle and the word vectors of each domain participle to obtain the instruction vector of the operation and maintenance instruction, the general weight and the domain weight are determined based on an inverse text frequency index dictionary under general scenarios, and the domain weight is greater than the general weight; matching the instruction vector of the operation and maintenance instruction with the instruction vectors of the instructions corresponding to each candidate intention, and selecting the intention of the operation and maintenance instruction from each candidate intention based on the matching result.

[0146] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0147] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0148] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for identifying operation and maintenance instruction intentions, characterized in that: include: Determine the common segmentation words and domain segmentation words in the operation and maintenance instructions to be identified; Based on the universal weights of the universal participles and the domain weights of the domain participles, the word vectors of the universal participles and the word vectors of the domain participles are weightedly fused to obtain the instruction vector of the operation and maintenance instruction, wherein the universal weight and the domain weight are determined based on the inverse text frequency index dictionary in a universal scenario, and the domain weight is a weight value greater than the universal weight determined based on the universal weights of the universal participles; Matching the instruction vector of the operation and maintenance instruction with the instruction vectors of the instructions corresponding to each candidate intention, and selecting the intention of the operation and maintenance instruction from each candidate intention based on the matching result; The word vector is determined based on the following steps: Based on the distributed word vector dictionary, determine the distributed word vector of any word segmentation; Determine a position encoding vector of any word segmentation based on the position of any word segmentation in the operation and maintenance instruction; Based on the distributed word vector and the position encoding vector of any word segmentation, determine the word vector of any word segmentation.

2. The method for identifying operation and maintenance instruction intention according to claim 1, characterized in that: The step of determining the common participles and domain participles in the operation and maintenance instructions to be identified includes: Performing operation and maintenance entity recognition on the operation and maintenance instruction to obtain operation and maintenance entity segmentations in the operation and maintenance instruction; The operation and maintenance entity segmentation is deleted from all the segmentations of the operation and maintenance instruction, and domain word matching is performed on the remaining segmentations, and the segmentations that successfully match are used as domain segmentations, and the segmentations that fail to match are used as general segmentations.

3. The method for identifying operation and maintenance instruction intention according to claim 2, characterized in that: The performing operation and maintenance entity recognition on the operation and maintenance instruction to obtain the operation and maintenance entity segmentation in the operation and maintenance instruction includes: Based on a proper noun dictionary, segment the operation and maintenance instructions to obtain a segmentation sequence; Inputting the segmentation sequence into an operation and maintenance entity recognition model to obtain operation and maintenance entity segmentations output by the operation and maintenance entity recognition model; The operation and maintenance entity recognition model is obtained by training based on a sample word segmentation sequence and its operation and maintenance recognition label, and the sample word segmentation sequence is obtained by segmenting sample instructions based on the proper noun dictionary.

4. The method for identifying operation and maintenance instruction intention according to claim 1, characterized in that: The domain weights are determined based on the following steps: Sorting the inverse text frequency indexes of all the word segments in the inverse text frequency index dictionary from large to small to obtain an inverse text frequency index sequence; The upper quartile of the inverse text frequency index series is taken as the domain weight.

5. The method for identifying operation and maintenance instruction intention according to any one of claims 1 to 4, characterized in that: The step of matching the instruction vector of the operation and maintenance instruction with the instruction vectors of the instructions corresponding to each candidate intention, and selecting the intention of the operation and maintenance instruction from each candidate intention based on the matching result, includes: Calculating the similarity between the instruction vector of the operation and maintenance instruction and the instruction vector of the instruction corresponding to each candidate intention respectively; Based on the similarities corresponding to the candidate intentions, the intention of the operation and maintenance instruction is determined.

6. A device for identifying operation and maintenance instruction intentions, characterized in that: include: A word segmentation unit, used to determine common word segmentations and domain word segmentations in the operation and maintenance instructions to be identified; A weighted fusion unit, configured to perform weighted fusion on the word vectors of each general participle and the word vectors of each field participle based on the general weights of each general participle and the field weights of each field participle, so as to obtain the instruction vector of the operation and maintenance instruction, wherein the general weight and the field weight are determined based on the inverse text frequency index dictionary in a general scenario, and the field weight is determined based on the general weights of each general participle, and is a weight value greater than the general weight; An intention recognition unit, used to match the instruction vector of the operation and maintenance instruction with the instruction vectors of instructions corresponding to each candidate intention, and select the intention of the operation and maintenance instruction from each candidate intention based on the matching result; The word vector is determined based on the following steps: Based on the distributed word vector dictionary, determine the distributed word vector of any word segmentation; Determine a position encoding vector of any word segmentation based on the position of any word segmentation in the operation and maintenance instruction; Based on the distributed word vector and the position encoding vector of any word segmentation, determine the word vector of any word segmentation.

7. The operation and maintenance instruction intention recognition device according to claim 6, characterized in that: The word segmentation unit comprises: An entity recognition subunit, used to perform operation and maintenance entity recognition on the operation and maintenance instruction to obtain operation and maintenance entity segmentations in the operation and maintenance instruction; The domain matching subunit is used to delete the operation and maintenance entity segmentation from all the segmentations of the operation and maintenance instruction, and perform domain word matching on the remaining segmentations, taking the segmentations that successfully match as the domain segmentations, and taking the segmentations that fail to match as the general segmentations.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the operation and maintenance instruction intention recognition method as described in any one of claims 1 to 5 are implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the operation and maintenance instruction intention recognition method as described in any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Text semantic analysis method

    CN109271626A

  • Text data word segmentation method and device and electronic equipment

    CN111241833A