System and method for generating abnormal time series indicators based on natural language descriptions

By constructing an indicator sample library and training an anomaly time series indicator generator, and using natural language descriptions to generate anomaly time series indicators, the problems of high cost and high professional skill requirements in existing technologies are solved, and low-cost and highly flexible anomaly time series indicator generation is achieved.

CN116010374BActive Publication Date: 2026-02-06SHANGHAI NETIS TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202211500253.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-28
Publication Date
2026-02-06
Estimated Expiration
2042-11-28

AI Technical Summary

Technical Problem

Existing technologies are costly and lack flexibility when constructing abnormal time-series indicators, and require high professional skills from operators. They also cannot control the output of different types of data through natural language.

Method used

By constructing an indicator sample library and training an anomaly time series indicator generator, anomaly time series indicator data corresponding to the language description are generated using natural language description. By combining multiple anomaly indicator matrixing and operation and maintenance description text modeling, the professional level requirements of users are reduced, and the realism and flexibility of the system simulation data are increased.

Benefits of technology

The system enables the low-cost and highly flexible generation of abnormal time-series indicator data corresponding to natural language descriptions. It has the ability to simulate operation and maintenance indicators of different styles, making data simulation more comprehensive and convenient.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116010374B_ABST
    Figure CN116010374B_ABST
Patent Text Reader

Abstract

The application provides a natural language description-based abnormal time sequence index generation method and system, comprising the following steps: S1, constructing a typical index sample library; S2, constructing an abnormal time sequence index generator, and training the abnormal time sequence index generator by using the typical index sample library to obtain a trained abnormal time sequence index generator; and S3, generating an abnormal time sequence index based on natural language description by using the trained abnormal time sequence index generator. The application matrixes multiple abnormal indexes, so that the system can express the related phenomena of multiple indexes in a certain abnormal scenario, and the data simulation is more comprehensive.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of time series data processing, in particular, to a system and method for generating abnormal time series indicators based on natural language descriptions. BACKGROUND

[0002] In the field of intelligent operation and maintenance, data containing abnormal time series indicators is an important resource for building abnormal detection systems and evaluating the effectiveness of abnormal detection systems. For example, time series indicators such as "CPU occupancy rate", "memory occupancy rate", "disk throughput rate", and "service success rate" during CPU abnormality can be used to build and evaluate the "CPU abnormality monitoring sub-module". Currently, abnormal time series indicator data can be generated by professional operation and maintenance personnel through system simulation or rule-based simulation. However, simulation systems are costly and lack flexibility, rule-based simulation lacks authenticity, and using the above methods requires operators to have relevant professional backgrounds and skills.

[0003] Patent document CN115033386A (application number: 202210772022.4) discloses a time series data generation method, device and storage medium, which is used to improve the simulation accuracy and efficiency of non-stationary time series data. The time series data generation method disclosed in this application includes: performing hardware configuration; performing specific configuration according to the hardware configuration; constructing a time series data generation system according to the specific configuration; and generating time series data according to the time series data generation system. This patent needs to adjust the generated configuration according to specific requirements, which requires higher professional skills of the user and higher cost.

[0004] Patent document CN112926802A (application number: 202110354068.X) discloses a time series data adversarial sample generation method, system, electronic device and storage medium; the method includes training a time series prediction model using original time series data; calculating the maximum value of the loss function in the time series prediction model using a stochastic gradient descent optimization strategy; determining the corresponding noise according to the maximum value of the loss function; and generating a globally disturbed time series data adversarial sample by superimposing the noise on the original time series data. This patent uses an adversarial method to generate data, which guarantees the simulation of the data, but cannot obtain different types of data by controlling the input; the present application controls the output data type through natural language, and the input form of "natural language" reduces the technical background requirements of the user.

[0005] This invention proposes an anomaly time-series indicator generation system and method based on natural language description. This system and method receive anomalies described in natural language, generate anomaly time-series indicator data corresponding to the language description, and can generate anomalies with characteristics of a specific system (such as periodicity and stability) based on the system's historical indicator logs. This system and method reduce the construction cost of anomaly time-series indicators and improve flexibility and accuracy compared to existing methods. Summary of the Invention

[0006] To address the shortcomings of existing technologies, the purpose of this invention is to provide a method and system for generating abnormal time-series indicators based on natural language description.

[0007] A method for generating anomaly time-series indicators based on natural language description, provided by the present invention, includes:

[0008] Step S1: Construct an indicator sample library;

[0009] Step S2: Construct an abnormal time series indicator generator and train the abnormal time series indicator generator using the indicator sample library to obtain the trained abnormal time series indicator generator.

[0010] Step S3: Use the trained anomaly time series indicator generator to generate anomaly time series indicators based on natural language descriptions.

