Operation and maintenance indicator data classification method, device, electronic device and storage medium

By normalizing and vectorizing the operation and maintenance indicator data and using convolutional neural network for classification, the problem of low classification accuracy of operation and maintenance indicator data in the existing technology is solved, and higher classification accuracy and efficiency.

CN118779714BActive Publication Date: 2024-12-03E SURFING VISION TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411275438.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-12
Publication Date
2024-12-03
Estimated Expiration
2044-09-12

AI Technical Summary

Technical Problem

In the prior art, the classification accuracy of operation and maintenance index data is low. Traditional machine learning algorithms such as clustering algorithms, RNN and LSTM are difficult to effectively handle the long dependence of operation and maintenance timing data, resulting in low classification accuracy.

Method used

By obtaining the original operation and maintenance indicator data, normalizing and vectorizing it, it is converted into three-dimensional vector data with channel, width and height as dimensions, and inputting the trained convolutional neural network for classification, using convolutional nerves The characteristics of the network break the long dependence of data and improve classification accuracy.

Benefits of technology

The vectorization of operation and maintenance indicator data is realized, and the index data is fully expressed, thereby improving the accuracy of the change type identification of operation and maintenance indicator data, and improving classification efficiency and accuracy compared with traditional methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118779714B_ABST
    Figure CN118779714B_ABST
Patent Text Reader

Abstract

The present application relates to a method, device, electronic device and storage medium for classifying operation and maintenance indicator data, wherein the method comprises: obtaining the original operation and maintenance indicator data to be detected; normalizing the original operation and maintenance indicator data to obtain target normalized data; converting the target normalized data into target two-dimensional vector data according to the preset data duration days and the maximum number of vector rows; then transforming the target two-dimensional vector data into three-dimensional target vectorized data with channel, width and height as dimensions; inputting the target vectorized data into a trained convolutional neural network for data classification to obtain the corresponding data change type. It realizes the vectorization of operation and maintenance indicator data, fully expresses the indicator data based on the vectorization method, and thus improves the accuracy of identifying the change type of operation and maintenance indicator data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer operation and maintenance, and in particular to an operation and maintenance indicator data classification method, device, electronic device and storage medium. Background Art

[0002] The operation and maintenance indicator data of a machine can characterize the performance status of the machine. Therefore, by analyzing the operation and maintenance indicator data, potential machine failures can be discovered in a timely manner, thereby maintaining the healthy operation of the machine. The operation and maintenance indicator data may have a certain periodicity, increase linearly, or change steadily within a controllable range. Therefore, identifying the data change category of the operation and maintenance indicator data is the basis for further analyzing the operation and maintenance indicator data.

[0003] At present, the classification of operation and maintenance indicator data is often processed using traditional machine learning algorithms such as clustering algorithms (kmean), recurrent neural networks (RNN), or long short-term memory networks (LSTM). Since operation and maintenance time series data has long dependencies, although natural language models such as LSTM have certain long dependencies, they still cannot handle the classification of these indicator data well, resulting in low classification accuracy of operation and maintenance indicator data.

[0004] With regard to the problem of low classification accuracy of operation and maintenance indicator data in related technologies, no effective solution has been proposed so far. Summary of the invention

[0005] In this embodiment, a method, device, electronic device and storage medium for classifying operation and maintenance indicator data are provided to solve the problem of low classification accuracy of operation and maintenance indicator data in related technologies.

[0006] In a first aspect, a method for classifying operation and maintenance indicator data is provided in this embodiment, including:

[0007] Obtain the original operation and maintenance indicator data to be tested;

[0008] Normalizing the original operation and maintenance indicator data to obtain target normalized data;

[0009] According to the preset data duration days and the maximum number of vector rows, the target normalized data is converted into target two-dimensional vector data; then the target two-dimensional vector data is transformed into three-dimensional target vectorized data with channel, width and height as dimensions;

[0010] The target vectorized data is input into the trained convolutional neural network for data classification to obtain the corresponding data change type.

[0011] In some embodiments, the original operation and maintenance indicator data is normalized to obtain target normalized data, including:

[0012] According to the data characteristics of the original operation and maintenance indicator data, a predetermined normalization rule corresponding to the data characteristics is selected;

[0013] The original operation and maintenance indicator data is normalized according to the normalization rule to obtain the target normalized data.

[0014] In some of the embodiments, according to the data characteristics of the original operation and maintenance indicator data, a predetermined normalization rule corresponding to the data characteristics is selected, including:

[0015] According to the data characteristics of the original operation and maintenance indicator data, when it is determined that the original operation and maintenance indicator data is data recorded as a percentage of a value within a preset range, the normalization rule is: updating each value in the original operation and maintenance indicator data to a quotient obtained by dividing each value by an upper limit value of the preset range;

[0016] When determining that the original operation and maintenance indicator data is memory usage, the normalization rule is: determine the maximum value of the original operation and maintenance indicator data, and take the memory capacity of the device corresponding to the maximum value as the target value; update the various values ​​of the original operation and maintenance indicator data to the quotient obtained by dividing the various values ​​by the target value.

