Operation instruction data analysis method and device, computer equipment and storage medium
By extracting and clustering multiple feature views of database operation instructions, the problem that operation and maintenance personnel can find it difficult to accurately locate problem SQL in massive SQL templates, and achieve more efficient database operation and maintenance.
Patent Information
- Application Number
- CN202411702640.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-03-07
AI Technical Summary
In database operation and maintenance, with the growth of business volume, the number of SQL and templates is huge, making it difficult for operation and maintenance personnel to accurately detect SQL and positioning performance problems from massive templates.
By obtaining the operation instruction sample set, feature information of multiple feature types is extracted, feature views corresponding to each feature type, potential representation information of each feature view, consistency information of feature view, and cluster analysis is performed to improve the accuracy of operation instruction data analysis.
This method can more accurately analyze operation instruction data, improve the ability to identify problem SQL and perform performance problems, and reduce the time and cost of operation and maintenance personnel to check.
Smart Images

Figure CN119577452A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of database technology, and in particular to an operation instruction data analysis method, device, computer equipment, storage medium and computer program product. Background Art
[0002] In the information age, especially in the era of booming cloud computing, databases are widely used as infrastructure to meet the business needs of various industries. With the increase in database instances, higher requirements are also placed on database operation and maintenance capabilities. With the increase in business needs, database failure events also occur frequently, causing large economic losses. At the database operation and maintenance level, the key to solving database failure problems is to quickly locate the problematic operation instruction statement, such as SQL.
[0003] The method adopted in the related technology is to count and sort the collected full amount of SQL in the form of templates, and provide them to operation and maintenance personnel for analysis. The operation and maintenance personnel then find the problematic SQL that causes database failure from these SQL templates.
[0004] Although related technologies provide operation and maintenance personnel with the ability to query and analyze problematic SQL statements, as business volume grows, the number of SQL statements and templates will also become huge. Even if they are aggregated and sorted through templates, it is difficult for operation and maintenance personnel to accurately troubleshoot problematic SQL statements and locate performance issues one by one from massive templates. Summary of the invention
[0005] Based on this, it is necessary to provide an operation instruction data analysis method, device, computer equipment, computer-readable storage medium and computer program product that can improve the accuracy of operation instruction data analysis in response to the above technical problems.
[0006] In a first aspect, the present application provides an operation instruction data analysis method, comprising:
[0007] Acquire an operation instruction sample set; wherein the operation instruction sample set includes a plurality of operation instruction samples within a preset time period;
[0008] For each of the operation instruction samples, extract feature information of multiple feature types, and construct a feature view corresponding to each of the feature types;
[0009] Extracting potential representation information of each of the feature views, and determining consistency information of each of the feature views according to the potential representation information;
[0010] Cluster analysis is performed on each of the operation instruction samples according to the consistency information to obtain a cluster analysis result.
[0011] In one embodiment, extracting feature information of multiple feature types and constructing a feature view corresponding to each feature type includes:
[0012] Extracting statement features and instruction execution results corresponding to the operation instruction sample, and constructing an instruction statement feature view;
[0013] Extracting computing resource usage data corresponding to the operation instruction sample and constructing a resource feature view;
[0014] The engine state information corresponding to the operation instruction sample is extracted, and a state feature view is constructed.
[0015] In one embodiment, extracting potential representation information of each of the feature views includes:
[0016] For each of the feature views, an autoencoder is assigned; wherein the autoencoder includes a multilayer perceptron;
[0017] The original feature matrix of the feature view is input into the autoencoder to obtain potential representation information of the feature view.
[0018] In one embodiment, determining the consistency information of each of the feature views according to the potential representation information includes:
[0019] The potential representation information is input into a fusion learning model to obtain consistency information of the multiple feature views; wherein the fusion learning model includes a multilayer perceptron for weighted fusion of the potential representation information of the multiple feature views.
[0020] In one embodiment, performing cluster analysis on each of the operation instruction samples according to the consistency information to obtain a cluster analysis result includes:
[0021] Using a consistent clustering algorithm, determining a cluster center according to the consistent information;
[0022] Calculating the probability that the operation instruction sample belongs to each cluster according to the cluster center to obtain probability distribution information;
[0023] A cluster analysis result is obtained according to the probability distribution information.
[0024] In one embodiment, after obtaining the cluster analysis result according to the probability distribution, the method further includes:
[0025] For each cluster, generating a cluster analysis view according to the cluster analysis result;
[0026] Acquire data monitoring indicators, and add the data monitoring indicators to the cluster analysis view to obtain an aggregate monitoring view;
[0027] In response to the exception handling instruction, abnormal problem information is acquired, and abnormal characteristic data is determined according to the abnormal problem information;
[0028] The abnormal operation instruction is located according to the aggregated monitoring view and the abnormal characteristic data.
[0029] In a second aspect, the present application further provides an operation instruction data analysis device, comprising:
[0030] A data acquisition module, used to acquire an operation instruction sample set; wherein the operation instruction sample set includes a plurality of operation instruction samples within a preset time period;
[0031] A view construction module, used for extracting feature information of multiple feature types for each of the operation instruction samples, and constructing a feature view corresponding to each of the feature types;
[0032] An information processing module, configured to extract potential representation information of each of the feature views, and determine consistency information of each of the feature views according to the potential representation information;
[0033] The cluster analysis module is used to perform cluster analysis on each of the operation instruction samples according to the consistency information to obtain a cluster analysis result.
[0034] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0035] Acquire an operation instruction sample set; wherein the operation instruction sample set includes a plurality of operation instruction samples within a preset time period;
[0036] For each of the operation instruction samples, extract feature information of multiple feature types, and construct a feature view corresponding to each of the feature types;
[0037] Extracting potential representation information of each of the feature views, and determining consistency information of each of the feature views according to the potential representation information;
[0038] Cluster analysis is performed on each of the operation instruction samples according to the consistency information to obtain a cluster analysis result.
[0039] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0040] Acquire an operation instruction sample set; wherein the operation instruction sample set includes a plurality of operation instruction samples within a preset time period;
[0041] For each of the operation instruction samples, extract feature information of multiple feature types, and construct a feature view corresponding to each of the feature types;
[0042] Extracting potential representation information of each of the feature views, and determining consistency information of each of the feature views according to the potential representation information;
[0043] Cluster analysis is performed on each of the operation instruction samples according to the consistency information to obtain a cluster analysis result.
[0044] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0045] Acquire an operation instruction sample set; wherein the operation instruction sample set includes a plurality of operation instruction samples within a preset time period;
[0046] For each of the operation instruction samples, extract feature information of multiple feature types, and construct a feature view corresponding to each of the feature types;
[0047] Extracting potential representation information of each of the feature views, and determining consistency information of each of the feature views according to the potential representation information;
[0048] Cluster analysis is performed on each of the operation instruction samples according to the consistency information to obtain a cluster analysis result.
[0049] The above-mentioned operation instruction data analysis method, device, computer equipment, storage medium and computer program product obtain a plurality of operation instruction samples within a preset time period by acquiring an operation instruction sample set, extracting feature information of a plurality of feature types for each operation instruction sample, and constructing a feature view corresponding to each feature type, so that a plurality of feature views at different angles can be obtained for each operation instruction sample, and then extracting the potential representation information of each feature view, which can fully represent the potential characteristics of the operation instruction behavior, and determining the consistency information of each feature view based on the potential representation information, and performing cluster analysis on each operation instruction sample based on the consistency information, so as to obtain a cluster analysis result that can fully consider a plurality of feature views, thereby improving the accuracy of operation instruction data analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0051] Figure 1 A diagram of an application environment of an operation instruction data analysis method in an embodiment;
[0052] Figure 2 A schematic diagram of a flow chart of an operation instruction data analysis method in one embodiment;
[0053] Figure 3 is a flow chart of an operation instruction data analysis method in another embodiment;
[0054] Figure 4 is a structural block diagram of an operation instruction data analysis device in one embodiment;
[0055] Figure 5 is an internal structure diagram of a computer device in one embodiment;
[0056] Figure 6 FIG. 4 is a diagram showing the internal structure of a computer device in another embodiment. DETAILED DESCRIPTION
[0057] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0058] The operation instruction data analysis method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The terminal 102 can be used to receive operation commands, generate operation instructions according to the operation commands and send them to the server 104. It can also be used to receive the cluster analysis results obtained by the server 104, generate views from the cluster analysis results and display them. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The data storage system can be used to store information such as operation instruction sample sets, extracted feature information, and constructed feature views. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented with an independent server or a server cluster consisting of multiple servers.
[0059] In an exemplary embodiment, Figure 2 As shown, a method for analyzing operation instruction data is provided, and the method is applied to Figure 1 The server 104 in the example is used as an example to illustrate the method, which includes the following steps S202 to S208. Among them:
[0060] Step S202, obtaining an operation instruction sample set.
[0061] The operation instruction sample set includes a plurality of operation instruction samples within a preset time period. The operation instruction sample set may be a SQL (Structured Query Language, Structured Query Language) sample data set.
[0062] For example, the server 104 may collect all SQL sample data occurring in the database within the preset time period to be analyzed according to the preset time period input by the user through the terminal 102, thereby generating an operation instruction sample set. Taking the MySQL operation and maintenance scenario as an example, the server 104 may input a set of SQL sample sets occurring within the past 3 hours corresponding to a group of database instances.
[0063] Step S204: for each operation instruction sample, extract feature information of multiple feature types, and construct a feature view corresponding to each feature type.
[0064] In addition to the SQL features of the SQL sample itself, it is also closely related to the changes in database resource usage and database engine status during SQL execution. These feature data from different sources can be considered as observations of SQL behavior from different angles. The integration of these multi-angle features will enrich the behavioral feature representation of the SQL sample, thereby improving the accuracy of SQL analysis.
[0065] For example, the server 104 may extract the statement features and instruction execution results corresponding to the operation instruction samples to construct the instruction statement feature view; extract the computing resource usage data corresponding to the operation instruction samples to construct the resource feature view; extract the engine state information corresponding to the operation instruction samples to construct the state feature view. Furthermore, after obtaining the feature data of multiple views of all SQL samples, the server 104 may normalize the feature matrix of each view respectively.
[0066] Exemplarily, the statement feature view may be an SQL feature view, which includes SQL syntax and SQL execution result features; SQL features include statement features and execution results. In this embodiment, statement features are represented by a 0-1 feature matrix, where the feature column name is an SQL keyword, such as Join, Group By, Order By, etc., and the feature value is 0 or 1, indicating whether the SQL sample contains this keyword; the execution result represents the features of the SQL run, including execution time, lock wait time, number of affected rows, and number of returned rows. The statement features and execution result features are concatenated along the X-axis to obtain a feature matrix of the SQL feature view.
[0067] For example, the resource feature view may be a database resource view, which the server 104 may obtain from a database resource monitoring service and define a sampling time window. , the step length is Each SQL statement starts with the execution start time. The step length in time is The monitoring indicator data of the resource is used as a feature, and multiple different resource indicator features are spliced along the X-axis. The collection method of database resource features can be: server 104 collects the host resource monitoring of the database through node-exporter, and summarizes it into the Prometheus monitoring service, and selects the database key indicators for analysis. In this implementation, processor usage, memory usage, disk usage, traffic throughput, user data space and binlog usage are selected. In this embodiment, a sampling time window can be defined The time interval is 2 minutes and the step length is 5 seconds. Each SQL sample uses the monitoring indicator data within 2 minutes from the start time of execution as the feature. Multiple different resource indicator features are spliced along the X-axis to obtain the feature matrix of the database resource view.
[0068] For example, the state feature view may be a database engine view, which the server 104 may obtain from a database engine monitoring service and define a sampling time window. , the step length is Each SQL statement starts with the execution start time. The step length in time is The monitoring indicator data is used as a feature, and multiple different database engine features are spliced along the X-axis. The database engine status feature is collected as follows: Server 104 collects the status monitoring of the database innodb engine through mysql-exporter, and summarizes it into the Prometheus monitoring service, and selects key indicators. In this implementation, the number of session connections, connection usage rate, number of executions of each type of SQL and number of affected rows, temporary table size, buffer pool throughput, buffer pool hit rate, dirty page ratio, number of slow SQL, number of row locks and number of deadlocks are selected. In this embodiment, the sampling time window is defined The step length is 2 minutes and 5 seconds. Each SQL sample uses the engine monitoring indicator within 2 minutes from the start time of execution as the feature. Multiple different indicator features are spliced along the X-axis to obtain the feature matrix of the database engine status view.
[0069] Step S206: extracting potential representation information of each feature view, and determining consistency information of each feature view according to the potential representation information.
[0070] Exemplarily, the server 104 may allocate an autoencoder for each feature view; wherein the autoencoder includes a multi-layer perceptron; and the original feature matrix of the feature view is input into the autoencoder to obtain potential representation information of the feature view.
[0071] Furthermore, the server 104 may input the feature view into a specific view learning model, and perform feature data analysis on the feature views of the input SQL sample. By building a specific view learning model, we can extract unique information that is beneficial to clustering from the original feature matrix of each view. The specific view learning model includes An autoencoder network, where Indicates the number of views. The autoencoder can include two submodules: encoder and decoder. The encoder can be composed of two MLP (multi-layer perceptron) layers.
[0072] In this embodiment, the specific view learning model ,Include An autoencoder network, the autoencoder contains two submodules, the encoder and the decoder. The encoder consists of two layers of MLP layers. The encoder of each view can be expressed as:
[0073]
[0074] in, Represents the original feature Enter the A specific view learning model is used to obtain a latent representation. and is the model weight parameter of the two-layer MLP of the encoder, Set to 3, indicating the number of views. In this embodiment, the first hidden layer dimension of the encoder is 64, the second hidden layer dimension is 32, and Represents the bias parameter, activation function is the ReLU function.
[0075] Furthermore, the decoder is the reverse process of the encoder, which is used to reconstruct the potential representation. The decoder of each view consists of two MLP layers, which can be expressed as:
[0076]
[0077] in, represents the feature matrix obtained by reverse decoding of the decoder, and is the model weight parameter of the two-layer MLP of the decoder, and the reconstructed feature matrix output by the decoder The original feature matrix The feature dimensions of It can be set to 3, indicating the number of views. In this embodiment, the first hidden layer dimension of the decoder is 64, and the second hidden layer dimension is the original feature matrix The characteristic dimension of and Represents the bias parameter, activation function is the ReLU function.
[0078] The view-specific learning model is composed of It consists of an autoencoder network, which aims to learn the unique information of each view feature. Its loss function can be formulated as , guiding the uniqueness learning of multi-view models.
[0079]
[0080] in, represents the bitwise multiplication operator, Indicates The weight of each view is a hyperparameter used to measure the importance of different views. By minimizing the L2 loss function of the view-specific learning model, each potential representation retains the unique information of the original view features as much as possible. In this embodiment, the weights of the three views can be set to [0.4, 0.6, 0.6] respectively.
[0081] Next, the server 104 may input the potential representation information into a fusion learning model to obtain consistency information of multiple feature views; wherein the fusion learning model includes a multi-layer perceptron for weighted fusion of the potential representation information of multiple feature views.
[0082] Furthermore, the server 104 may , establish a multi-view fusion learning model , which is used to learn the consistency information in multi-view features and obtain a potential representation for clustering. In this embodiment, the multi-view fusion learning model can combine the potential representations of all views into Perform weighted fusion and use two layers of MLP to learn the consistency information between views, which can be formulated as:
[0083]
[0084] in, represents the potential representation obtained by multi-view fusion, represents the fusion weight of each view, set to , Indicates the number of views, and are the weight parameters of the two MLP layers, and Represents the bias parameter, activation function is the ReLU function. In this embodiment, the hidden dimension of the two-layer MLP is set to 32, that is, the fusion potential representation The dimension is 32, the number of views Set to 3.
[0085] The multi-view fusion learning model aims to learn the consistency information between multiple views and obtain the fused potential representation for downstream clustering tasks. Its loss function can be defined as , guiding the learning of consistency information of multi-view models.
[0086]
[0087] By minimizing the sum of the L2 losses between the fused latent representation Z and the latent representation hi of a specific view, the fused latent representation Z is made to contain as much consistency information in the feature view as possible.
[0088] Step S208: performing cluster analysis on each operation instruction sample according to the consistency information to obtain a cluster analysis result.
[0089] Exemplarily, the server 104 may use a consistency clustering algorithm to determine cluster centers according to consistency information, calculate the probability that the operation instruction sample belongs to each cluster according to the cluster centers, obtain probability distribution information, and obtain cluster analysis results according to the probability distribution information.
[0090] For example, the server 104 may use a consensus clustering algorithm to estimate clusters. , the consensus clustering algorithm sets the upper limit of the estimated clustering cluster to , and the maximum number of clusters Set to 10, the clustering clusters estimate the optimal number of clusters , for the above fusion potential representation Perform K-means clustering to obtain cluster centers ,Compute Fusion Latent Representation Samples and cluster centers The probability distribution of soft labels , It is a probability estimate of the sample cluster label, indicating that the sample Belongs to cluster The probability of , initialized using Student's T distribution, can be formulated as:
[0091]
[0092] in, Representation Fusion Latent Representation Samples in , Indicates The cluster centers, Represents the set of all cluster centers.
[0093] Next, the server 104 will Samples with medium confidence are used as target distributions to guide clustering , The calculation method is:
[0094]
[0095] in, represents the i-th sample, Indicates The cluster centers, represents the set of all cluster centers, Statistical samples are clustered to the cluster center The loss function of the deep clustering model is minimized by and distributed Loss is used to improve the confidence of clustering results, thereby improving the accuracy of clustering. The clustering loss function The calculation method is:
[0096]
[0097] Finally, the overall loss function L of the multi-view learning model is composed of the above uniqueness loss function , consistency loss function With clustering loss function Composition, taking into account the uniqueness and consistency information of multiple views and the downstream clustering tasks, the total loss function can be formulated as:
[0098]
[0099] in, , and is the balance coefficient of the loss function, which is set to [0.5, 0.8, 0.6] in this embodiment. The model training uses the Adam optimizer for back propagation training, the learning rate is set to 0.0001, the other parameters use the default values, the maximum training epochs is 100, and the optimal model is saved. Finally, the SQL sample data is input into the above model to obtain the fusion potential representation And perform the last K-means clustering to get the optimal clustering result .
[0100] In the above-mentioned operation instruction data analysis method, by acquiring an operation instruction sample set, multiple operation instruction samples within a preset time period are obtained. For each operation instruction sample, feature information of multiple feature types is extracted, and a feature view corresponding to each feature type is constructed, so that for each operation instruction sample, multiple feature views at different angles can be obtained, and then the potential representation information of each feature view is extracted, which can fully represent the potential characteristics of the operation instruction behavior, and the consistency information of each feature view is determined based on the potential representation information. According to the consistency information, each operation instruction sample is clustered and analyzed to obtain a cluster analysis result that can fully consider multiple feature views, thereby improving the accuracy of operation instruction data analysis.
[0101] In an exemplary embodiment, Figure 3 As shown, the above method may further include steps S302 to S308. Among them:
[0102] Step S302: for each cluster, generate a cluster analysis view according to the cluster analysis result.
[0103] For example, the server 104 may , each cluster It is a collection of SQL behaviors. For all SQL samples in each cluster, a cluster analysis view is generated. The cluster analysis view contains a list of all SQL samples in the cluster and the execution results of each SQL sample. These SQL samples can be further aggregated according to the execution time interval and SQL template to calculate the average execution time, average execution times, average lock waiting time, average number of scanned rows, and average number of returned rows.
[0104] Step S304: obtain data monitoring indicators, and add the data monitoring indicators to the cluster analysis view to obtain an aggregate monitoring view.
[0105] For example, the server 104 can add the data monitoring indicators to the cluster analysis view to obtain an aggregate monitoring view, which includes an aggregate monitoring image of each database indicator, an aggregate monitoring image of the monitoring indicators of the database resources and the database engine in the multi-view feature data, that is, when the user selects a monitoring indicator to view, the following algorithm can be used: each SQL sample in the cluster is aggregated from the execution start time The monitoring data of the selected indicator within the time is superimposed and the average value is calculated to obtain the aggregated monitoring image of this cluster.
[0106] Furthermore, for each database monitoring indicator, the server 104 can superimpose the monitoring data of each SQL sample in the cluster within 2 minutes from the start of execution, and then calculate the average value to obtain the aggregated monitoring image of this indicator in each cluster. By comparing and analyzing the SQL samples in different clusters and the aggregated monitoring image of each monitoring indicator, the resource type that causes abnormal changes in each cluster SQL can be quickly located, thereby analyzing the performance bottleneck of the corresponding SQL.
[0107] Step S306, in response to the exception handling instruction, obtain exception problem information, and determine exception feature data according to the exception problem information.
[0108] Exemplarily, server 104 can receive exception handling instructions from terminal 102, and can also respond to exception handling instructions automatically triggered by other servers to obtain current exception problem information, such as calculating the average execution time, average number of executions, average lock waiting time, average number of scanned rows, and average number of returned rows.
[0109] Step S308: locating the abnormal operation instruction according to the aggregated monitoring view and the abnormal characteristic data.
[0110] Exemplarily, the server 104 may determine abnormal feature data based on the abnormal problem information, and thereby query the aggregated monitoring view based on the abnormal feature data to determine the operation instruction for locating the abnormality, and send the locating result to the terminal 102 for display.
[0111] In the above embodiment, for a set of SQLs with the same behavior, further aggregate analysis can be performed based on the execution time interval and the SQL template. It also supports the calculation of aggregate monitoring views of various indicators and provides them to operation and maintenance personnel for viewing, which helps operation and maintenance personnel quickly locate problematic SQLs and the types of resources that are highly consumed by the SQLs.
[0112] In another exemplary embodiment, server 104 obtains an operation instruction sample set, obtains multiple operation instruction samples within a preset time period, and for each operation instruction sample, extracts statement features and instruction execution results corresponding to the operation instruction sample, and constructs an instruction statement feature view; extracts computing resource usage data corresponding to the operation instruction sample, and constructs a resource feature view; extracts engine status information corresponding to the operation instruction sample, and constructs a status feature view.
[0113] Next, the server 104 assigns an autoencoder including a multilayer perceptron to each feature view, and then inputs the original feature matrix of the feature view into the autoencoder to obtain the potential representation information of the feature view, and then inputs the potential representation information into the fusion learning model to obtain the consistency information of multiple feature views; wherein the fusion learning model includes a multilayer perceptron, which is used to weightedly fuse the potential representation information of multiple feature views.
[0114] Subsequently, the server 104 uses a consistency clustering algorithm to determine the cluster centers according to the consistency information, calculates the probability that the operation instruction sample belongs to each cluster according to the cluster centers, obtains probability distribution information, and then obtains cluster analysis results according to the probability distribution information.
[0115] Finally, the server 104 generates a cluster analysis view for each cluster according to the cluster analysis results, obtains data monitoring indicators, and adds the data monitoring indicators to the cluster analysis view to obtain an aggregate monitoring view. The server 104 responds to the exception handling instruction, obtains the exception problem information, determines the exception feature data according to the exception problem information, and locates the abnormal operation instruction according to the aggregate monitoring view and the exception feature data.
[0116] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0117] Based on the same inventive concept, the embodiment of the present application also provides an operation instruction data analysis device for implementing the operation instruction data analysis method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the one or more operation instruction data analysis device embodiments provided below can refer to the limitations of the operation instruction data analysis method above, and will not be repeated here.
[0118] In an exemplary embodiment, Figure 4 As shown, an operation instruction data analysis device is provided, including: a data acquisition module 402, a view construction module 404, an information processing module 406 and a cluster analysis module 408, wherein:
[0119] The data acquisition module 402 is used to acquire an operation instruction sample set; wherein the operation instruction sample set includes a plurality of operation instruction samples within a preset time period;
[0120] A view construction module 404 is used to extract feature information of multiple feature types for each operation instruction sample and construct a feature view corresponding to each feature type;
[0121] An information processing module 406 is used to extract potential representation information of each feature view and determine consistency information of each feature view according to the potential representation information;
[0122] The cluster analysis module 408 is used to perform cluster analysis on each operation instruction sample according to the consistency information to obtain a cluster analysis result.
[0123] In one embodiment, the view construction module 404 includes:
[0124] A first construction unit is used to extract the statement features and instruction execution results corresponding to the operation instruction sample, and construct an instruction statement feature view;
[0125] The second construction unit is used to extract computing resource usage data corresponding to the operation instruction sample and construct a resource feature view;
[0126] The third construction unit is used to extract engine state information corresponding to the operation instruction sample and construct a state feature view.
[0127] In one embodiment, the information processing module 406 includes: a potential information extraction unit, for assigning an autoencoder to each feature view; wherein the autoencoder includes a multi-layer perceptron; and inputting the original feature matrix of the feature view into the autoencoder to obtain the potential representation information of the feature view.
[0128] In one embodiment, the information processing module 406 also includes: a consistency information extraction unit, which is used to input the potential representation information into the fusion learning model to obtain the consistency information of multiple feature views; wherein the fusion learning model includes a multi-layer perceptron, which is used to weightedly fuse the potential representation information of multiple feature views.
[0129] In one embodiment, the cluster analysis module 408 is specifically used to: use a consistency clustering algorithm to determine the cluster center according to consistency information; calculate the probability that the operation instruction sample belongs to each cluster according to the cluster center to obtain probability distribution information; and obtain cluster analysis results according to the probability distribution information.
[0130] In one embodiment, the device further comprises:
[0131] The view analysis unit is used to generate a cluster analysis view for each cluster according to the cluster analysis results; obtain data monitoring indicators, and add the data monitoring indicators to the cluster analysis view to obtain an aggregate monitoring view;
[0132] The instruction response unit is used to respond to the exception handling instruction, obtain the exception problem information, and determine the exception feature data according to the exception problem information; locate the operation instruction where the exception occurs according to the aggregated monitoring view and the exception feature data.
[0133] Each module in the above-mentioned operation instruction data analysis device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0134] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 5As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used for a data storage system and can be used to store information such as an operation instruction sample set, extracted feature information, and constructed feature views. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an operation instruction data analysis method is implemented.
[0135] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 6 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, an operation instruction data analysis method is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0136] Those skilled in the art will understand that Figure 6The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0137] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the following steps when executing the computer program: obtaining an operation instruction sample set; wherein the operation instruction sample set includes multiple operation instruction samples within a preset time period; for each operation instruction sample, extracting feature information of multiple feature types, and constructing a feature view corresponding to each feature type; extracting potential representation information of each feature view, and determining consistency information of each feature view based on the potential representation information; and performing cluster analysis on each operation instruction sample based on the consistency information to obtain a cluster analysis result.
[0138] In one embodiment, when the processor executes the computer program, the following steps are also implemented: extracting statement features and instruction execution results corresponding to the operation instruction samples, and constructing an instruction statement feature view; extracting computing resource usage data corresponding to the operation instruction samples, and constructing a resource feature view; extracting engine status information corresponding to the operation instruction samples, and constructing a status feature view.
[0139] In one embodiment, when the processor executes the computer program, the following steps are also implemented: for each feature view, an autoencoder is assigned; wherein the autoencoder includes a multilayer perceptron; and the original feature matrix of the feature view is input into the autoencoder to obtain the potential representation information of the feature view.
[0140] In one embodiment, when the processor executes the computer program, the following steps are also implemented: inputting the potential representation information into a fusion learning model to obtain consistency information of multiple feature views; wherein the fusion learning model includes a multilayer perceptron for weighted fusion of the potential representation information of multiple feature views.
[0141] In one embodiment, when the processor executes the computer program, the following steps are also implemented: using a consistency clustering algorithm to determine the cluster center based on consistency information; calculating the probability that the operation instruction sample belongs to each cluster based on the cluster center to obtain probability distribution information; and obtaining a cluster analysis result based on the probability distribution information.
[0142] In one embodiment, the processor also implements the following steps when executing the computer program: for each cluster cluster, generate a cluster analysis view based on the cluster analysis results; obtain data monitoring indicators, and add the data monitoring indicators to the cluster analysis view to obtain an aggregate monitoring view; in response to an exception handling instruction, obtain abnormal problem information, and determine abnormal feature data based on the abnormal problem information; locate the abnormal operation instruction based on the aggregate monitoring view and the abnormal feature data.
[0143] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: obtaining an operation instruction sample set; wherein the operation instruction sample set includes multiple operation instruction samples within a preset time period; for each operation instruction sample, extracting feature information of multiple feature types, and constructing a feature view corresponding to each feature type; extracting potential representation information of each feature view, and determining consistency information of each feature view based on the potential representation information; and performing cluster analysis on each operation instruction sample based on the consistency information to obtain a cluster analysis result.
[0144] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: extracting statement features and instruction execution results corresponding to the operation instruction samples, and constructing an instruction statement feature view; extracting computing resource usage data corresponding to the operation instruction samples, and constructing a resource feature view; extracting engine status information corresponding to the operation instruction samples, and constructing a status feature view.
[0145] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented: for each feature view, an autoencoder is assigned; wherein the autoencoder includes a multilayer perceptron; and the original feature matrix of the feature view is input into the autoencoder to obtain the potential representation information of the feature view.
[0146] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented: inputting the potential representation information into a fusion learning model to obtain consistency information of multiple feature views; wherein the fusion learning model includes a multilayer perceptron for weighted fusion of the potential representation information of multiple feature views.
[0147] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: using a consistency clustering algorithm to determine the cluster center based on consistency information; calculating the probability that the operation instruction sample belongs to each cluster based on the cluster center to obtain probability distribution information; and obtaining a cluster analysis result based on the probability distribution information.
[0148] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: for each cluster cluster, a cluster analysis view is generated according to the cluster analysis results; data monitoring indicators are obtained, and the data monitoring indicators are added to the cluster analysis view to obtain an aggregate monitoring view; in response to an exception handling instruction, abnormal problem information is obtained, and abnormal feature data is determined according to the abnormal problem information; and the operation instruction where the abnormality occurs is located according to the aggregate monitoring view and the abnormal feature data.
[0149] In one embodiment, a computer program product is provided, including a computer program, which, when executed by a processor, implements the following steps: obtaining an operation instruction sample set; wherein the operation instruction sample set includes multiple operation instruction samples within a preset time period; for each operation instruction sample, extracting feature information of multiple feature types, and constructing a feature view corresponding to each feature type; extracting potential representation information of each feature view, and determining consistency information of each feature view based on the potential representation information; and performing cluster analysis on each operation instruction sample based on the consistency information to obtain a cluster analysis result.
[0150] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: extracting statement features and instruction execution results corresponding to the operation instruction samples, and constructing an instruction statement feature view; extracting computing resource usage data corresponding to the operation instruction samples, and constructing a resource feature view; extracting engine status information corresponding to the operation instruction samples, and constructing a status feature view.
[0151] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented: for each feature view, an autoencoder is assigned; wherein the autoencoder includes a multilayer perceptron; and the original feature matrix of the feature view is input into the autoencoder to obtain the potential representation information of the feature view.
[0152] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented: inputting the potential representation information into a fusion learning model to obtain consistency information of multiple feature views; wherein the fusion learning model includes a multilayer perceptron for weighted fusion of the potential representation information of multiple feature views.
[0153] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: using a consistency clustering algorithm to determine the cluster center based on consistency information; calculating the probability that the operation instruction sample belongs to each cluster based on the cluster center to obtain probability distribution information; and obtaining a cluster analysis result based on the probability distribution information.
[0154] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: for each cluster cluster, a cluster analysis view is generated according to the cluster analysis results; data monitoring indicators are obtained, and the data monitoring indicators are added to the cluster analysis view to obtain an aggregate monitoring view; in response to an exception handling instruction, abnormal problem information is obtained, and abnormal feature data is determined according to the abnormal problem information; and the operation instruction where the abnormality occurs is located according to the aggregate monitoring view and the abnormal feature data.
[0155] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0156] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0157] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0158] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for analyzing operation instruction data, characterized in that: The method comprises: Acquire an operation instruction sample set; wherein the operation instruction sample set includes a plurality of operation instruction samples within a preset time period; For each of the operation instruction samples, extract feature information of multiple feature types, and construct a feature view corresponding to each of the feature types; Extracting potential representation information of each of the feature views, and determining consistency information of each of the feature views according to the potential representation information; Cluster analysis is performed on each of the operation instruction samples according to the consistency information to obtain a cluster analysis result.
2. The method according to claim 1, characterized in that The step of extracting feature information of multiple feature types and constructing a feature view corresponding to each feature type includes: Extracting statement features and instruction execution results corresponding to the operation instruction sample, and constructing an instruction statement feature view; Extracting computing resource usage data corresponding to the operation instruction sample and constructing a resource feature view; The engine state information corresponding to the operation instruction sample is extracted, and a state feature view is constructed.
3. The method according to claim 1, characterized in that The extracting potential representation information of each of the feature views includes: For each of the feature views, an autoencoder is assigned; wherein the autoencoder includes a multilayer perceptron; The original feature matrix of the feature view is input into the autoencoder to obtain potential representation information of the feature view.
4. The method according to claim 3, characterized in that The determining, according to the potential representation information, the consistency information of each of the feature views includes: The potential representation information is input into a fusion learning model to obtain consistency information of the multiple feature views; wherein the fusion learning model includes a multilayer perceptron for weighted fusion of the potential representation information of the multiple feature views.
5. The method according to any one of claims 1 to 4, characterized in that: The performing cluster analysis on each of the operation instruction samples according to the consistency information to obtain a cluster analysis result includes: Using a consistent clustering algorithm, determining a cluster center according to the consistent information; Calculating the probability that the operation instruction sample belongs to each cluster according to the cluster center to obtain probability distribution information; A cluster analysis result is obtained according to the probability distribution information.
6. The method according to claim 5, characterized in that After obtaining the cluster analysis result according to the probability distribution, the method further includes: For each cluster, generating a cluster analysis view according to the cluster analysis result; Acquire data monitoring indicators, and add the data monitoring indicators to the cluster analysis view to obtain an aggregate monitoring view; In response to the exception handling instruction, abnormal problem information is acquired, and abnormal characteristic data is determined according to the abnormal problem information; The abnormal operation instruction is located according to the aggregated monitoring view and the abnormal characteristic data.
7. An operation instruction data analysis device, characterized in that: The device comprises: A data acquisition module, used to acquire an operation instruction sample set; wherein the operation instruction sample set includes a plurality of operation instruction samples within a preset time period; A view construction module, used for extracting feature information of multiple feature types for each of the operation instruction samples, and constructing a feature view corresponding to each of the feature types; An information processing module, configured to extract potential representation information of each of the feature views, and determine consistency information of each of the feature views according to the potential representation information; The cluster analysis module is used to perform cluster analysis on each of the operation instruction samples according to the consistency information to obtain a cluster analysis result.
8. 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 method according to any one of claims 1 to 6 are implemented.
9. 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 the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.