[0011] Preferably, step S1 employs:

[0012] Step S1.1: Collect indicator data based on a preset scenario to form an indicator dataset;

[0013] Step S1.2: Normalize the collected indicator data to obtain the normalized indicator dataset;

[0014] Step S1.3: Construct a sample library of abnormal indicators for a preset scenario based on the normalized indicator dataset;

[0015] Step S1.4: Construct a sample library of normal indicators for a preset scenario based on the normalized indicator dataset;

[0016] The preset scenarios include: CPU full utilization, CPU stoppage, memory full utilization, and network interruption;

[0017] The metrics include: CPU utilization, memory utilization, network throughput, and service success rate.

[0018] The anomaly indicator sample library is a binary tuple consisting of anomaly description text labels and corresponding anomaly indicator data matrices.

[0019] The normal index sample library is a binary tuple composed of a normal description text label and a corresponding index data matrix.

[0020] Preferably, the step S2 employs:

[0021] Step S2.1: constructing an abnormal time series index matrix generator, including a time series index matrix discriminator and a time series index matrix generator;

[0022] Step S2.2: constructing a sample set required by the time series index matrix discriminator, including a positive sample set and a negative sample set;

[0023] Step S2.3: optimizing the parameters of the current time series index matrix discriminator based on the sample set required by the time series index matrix discriminator;

[0024] Step S2.4: constructing a sample set required by the time series index matrix generator, each sample being [(text vector of preset length, random short vector), 1], wherein 1 represents a sample label;

[0025] Step S2.5: inputting the constructed sample set required by the time series index matrix generator into the current abnormal time series index matrix generator to obtain a corresponding discrimination label, optimizing the current time series index matrix generator based on the discrimination label and the sample label, repeatedly triggering steps S2.2 to S2.5 until the iteration number reaches a preset value, and obtaining a trained abnormal time series index matrix generator;

[0026] The positive sample set includes [(text vector of preset length, corresponding index data), 1], wherein 1 represents a positive sample.

[0027] The negative sample set includes [(text vector of preset length, time series index matrix), 0] and [(text vector of preset length not corresponding to the current time series index matrix, time series index matrix), 0], wherein 0 represents a negative sample.

[0028] Preferably, the abnormal time series index matrix generator employs:

[0029] Step S2.1.1: converting the description text label into a text vector of preset length;

[0030] Step S2.1.2: inputting the text vector of preset length and the random short vector into the time series index matrix generator to obtain a time series index matrix with a size consistent with the index data matrix;

[0031] Step S2.1.3: inputting the text vector of preset length and the time series index matrix into the time series index matrix discriminator to output 0 or 1; wherein 0 represents false; and 1 represents true.

[0032] Preferably, the step S3 employs:

[0033] Step S3.1: obtaining a time series index matrix based on the natural language description by using the trained abnormal time series index matrix generator;

[0034] Step S3.2: obtaining an abnormal index time series by analyzing the time series index matrix.

[0035] According to the abnormal time series index generation system based on natural language description provided by the application, the following technical effects can be achieved:

[0036] Module M1: constructing an index sample library;

[0037] Module M2: constructing an abnormal time series index generator, training the abnormal time series index generator by using the index sample library, and obtaining a trained abnormal time series index generator;

[0038] Module M3: generating an abnormal time series index based on a natural language description by using the trained abnormal time series index generator.

[0039] Preferably, the module M1 adopts:

[0040] Module M1.1: collecting index data based on a preset scene to form an index data set;

[0041] Module M1.2: performing normalization processing on the collected index data to obtain a normalized index data set;

[0042] Module M1.3: constructing a preset scene abnormal index sample library based on the normalized index data set;

[0043] Module M1.4: constructing a preset scene normal index sample library based on the normalized index data set;

[0044] The preset scene includes CPU full occupation, CPU stop, memory full occupation, and network interruption.

[0045] The index includes CPU occupation rate, memory occupation rate, network throughput rate, and service success rate.

[0046] The abnormal index sample library is a binary tuple composed of an abnormal description text label and a corresponding abnormal index data matrix.

[0047] The normal index sample library is a binary tuple composed of a normal description text label and a corresponding index data matrix.

[0048] Preferably, the module M2 adopts:

[0049] Module M2.1: constructing an abnormal time series index matrix generator, including a time series index matrix discriminator and a time series index matrix generator;

[0050] Module M2.2: Construct a sample set required by the timing index matrix discriminator, including a positive sample set and a negative sample set;

[0051] Module M2.3: Optimize the parameters of the current timing index matrix discriminator based on the sample set required by the timing index matrix discriminator;

[0052] Module M2.4: Construct a sample set required by the timing index matrix generator, each sample is [(text vector of preset length, random short vector), 1], wherein 1 represents a sample label;