[0017] In some embodiments, according to the preset data duration days and the maximum number of vector rows, the target normalized data is converted into target two-dimensional vector data, including:

[0018] Correcting the target normalized data to corrected data of a preset length;

[0019] According to the preset data duration days and the maximum number of vector rows, the corrected data is converted into initial two-dimensional vector data; wherein, in the initial two-dimensional vector data, the time span corresponding to a single row of data is the data duration days, and the total number of rows is the maximum number of vector rows; the time span corresponding to the single row of data is the maximum span between the collection times corresponding to all the data in the single row of data;

[0020] Each row of the initial two-dimensional vector data is sampled and combined to obtain the target two-dimensional vector data; in the target two-dimensional vector data, the collection time of each consecutive preset number of rows of data belongs to different days, and the time span corresponding to each row of data is the number of days the data lasts.

[0021] In some embodiments, transforming the target two-dimensional vector data into three-dimensional target vectorized data with channels, width and height as dimensions includes:

[0022] The deformation method of the preset open source numerical calculation extension library is called to deform the target two-dimensional vector data into three-dimensional target vectorized data with channels, width and height as dimensions.

[0023] In some of the embodiments, the number of input channels of the convolutional neural network is 1.

[0024] In some of the embodiments, before obtaining the trained convolutional neural network, the training process of the convolutional neural network includes:

[0025] Convert the original training data into two-dimensional image data;

[0026] Classifying and labeling the two-dimensional image data to obtain classification and labeling results;

[0027] The original training data is divided into data sets, and the initial convolutional neural network is trained according to the classification and labeling results and the divided data sets to obtain the trained convolutional neural network.

[0028] In a second aspect, in this embodiment, a device for classifying operation and maintenance indicator data is provided, comprising: an acquisition module, a normalization module, a vectorization module and a classification module; wherein:

[0029] The acquisition module is used to acquire the original operation and maintenance indicator data to be detected;

[0030] The normalization module is used to normalize the original operation and maintenance indicator data to obtain target normalized data;

[0031] The vectorization module is used to convert the target normalized data into target two-dimensional vector data according to the preset data duration days and the maximum number of vector rows; and then transform the target two-dimensional vector data into three-dimensional target vectorized data with channel, width and height as dimensions;

[0032] The classification module is used to input the target vectorized data into the trained convolutional neural network for data classification to obtain the corresponding data change type.

[0033] In a third aspect, an electronic device is provided in this embodiment, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the operation and maintenance indicator data classification method described in the first aspect is implemented.

[0034] In a fourth aspect, a storage medium is provided in this embodiment, on which a computer program is stored, and when the program is executed by a processor, the operation and maintenance indicator data classification method described in the first aspect is implemented.

[0035] Compared with the related art, the present embodiment provides an operation and maintenance indicator data classification method, device, electronic device and storage medium. The operation and maintenance indicator data classification method obtains the original operation and maintenance indicator data to be detected; normalizes the original operation and maintenance indicator data to obtain target normalized data; converts the target normalized data into target two-dimensional vector data according to the preset data duration days and the maximum number of vector rows; then transforms the target two-dimensional vector data into three-dimensional target vectorized data with channel, width and height as dimensions; inputs the target vectorized data into the trained convolutional neural network for data classification to obtain the corresponding data change type. It realizes the vectorization of operation and maintenance indicator data, fully expresses the indicator data based on the vectorization method, and thus improves the accuracy of identifying the change type of operation and maintenance indicator data.

[0036] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0038] Figure 1 is a hardware structure block diagram of a terminal of the operation and maintenance indicator data classification method of this embodiment;

[0039] Figure 2 is a flow chart of the operation and maintenance indicator data classification method of this embodiment;

[0040] Figure 3 is a schematic diagram of two-dimensional image data of this embodiment;

[0041] Figure 4 is a flowchart of a model training method based on vectorization of operation and maintenance indicator data in some embodiments;

[0042] Figure 5 It is a structural block diagram of the operation and maintenance indicator data classification device of this embodiment. DETAILED DESCRIPTION

[0043] In order to more clearly understand the purpose, technical solutions and advantages of the present application, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments.

[0044] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the general meaning understood by people with general skills in the technical field to which this application belongs. The words "one", "a", "the", "these" and the like in this application do not indicate a quantitative limitation, and they may be singular or plural. The terms "include", "comprise", "have" and any variants thereof involved in this application are intended to cover non-exclusive inclusions; for example, a process, method and system, product or device comprising a series of steps or modules (units) is not limited to the listed steps or modules (units), but may include unlisted steps or modules (units), or may include other steps or modules (units) inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships, for example, "A and / or B" may mean: A exists alone, A and B exist at the same time, and B exists alone. Generally, the character " / " indicates that the objects associated with each other are in an "or" relationship. The terms "first", "second", "third", etc. in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.

