A method and system for character instruction intention recognition

Through deep learning and natural language processing technology, the operation intention of operation and maintenance commands is identified, and the problem that the existing technology cannot understand the purpose and context of operation and maintenance commands is solved, and more accurate and efficient operation and maintenance audits are achieved, reducing manual intervention and adapting to complexity scenarios and improve the ability to deal with new threats.

CN118551368BActive Publication Date: 2024-11-22GUANGDONG POWER TELECOMMUNICATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410994395.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-24
Publication Date
2024-11-22
Estimated Expiration
2044-07-24

AI Technical Summary

Technical Problem

The existing technology cannot deeply understand the real purpose and context environment of operation and maintenance commands, and it is difficult to deal with complex operation and maintenance scenarios. There are problems such as insufficient semantic analysis, lack of context, challenges in complex scenarios, more manual interventions and difficulty in dealing with new threats.

Method used

Using deep learning and natural language processing technology, the command record preprocessing, key configuration information extraction, semantic analysis and operation intention analysis are used, combined with context judgment, the command operation intention is identified, and prediction is made through multi-layer perceptron and attention mechanism. , integrate and display the user's command execution status and operation intentions.

Benefits of technology

Achieve more accurate and efficient operation and maintenance audits, reduce manual intervention, improve analysis accuracy and robustness, adapt to different operation and maintenance scenarios, reduce operation and maintenance audit costs and training costs, and enhance response to new threats ability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118551368B_ABST
    Figure CN118551368B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for character instruction intention recognition, which relates to the technical field of power communication security auditing, including collecting command records, preprocessing command records and extracting key configuration information, extracting key configuration information from command records using keyword extraction; semantically analyzing the key configuration information of command records to identify the operational intent of commands; performing operational intent analysis, and judging the accuracy of operational intent analysis in combination with command context; integrating the analysis results, and displaying the user's command execution and operational intent in a time series. The present invention can more accurately and efficiently identify the user's operational intent, and compared with traditional rule-based methods, it provides a clearer and more intuitive audit report by comprehensively displaying command records, semantic analysis results, and context information, can better adapt to different operation and maintenance scenarios, has stronger generalization capabilities, and improves the accuracy and robustness of the analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power communication security auditing, and in particular to a method and system for character instruction intention recognition. Background Art

[0002] Currently, in the field of character-based session operation and maintenance auditing, the main technologies focus on the collection and storage of command execution records. The system records various commands executed by users through logs to meet the needs of auditing and security monitoring. These records contain basic information such as the command itself, execution time, and executor. However, these technologies often cannot deeply understand the true purpose and context of the command, resulting in certain limitations when dealing with complex scenarios.

[0003] In addition, some existing technologies attempt to use rule-based methods for auditing, by defining pre-set rules to detect potential risk operations or abnormal behaviors. However, these methods are often limited by the accuracy and applicability of the rules and cannot handle complex operation and maintenance scenarios. For example, a command may have multiple different purposes, and it is difficult for existing technologies to accurately distinguish them. At the same time, existing technologies generally lack a comprehensive understanding of the execution context of operation and maintenance commands. The same command may have different meanings in different contexts, and it is difficult for existing technologies to capture this ambiguity. The shortcomings of existing technologies are:

[0004] Insufficient semantic analysis: Existing technologies mainly focus on the form and execution process of commands, but lack a deep understanding of the real purpose of commands. For example, a command may have multiple different purposes, and existing technologies are difficult to accurately distinguish.

[0005] Lack of context: Existing technologies often lack a comprehensive understanding of the execution context of operation and maintenance commands. The same command may have different meanings in different contexts, and existing technologies have difficulty capturing this ambiguity.

[0006] Complex scenario challenges: As the complexity of systems and networks increases, operation and maintenance scenarios become more diverse and complex. Traditional rule-based methods are difficult to adapt to such changes and are prone to missed or false positives.

[0007] Extensive manual intervention: Existing technologies often require a lot of manual settings and intervention, such as defining rules and adjusting parameters, making the operation and maintenance audit process cumbersome and easily affected by subjective factors.