[0053] Module M2.5: Input the constructed sample set required by the timing index matrix generator into the current abnormal timing index matrix generator to obtain a corresponding discrimination label, optimize the current timing index matrix generator based on the discrimination label and the sample label, repeatedly trigger modules M2.2 to M2.5 until the iteration number reaches a preset value, and obtain a trained abnormal timing index matrix generator;

[0054] The positive sample set includes: [(text vector of preset length, corresponding index data), 1], wherein 1 represents a positive sample;

[0055] The negative sample set includes: [(text vector of preset length not corresponding to the current timing index matrix, timing index matrix), 0] and [(text vector of preset length not corresponding to the current timing index matrix, timing index matrix), 0], wherein 0 represents a negative sample.

[0056] Preferably, the abnormal timing index matrix generator adopts:

[0057] Module M2.1.1: Convert the description text label into a text vector of a preset length;

[0058] Module M2.1.2: Input the timing index matrix generator based on the preset length of the text vector and the random short vector to obtain a timing index matrix with the same size as the index data matrix;

[0059] Module M2.1.3: Input the preset length of the text vector and the timing index matrix into the timing index matrix discriminator to output 0 or 1; wherein 0 represents false; 1 represents true.

[0060] Preferably, the module M3 adopts:

[0061] Module M3.1: Obtain the timing index matrix using the trained abnormal timing index matrix generator based on the natural language description;

[0062] Module M3.2: Analyze the timing index matrix to obtain an abnormal index timing.

[0063] Compared with the prior art, the present application has the following beneficial effects:

[0064] 1、 The present application can express the correlation of multiple indicators in a certain abnormal scenario by matrixing multiple abnormal indicators, so that the data simulation is more comprehensive;

[0065] 2、 The present application can generate corresponding operation and maintenance indicator data directly from the text by joint modeling of the matrixed indicators and operation and maintenance description text, so that the data simulation is more convenient and the professional level requirement of the user is reduced;

[0066] 3、 The present application can simulate operation and maintenance indicators of different styles (periodicity, trend) by adjusting the model style using a specific system scenario, thereby increasing the authenticity and flexibility of the system simulation data. BRIEF DESCRIPTION OF DRAWINGS

[0067] Other features, objects and advantages of the present application will become more apparent from the following detailed description of non-limiting embodiments with reference to the attached drawings:

[0068] Figure 1 The abnormal indicator generation model architecture diagram is shown.

[0069] Figure 2 The typical indicator sample library construction flowchart is shown.

[0070] Figure 3 The abnormal time series indicator base generator flowchart is shown.

[0071] Figure 4 The specific system historical data based indicator generator style adjustment flowchart is shown.

[0072] Figure 5 The natural language description based abnormal time series indicator generation flowchart is shown. DETAILED DESCRIPTION

[0073] The present application will be described in detail below with reference to specific embodiments. The following embodiments will help those skilled in the art to further understand the present application, but do not limit the present application in any form. It should be noted that those skilled in the art can make several changes and improvements without departing from the concept of the present application. These all belong to the protection scope of the present application.

[0074] Example 1

[0075] According to the abnormal time series indicator generation method based on natural language description provided by the present application, the method comprises the following steps:

[0076] Step S1: constructing an indicator sample library;

[0077] Step S2: constructing an abnormal timing indicator generator and training the abnormal timing indicator generator using the indicator sample library to obtain a trained abnormal timing indicator generator;

[0078] Step S3: generating an abnormal timing indicator based on the natural language description using the trained abnormal timing indicator generator.

[0079] Specifically, the step S1 adopts:

[0080] Step S1.1: collecting indicator data based on a preset scene to form an indicator data set;

[0081] Step S1.2: performing normalization processing on the collected indicator data to obtain a normalized indicator data set;

[0082] Step S1.3: constructing a preset scene abnormal indicator sample library based on the normalized indicator data set;

[0083] Step S1.4: constructing a preset scene normal indicator sample library based on the normalized indicator data set;

[0084] The preset scene includes: CPU full, CPU stop, memory full, and network interruption;

[0085] The indicators include: CPU occupancy rate, memory occupancy rate, network throughput rate, and service success rate;

[0086] The abnormal indicator sample library is a binary tuple composed of an abnormal description text label and a corresponding abnormal indicator data matrix;

[0087] The normal indicator sample library is a binary tuple composed of a normal description text label and a corresponding indicator data matrix.

[0088] Specifically, the step S2 adopts:

[0089] Step S2.1: constructing an abnormal timing indicator matrix generator, including a timing indicator matrix discriminator and a timing indicator matrix generator;

[0090] Step S2.2: constructing a sample set required by the timing indicator matrix discriminator, including a positive sample set and a negative sample set;