[0045] The method embodiment provided in this embodiment can be executed in a terminal, a computer or a similar computing device. For example, running on a terminal, Figure 1 is a hardware structure block diagram of a terminal of the operation and maintenance indicator data classification method of this embodiment. Figure 1 As shown, the terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 and a memory 104 for storing data, wherein the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA. The above terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.

[0046] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the operation and maintenance indicator data classification method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0047] The transmission device 106 is used to receive or send data via a network. The above network includes a wireless network provided by a communication provider of the terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.

[0048] In this embodiment, a method for classifying operation and maintenance indicator data is provided. Figure 2 is a flow chart of the operation and maintenance indicator data classification method of this embodiment. Figure 2 As shown, the process includes the following steps:

[0049] Step S210, obtaining original operation and maintenance indicator data to be detected.

[0050] Specifically, the raw operation and maintenance indicator data to be detected can be the usage data of hardware such as the central processing unit (CPU), memory, disk, etc. For example, it can be CPU usage, network connection data, network traffic, memory usage, etc. These data change over time and are a kind of time series data. Analyzing the operation and maintenance indicator data to perceive the performance status of the machine is conducive to timely discovering potential machine failures, thereby maintaining the healthy operation of the machine.

[0051] Step S220, normalize the original operation and maintenance indicator data to obtain target normalized data.

[0052] The values ​​of different operation and maintenance indicator data may differ by multiple orders of magnitude. If the original operation and maintenance indicator data is directly input into the model for recognition, the recognition difficulty will be increased. Therefore, it is necessary to normalize the original operation and maintenance indicator data to obtain the normalized operation and maintenance indicator data as the target normalized data.

[0053] Step S230, converting the target normalized data into target two-dimensional vector data according to the preset data duration days and the maximum number of vector rows; and then transforming the target two-dimensional vector data into three-dimensional target vectorized data with channel, width and height as dimensions.

[0054] By analyzing the distribution characteristics of the operation and maintenance indicator data, considering that the operation and maintenance indicator data is distributed in a related manner in units of days. For example, the period of periodic data is generally one day, the difference between the data of each day of the stable type is small, and the value of the linear data increases with the increase of the number of days. Therefore, if the convolutional neural network can use the data of the same time on different days at the same time, it will be able to accurately identify the category of the data without long-term dependence. Based on this, the number of days of data duration is set, and the target normalized data is converted into a two-dimensional vector.

[0055] In this step, the one-dimensional time series data is mainly converted into three-dimensional vector data, so as to facilitate the subsequent use of convolutional neural networks to identify the type of data changes. Specifically, the target normalized data within n days can be obtained, and after the length of the target normalized data is adjusted, the target normalized data is constructed as two-dimensional vector data. Exemplarily, the above n can be taken as 7, and other values ​​can also be taken, which are not limited in this embodiment. Among them, since the periodicity of the operation and maintenance indicator data is days, based on this characteristic, the operation and maintenance indicator data that lasts for many days is conducive to maintaining the integrity of the data cycle. Therefore, the data duration days for constructing the two-dimensional vector can be set. Exemplarily, the data duration days can be set to 4 days. The data duration days are used to indicate the span of the collection time corresponding to each row of data in the constructed two-dimensional vector. It can be understood that the data duration days can also be set to other values ​​according to different actual application scenarios, which are not specifically limited in this embodiment. In addition, the maximum number of vector rows can also be set. The setting of the maximum number of vector rows can be set based on the data duration days and the above data collection days n days. For example, if the duration of a row of data is 4 days, then the sequence data collected within 7 days can construct a maximum of 3 rows of data. For example, if the target normalized data within n days is obtained and the duration of a row of data after vectorization is set to D, the maximum number of rows of the constructed vector line_num is nD.

[0056] Then, the two-dimensional vector data obtained by the construction can be transformed to obtain three-dimensional target vector data with channel, width and height as dimensions. In order to keep the total dimension of the data unchanged, the channel can be set to 1.

[0057] In related technologies, traditional machine learning algorithms such as kmean, RNN, or LSTM are often used to classify operation and maintenance indicator data. Since operation and maintenance time series data has long dependencies, although natural language models such as LSTM have certain long dependencies, they still cannot handle the classification of these indicator data well, resulting in low classification accuracy of operation and maintenance indicator data. Alternatively, the time series data is converted into images, and then these images are analyzed using computer vision models. On the one hand, this type of method requires the data to be converted into images, resulting in relatively low overall processing efficiency; on the other hand, the generated image data is often long and narrow, requiring the model to have long dependencies, and convolutional neural networks (CNNs) are not good at processing these data; thus, the final classification accuracy is low.

[0058] Different from this, this embodiment converts time series data such as operation and maintenance indicator data into three-dimensional vector data with channel, width and height as dimensions through steps S210 to S230. On the one hand, it breaks the long-term dependency of data, so that the convolutional neural network can process the same time data of different days at every moment, improving the accuracy of data classification; on the other hand, it improves the data conversion efficiency compared with the visualization method.