[0008] Difficulty responding to new threats: As malicious attacks and security threats continue to evolve, existing technologies lag behind in timely detecting and responding to threats.

[0009] In view of the above problems, the present invention provides a character instruction intention recognition method, which aims to make up for the shortcomings of the existing technology and provide a more intelligent and comprehensive operation and maintenance audit method. Through deep learning and natural language processing technology, the present invention aims to achieve deep semantic analysis of operation and maintenance commands, fully understand the user's operation purpose, and thus audit and monitor more accurately. Summary of the invention

[0010] In view of the above-mentioned problems, the present invention is proposed.

[0011] Therefore, the problem to be solved by the present invention is: how to solve the problem that the existing technology cannot handle complex operation and maintenance scenarios.

[0012] To solve the above technical problems, the present invention provides the following technical solutions: a method for character instruction intention recognition, comprising: collecting command records, preprocessing the command records and extracting key configuration information, and extracting key configuration information from the command records using keyword extraction; performing semantic analysis on the key configuration information of the command records to identify the operation intention of the command; performing operation intention analysis and judging the accuracy of the operation intention analysis in combination with the command context; integrating the analysis results and displaying the user's command execution status and operation intention in a time series.

[0013] As a preferred solution of the character instruction intention recognition method described in the present invention, wherein: the command record includes command content, timestamp and user information; the preprocessing includes data cleaning of the original command record to remove unnecessary special characters, spaces and format inconsistencies; the key configuration information extraction includes extraction of new configurations, extraction of deleted configurations, detection of conflicting configurations before and after, and filtering query operations.

[0014] As a preferred solution of the character instruction intention recognition method described in the present invention, wherein: the extraction of the new configuration includes identifying and extracting the information of the new configuration by finding specific keywords related to the new configuration in the command record; the extraction of the deleted configuration includes identifying and extracting the information of the deleted configuration by finding specific keywords related to the deleted configuration in the command record; the detection of the previous and subsequent conflicting configurations includes identifying whether commands executed at different times perform contradictory or conflicting operations on the same configuration item; the filtering query operation includes being implemented by identifying specific keywords containing query operations in the command.

[0015] As a preferred solution of the character instruction intention recognition method described in the present invention, the semantic analysis includes using natural language processing technology to perform grammatical parsing on the command, the extracted key configuration information is converted into vector form through embedding technology, the vector is integrated into a comprehensive feature representation through a multi-layer perceptron, the serialized comprehensive features are processed through an LSTM network to capture long-term dependencies, and the importance of key information is emphasized through the attention mechanism, and the operational intent of the command is predicted using a fully connected layer and a softmax function.

[0016] As a preferred solution of the character instruction intention recognition method described in the present invention, wherein: The syntax analysis is expressed as:

[0017] ,

[0018] in, For command, For natural language processing analysis, For the command words, For the command Part of speech standards, For the command dependency labels; the vector form is expressed as:

[0019] ,

[0020] in, For slave commands The vector form of the key configuration information extracted from For slave commands The key configuration information extracted from is the word embedding matrix; the comprehensive feature is expressed as:

[0021] ,

[0022] in, is the comprehensive feature vector, is the vector concatenation operation, A multi-layer perceptron.

[0023] As a preferred solution of the character instruction intention recognition method described in the present invention, the processing of the serialized comprehensive features includes using an LSTM network to process the serialized comprehensive features, capturing long-distance dependencies, introducing an attention mechanism, calculating the weighted average command representation, classifying the weighted average command representation, using a softmax function to obtain the predicted intent, and using a cross entropy loss function for model training, which is expressed as:

[0024] ,

[0025] ,

[0026] ,

[0027] ,

[0028] ,

[0029] in, For time The comprehensive feature vector of the input, For the The hidden state of the LSTM at time steps, For the The hidden state of the LSTM at time steps, For time Attention weight, indicating the The importance of the word is the attention weight parameter vector, is the weight that maps the hidden state to the intermediate space, A bias to map the hidden state to the intermediate space, For the time steps, is the time step length of the input command, For the The hidden state of the LSTM at time steps, is the final vector of the command, To predict the intent of the command, is the intention prediction weight, is the intention prediction bias, is the cross entropy loss function, is the number of test samples, For the Test samples, is the real intention label, To predict the intent label; the model is trained until the value of the loss function is lower than the preset loss function threshold, and the training stops.