[0091] Step S2.3: optimizing the parameters of the current timing indicator matrix discriminator based on the sample set required by the timing indicator matrix discriminator;

[0092] Step S2.4: constructing a sample set required by the timing indicator matrix generator, each sample being [(text vector of preset length, random short vector), 1], wherein 1 represents a sample label;

[0093] Step S2.5: inputting the sample set required by the constructed time sequence index matrix generator into the current abnormal time sequence index matrix generator to obtain a corresponding discrimination label, optimizing the current time sequence index matrix generator based on the discrimination label and the sample label, repeatedly triggering steps S2.2 to S2.5 until the iteration number reaches a preset value, and obtaining the trained abnormal time sequence index matrix generator;

[0094] The positive sample set comprises: [(text vector of a preset length, corresponding index data), 1], wherein 1 represents a positive sample.

[0095] The negative sample set comprises: [(text vector of a preset length, time sequence index matrix), 0] and [(text vector of a preset length not corresponding to the current time sequence index matrix, time sequence index matrix), 0], wherein 0 represents a negative sample.

[0096] Specifically, the abnormal time sequence index matrix generator adopts:

[0097] Step S2.1.1: converting the description text label into a text vector of a preset length;

[0098] Step S2.1.2: inputting the text vector of a preset length and a random short vector into the time sequence index matrix generator to obtain a time sequence index matrix with a size consistent with the index data matrix;

[0099] Step S2.1.3: inputting the text vector of a preset length and the time sequence index matrix into the time sequence index matrix discriminator to output 0 or 1; wherein 0 represents false, and 1 represents true.

[0100] Specifically, the step S3 adopts:

[0101] Step S3.1: acquiring a time sequence index matrix based on a natural language description by using the trained abnormal time sequence index matrix generator;

[0102] Step S3.2: analyzing the time sequence index matrix to obtain an abnormal index time sequence.

[0103] According to the abnormal time sequence index generation system based on a natural language description provided by the application, the following are provided:

[0104] Module M1: constructing an index sample library;

[0105] Module M2: constructing an abnormal time sequence index generator, training the abnormal time sequence index generator by using the index sample library, and obtaining a trained abnormal time sequence index generator;

[0106] Module M3: generating an abnormal time sequence index based on a natural language description by using the trained abnormal time sequence index generator.

[0107] Specifically, the module M1 employs:

[0108] Module M1.1: Collecting index data based on a preset scene to form an index data set;

[0109] Module M1.2: Normalizing the collected index data to obtain a normalized index data set;

[0110] Module M1.3: Constructing a preset scene abnormal index sample library based on the normalized index data set;

[0111] Module M1.4: Constructing a preset scene normal index sample library based on the normalized index data set;

[0112] The preset scene includes: CPU full, CPU stop, memory full, and network interruption;

[0113] The index includes: CPU occupancy, memory occupancy, network throughput, and business success rate;

[0114] The abnormal index sample library is a binary tuple composed of an abnormal description text label and a corresponding abnormal index data matrix;

[0115] The normal index sample library is a binary tuple composed of a normal description text label and a corresponding index data matrix.

[0116] Specifically, the module M2 employs:

[0117] Module M2.1: Constructing an abnormal time series index matrix generator, including a time series index matrix discriminator and a time series index matrix generator;

[0118] Module M2.2: Constructing a sample set required by the time series index matrix discriminator, including a positive sample set and a negative sample set;

[0119] Module M2.3: Optimizing the parameters of the current time series index matrix discriminator based on the sample set required by the time series index matrix discriminator;

[0120] Module M2.4: Constructing a sample set required by the time series index matrix generator, each sample being [(text vector of preset length, random short vector), 1], wherein 1 represents a sample label;

[0121] Module M2.5: Inputting the constructed sample set required by the time series index matrix generator into the current abnormal time series index matrix generator to obtain a corresponding discrimination label, optimizing the current time series index matrix generator based on the discrimination label and the sample label, repeatedly triggering modules M2.2 to M2.5 until the iteration number reaches a preset value, and obtaining a trained abnormal time series index matrix generator;

[0122] The set of positive samples includes: [(text vector of preset length, corresponding index data), 1], where 1 represents a positive sample;

[0123] The negative sample set includes: [(text vector of preset length, time series index matrix), 0] and [(text vector of preset length that does not correspond to the current time series index matrix, time series index matrix), 0], where 0 represents a negative sample.

[0124] Specifically, the abnormal time series indicator matrix generator adopts:

[0125] Module M2.1.1: Converts descriptive text labels into text vectors of a preset length;

[0126] Module M2.1.2: Based on text vectors of preset length and random short vectors as input, a time series index matrix generator obtains a time series index matrix with the same size as the index data matrix;