[0059] Step S240, input the target vectorized data into the trained convolutional neural network for data classification to obtain the corresponding data change type.

[0060] After the vectorization of the original operation and maintenance indicator data to be detected is realized, the target vectorized data is input into the trained convolutional neural network for data classification processing, so as to obtain the data change type corresponding to the original operation and maintenance indicator data. It can be understood that the original operation and maintenance indicator data may contain data of several different types and sources. After the vectorization processing of steps S210 to S230, the data change type of the operation and maintenance indicator data corresponding to different indicators can be obtained through classification and identification of step S240. The data change type may include: periodic type, stable type, linear type, etc.

[0061] In the above steps S210 to S240, the original operation and maintenance indicator data to be detected is obtained; the original operation and maintenance indicator data is normalized to obtain the target normalized data; according to the preset data duration days and the maximum number of vector rows, the target normalized data is converted into the target two-dimensional vector data; then the target two-dimensional vector data is transformed into three-dimensional target vectorized data with channel, width and height as dimensions; the target vectorized data is input into the trained convolutional neural network for data classification to obtain the corresponding data change type. It realizes the vectorization of the operation and maintenance indicator data, fully expresses the indicator data based on the vectorization method, and thus improves the accuracy of identifying the change type of the operation and maintenance indicator data.

[0062] In one embodiment, based on the above step S220, the original operation and maintenance indicator data is normalized to obtain target normalized data, which may specifically include:

[0063] According to the data characteristics of the original operation and maintenance indicator data, a predetermined normalization rule corresponding to the data characteristics is selected; the original operation and maintenance indicator data is normalized according to the normalization rule to obtain target normalized data.

[0064] Specifically, corresponding normalization rules can be set in advance for different original operation and maintenance indicator data. When obtaining the original operation and maintenance indicator data to be detected, the data can be divided according to the different indicators collected. For example, the original operation and maintenance indicator data is represented in the form of a one-dimensional vector [X1, X2, X3...Xn], recorded as data. The title of the data is recorded as title, and the title title records which indicator data is. For example, it can be CPU usage, memory usage, network usage traffic, etc. According to different titles and corresponding data characteristics, different normalization rules are selected for normalization processing.

[0065] In this embodiment, according to the data characteristics of the original operation and maintenance index data, the corresponding normalization rule is selected for normalization processing, so that the target normalized data finally obtained can maintain a consistent waveform with the original operation and maintenance index data, so that data of different orders of magnitude are transformed into a range from 0 to 1 while keeping the characteristics of the data unchanged. For example, data with periodic changes are still periodic data after normalization. Therefore, the normalization processing of this embodiment can avoid the dirty data problem.

[0066] Specifically, in one embodiment, according to the data characteristics of the original operation and maintenance indicator data, a predetermined normalization rule corresponding to the data characteristics is selected, which may specifically include:

[0067] According to the data characteristics of the original operation and maintenance indicator data, when it is determined that the original operation and maintenance indicator data is data recorded as a percentage of a preset range, the normalization rule is: update each numerical value in the original operation and maintenance indicator data to a quotient obtained by dividing each numerical value by the upper limit value of the preset range; when it is determined that the original operation and maintenance indicator data is memory usage, the normalization rule is: determine the maximum value of the original operation and maintenance indicator data, and use the memory capacity of the device corresponding to the maximum value as the target value; update each numerical value of the original operation and maintenance indicator data to a quotient obtained by dividing each numerical value by the target value.

[0068] The preset range can be a range from 0 to 100. For example, for operation and maintenance indicator data whose percentages are distributed in the range of (0, 100), such as memory usage, the value of each item of data can be updated to the quotient of the original value divided by 100. For example, for the data d, d is updated to d / 100. The specific normalization process can be implemented in Python, and the corresponding Python code is: "data= [d / 100 for d in data]". Data is a set of one-dimensional original operation and maintenance indicator data that needs to be normalized, and d is any one of the data.

[0069] For raw operation and maintenance indicator data with a value range from 0 to 1, that is, in the range of (0, 1), such as CPU usage, disk usage, etc., the raw values ​​can be used directly.

[0070] For data such as memory usage, the normalization rule is to take the maximum value of the current memory usage to be detected, for example, record it as max_value. Then, find the memory capacity closest to the maximum value max_value. The memory capacity of the device corresponding to the maximum value here can be understood as the memory capacity closest to the maximum value among the different memory capacities of the machine that change over time (for example, 8G, 16G, 32G, 64G, etc.), and the target value is the memory capacity closest to the maximum value, for example, record it as mem. G represents gigabytes. Then, update the values ​​of each item of the original operation and maintenance indicator data to the quotient of each value divided by the target value. The corresponding python code can be: "data=[d / mem for d in data]"; where data is a set of one-dimensional original operation and maintenance indicator data that needs to be normalized, and d is any one of the data.