[0030] As a preferred solution of the character instruction intention recognition method described in the present invention, the operation intention analysis includes combining the context and the command content, which is expressed as:

[0031] ,

[0032] ,

[0033] in, For in time The result of the command operation intention analysis is The number of commands recorded for the preceding or following command, For the The timestamp of the command, is the standard deviation of the Gaussian distribution, For the above or below The vector form of the command, is a complex information filtering function. is the normalization factor, For command The prior probability of ; calculate the cosine similarity to determine the accuracy of intent recognition, expressed as:

[0034] ,

[0035] in, is the cosine similarity; if If the similarity is greater than the high threshold, the prediction result is judged to be correct and the predicted intention is directly used as the final result. If the operation intention analysis result is very similar to the prediction result, the prediction result is output to the user as the final operation intention. If the similarity is greater than the low threshold and less than or equal to the high threshold, the prediction result is judged to be partially correct. The difference between the prediction result and the actual result is analyzed, and the cause of the difference is determined. The prediction model is corrected or optimized according to the analysis results, and the corrected model is verified and evaluated, and the character instruction intention recognition is performed again; if If the similarity is less than or equal to the low threshold, the prediction result is judged to be wrong. The significant difference between the prediction result and the actual result is analyzed, and the cause of the prediction error is determined. The model is rebuilt and the character instruction intention recognition is re-performed.

[0036] Another object of the present invention is to provide a system for character instruction intention recognition method, which can solve the problem of character instruction intention recognition by constructing a character instruction intention recognition system.

[0037] To solve the above technical problems, the present invention provides the following technical solutions: a character instruction intention recognition system, comprising a data acquisition module, an operation intention recognition module, an accuracy judgment module and a display module; the data acquisition module is used to collect command records, pre-process the command records and extract key configuration information, and use keyword extraction to extract key configuration information from the command records; the operation intention recognition module is used to perform semantic analysis on the key configuration information of the command records and identify the operation intention of the command; the accuracy judgment module is used to perform operation intention analysis and judge the accuracy of the operation intention analysis in combination with the context; the display module is used to integrate the analysis results and display the user's command execution status and operation intention in time series.

[0038] A computer device includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above-mentioned method for character instruction intention recognition when executing the computer program.

[0039] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of a method for character instruction intention recognition as described above.

[0040] The beneficial effects of the present invention are as follows: the character instruction intention recognition method provided by the present invention can more accurately and efficiently recognize the user's operation intention through deep learning and semantic analysis technology, and the accuracy and efficiency are significantly improved compared with the traditional rule-based method. Automated intention recognition reduces the dependence on manual auditing and reduces the cost of operation and maintenance auditing. Compared with the existing technology that requires a lot of manual settings and intervention, the present solution can achieve more automated operations, improve efficiency and reduce labor costs. By comprehensively displaying command records, semantic analysis results and context information, the present solution provides a clearer and more intuitive audit report. Compared with the existing technology that only displays command records or only performs semantic analysis, the comprehensive display can more comprehensively display the true intention behind the user's operation. Using a deep learning model for semantic analysis, the present solution can better adapt to different operation and maintenance scenarios and has stronger generalization ability. Compared with traditional methods, the present solution performs better when facing diversified and complex operation and maintenance commands, and improves the accuracy and robustness of the analysis. Through comprehensive display, the present solution provides a more user-friendly audit report, so that auditors can more easily understand the operation content in the operation and maintenance process. This helps reduce training costs and makes audit work more efficient. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

[0042] Figure 1 A flowchart of a method for character instruction intention recognition provided for the first embodiment of the present invention.

[0043] Figure 2 A structural diagram of a character instruction intention recognition system provided for the second embodiment of the present invention. DETAILED DESCRIPTION