[0127] Module M2.1.3: Input the text vector of preset length and the time series index matrix into the time series index matrix discriminator, and output 0 or 1; where 0 represents false and 1 represents true.

[0128] Specifically, module M3 adopts:

[0129] Module M3.1: Obtains the time series index matrix using a trained anomaly time series index matrix generator based on natural language description;

[0130] Module M3.2: Parse the time series index matrix to obtain the time series of abnormal indicators.

[0131] Example 2

[0132] Example 2 is a preferred example of Example 1.

[0133] According to the present invention, a method for generating anomaly time-series indicators based on natural language description is provided, such as... Figures 1 to 5 As shown, it includes the following steps:

[0134] Step 1: Construct a sample library of typical indicators;

[0135] Step 2: Construct a basic generator for abnormal time series indicators and train the basic generator for abnormal time series indicators using a typical indicator sample library;

[0136] Step 3: Generate abnormal time series indicators based on natural language description using the trained abnormal time series indicator generator;

[0137] Step 1 includes the following steps:

[0138] Step 1.1: Collect abnormal indicator data based on typical scenarios to form an indicator dataset. The typical scenario labels include but are not limited to "CPU full", "CPU stop", "memory full", "network interruption", etc. The abnormal indicators include but are not limited to "CPU occupancy rate", "memory occupancy rate", "network throughput rate", "service success rate", etc. The data for a certain typical abnormal scenario is recorded in the form of a binary tuple, such as (abnormal label, abnormal indicator log). In the above tuple, the labels between different tuples can be the same, similar, or contain each other; the label is a limited length description text (such as a maximum length of 20). The above tuple is composed of an abnormal indicator dataset, denoted as anomaly_log_set;

[0139] Step 1.2: Construct a typical scenario abnormal indicator sample library. Set a uniform time length for each scenario, denoted as scene_len. Determine the indicator granularity as a uniform size, denoted as grain_size; continuously and non-negatively number different indicators, such as giving 0 and 1 to "CPU occupancy rate" and "memory occupancy rate", respectively, and record the indicator and number relationship in a dictionary, denoted as factor_dic; compile the indicators of each typical abnormal scenario into an indicator matrix, denoted as anomaly_scene_matrix. Each element in the sample library is a binary tuple composed of an abnormal description label and an indicator matrix, denoted as (anomaly_label, anomaly_scene_metric). Convert the indicator data collected in step 1.1 into the above tuple to form an abnormal indicator sample library, denoted as anomaly_sample_set. Specific implementation examples can be, but are not limited to, the following examples:

[0140] Take scene_len = 300 (seconds), grain_size = 1 (seconds), and the content in factor_dic as {CPU occupancy rate: 0, CPU occupancy rate: 1, memory occupancy rate: 2, service success rate: 3, …}. At this time, a sample in the abnormal sample library can be:

[0141]

[0142] In the above binary tuple, the matrix on the right side has 300 columns and the number of rows is equal to the number of key-value pairs in fector_dic. The rows from the top down in the matrix represent CPU occupancy rate, memory occupancy rate, service success rate, etc. It is particularly noted that all indicators entering the matrix must be normalized first. For non-negative indicators such as memory throughput rate, which have no upper bound in the value domain, the maximum value in a certain time (such as the last 28 days) can be used as the denominator for normalization, and if it is greater than the denominator, it is taken as 1;

[0143] Step 1.3: Constructing normal indicator sample set. Collect normal indicator data and its label, construct normal indicator and label into normal indicator data set (normal_log_set) and normal indicator sample set (normaly_sample_set) respectively, according to the method of step 1.1 and step 1.2. The elements in the above two libraries are respectively denoted as (normal_label, normal_log) and (normal_label, normal_scene_matrix). The contents of scene_len, grain_set, factor_dic in the above two libraries are completely consistent, and the row and column numbers of anomaly_scene_matrix and normal_scene_matrix are completely consistent. The samples in the normal indicator sample set can be but are not limited to the following examples:

[0144]

[0145]

[0146] The anomaly_sample_set and normaly_sample_set are merged into a typical indicator sample set, denoted as common_sample_set.

[0147] The step 2 comprises the following steps:

[0148] Step 2.1: Constructing anomaly indicator generation model architecture. The anomaly indicator generation model is a deep neural network model, which includes a label vectorization module, a time series indicator matrix generator, and a time series indicator matrix discriminator (as shown in Figure 1 ).

[0149] Step 2.1.1: Constructing label vectorization module. The input of the module is a label text less than a specific length (such as a maximum length of 20), and the output is a text vector of a specific length (such as 256), denoted as label_vector. This paper adopts but is not limited to BERT model (Bidirectional Encoder Representation from Transformers) for text vectorization. BERT is a publicly pre-trained model in the field of NLP, which contains a function call for text vectorization, and the related method can be found in the public data;