[0071] In addition to the three different characteristics of the original operation and maintenance indicator data mentioned above, for other original operation and maintenance indicator data, the value of each data can be updated to the quotient of the original value and the maximum value of the group of data. For example, find the maximum value in a group of original operation and maintenance indicator data to be tested, recorded as max_value. Then, update each data d to d / max_value. The corresponding python code can be: "data=[d / max_value for d in data]"; where data is a group of one-dimensional original operation and maintenance indicator data that needs to be normalized, and d is any one of the data.

[0072] In one embodiment, based on the above step S230, according to the preset data duration days and the maximum number of vector rows, the target normalized data is converted into target two-dimensional vector data, which may specifically include:

[0073] Correct the target normalized data into corrected data of a preset length; convert the corrected data into initial two-dimensional vector data according to the preset data duration days and the maximum number of vector rows; wherein, in the initial two-dimensional vector data, the time span corresponding to a single row of data is the data duration days, and the total number of rows is the maximum number of vector rows; the time span corresponding to a single row of data is the maximum span between the collection times corresponding to all data in the single row of data; sample and combine each row of the initial two-dimensional vector data to obtain the target two-dimensional vector data; in the target two-dimensional vector data, the collection time of each consecutive preset number of rows of data belongs to different days, and the time span corresponding to each row of data is the data duration days.

[0074] First, the target normalized data within n days can be obtained, which can be recorded as data_origin. It can be understood that the target normalized data is a one-dimensional vector data. n can be set to 7 or other values. After that, the sampling interval of the data is set, which is recorded as T. The sampling interval T indicates how many data are sampled every time. Exemplarily, T can be 3, that is, a sample is taken every 3 data. T can also have other values.

[0075] After that, according to the sampling interval T of the data and the number of days n collected, the unit length of the sequence is calculated as a, which is the original length of the target normalized data and the integer divisibility of n×T. In Python, it can be expressed as: "a=len(data_origin) / / (n T)”; where data_origin is understood as the original length of the target normalized data, that is, the number of all data in the target normalized data.

[0076] Afterwards, the length of the target normalized data can be corrected according to the above-solved unit length a, the number of days of collection n, and the sampling interval T, so that the length of each row of data after vectorization is consistent. Specifically, the first a×n×T data in the target normalized data can be intercepted as the corrected data after the length correction. That is, the above-mentioned preset length is the product of the unit length, the number of days of collection, and the sampling interval.

[0077] After that, set the time span of the collection time corresponding to a row of data after vectorization as the data duration in days, which can be recorded as D. For example, when the value of D is 4, it means that a row of data contains data collected from the xth day to the data collected on the x+4th day, and the time span is 4 days. Set the maximum number of rows of two-dimensional vector data that can be constructed by the corrected data, as the maximum number of vector rows, which can be recorded as line_num; where line_num=nD. For example, if the data duration in days of a row of data is 4 days, then at most 3 rows of data can be constructed from the data collected within 7 days. Afterwards, based on the above-set data duration in days and the maximum number of vector rows, construct a single row of two-dimensional vector data lasting D days, with a total of line_num rows, to obtain the initial two-dimensional vector data, which can be recorded as tmps.

[0078] During the construction process, a list of daily indexes can be set, denoted as day_indexes. The value of the i-th element in day_indexes is i×a×line_num. Among them, the value of i is 0 to lin_num. Initialize tmps to an empty set, then traverse each element index in day_indexes, and add the corresponding data from index to index+a×T×D in the sequence composed of the above corrected data (which can be denoted as lines) into tmps. The corresponding python implementation code can be: "# For each day's index, only the index of line_num days is used, and each row of data spans 4 days.

[0079] day_indexes = [i a line_num for i in range(line_num)]

[0080] tmps= []

[0081] for index in day_indexes:

[0082] # Each piece of data spans 4 days, keeping the characteristics of the data

[0083] tmps.append(lines[index:index+a T D])”;

[0084] The text following “#” indicates a code comment.

[0085] Therefore, the initial two-dimensional vector data can be constructed from the corrected data, where the time span corresponding to a single row of data is the number of days the data lasts, and the total number of rows is the maximum number of rows in the vector.

[0086] After that, each row of the initial two-dimensional vector data tmps can be sampled at intervals T, and each row of data can be combined in an interval manner to obtain the expanded data as the target two-dimensional vector data, which can be recorded as samples. For example, the Python code for implementing interval sampling with D as 4, T as 3, and line_num as 3 is as follows:

[0087] "arr1 = []

[0088] arr2 = []

[0089] arr3 = []

[0090] arr4 = []

[0091] arr5 = []

[0092] arr6 = []

[0093] arr7 = []

[0094] arr8 = []

[0095] arr9 = []

[0096] for index in range(a 4):

[0097] arr1.append(tmps[0][index 3])

[0098] arr2.append(tmps[1][index 3])

[0099] arr3.append(tmps[2][index 3])

[0100] arr4.append(tmps[0][index 3+1])