[0044] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings.

[0045] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0046] Example 1

[0047] Reference Figure 1 , which is the first embodiment of the present invention, provides a method for character instruction intention recognition, including: collecting command records, preprocessing the command records and extracting key configuration information, using keyword extraction to extract key configuration information from the command records; performing semantic analysis on the key configuration information of the command records to identify the operation intention of the command; performing operation intention analysis, and judging the accuracy of the operation intention analysis in combination with the command context; integrating the analysis results and displaying the user's command execution status and operation intention in a time series.

[0048] S1. Collect command records, pre-process the command records and extract key configuration information, and use keyword extraction to extract key configuration information from the command records.

[0049] The command record includes command content, timestamp and user information.

[0050] Preprocessing includes data cleaning of the original command records to remove unnecessary special characters, spaces, and format inconsistencies.

[0051] Key configuration information extraction includes the extraction of newly added configurations, the extraction of deleted configurations, the detection of conflicting configurations, and filtering query operations. Special characters include control characters, non-printing characters, extended characters, quotation marks, and brackets.

[0052] S2. Perform semantic analysis on key configuration information recorded by the command to identify the operational intent of the command.

[0053] The extraction of the newly added configuration includes identifying and extracting the information of the newly added configuration by finding specific keywords related to the newly added configuration in the command record; first, it is necessary to determine the keywords that may be related to the newly added configuration. For example, keywords such as "add", "create", "insert", and "new" are usually related to the newly added operation. Traverse each record in the command record and scan each record to find the command containing the specified keyword. Identify the position of the keyword in the command. For example, in "add user admin", the word "add" appears at the beginning of the command, indicating that this is an addition operation. According to the position of the keyword, the structure of the command is parsed. Taking "add user admin" as an example, the part immediately following the keyword "add" can be parsed into a specific configuration item, such as "user admin". Once it is identified that this is a new operation and the configuration item is parsed, the newly added configuration information can be extracted. For example, for the command "add user adminpassword 12345", the newly added user configuration items can be extracted, including the username "admin" and the password "12345". The extracted configuration items can be further stored, recorded, or used for subsequent analysis. For example, record the new configuration in the database for review by the operation and maintenance team, or compare it with other operations to ensure that there is no conflict with the previous configuration.

[0054] Extraction of the deletion configuration includes identifying and extracting the deletion configuration information by searching for specific keywords related to the deletion configuration in the command record; first, identifying keywords related to the deletion operation, such as "delete", "remove", "drop", "erase", etc., which usually indicate the deletion operation. Traverse each record in the command record and scan each record to find the command containing the specified keyword. Identify the position of the keyword in the command. For example, in "delete user admin", the word "delete" appears at the beginning of the command, indicating that this is a deletion operation. According to the position of the keyword, parse the structure of the command. Taking "delete user admin" as an example, the part after the keyword "delete" can be parsed into a specific configuration item, such as "user admin". Once it is identified that this is a deletion operation and the configuration item is parsed, the deleted configuration information can be extracted. For example, for the command "deleteuser admin", the deleted user configuration items can be extracted, including the user name "admin". The extracted configuration items can be further stored, recorded or used for subsequent analysis. For example, the deleted configuration is recorded in the database for review by the operation and maintenance team, or compared with other operations to ensure that there is no conflict with subsequent configuration operations.

[0055] Detection of conflicting configurations includes identifying whether commands executed at different times perform contradictory or conflicting operations on the same configuration item; first, sort the command records by timestamp to ensure that the order of analysis is consistent with the order in which the commands are executed. This helps to identify the order of commands. Extract the configuration items involved from each command. For example, for the commands "add user admin password 12345" and "delete user admin", the extracted configuration items are both "user admin". Maintain a record of the current configuration state to track the current state of each configuration item. For example, the configuration item "user admin" does not exist initially; after executing "add user admin password 12345", the configuration item is added; after executing "delete user admin", the configuration item is deleted. When updating the configuration state, check whether the new command is inconsistent with the current configuration state. If the configuration item already exists and the new command attempts to add the configuration item, a conflict may occur. If the configuration item has been deleted and the new command attempts to delete it, a conflict will occur. If the command attempts to modify a non-existent configuration item, a conflict will also occur. Once a conflict is detected, the conflict is recorded in the log for subsequent audit and analysis. Relevant personnel are notified in a timely manner and corrective measures are taken. To avoid further conflicts, subsequent commands can be stopped and the operation and maintenance team can be asked to resolve the issue.