[0150] Step 2.1.2: Constructing the time-indexed matrix generator. The input is the vector of labels (output of step 2.1.1) and a random short vector (may be but not limited to a vector with length less than 128), the output is a matrix with the same size as the anomaly_scene_matrix (or normal_scene_matrix). The main part of the time-indexed matrix generator is a deep neural network, which may be but not limited to the following structure "fully connected layer, deconvolutional layer, fully connected layer, fully connected layer".

[0151] Step 2.1.3: Constructing the time-indexed matrix discriminator. The input is the vector of labels (output of step 2.1.1) and the time-indexed matrix (output of step 2.1.2), the output is 0 or 1. The main part of the time-indexed matrix discriminator is a deep neural network, which may be but not limited to the following structure "fully connected layer, deconvolutional layer, fully connected layer, fully connected layer".

[0152] Step 2.2: Constructing the samples needed by the time-indexed discriminator. Based on the common_sample_set generated in step 1.3, where each element is a tuple (anomaly_label / normal_label, anomaly_scene_matrix / normal_scene_matrix), the left side of the tuple is the natural language text, and the right side of the tuple is the fixed-size index matrix. The left element of the tuple is converted into a label vector by the label vectorization module, which is the label_vector generated in step 2.1.1. The label_vector and the "random short vector" are operated by the "time-indexed matrix generator" to obtain the "generated index matrix", denoted as generated_scene_matrix. The anomaly_scene_matrix and the normal_scene_matrix are uniformly denoted as real_scene_matrix. Based on the above, the positive sample set is constructed, and each element in the set is [(label_vector, real_scene_matrix), 1], where 1 is the label of the positive sample. Two types of negative sample sets are constructed, category 1): each element in the set is [(label_vector, generated_scene_matrix), 0], where 0 is the label of the negative sample, category 2): each element in the set is [(shuffle_label_vector, real_scene_matrix), 0], where 0 is the negative sample label, and shuffle_label_vector represents the text description that does not correspond to the current real_scene_matrix.

[0153] Step 2.3: Optimize the parameters of the timing indicator discriminator. The positive and negative sample data generated in step 2.2 is input into the "timing indicator matrix discriminator" (skip the timing indicator matrix generator), the result is calculated, and the loss is calculated using the "cross-entropy loss function" (a general concept in the field of machine learning). The gradient is passed back using the gradient descent method (a general concept in the field of machine learning) and the parameters of the "timing indicator matrix discriminator" are updated.

[0154] Step 2.4: Construct the sample required for the timing indicator generator. The text description of each element in the common_sample_set is converted into a vector using the method in step 2.1.1, i.e. label_vector. A sample set is constructed, with each sample being [(label_vector, random short vector), 1], where 1 is the sample label.

[0155] Step 2.5: Optimize the parameters of the timing indicator generator. Based on the complete "abnormal indicator generation model architecture", input the sample set constructed in step 2.4 at the "timing indicator matrix generator". The output value is obtained at the "timing indicator matrix discriminator". The loss is calculated using the cross-entropy loss function with the sample label. The gradient is passed back using the gradient descent method and the model is updated. The gradient of the "timing indicator matrix discriminator" is not calculated and updated, only the "timing indicator matrix generator" is calculated and updated.

[0156] Step 2.6: Complete the construction of the basic indicator matrix generator. Repeat steps 2.2 to 2.5 for N times, where N can be but not limited to 3000, 5000, 10000, etc. At this point, the "label vectorization module" and the "timing indicator generator" together constitute the basic indicator evidence generator. This generator takes "natural text description" and "random short vector" as input and outputs a timing indicator matrix. Each row in the matrix can be parsed into an indicator name by the factor_dic described in step 1.2 according to the row number (starting from 0). Each list represents the value of an indicator at a time. Through this generator, a typical set of abnormal indicators can be generated based on the input abnormal description text and random vector.

[0157] The step 3 includes the following steps:

[0158] Step 3.1: Obtain the abnormal timing indicator matrix based on natural language description. If there are special style requirements such as non-periodic and trend for the generated timing, the generator obtained after executing step 2 can be directly used to generate the matrix. If there are style requirements, execute step 3 using the adjusted generator. The input of the generator is an abnormal description text less than a certain length (such as less than 20) and a random short vector. The generator will generate an abnormal timing indicator matrix.

[0159] Step 3.2: Analyze the matrix to obtain the abnormal index time sequence. According to the scene_len, grain_size, factor_dic of step 1, the matrix is analyzed to obtain the abnormal index time sequence. The grain_size indicates the time granularity represented by each column in the matrix, the scene_len indicates the time span of each row index in the matrix, and the factor_dic indicates the meaning of each row in the matrix.