[0101] arr5.append(tmps[1][index 3+1])

[0102] arr6.append(tmps[2][index 3+1])

[0103] arr7.append(tmps[0][index 3+2])

[0104] arr8.append(tmps[1][index 3+2])

[0105] arr9.append(tmps[2][index 3+2])

[0106] arr.append(arr1)

[0107] arr.append(arr2)

[0108] arr.append(arr3)

[0109] arr.append(arr4)

[0110] arr.append(arr5)

[0111] arr.append(arr6)

[0112] arr.append(arr7)

[0113] arr.append(arr8)

[0114] arr.append(arr9)

[0115] samples = np.array(arr)";

[0116] Among them, arr1 to arr9 represent the intermediate arrays used in the process of implementing interval sampling; append() represents the method of adding elements to the array; np.array represents a function in the open source numerical computing extension library NumPy. When using np.array(), a list, tuple or other iterable objects can be converted into a NumPy array. In this way, the sampling of the initial two-dimensional vector data is realized, and the target two-dimensional vector data is obtained.

[0117] Based on the values ​​of T and D in the above sample code, the target two-dimensional vector data finally obtained has three consecutive rows of data from different days, and the time span corresponding to each row of data lasts for 4 days. Therefore, through interval sampling, it is beneficial for the subsequent convolutional neural network to use data from different days for each convolution operation on the target two-dimensional vector data, thereby further improving the accuracy of data change type recognition of operation and maintenance indicator data.

[0118] In addition, in one embodiment, based on the above step S230, transforming the two-dimensional vector data into three-dimensional target vectorized data with channels, width and height as dimensions may include:

[0119] The deformation method of the preset open source numerical calculation extension library is called to transform the two-dimensional vector data into three-dimensional target vectorized data with channels, width and height as dimensions.

[0120] Specifically, the reshape function of the numpy library can be called to transform the two-dimensional vector data into three-dimensional target vectorized data. For example, the achievable python code is as follows:

[0121] "embedings = np.reshape(arr, (1, samples.shape[0], samples.shape[1]))";

[0122] Among them, embeddings is the final three-dimensional target vectorized data; arr is the array obtained by the above interval sampling process; samples is the target two-dimensional vector data. It can be seen that the above code reshapes the arr array into a new three-dimensional vectorized data, whose shape is specified by (1, samples.shape[0], samples.shape[1]). 1 is the size of the first dimension of the target vectorized data. samples.shape[0] is the size of the second dimension of the new array, which is equal to the size of the first dimension of samples. samples.shape[1] is the size of the third dimension of the target vectorized data, which is equal to the size of the second dimension of samples. By constructing three-dimensional vectorized data, data that is easy for convolutional neural networks to process can be obtained.

[0123] In one embodiment, the number of input channels of the convolutional neural network is 1. Specifically, the data input channel of the convolutional neural network can be modified to 1.

[0124] Additionally, in one embodiment, before obtaining the trained convolutional neural network, the training process of the convolutional neural network, the above-mentioned operation and maintenance indicator data classification method may further include:

[0125] The original training data is converted into two-dimensional image data; the two-dimensional image data is classified and labeled to obtain classification and labeling results; the original training data is divided into data sets, and the initial convolutional neural network is trained according to the classification and labeling results and the divided data sets to obtain a trained convolutional neural network.

[0126] Specifically, the original training data may be a normalized sample obtained by normalizing the operation and maintenance indicator sample used as the training sample. The normalization process may refer to the normalization process of the original operation and maintenance indicator data to be detected in the above embodiment, and this embodiment will not be repeated here. Afterwards, the normalized sample is converted into two-dimensional image data. The specific process may be: save the normalized sample in a comma separated value (csv) file, read the csv file, obtain the corresponding data sequence and record it as Y; then, obtain the length of Y and record it as L; generate a linear sequence with a length of L and a step length of step, recorded as X; wherein step may be a time interval in seconds. Let the value of the i-th element in X be a value in the range of 0 to L×step with a step length of step, which is expressed in python code as: “X= [i for i in range(0,L step,step)]".

[0127] After that, a plot is performed with X as the horizontal coordinate and Y as the vertical coordinate to obtain an image Image. The image Image represents the waveform of the sequence Y, and the image Image is used as two-dimensional image data. Figure 3 FIG. 1 is a schematic diagram of two-dimensional image data of this embodiment. Figure 3 As shown, the horizontal axis is the sequence X obtained above, and the vertical axis is Y. Afterwards, according to the change trend of the data waveform presented in the two-dimensional image data, classification and labeling are performed, for example, labeling as periodic type, linear type and stable type. The labeled label can be recorded as label. According to the label information, the csv file is placed in a folder named label to obtain the classification and labeling results. Repeat the labeling process until all data are labeled.

[0128] Afterwards, the original training data may be divided into a training set, a test set, and a validation set in a preset ratio, for example, a training set, a test set, and a validation set in a ratio of 8:1:1.