[0056] The filtering query operation includes being implemented by identifying specific keywords containing the query operation in the command.

[0057] First, identify keywords that may be used for query operations. These keywords may include "show", "display", "list", "view", etc., which are often used to represent query operations. Traverse each record in the command log and scan each record to find commands containing the specified keywords. Identify the location of the keyword in the command. For example, in "show configuration", the word "show" appears at the beginning of the command, indicating that this is a query operation. Once it is identified that this is a query operation, filter the operation out of the command log and do not include it in the configuration change item.

[0058] Semantic analysis includes using natural language processing technology to parse the command syntax. The extracted key configuration information is converted into vector form through embedding technology, which includes part-of-speech and dependency information, as well as key configuration information in the command. The vector is further integrated into a comprehensive feature representation through a multi-layer perceptron. The serialized comprehensive features are processed through an LSTM network to capture long-term dependencies. At the same time, the importance of key information is emphasized through the attention mechanism. The fully connected layer and softmax function are used to predict the operational intent of the command.

[0059] In semantic analysis, the command is parsed to extract keywords and command structure. The output of this step will provide semantic understanding and data support for subsequent operation intention analysis. Based on the results of semantic analysis, the operation intention of the command is inferred and analyzed. The results of operation intention analysis will be used for integrated analysis and display to users, and are also one of the label data for model training.

[0060] To command The syntax analysis is expressed as:

[0061] ,

[0062] in, For command, For natural language processing analysis, For the command words, For the command Part of speech standards, For the command Dependency tags.

[0063] The vector form is expressed as:

[0064] ,

[0065] in, For slave commands The vector form of the key configuration information extracted from For slave commands The key configuration information extracted from is the word embedding matrix.

[0066] Word Embedding Matrix It consists of pre-trained word vectors, where each row corresponds to a word vector. Assume that the vocabulary size is , the dimension of the word vector is , then the word embedding matrix The shape is × . Specifically, No. The row represents the first Therefore, the word embedding matrix can be expressed as follows :

[0067] ,

[0068] in, is the first The word vector of each word, is the size of the vocabulary.

[0069] The comprehensive features are expressed as:

[0070] ,

[0071] in, is the comprehensive feature vector, is the vector concatenation operation, A multi-layer perceptron.

[0072] MLP consists of an input layer that receives raw data, two hidden layers, each containing multiple neurons, each of which performs a weighted sum of the output of the previous layer, plus a bias and passes it through a nonlinear activation function. The output layer converts the output of the hidden layer into the final prediction.

[0073] The first hidden layer is represented as:

[0074] ,

[0075] The second hidden layer is represented as:

[0076] ,

[0077] The output layer is represented as:

[0078] ,

[0079] in, is the output of the first hidden layer, is the hidden layer activation function, is the weight matrix of the first hidden layer, For input , is the bias vector of the first hidden layer, is the output of the second hidden layer, is the weight matrix of the second hidden layer, is the bias vector of the second hidden layer, is the predicted probability vector of the output, is the weight matrix of the output layer, is the bias vector of the output layer.

[0080] By modeling and training the operation intention, the model is optimized to improve the accuracy of prediction. The input data of the model training comes from the results of the operation intention analysis, and the output is the predicted operation intention.

[0081] Processing the serialized comprehensive features includes using the LSTM network to process the serialized comprehensive features, capturing long-distance dependencies, introducing the attention mechanism, calculating the weighted average command representation, classifying the weighted average command representation, using the softmax function to obtain the predicted intent, and using the cross entropy loss function for model training, which is expressed as:

[0082] ,

[0083] ,

[0084] ,