[0160] When the scene data source is significantly different from the typical scene data source, the current scene is defined as an atypical scene, and the trained abnormal time sequence index base generator is fine-tuned accordingly based on the natural language description of the abnormal time sequence index generation method. Specifically, it includes:

[0161] Step 4: Generate a style sample library based on the historical data of a specific system (atypical scene). Since different systems may have different periodicity, trendiness, and other styles, sample the historical section data, select some scenes that do not contain abnormalities, and construct an index sample library, denoted as style_sample_set, where each element is a tuple (style_label, style_scene_matrix). For example, but not limited to, the following examples:

[0162]

[0163] Step 5: Based on the style sample library, generate a sample set for adjusting the style of the discriminator. Based on the element label in the generated style sample library, generate a vectorized representation of the text, denoted as style_label_vector. Construct a positive sample set [(style_label_vector, style_scene_matrix), 1] for adjusting the style of the discriminator, where 1 represents a positive sample. style_label_vector and a random number short vector are input into the trained abnormal time sequence index base generator to obtain a generated style index matrix, denoted as style_generated_scene_matrix. Construct a negative sample set [(style_label_vector, style_generated_scene_matrix), 0], where 0 represents a negative sample;

[0164] Step 6: Adjust the style of the time sequence index discriminator. Input the generated positive and negative sample data into the time sequence index matrix discriminator (skip the time sequence index matrix generator), calculate the result, and use the cross-entropy loss function (a general concept in the field of machine learning) to calculate the loss. Use gradient descent method (a general concept in the field of machine learning) to pass the gradient in reverse and update the parameters of the time sequence index matrix discriminator.

[0165] Step 7: Constructing the sample set required for adjusting the style of the time series index generator. Constructing a sample set from each text generation vector in the style_sample_set, i.e. style_label_vector, each sample is [(label_vector, random short vector), 1], where 1 is the sample label;

[0166] Step 8: Adjusting the style of the time series index generator. Based on the complete "anomaly index generation model architecture", input the sample set constructed in step 7 at the "time series index matrix generator", get the output value at the "time series index matrix discriminator", and calculate the loss using the cross-entropy loss function with the sample label. Use gradient descent method to pass back the gradient and update the model, here the gradient of "time series index matrix discriminator" is not calculated and updated, only "time series index matrix generator" is calculated and updated; repeat steps 5 to 8 for M times, M can be but not limited to 1000, 2000, 3000… Note that M should be much smaller than N in step 2 above (M*3<N). At this point, the index generator style adjustment is complete.

[0167] Those skilled in the art know that in addition to implementing the system, device and each module thereof provided by the present application in the form of pure computer readable program code, the same program can also be realized by logically programming the method steps to make the system, device and each module thereof provided by the present application in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers and embedded microcontrollers. Therefore, the system, device and each module thereof provided by the present application can be considered as a hardware component, and the modules included therein for implementing various programs can also be considered as structures within the hardware component; the modules for implementing various functions can also be considered as both software programs for implementing methods and structures within hardware components.

[0168] The specific embodiments of the present application are described above. It needs to be understood that the present application is not limited to the above specific embodiments, and those skilled in the art can make various changes or modifications within the scope of the claims, which does not affect the essential content of the present application. The embodiments of the present application and the features in the embodiments can be arbitrarily combined with each other without conflict.

Claims