[0129] When it is then input into the initial convolutional neural network, the input data is vectorized to obtain three-dimensional vectorized training data. The specific process of converting one-dimensional labeled data into three-dimensional vector data can refer to the process of converting target normalized data into three-dimensional target vectorized data involved in the above embodiment, which will not be repeated here.

[0130] Among them, it should be noted that when the initial convolutional neural network is trained, the input channel of the initial convolutional neural network is modified to 1. The convolutional neural network is trained using the training set, and each iteration is verified using the verification set to obtain the optimal n models. Exemplarily, n can take a value of 10. The training parameters and related codes can be selected from any relevant open source project, such as the open source project timm, and this embodiment does not limit this. Among them, the way to load data is to load it in a conventional folder, which will not be repeated here. It should be noted that each time the data of the training set is read in, it needs to be vectorized and converted in the above embodiment before it can be input into the trained convolutional neural network. The 10 models obtained by testing the test set are selected, and the best model is selected as the final model to obtain the trained convolutional neural network. Exemplarily, the convolutional neural network can be a residual network restnet18, or other convolutional neural networks can be selected, and this embodiment does not limit this.

[0131] Figure 4 is a flowchart of a model training method based on vectorization of operation and maintenance indicator data in some embodiments, such as Figure 4 As shown, the model training method based on the vectorization of operation and maintenance indicator data includes the following steps:

[0132] Step S401, obtaining an operation and maintenance indicator sample; the operation and maintenance indicator sample is a time series data set.

[0133] Step S402: normalize the operation and maintenance indicator samples to obtain original training data.

[0134] Step S403, converting the original training data into two-dimensional image data, and classifying and labeling the two-dimensional image data;

[0135] In step S404, the original training data is divided into three data sets according to the classification and labeling results, namely a training set, a validation set, and a test set.

[0136] Step S405, reading each data in the three data sets and performing three-dimensional vectorization.

[0137] Step S406, training, testing and verifying the convolutional neural network using the vectorized training data to obtain the final trained convolutional neural network.

[0138] Step S407: Use the trained convolutional neural network to classify and identify data transformation types.

[0139] The above steps S401 to S407 realize the vectorization of the operation and maintenance indicator data, and fully express the indicator data based on the vectorization method, thereby improving the accuracy of identifying the change type of the operation and maintenance indicator data.

[0140] In this embodiment, an operation and maintenance indicator data classification device is also provided, and the operation and maintenance indicator data classification device is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. The terms "module", "unit", "sub-unit", etc. used below can implement a combination of software and / or hardware for predetermined functions. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0141] Figure 5 is a structural block diagram of the operation and maintenance indicator data classification device 50 of this embodiment, such as Figure 5 As shown, the operation and maintenance indicator data classification device 50 includes: an acquisition module 52, a normalization module 54, a vectorization module 56 and a classification module 58; wherein:

[0142] The acquisition module 52 is used to acquire the original operation and maintenance indicator data to be detected; the normalization module 54 is used to normalize the original operation and maintenance indicator data to obtain target normalized data; the vectorization module 56 is used to convert the target normalized data into target two-dimensional vector data according to the preset data duration days and the maximum number of vector rows; then the target two-dimensional vector data is transformed into three-dimensional target vectorized data with channel, width and height as dimensions; the classification module 58 is used to input the target vectorized data into the trained convolutional neural network for data classification to obtain the corresponding data change type.

[0143] It should be noted that the above modules can be functional modules or program modules, and can be implemented by software or hardware. For modules implemented by hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.

[0144] In this embodiment, an electronic device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0145] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0146] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0147] S1, obtaining the original operation and maintenance indicator data to be tested;

[0148] S2, normalize the original operation and maintenance indicator data to obtain target normalized data;

[0149] S3, according to the preset data duration days and the maximum number of vector rows, the target normalized data is converted into target two-dimensional vector data; then the target two-dimensional vector data is transformed into three-dimensional target vectorized data with channel, width and height as dimensions;

[0150] S4, input the target vectorized data into the trained convolutional neural network for data classification to obtain the corresponding data change type.

[0151] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and will not be repeated in this embodiment.

[0152] In addition, in combination with the operation and maintenance indicator data classification method provided in the above embodiment, a storage medium can also be provided in this embodiment to implement the operation and maintenance indicator data classification method. The storage medium stores a computer program; when the computer program is executed by the processor, any one of the operation and maintenance indicator data classification methods in the above embodiment is implemented.

[0153] It should be understood that the specific embodiments described herein are only used to explain the application, rather than to limit it. Based on the embodiments provided in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the protection scope of this application.

[0154] 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.

[0155] Obviously, the drawings are only some examples or embodiments of the present application. For ordinary technicians in the field, the present application can also be applied to other similar situations based on these drawings without creative work. In addition, it is understandable that although the work done in this development process may be complicated and lengthy, for ordinary technicians in the field, certain changes in design, manufacturing or production based on the technical content disclosed in this application are only conventional technical means and should not be regarded as insufficient content disclosed in this application.