[0085] ,

[0086] ,

[0087] in, For time The comprehensive feature vector of the input, For the The hidden state of the LSTM at time steps, For the The hidden state of the LSTM at time steps, For time Attention weight, indicating the The importance of the word is the attention weight parameter vector, is the weight that maps the hidden state to the intermediate space, A bias to map the hidden state to the intermediate space, For the time steps, is the time step length of the input command, For the The hidden state of the LSTM at time steps, is the final vector of the command, To predict the intent of the command, is the intention prediction weight, is the intention prediction bias, is the cross entropy loss function, For the Test samples, is the number of test samples, is the real intention label, To predict the intent label; the model is trained until the value of the loss function is lower than the preset loss function threshold, and the training stops.

[0088] S3. Perform operation intention analysis and determine the accuracy of the operation intention analysis based on the command context.

[0089] Operation intention analysis includes combining context and command content, expressed as:

[0090] ,

[0091] ,

[0092] in, For in time The result of the command operation intention analysis is The number of commands recorded for the preceding or following command, For the The timestamp of the command, is the standard deviation of the Gaussian distribution, which is used to measure the influence of the temporal context. For the above or below The vector form of the command, It is a complex information filtering function used to extract key information from the command content. is the normalization factor, For command The prior probability of a command indicates the frequency of the command appearing in all commands. Considering the influence of the time context, the time-weighted model is used to analyze the commands, understand the logic and dependencies in the command sequence, and improve the accuracy of the operation intention analysis.

[0093] It shows the effect of time difference on weight, giving higher weight to commands whose timestamps are close to the current command.

[0094] By combining the temporal context and normalized importance of commands, the weighted average of Gaussian weights and command importance differences is used to accurately analyze the user's operation intention at a specific time point. Not only the temporal proximity of commands is considered, but also the influence of each command is adjusted through prior probability, thereby effectively improving the accuracy and context sensitivity of intent recognition.

[0095] Calculate the cosine similarity to determine the accuracy of intent recognition, expressed as:

[0096] ,

[0097] in, is the cosine similarity; set the similarity high threshold and similarity low threshold. If the similarity is greater than the high threshold, the prediction result is judged to be correct and the predicted intention is directly used as the final result. Because the operation intention analysis result and the predicted result are very similar, the predicted result is output to the user as the final operation intention. If the similarity is greater than the low similarity threshold and less than or equal to the high similarity threshold, the prediction result is judged to be partially correct. The difference between the predicted result and the actual result is analyzed and the cause of the difference is determined. This may include model limitations, insufficient data or inaccurate labels. The prediction model is corrected or optimized based on the analysis results. Possible corrections include adjusting model parameters, adding more training data, improving feature engineering or adopting more advanced algorithms. The corrected model is verified and evaluated, and the character instruction intent recognition is re-performed to ensure the effectiveness of the correction and the accuracy of the improvement. If If the similarity is less than or equal to the low threshold, the prediction result is judged to be wrong. The significant difference between the prediction result and the actual result is analyzed, and the cause of the prediction error is determined. The model is rebuilt and the character instruction intention recognition is re-performed.

[0098] S4. Integrate the analysis results and display the user's command execution status and operation intention in time series.

[0099] Example 2

[0100] Reference Figure 2 , which is the second embodiment of the present invention, is different from the previous embodiment in that it provides a character instruction intention recognition system, including: a data acquisition module, an operation intention recognition module, an accuracy judgment module and a display module.

[0101] The data acquisition module is used to collect command records, preprocess the command records and extract key configuration information, and use keyword extraction to extract key configuration information from the command records.

[0102] The operation intention recognition module is used to perform semantic analysis on the key configuration information of the command record and identify the operation intention of the command.

[0103] The accuracy judgment module is used to perform operation intention analysis and judge the accuracy of the operation intention analysis based on the context.

[0104] The display module is used to integrate the analysis results and display the user's command execution status and operation intention in time series.

[0105] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, 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. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments 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, etc., which can store program codes.

[0106] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.

[0107] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.

[0108] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0109] Example 3