1. A method for generating an abnormal time series indicator based on a natural language description, characterized in that, The application relates to a method for generating an abnormal time sequence index based on natural language description. The method comprises the following steps: Step S1: constructing an index sample library; Step S2: constructing an abnormal time sequence index generator and training the abnormal time sequence index generator by using the index sample library to obtain a trained abnormal time sequence index generator; Step S3: generating an abnormal time sequence index based on natural language description by using the trained abnormal time sequence index generator. The step S2 adopts the following steps: Step S2.1: constructing an abnormal time sequence index matrix generator, which comprises a time sequence index matrix discriminator and a time sequence index matrix generator; Step S2.2: constructing a sample set required by the time sequence index matrix discriminator, which comprises a positive sample set and a negative sample set; Step S2.3: optimizing parameters of the current time sequence index matrix discriminator based on the sample set required by the time sequence index matrix discriminator; Step S2.4: constructing a sample set required by the time sequence index matrix generator, wherein each sample is [(a preset length of a text vector, a random short vector), 1], and 1 represents a sample label; Step S2.5: inputting the constructed sample set required by the time sequence index matrix generator into the current abnormal time sequence index matrix generator to obtain a corresponding discrimination label; optimizing the current time sequence index matrix generator based on the discrimination label and the sample label; repeatedly triggering steps S2.2 to S2.5 until the iteration times reach a preset value, and obtaining the trained abnormal time sequence index matrix generator; The positive sample set comprises [(a preset length of a text vector, corresponding index data), 1], wherein 1 represents a positive sample; The negative sample set comprises [(a preset length of a text vector, a time sequence index matrix), 0] and [(a preset length of a text vector which does not correspond to the current time sequence index matrix, a time sequence index matrix), 0], wherein 0 represents a negative sample; The abnormal time sequence index matrix generator adopts the following steps: Step S2.1.1: converting a description text label into a preset length of a text vector; Step S2.1.2: inputting the preset length of the text vector and the random short vector into the time sequence index matrix generator to obtain a time sequence index matrix with a size consistent with that of index data matrix; 2.The natural language description based abnormal time series indicator generation method of claim 1, wherein, Step S2.1.3: inputting the preset length of the text vector and the time sequence index matrix into the time sequence index matrix discriminator to output 0 or 1; wherein 0 represents false, and 1 represents true. The step S1 adopts the following steps: Step S1.1: collecting index data based on a preset scene to form an index data set; Step S1.2: performing normalization processing on the collected index data to obtain a normalized index data set; Step S1.3: constructing a preset scene abnormal index sample library based on the normalized index data set; Step S1.4: constructing a preset scene normal index sample library based on the normalized index data set; The preset scene comprises CPU full occupation, CPU stop, memory full occupation and network interruption; The index comprises CPU occupation rate, memory occupation rate, network throughput rate and business success rate; The abnormal index sample library is a binary group composed of an abnormal description text label and a corresponding abnormal index data matrix; The normal index sample library is a binary group composed of a normal description text label and a corresponding index data matrix. 3.The natural language description based abnormal time series indicator generation method of claim 1, wherein, The step S3 employs: Step S3.1: obtaining a time series index matrix based on the natural language description by using the trained abnormal time series index matrix generator; Step S3.2: obtaining an abnormal index time series by analyzing the time series index matrix.

4. A natural language description based abnormal time series indicator generation system, characterized in that, Comprise: Module M1: constructing an index sample library; Module M2: constructing an abnormal time series index generator, and training the abnormal time series index generator by using the index sample library to obtain the trained abnormal time series index generator; Module M3: generating an abnormal time series index based on a natural language description by using the trained abnormal time series index generator; The module M2 employs: Module M2.1: constructing an abnormal time series index matrix generator, comprising a time series index matrix discriminator and a time series index matrix generator; Module M2.2: constructing a sample set required by the time series index matrix discriminator, comprising a positive sample set and a negative sample set; Module M2.3: optimizing the parameters of the current time series index matrix discriminator based on the sample set required by the time series index matrix discriminator; Module M2.4: constructing a sample set required by the time series index matrix generator, each sample being [(text vector of preset length, random short vector), 1], wherein 1 represents a sample label; Module M2.5: inputting the constructed sample set required by the time series index matrix generator into the current abnormal time series index matrix generator to obtain a corresponding discrimination label, optimizing the current time series index matrix generator based on the discrimination label and the sample label, repeatedly triggering the module M2.2 to the module M2.5, and obtaining the trained abnormal time series index matrix generator until the iteration times reach a preset value; The positive sample set comprises: [(text vector of preset length, corresponding index data), 1], wherein 1 represents a positive sample; The negative sample set comprises: [(text vector of preset length, time series index matrix), 0] and [(text vector of preset length not corresponding to the current time series index matrix, time series index matrix), 0], wherein 0 represents a negative sample.

5. The natural language description based anomalous time series indicator generation system of claim 4, wherein, The module M1 employs: Module M1.1: collecting index data based on a preset scene to form an index data set; Module M1.2: performing normalization processing on the collected index data to obtain a normalized index data set; Module M1.3: constructing a preset scene abnormal index sample library based on the normalized index data set; Module M1.4: constructing a preset scene normal index sample library based on the normalized index data set; The preset scene comprises: CPU full, CPU stop, memory full, and network interruption; The index comprises: CPU occupancy rate, memory occupancy rate, network throughput rate, and business success rate; The abnormal index sample library is a binary tuple composed of an abnormal description text label and a corresponding abnormal index data matrix; The normal index sample library is a binary tuple composed of a normal description text label and a corresponding index data matrix.

6. The natural language description based anomalous time series indicator generation system of claim 5, wherein, The module M3 employs: Module M3.1: obtaining a time series index matrix based on the natural language description by using the trained abnormal time series index matrix generator; Module M3.2: obtaining an abnormal index time series by analyzing the time series index matrix.

Citation Information

Patent Citations

  • Time series data confrontation sample generation method and system, electronic equipment and storage medium

    CN112926802A

  • Time series data generation method and device and storage medium

    CN115033386A

  • Adversarial sample attack method for voice keyword classification network

    CN112216273A

  • Internet of Things equipment detection method, system and equipment

    CN115348190A