[0156] The term "embodiment" in this application refers to a specific feature, structure or characteristic described in conjunction with the embodiment that can be included in at least one embodiment of the present application. The appearance of this phrase in various locations in the specification does not necessarily mean the same embodiment, nor does it mean that it is mutually exclusive with other embodiments and is independent or optional. It is clearly or implicitly understood by those of ordinary skill in the art that the embodiments described in this application can be combined with other embodiments without conflict.

[0157] The above-mentioned 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 patent protection. 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 scope of protection of the present application. Therefore, the scope of protection of the present application shall be subject to the attached claims.

Claims

1. A method for classifying operation and maintenance indicator data, characterized in that: include: Obtain the original operation and maintenance indicator data to be tested; Normalizing the original operation and maintenance indicator data to obtain target normalized data; Correcting the target normalized data to corrected data of a preset length; According to the preset data duration days and the maximum number of vector rows, the corrected data is converted into initial two-dimensional vector data; wherein, in the initial two-dimensional vector data, the time span corresponding to a single row of data is the data duration days, and the total number of rows is the maximum number of vector rows; the time span corresponding to the single row of data is the maximum span between the collection times corresponding to all the data in the single row of data; Sampling and combining each row of the initial two-dimensional vector data to obtain target two-dimensional vector data; in the target two-dimensional vector data, the collection time of each consecutive preset number of rows of data belongs to different days, and the time span corresponding to each row of data is the number of days the data lasts; Calling a deformation method of a preset open source numerical calculation extension library to transform the target two-dimensional vector data into three-dimensional target vectorized data with channels, width and height as dimensions; The target vectorized data is input into the trained convolutional neural network for data classification to obtain the corresponding data change type.

2. The operation and maintenance indicator data classification method according to claim 1 is characterized in that: The original operation and maintenance indicator data is normalized to obtain target normalized data, including: According to the data characteristics of the original operation and maintenance indicator data, a predetermined normalization rule corresponding to the data characteristics is selected; The original operation and maintenance indicator data is normalized according to the normalization rule to obtain the target normalized data.

3. The operation and maintenance indicator data classification method according to claim 2 is characterized in that: According to the data characteristics of the original operation and maintenance indicator data, a predetermined normalization rule corresponding to the data characteristics is selected, including: According to the data characteristics of the original operation and maintenance indicator data, when it is determined that the original operation and maintenance indicator data is data recorded as a percentage of a value within a preset range, the normalization rule is: updating each value in the original operation and maintenance indicator data to a quotient obtained by dividing each value by an upper limit value of the preset range; When determining that the original operation and maintenance indicator data is memory usage, the normalization rule is: determine the maximum value of the original operation and maintenance indicator data, and take the memory capacity of the device corresponding to the maximum value as the target value; update the various values ​​of the original operation and maintenance indicator data to the quotient obtained by dividing the various values ​​by the target value.

4. The operation and maintenance indicator data classification method according to claim 1 is characterized in that: The number of input channels of the convolutional neural network is 1.

5. The operation and maintenance indicator data classification method according to any one of claims 1 to 4, characterized in that: Before obtaining the trained convolutional neural network, the training process of the convolutional neural network includes: Convert the original training data into two-dimensional image data; Classifying and labeling the two-dimensional image data to obtain classification and labeling results; The original training data is divided into data sets, and the initial convolutional neural network is trained according to the classification and labeling results and the divided data sets to obtain the trained convolutional neural network.

6. A device for classifying operation and maintenance indicator data, characterized in that: include: Acquisition module, normalization module, vectorization module and classification module; among them: The acquisition module is used to acquire the original operation and maintenance indicator data to be detected; The normalization module is used to normalize the original operation and maintenance indicator data to obtain target normalized data; The vectorization module is used to correct the target normalized data into corrected data of a preset length; convert the corrected data into initial two-dimensional vector data according to the preset data duration days and the maximum number of vector rows; wherein, in the initial two-dimensional vector data, the time span corresponding to a single row of data is the data duration days, and the total number of rows is the maximum number of vector rows; the time span corresponding to the single row of data is the maximum span between the collection times corresponding to all data in the single row of data; sample and combine each row of data of the initial two-dimensional vector data to obtain target two-dimensional vector data; in the target two-dimensional vector data, the collection time of each consecutive preset number of rows of data belongs to different days, and the time span corresponding to each row of data is the data duration days; call the deformation method of the preset open source numerical calculation extension library to deform the target two-dimensional vector data into three-dimensional target vectorized data with channels, width and height as dimensions; The classification module is used to input the target vectorized data into the trained convolutional neural network for data classification to obtain the corresponding data change type.

7. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to execute the operation and maintenance indicator data classification method according to any one of claims 1 to 5.

8. 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 operation and maintenance indicator data classification method described in any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Bearing data model training and using method

    CN110750876A

  • Operation and maintenance fault analysis method and device and computer equipment

    CN116980307A