[0110] The third embodiment of the present invention is different from the first two embodiments in that it is used to verify the technical effects adopted in the present invention in order to verify the real effects of the method.

[0111] Use a real or synthetic operation and maintenance command dataset that contains a variety of normal operations and abnormal behaviors, including 10,000 operation and maintenance command records, of which 80% are normal operations and 20% are abnormal behaviors. Evaluation indicators include accuracy, generalization ability, need for manual intervention, audit report clarity, ability to respond to new threats, operation and maintenance audit cost, training cost, and efficiency. The traditional method is a traditional rule-based method that relies on predefined rules to identify and classify commands. Compare the performance of the two methods in different scenarios, including normal operations, abnormal behaviors, complex commands, etc. Ensure that the two methods are run under the same conditions, such as the same dataset, similar computing resources, and execution time.

[0112] This embodiment uses the traditional method and the method of the present invention to perform detection simultaneously, and the detection comparison results are shown in the following table:

[0113] Table 1 Comparison table between traditional method and the method of the present invention

[0114] index Traditional methods Method of the present invention Accuracy 85% 98% Generalization 40% 90% Human intervention required 80 times / month 10 times / month Clarity of audit reports 60% 95% Ability to respond to new threats 50% 95% efficiency 30 commands / hour 100 commands / hour

[0115] In terms of accuracy, the method of the present invention reaches 98%, which is much higher than the 85% of the traditional method, which means that the method of the present invention can more accurately identify the user's operating intention.

[0116] In terms of generalization ability, the method of the present invention exhibits a generalization ability of 90%, while the traditional method only has 40%, which indicates that the method of the present invention can better handle unseen data and complex scenarios.

[0117] In terms of the need for manual intervention, the method of the present invention significantly reduces the number of manual interventions from 80 times per month to 10 times, which not only reduces labor costs but also improves the degree of automation of the system.

[0118] In terms of audit report clarity, the method of the present invention provides 95% clarity, which is much higher than the 60% of the traditional method, which means that the generated report is easier to understand and helps the work of auditors.

[0119] In terms of the ability to respond to new threats, the method of the present invention demonstrated 95% of the ability, far exceeding the 50% of the traditional method, which shows that the method of the present invention can more effectively identify and respond to threats.

[0120] Finally, in terms of efficiency, the method of the present invention can process 100 commands per hour, while the traditional method can only process 30 commands, which improves the speed and efficiency of processing commands.

[0121] In summary, it is fully demonstrated that the character instruction intention recognition method of the present invention has significant beneficial effects in terms of accuracy, efficiency and automation compared with traditional methods.

[0122] 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 preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.

Claims

1. A method for character instruction intention recognition, characterized in that: include, Collect command records, pre-process command records and extract key configuration information, and use keyword extraction to extract key configuration information from command records; Perform semantic analysis on key configuration information recorded by commands to identify the operational intent of commands; Conduct operation intention analysis and judge the accuracy of the operation intention analysis based on the command context; Integrate the analysis results to display the user's command execution and operation intention in time series; The command record includes command content, timestamp and user information; The preprocessing includes cleaning the original command records to remove unnecessary special characters, spaces and format inconsistencies; The key configuration information extraction includes the extraction of newly added configurations, the extraction of deleted configurations, the detection of conflicting configurations, and the filtering query operation; The extracting of the newly added configuration includes identifying and extracting information of the newly added configuration by searching for specific keywords related to the newly added configuration in the command record; The extraction of the deletion configuration includes identifying and extracting the deletion configuration information by searching for specific keywords related to the deletion configuration in the command record; The detection of the conflicting configurations includes identifying whether commands executed at different times perform contradictory or conflicting operations on the same configuration item; The filtering query operation includes being implemented by identifying specific keywords containing query operations in commands; The semantic analysis includes using natural language processing technology to perform syntax analysis on commands, converting the extracted key configuration information into vector form through embedding technology, integrating the vector into comprehensive feature representation through a multi-layer perceptron, processing the serialized comprehensive features through an LSTM network to capture long-term dependencies, and emphasizing the importance of key information through an attention mechanism, and using a fully connected layer and a softmax function to predict the operational intent of the command; The syntax analysis of command c is expressed as: C=NLP Parse (C)→{(w1,p1,d1),(w2,p2,d2),…,(w n ,p n ,d n )} Among them, C is the command, NLP Parse For natural language processing parsing, w n is the nth word of the command, p n is the nth part-of-speech standard of the command, d n is the nth dependency label of the command; The vector form is expressed as, K=E(k) Among them, K is the vector form of the key configuration information extracted from command C, k is the key configuration information extracted from command C, and E is the word embedding matrix; The comprehensive feature is expressed as, Among them, x is the comprehensive feature vector, is the concatenation operation of vectors, and MLP is a multi-layer perceptron; The processing of the serialized comprehensive features includes using an LSTM network to process the serialized comprehensive features, capturing long-distance dependencies, introducing an attention mechanism, calculating the weighted average command representation, classifying the weighted average command representation, using a softmax function to obtain the predicted intent, and using a cross entropy loss function to train the model, which is expressed as: h t =LSTM(x t ,h t-1 ;Θ LSTM ) Among them, x t is the comprehensive feature vector input at time t, h t is the hidden state of the LSTM at the tth time step, h t-1 is the hidden state of the LSTM at the t-1th time step, Θ LSTM is the parameter of the LSTM layer, α t is the attention weight at time t, indicating the importance of the i-th word in the command, w a is the attention weight parameter vector, W h is the weight that maps the hidden state to the intermediate space, b h is the bias for mapping the hidden state to the intermediate space, e is the e-th time step, T is the time step length of the input command, and h e is the hidden state of the LSTM at the e-th time step, v(C) is the final vector of the command, is the command intention prediction, W c is the intention prediction weight, b c is the intention prediction bias, L(Θ) is the cross entropy loss function, M is the number of test samples, j is the jth test sample, and y j is the real intention label, To predict the intent label; The model is trained until the value of the loss function is lower than the preset loss function threshold, and then the training stops; The operation intention analysis includes combining context commands and command content, expressed as: Where I is the result of the analysis of the command operation intention at time t, A is the number of command records in the previous or next context, and t a is the timestamp of the ath command, σ is the standard deviation of the Gaussian distribution, C a is the vector form of the ath command above or below, g(C a ) is a complex information filtering function, τ is the normalization factor, P(C a ) is the command C a The prior probability of Calculate the cosine similarity to determine the accuracy of intent recognition, expressed as, Among them, Cos is the cosine similarity; If Cos is greater than the high similarity threshold, the prediction result is judged to be correct, and the predicted intention is directly used as the final result. The operation intention analysis result and the predicted result are very similar, and the predicted result is output to the user as the final operation intention; If Cos is greater than the low similarity threshold and less than or equal to the high similarity threshold, the prediction result is judged to be partially correct. The difference between the prediction result and the actual result is analyzed, and the cause of the difference is determined. The prediction model is corrected or optimized according to the analysis result, and the corrected model is verified and evaluated, and the character instruction intention recognition is performed again; If Cos is less than or equal to the similarity low threshold, the prediction result is judged to be wrong. The significant difference between the prediction result and the actual result is analyzed, and the cause of the prediction error is determined. The model is rebuilt and the character instruction intention recognition is re-performed.

2. A system using a character instruction intention recognition method as claimed in claim 1, characterized in that: Including data collection module, operation intention recognition module, accuracy judgment module and display module; The data acquisition module is used to collect command records, pre-process the command records and extract key configuration information, and use keyword extraction to extract key configuration information from the command records; The operation intention recognition module is used to perform semantic analysis on key configuration information of command records to recognize the operation intention of the command; The accuracy judgment module is used to perform operation intention analysis and judge the accuracy of the operation intention analysis in combination with the context; The display module is used to integrate the analysis results and display the user's command execution status and operation intention in time series.

3. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the character instruction intention recognition method described in claim 1 are implemented.

4. A 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 a method for character instruction intention recognition described in claim 1 are implemented.