Data clustering processing method, flash memory device, and computer-readable storage medium

By updating the cluster centers, the problem of clustering results being greatly affected by historical data in existing technologies is solved, the accuracy of data clustering and the ability to reflect logical unit characteristics are improved, and the data storage and management of solid-state drives are optimized.

CN119989021BActive Publication Date: 2026-01-02DAPUSTOR CORP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411981657.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2026-01-02
Estimated Expiration
2044-12-31

AI Technical Summary

Technical Problem

Existing solid-state drive (SSD) offloading/grouping schemes are heavily influenced by historical data during clustering or classification, making it difficult to accurately reflect recent input/output characteristics and resulting in inaccurate clustering results.

Method used

By clustering the data points to be clustered based on the current cluster centers of multiple cluster groups, the corresponding cluster groups are determined, and the cluster center points are updated through a preset clustering algorithm to eliminate the adverse effects of historical data on the cluster centers.

Benefits of technology

It improves the accuracy of data clustering, enabling cluster centers to more accurately reflect the characteristics of logical units, and optimizes data storage and management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119989021B_ABST
    Figure CN119989021B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of data processing, and discloses a data clustering processing method, a flash memory device and a computer readable storage medium. The data points to be clustered are clustered based on current clustering centers of multiple clustering groups, and the clustering groups corresponding to the data points to be clustered are determined. The data points to be clustered are added to the clustering groups, and the current clustering center points of the clustering groups are updated through a preset clustering algorithm to obtain updated clustering center points. The application can eliminate the adverse effects of historical data on the clustering center, update the initial clustering center points to obtain the updated clustering center points, so that the updated clustering center more accurately reflects the characteristics of the logical unit and improves the data clustering accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the technical field of data processing, and in particular, to a data clustering processing method, a flash memory device, and a computer readable storage medium. BACKGROUND

[0002] In a flash memory device, due to the use of flash memory technology for the storage medium, the way of writing data is different from that of a traditional hard disk. When performing a write operation, a flash memory unit must first erase the original data, and the erase operation is performed in units of a relatively large unit (i.e., a storage block), rather than a single data page. This write mechanism results in the amount of data actually written to the storage medium often being greater than the original requested write amount, which is referred to as write amplification. In order to alleviate the problem of write amplification inside a solid state disk, technologies such as Open Channel (OC), Multi Stream (MS), Zoned Namespace (ZNS), and Flexible Data Placement (FDP) have emerged. These technologies need to be adapted to the upper software stack including applications, file systems, and device drivers, and are difficult to promote. In order to address this problem and achieve application-agnostic input / output data placement optimization, many intelligent solid state disk shunting / grouping schemes have been proposed.

[0003] At present, the existing solid state disk shunting / grouping scheme is to average all historical data points in a cluster through an average algorithm, and the dynamic incremental average considers both incoming data points and removed data points. In the existing scheme, each group is greatly affected by historical data information in the clustering or classification process, and it is difficult to accurately reflect recent input / output characteristics, resulting in classification errors. Taking the common K-means clustering as an example, the cluster center is calculated by the mean of all historical data points in the cluster. If the access pattern of a logical block has changed significantly, it may move from one cluster to another. If the block continues to contribute to the calculation of the center point of the original cluster, the clustering center of the original cluster may deviate, resulting in inaccurate clustering results. Therefore, the existing technical scheme has the defect of low clustering accuracy. SUMMARY

[0004] The embodiment of the application provides a data clustering processing method, a flash memory device and a computer readable storage medium. The data points to be clustered are clustered based on the current clustering centers of the plurality of clustering groups, and the clustering groups corresponding to the data points to be clustered are determined; the data points to be clustered are added to the clustering groups, and the current clustering center points of the clustering groups are updated through a preset clustering algorithm to obtain updated clustering center points. The application can eliminate the adverse effects of historical data on the clustering center, update the initial clustering center points to obtain updated clustering center points, so that the updated clustering center more accurately reflects the characteristics of the logical unit, and the data clustering accuracy is improved.

[0005] The embodiment of the application provides the following technical solutions:

[0006] In a first aspect, the embodiment of the application provides a data clustering processing method applied to a flash memory device, and the flash memory device includes a plurality of logical units. The method includes the following steps:

[0007] Obtaining historical feature data corresponding to the logical unit and determining initial clustering center points corresponding to the historical feature data, wherein the historical feature data includes a plurality of historical data points, the historical data points are feature vectors, and the feature vectors are used to represent the hot and cold degrees of the historical feature data points;

[0008] Determining a plurality of clustering groups according to the initial clustering centers, wherein one initial clustering center corresponds to one clustering group;

[0009] Clustering the historical feature data according to the initial clustering center points, determining the initial clustering center points corresponding to each historical data point, and dividing the historical feature data with the same initial clustering center into the same clustering group, wherein the hot and cold degrees of the historical feature data points in each clustering group are the same or similar;

[0010] Obtaining sample data to be clustered, wherein the sample data to be clustered includes a plurality of data points to be clustered;

[0011] Clustering the data points to be clustered based on the current clustering centers of the plurality of clustering groups, and determining the clustering groups corresponding to the data points to be clustered;

[0012] Adding the data points to be clustered to the clustering groups, and updating the current clustering center points of the clustering groups through a preset clustering algorithm to obtain updated clustering center points.

[0013] In some embodiments, clustering the data points to be clustered based on the current clustering centers of the plurality of clustering groups, and determining the clustering groups corresponding to the data points to be clustered, includes:

[0014] Traversing the data points to be clustered in the sample data to obtain the current data points to be clustered;

[0015] Calculate the Euclidean distance between the current data point to be clustered and the plurality of current cluster center points, to obtain a plurality of distance results;

[0016] According to the plurality of distance results, determine the minimum value in the distance results;

[0017] According to the minimum value, determine the current cluster center point corresponding to the minimum value;

[0018] According to the current cluster center point corresponding to the minimum value, determine the cluster grouping corresponding to the current data point to be clustered, and obtain the grouping size of the cluster grouping, wherein the grouping size is the number of logical addresses of the logical units in the cluster grouping.

[0019] In some embodiments, the sample data includes a timestamp of each sample point, and the current data point to be clustered is obtained by traversing the data points to be clustered in the sample data, including:

[0020] Obtain the timestamp of the data point to be clustered;

[0021] According to the timestamp of the data point to be clustered, determine the time sequence corresponding to the sample data to be clustered, wherein the data points to be clustered in the time sequence are sorted in ascending order of the timestamp;

[0022] Traverse the time sequence in ascending order of the timestamp, and obtain the current data point to be clustered from the time sequence.

[0023] In some embodiments, the preset clustering algorithm includes a first clustering algorithm or a second clustering algorithm or a third clustering algorithm, and the current cluster center point of the cluster grouping is updated by the preset clustering algorithm to obtain an updated cluster center point, including:

[0024] The current cluster center point of the cluster grouping is updated by the first clustering algorithm to obtain an updated cluster center point;

[0025] Alternatively,

[0026] The current cluster center point of the cluster grouping is updated by the second clustering algorithm to obtain an updated cluster center point;

[0027] Alternatively,

[0028] The current cluster center point of the cluster grouping is updated by the third clustering algorithm to obtain an updated cluster center point.

[0029] In some embodiments, the current cluster center point of the cluster grouping is updated by the first clustering algorithm to obtain an updated cluster center point, including:

[0030] According to the data point to be clustered, the current clustering center point and the grouping size of the clustering group, an updated clustering center point is calculated, specifically including:

[0031]

[0032] wherein μ new is the updated clustering center point, N is the grouping size of the clustering group, x in is the data point to be clustered, and μ1 is the current clustering center point.

[0033] In some embodiments, the method further includes:

[0034] obtaining the current clustering center point of the clustering group;

[0035] When the clustering group has a removed data point, the current clustering center point is updated according to the removed data point, the current clustering center point and the grouping size, and an updated clustering center point is calculated, specifically including:

[0036]

[0037] wherein μ new is the updated clustering center point, N is the grouping size of the clustering group, x out is the removed data point, and μ2 is the current clustering center point.

[0038] In some embodiments, the current clustering center point of the clustering group is updated by a second clustering algorithm to obtain an updated clustering center point, including:

[0039] setting a moving window and a window size of the moving window, wherein the window size is less than or equal to the grouping size of the clustering group;

[0040] determining a removed historical data point according to the time stamp of the historical data point, wherein the removed historical data point is the historical data point with the smallest time stamp in the moving window;

[0041] updating the current clustering center point according to the removed historical data point, the current clustering center point and the current data point to be clustered to obtain an updated clustering center point, specifically including:

[0042] mean new = mean + (x k -x k-w ) / w,

[0043] wherein mean new is the updated clustering center point, mean is the current clustering center point, x k is the current data point to be clustered, and x k-wFor the removed historical data points, w is the window size, wherein the current cluster center point = the sum of all historical data points in the moving window / the window size.

[0044] In some embodiments, the current cluster center point of the cluster group is updated by a third clustering algorithm to obtain an updated cluster center point, including:

[0045] A smoothing coefficient is set.

[0046] The current cluster center point is updated according to the smoothing coefficient, the current cluster center point and the current sample point to obtain an updated cluster center point, specifically including:

[0047] EMA t = alpha x t + (1-alpha) EMA t-1 ,

[0048] Wherein, EMA t is the updated cluster center point, alpha is the smoothing coefficient, x t is the data point to be clustered, EMA t-1 is the current cluster center point.

[0049] In some embodiments, the smoothing coefficient is set, including:

[0050] The smoothing coefficient is determined according to the group size, specifically including:

[0051] alpha = 2 / (gamma * N + 1),

[0052] Wherein, alpha is the smoothing coefficient, gamma is the group adjustment coefficient, and N is the group size.

[0053] In a second aspect, the embodiments of the present application provide a flash device, including:

[0054] A processor and a memory, the processor is used to execute the executable program code in the memory, when the executable program code is executed, the processor executes the instructions of the data clustering processing method of the first aspect.

[0055] In a third aspect, the embodiments of the present application provide a computer readable storage medium, the computer readable storage medium stores a computer program, when the computer program is executed, the data clustering processing method of any one of the first aspect is realized.

[0056] The beneficial effect of the embodiment of the present application is that: different from the prior art, the embodiment of the present application provides a data clustering processing method, which is applied to a flash memory device including a plurality of logical units, and the method includes: obtaining historical feature data corresponding to the logical units, and determining initial clustering center points corresponding to the historical feature data, wherein the historical feature data includes a plurality of historical data points, the historical data points are feature vectors, and the feature vectors are used to represent the hot and cold degrees of the historical feature data points; determining a plurality of clustering groups according to the initial clustering centers, wherein one initial clustering center corresponds to one clustering group; clustering the historical feature data according to the initial clustering center points, determining an initial clustering center point corresponding to each historical data point, and dividing the historical feature data with the same initial clustering center into the same clustering group, wherein the hot and cold degrees of the historical feature data points in each clustering group are the same or similar; obtaining sample data to be clustered, wherein the sample data to be clustered includes a plurality of data points to be clustered; clustering the data points to be clustered based on the current clustering centers of the plurality of clustering groups, determining the clustering groups corresponding to the data points to be clustered; adding the data points to be clustered to the clustering groups, and updating the current clustering center points of the clustering groups through a preset clustering algorithm to obtain updated clustering center points.

[0057] By clustering the data points to be clustered based on the current clustering centers of the plurality of clustering groups, determining the clustering groups corresponding to the data points to be clustered, adding the data points to be clustered to the clustering groups, and updating the current clustering center points of the clustering groups through a preset clustering algorithm to obtain updated clustering center points, the present application can eliminate the adverse effects of historical data on the clustering centers, update the initial clustering center points to obtain updated clustering center points, so that the updated clustering centers more accurately reflect the characteristics of the logical units, and improve the data clustering accuracy. BRIEF DESCRIPTION OF DRAWINGS

[0058] One or more embodiments are illustrated by way of example with reference to the accompanying drawings, which are schematic and not intended to be limiting of the embodiments, and in which like reference numerals refer to like elements in the various figures of the drawings in which: the figures are not to scale.

[0059] Figure 1 is a flowchart of a solid state disk intelligent shunting method based on a preset clustering algorithm provided by the embodiment of the present application;

[0060] Figure 2 is a flowchart of a data clustering processing method provided by the embodiment of the present application;

[0061] Figure 3 is Figure 2 is a detailed flowchart of step S205 in

[0062] Figure 4 is a refinement flowchart of step S251 in Figure 3

[0063] Figure 5 is a refinement flowchart of step S206 in Figure 2

[0064] Figure 6 is a refinement flowchart of step S261 in Figure 5

[0065] Figure 7 is a flowchart of updating a cluster center point when a data point removed from a cluster group according to an embodiment of the present application;

[0066] Figure 8 is a flowchart of updating a cluster center based on a dynamic incremental average method according to an embodiment of the present application;

[0067] Figure 9 is a refinement flowchart of step S262 in Figure 5

[0068] Figure 10 is a flowchart of updating a cluster center based on a moving sliding window average method according to an embodiment of the present application;

[0069] Figure 11 is a refinement flowchart of step S263 in Figure 5

[0070] Figure 12 is a refinement flowchart of step S2631 in Figure 11

[0071] Figure 13 is a flowchart of updating a cluster center based on an exponential moving average method according to an embodiment of the present application;

[0072] Figure 14 is a structure diagram of a flash memory device according to an embodiment of the present application.

[0073] BRIEF DESCRIPTION OF THE DRAWINGS

[0074] Reference Name Reference Name 140 Flash memory device 141 Processor 142 Memory DETAILED DESCRIPTION

[0075] ​​​​​​For the convenience of understanding the present application, the present application is described in more detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that when an element is described as "fixed to" another element, it can be directly on the other element or one or more intervening elements can be present therebetween. When an element is described as "connected to" another element, it can be directly connected to the other element or one or more intervening elements can be present therebetween. The terms "vertical", "horizontal", "left", "right", and similar expressions used in the present specification are for illustrative purposes only.

[0076] Unless otherwise defined, all technical and scientific terms used in the present specification are the same as those commonly understood by one skilled in the art to which the present application belongs. The terms used in the present specification are only for the purpose of describing specific embodiments of the present application and are not intended to limit the present application. The term "and / or" used in the present specification includes any and all combinations of one or more related listed items.

[0077] The technical solutions of the present application are specifically described below in conjunction with the accompanying drawings of the specification:

[0078] Please refer to Figure 1 , Figure 1 is a flowchart of a solid state disk intelligent shunting based on a preset clustering algorithm provided by an embodiment of the present application;

[0079] As shown in Figure 1 , the flow of the solid state disk intelligent shunting based on the preset clustering algorithm includes:

[0080] Step (1): Extract the feature vector of the logical block. The feature vector representing the characteristics of each logical block of the SSD needs to be extracted. These feature vectors can include the size, read-write frequency, access pattern, and other information of the logical block, depending on the requirements and goals of the shunting strategy.

[0081] Step (2): Obtain the clustering result by using the preset clustering algorithm to cluster the extracted feature vectors. The preset clustering algorithm includes a first clustering algorithm, a second clustering algorithm, and a third clustering algorithm. The first clustering algorithm is an algorithm for updating the clustering center based on a dynamic incremental average method. The second clustering algorithm is an algorithm for updating the clustering center based on a moving sliding window average method. The third clustering algorithm is an algorithm for updating the clustering center based on an exponential moving average method. In the clustering process, the current clustering center point is updated by accepting new data points. The algorithm iteratively reallocates data points to the nearest clustering center and updates the position of the clustering center until a convergence condition is reached (such as the clustering center no longer changes or a preset number of iterations is reached), obtaining the clustering result. The clustering result includes multiple clustering groups and the updated clustering center point corresponding to each clustering group.

[0082] Step (3): Place the data groups / shunt according to the clustering result. Place the logical blocks according to the clustering result obtained by the preset clustering algorithm. Specifically, logical blocks belonging to the same cluster can be placed in the same area of the SSD or the same type of storage medium in order to optimize read / write performance, prolong SSD life, or achieve other goals.

[0083] Step (4): After the shunt placement is completed, the write operation of the SSD needs to be continuously monitored to determine whether new data is written. If new data is written, the above process needs to be repeated (starting from extracting the feature vector of the logical block) in order to dynamically adjust the shunt strategy according to the latest data distribution and access mode; if new data is written, the data clustering process ends.

[0084] Please refer to Figure 2 , Figure 2 is a flowchart of a data clustering processing method provided by an embodiment of the present application;

[0085] As Figure 2 shown, the flow of the data clustering processing method includes:

[0086] Step S201: Obtain the historical feature data corresponding to the logical unit and determine the initial clustering center point corresponding to the historical feature data.

[0087] Specifically, the flash memory device includes a plurality of logical units, the types of the logical units include but are not limited to logical blocks or logical pages, historical feature data corresponding to the logical units is obtained from the flash memory device, wherein the historical feature data includes a plurality of historical data points, the historical data points are feature vectors, the feature vectors are used to represent the hot and cold degree of the historical data points, and it can be understood that when the logical unit is a logical block, one historical data point corresponds to the historical feature data of one logical block, and when the logical unit is a logical page, one historical data point corresponds to the historical feature data of one logical page.

[0088] In some embodiments, the historical data points are feature extracted by calculating a covariance matrix of the historical data points, and performing eigenvalue decomposition on the covariance matrix, to obtain eigenvalues and corresponding eigenvectors, wherein the eigenvalues represent the variance of the data projected onto the corresponding eigenvectors, and the eigenvectors define new coordinate axis directions, and then the eigenvectors corresponding to each historical data point are obtained, wherein the eigenvectors include but are not limited to the size of the logical unit, the read-write frequency, the access mode and other information capable of reflecting the hot and cold degree characteristics of the logical unit.

[0089] Step S202: determining a plurality of clustering groups according to the initial clustering center points;

[0090] Specifically, k historical data points are randomly selected from the historical feature data as initial clustering centers, or regions with higher density in the data point set are determined by a density estimation algorithm (such as kernel density estimation, DBSCAN), and the center points of these regions are selected as the initial clustering centers, to determine the initial clustering centers, and then a plurality of clustering groups are determined according to the initial clustering center points, wherein one initial clustering center point corresponds to one clustering group, and the number of initial clustering center points is equal to the number of clustering groups.

[0091] Step S203: clustering the historical feature data according to the initial clustering center points, determining the initial clustering center points corresponding to each historical data point, and dividing the historical feature data with the same initial clustering center into the same clustering group;

[0092] Specifically, the clustering algorithm includes a K-Means algorithm, and based on the K-Means algorithm, k historical data points are randomly selected from the historical data as initial clustering centers, for each historical data point, the Euclidean distances between the historical data point and the k initial clustering centers are calculated, to obtain k Euclidean distances corresponding to each historical data point, the minimum value of the k Euclidean distances is determined, and the initial clustering center corresponding to the minimum value of the Euclidean distance is determined as the initial clustering center point corresponding to the historical data point.

[0093] For example, assuming that there are initial clustering centers A and B, and history data points C and D, for the history data point C, first, the Euclidean distance between the feature vector corresponding to the history data point C and the initial clustering center A is calculated, denoted as a first Euclidean distance, then the Euclidean distance between the feature vector corresponding to the history data point C and the initial clustering center B is calculated, denoted as a second Euclidean distance, the first Euclidean distance and the second Euclidean distance are compared to determine the minimum value in the first Euclidean distance and the second Euclidean distance, and the initial clustering center corresponding to the minimum value is determined as the clustering result of the history data point C; for the history data point D, first, the Euclidean distance between the feature vector corresponding to the history data point D and the initial clustering center A is calculated, denoted as a third Euclidean distance, then the Euclidean distance between the feature vector corresponding to the history data point C and the initial clustering center B is calculated, denoted as a fourth Euclidean distance, the third Euclidean distance and the fourth Euclidean distance are compared to determine the minimum value in the third Euclidean distance and the fourth Euclidean distance, and the initial clustering center corresponding to the minimum value is determined as the clustering result of the history data point D.

[0094] In the embodiments of the present application, the number of k can be determined by the "elbow rule", which refers to drawing a relationship diagram of the total sum of squared errors (SSE, Sum of Squared Errors) and k, and selecting the k value corresponding to the inflection point (elbow).

[0095] Step S204: obtaining sample data to be clustered;

[0096] Specifically, the sample data to be clustered is obtained, wherein the sample data to be clustered includes a plurality of data points to be clustered, and it can be understood that the data points to be clustered have not been divided into any clustering group.

[0097] Step S205: clustering the data points to be clustered based on the current clustering centers of the plurality of clustering groups, to determine the clustering group corresponding to the data points to be clustered;

[0098] Specifically, please refer to Figure 3 , Figure 3 is Figure 2 a refinement process diagram of step S205 in

[0099] As shown in Figure 3 , step S205: clustering the data points to be clustered based on the current clustering centers of the plurality of clustering groups, to determine the clustering group corresponding to the data points to be clustered, includes:

[0100] Step S251: traversing the data points to be clustered in the sample data, to obtain a current data point to be clustered;

[0101] Specifically, please refer to Figure 4, Figure 4 is Figure 3 a refinement process diagram of step S251 in

[0102] As shown in Figure 4 , step S251: traversing the data points to be clustered in the sample data, obtaining the current data point to be clustered, comprising:

[0103] Step S2511: obtaining the timestamp of the data point to be clustered;

[0104] Specifically, the sample data to be clustered includes the timestamp of each data point to be clustered. According to the sample data, the timestamp of each data point to be clustered is obtained. For example, assuming that the data point to be clustered is a feature vector corresponding to a write request of a solid state disk, the timestamp corresponding to the sample data is the time when the solid state disk receives the write request.

[0105] Step S2512: determining the time sequence corresponding to the sample data to be clustered according to the timestamp of the data point to be clustered;

[0106] Specifically, according to the timestamp of each data point to be clustered, the data points to be clustered are sorted in ascending order of timestamp to determine the time sequence corresponding to the sample data to be clustered, wherein the data points to be clustered in the time sequence are sorted in ascending order of timestamp. For example, assuming that the sample data to be clustered includes data point A to be clustered, data point B to be clustered and data point C to be clustered, the timestamp corresponding to data point A to be clustered > the timestamp corresponding to data point B to be clustered > the timestamp corresponding to data point C to be clustered, then the time sequence corresponding to the sample data can be represented as {C, B, A}.

[0107] Step S2513: traversing the time sequence in ascending order of timestamp to obtain the current data point to be clustered from the time sequence;

[0108] Specifically, the time sequence corresponding to the sample data to be clustered is traversed in ascending order of timestamp to obtain the current sample point from the time sequence. For example, assuming that the time sequence corresponding to the sample data to be clustered is {C, B, A}, the first time the sample point C to be clustered is taken out from the time sequence, and the current sample point is determined as the sample point C to be clustered, the second time the sample point B to be clustered is taken out from the time sequence, and the current sample point is determined as the sample point B to be clustered, the third time the sample point A to be clustered is taken out from the time sequence, and the current sample point is determined as the sample point A to be clustered.

[0109] Step S252: calculating the Euclidean distance between the current data point to be clustered and a plurality of current cluster center points to obtain a plurality of distance results;

[0110] Specifically, the data point to be clustered can be understood as not being divided into any cluster group, and the plurality of distance results are obtained by calculating the Euclidean distances between the data point to be clustered and the plurality of current cluster center points.

[0111] In some embodiments, the Euclidean distance between each current cluster center point and the data point to be clustered can be calculated according to the coordinates of the current cluster center point and the coordinates of the data point to be clustered, and the plurality of distance results are obtained, wherein the distance results include the Euclidean distances between the plurality of current cluster center points and the data point to be clustered, and the calculation formula of the Euclidean distance is as follows:

[0112] d = sqrt((x2-x1) 2 +(y2-y1) 2 ),

[0113] wherein d is the Euclidean distance between the current cluster center point and the data point to be clustered, x1 is the horizontal coordinate of the current cluster center point, y2 is the vertical coordinate of the current cluster center point, x2 is the horizontal coordinate of the data point to be clustered, and y2 is the vertical coordinate of the data point to be clustered.

[0114] Step S253: determining the minimum value in the distance results according to the plurality of distance results;

[0115] Specifically, after calculating the Euclidean distances between the data point to be clustered and the plurality of current cluster center points to obtain the plurality of distance results, the minimum value in the distance results is determined by comparing the plurality of cluster results.

[0116] For example, assuming that there are current cluster centers A and B, and data points C and D to be clustered, for the data point C to be clustered, the Euclidean distance between the feature vector corresponding to the data point C to be clustered and the current cluster center A is calculated first, which is recorded as the first Euclidean distance, and then the Euclidean distance between the feature vector corresponding to the data point C to be clustered and the current cluster center B is calculated, which is recorded as the second Euclidean distance, and the first Euclidean distance and the second Euclidean distance are compared to determine the minimum value in the first Euclidean distance and the second Euclidean distance; for the data point D to be clustered, the Euclidean distance between the feature vector corresponding to the data point D to be clustered and the current cluster center A is calculated first, which is recorded as the third Euclidean distance, and then the Euclidean distance between the feature vector corresponding to the data point D to be clustered and the current cluster center B is calculated, which is recorded as the fourth Euclidean distance, and the third Euclidean distance and the fourth Euclidean distance are compared to determine the minimum value in the third Euclidean distance and the fourth Euclidean distance.

[0117] Step S254: determining the current cluster center point corresponding to the minimum value according to the minimum value;

[0118] Specifically, each current cluster center point corresponds to a cluster group, and the current cluster center point corresponding to the minimum value is determined according to the minimum value, and then the cluster group corresponding to the current cluster center point is determined through the minimum value.

[0119] Step S255: determining the cluster group corresponding to the current data point to be clustered according to the current cluster center point corresponding to the minimum value, and obtaining the group size of the cluster group;

[0120] Specifically, each data point to be clustered corresponds to a logical block and a logical block address, and the data point to be clustered is added to the cluster group corresponding to the second cluster center point, and the group size of the cluster group is obtained, wherein the group size of the cluster group is the number of logical block addresses in the cluster group.

[0121] For example, assuming that the current cluster center point of the data point C to be clustered is A, the data point C to be clustered is divided into the cluster group corresponding to the current cluster center point A, and assuming that the current cluster center point of the data point D to be clustered is B, the data point D to be clustered is divided into the cluster group corresponding to the current cluster center point B, thereby obtaining two cluster groups, the first cluster group contains the current cluster center point A and the data point C to be clustered, and the second cluster group contains the current cluster center point B and the data point D to be clustered.

[0122] In some embodiments, when the logical unit is a logical page, the group size of the cluster group can also be determined as the number of logical pages contained in the cluster group. It can be understood that the group size of each cluster group can be adjusted according to actual needs and system configuration.

[0123] Generally speaking, the cluster group with higher access frequency, i.e., the size of the first group of hot data with hot degree, can be relatively small, because it contains a relatively small amount of data and needs to be frequently accessed; and the cluster group with lower access frequency, i.e., the size of the cluster group of cold data with cold degree, can be relatively large, because cold data usually does not need to be frequently accessed and occupies more storage space. It can be understood that hot data refers to data with high access frequency and frequently accessed in recent time, and cold data refers to data with low access frequency and not accessed for a long time. Once the data is identified as hot data or cold data, the system will allocate them to different cluster groups, which are usually referred to as hot data group, warm data group and cold data group.

[0124] Step S206: adding the data point to be clustered to the cluster group, and updating the current cluster center point of the cluster group through a preset clustering algorithm to obtain an updated cluster center point;

[0125] Specifically, please refer to Figure 5 , Figure 5 isFigure 2 a refinement process diagram of step S206 in

[0126] As shown in Figure 5 step S206: adding the data point to be clustered to the clustering group, and updating the current clustering center point of the clustering group by a preset clustering algorithm to obtain an updated clustering center point, comprising:

[0127] Step S261: updating the current clustering center point of the clustering group by a first clustering algorithm to obtain an updated clustering center point;

[0128] Specifically, please refer to Figure 6 , Figure 6 is Figure 5 a refinement process diagram of step S261 in

[0129] As shown in Figure 6 step S261: updating the current clustering center point of the clustering group by a first clustering algorithm to obtain an updated clustering center point, comprising:

[0130] Step S2611: calculating the updated clustering center point according to the data point to be clustered, the current clustering center point and the grouping size of the clustering group;

[0131] Specifically, the first clustering algorithm includes a clustering center algorithm based on a dynamic incremental average mode, and the calculation formula of the algorithm is as follows:

[0132]

[0133] Wherein, μ new is the updated clustering center point, N is the grouping size of the clustering group, x in is the data point to be clustered, and μ1 is the current clustering center point.

[0134] Please refer to Figure 7 , Figure 7 is a process diagram for calculating the updated clustering center point when the clustering group has a removed data point;

[0135] As shown in Figure 7 when the clustering group has a removed data point, the process for calculating the updated clustering center point, comprising:

[0136] Step S701: obtaining the current clustering center point of the clustering group;

[0137] Specifically, when the clustering group has a removed data point, the current clustering center point of the clustering group is obtained.

[0138] Step S702: When the clustering group has a removed data point, the current clustering center point is updated according to the removed data point, the current clustering center point and the group size, and an updated clustering center point is calculated;

[0139] Specifically, the removed data point is obtained, the current clustering center point is updated according to the removed data point, the current clustering center point and the group size, and an updated clustering center point is calculated, and the calculation formula is as follows:

[0140]

[0141] Wherein, μ new is the updated clustering center point, N is the group size of the clustering group, x out is the removed data point, and μ2 is the current clustering center point.

[0142] Please refer to Figure 8 , Figure 8 is a whole flowchart of updating a clustering center based on a dynamic incremental average method provided in the embodiments of the present application.

[0143] As shown in Figure 8 , step (1): the clustering center and the counter are initialized, wherein the counter is used to record the number of accepted data points, for example, the initial values of the clustering center and the counter are set to zero.

[0144] Step (2): when a new data point is received, the clustering center is updated based on the dynamic incremental average method to obtain an updated clustering center, and specifically, the update formula of the clustering center is as follows: mean_new=mean+(x_k-mean) / (n+1), wherein mean_new represents the updated clustering center, mean represents the clustering center before updating, x_k represents the new data point, and n represents the number of accepted data points.

[0145] Step (3): the counter is increased by one, and the updated clustering center is taken as the current clustering center.

[0146] Step (4): it is judged whether all data points have been accepted, if not, step (2) is returned, and the next data point is accepted, and then the clustering center is updated; if yes, the data clustering process is ended.

[0147] In the embodiments of the present application, the dynamic incremental average method considers both the entering data points and the removed data points. Let the mean value be μ and the counter be N, and the initial values are both 0, when a new data x enters the group, N=N+1. When an old data is removed from the group, N=N-1.

[0148] Step S262: updating the current clustering center point of the clustering group by a second clustering algorithm to obtain an updated clustering center point;

[0149] Specifically, please refer to Figure 9 , Figure 9 is Figure 5 a detailed flowchart of step S262 in

[0150] As shown in Figure 9 , step S262: updating the current clustering center point of the clustering group by a second clustering algorithm to obtain an updated clustering center point, comprising:

[0151] Step S2621: setting a moving window and a window size of the moving window;

[0152] Specifically, the moving window and the window size corresponding to the moving window are set, wherein the window size (W) determines the number of data points considered in the clustering process. It should be noted that the window size of the moving window can be set according to actual needs, and the application does not limit the window size. For example, if the data points are relatively dense, a smaller W can be selected to capture the changes in data more carefully, and if the data points are relatively sparse, a larger W can be selected to find the clustering structure in a larger range.

[0153] Step S2622: determining the removed historical data points according to the time stamps of the historical data points;

[0154] Specifically, a first number of historical data points are determined according to the window size of the moving window, wherein the first number is equal to the window size. It can be understood that the first number of historical data points can be randomly selected historical data points or historical data points selected according to the size of the time stamp, and the application does not limit this. For example, if the window size is set to 100, the first number is 100, and 100 historical data points need to be obtained. The time stamps of all historical data points in the moving window are obtained, and the historical data point corresponding to the minimum time stamp is obtained according to the time stamps of all historical data points in the moving window. It can be understood that among all the historical data points in the current moving window, the historical data point is the earliest historical data point entering the moving window. When a new data point enters the moving window, the earliest historical data point entering the moving window needs to be removed.

[0155] Step S2623: updating the current clustering center point according to the removed historical data points, the current clustering center point and the current data points to be clustered to obtain an updated clustering center point;

[0156] Specifically, according to the historical data points and the window size, a current clustering center point corresponding to the historical data is determined, wherein the current clustering center point = the sum of the historical data points in the moving window / window size. For example, assuming that the window size is w, the number of the historical data points in the moving window is w, wherein the historical data points are x_1, x_2, …, x_w respectively, and the first clustering center is the mean of all the historical data points in the moving window, and the calculation formula is mean = (x_1+x_2+…+x_w) / w, wherein mean represents the first clustering center, w represents the window size, and x_1, x_2, …, x_w represent the w historical data points in the moving window.

[0157] According to the removed historical data point, the current clustering center point and the current data point to be clustered, the current clustering center point is updated to obtain an updated clustering center point, and the specific operations include:

[0158] mean new =mean+(x k -x k-w ) / w,

[0159] wherein mean new is the updated clustering center point, mean is the current clustering center point, x k is the current data point to be clustered, x k-w is the removed historical data point, and w is the window size, wherein the current clustering center point = the sum of all the historical data points in the moving window / window size.

[0160] In some embodiments, in addition to calculating the mean of the historical data points in the moving window, the regions with high density in the data point set can also be determined by a density estimation algorithm (such as kernel density estimation, DBSCAN), and the center points of these regions are selected as the first clustering center to determine the first clustering center.

[0161] Figure 10 is a whole process schematic diagram for updating a clustering center based on a moving sliding window average method provided by an embodiment of the present application;

[0162] As Figure 10 shown, the process of updating the clustering center based on the moving sliding window average method includes:

[0163] Step (1): Set a moving window, initialize the window size of the moving window as w, obtain the first w historical data points, and calculate the mean of the first w historical data points: mean = (x_1+x_2+…+x_w) / w, wherein mean represents the current initial clustering center, that is, the first clustering center point.

[0164] Step (2): each time a new data point x k is accepted, the moving window slides to the right so that the new data point enters the moving window and the earliest accepted data point in the moving window is removed; the clustering center is updated according to the following calculation formula: mean new = mean + (x k - x k-w ) / w, wherein mean new represents the updated clustering center, mean represents the current clustering center, x k represents the new data point, x k-w represents the removed data point, and w represents the size of the moving window.

[0165] Step (3): the updated clustering center is taken as the current clustering center.

[0166] Step (4): it is judged whether all data points have been accepted, if not, returning to step (2) and accepting the next data point and updating the clustering center; if yes, ending the data clustering process.

[0167] In the embodiment of the application, in order to reduce memory overhead, the application further proposes a clustering center update based on moving sliding window average, which maintains a fixed size window for each cluster, and when new data x comes, it is added to the window, and if the number of data points in the window exceeds W, the earliest data point in the window is removed, so that the window always contains only W recent data points, and then the calculation formula of the moving sliding window average can be derived:

[0168] Step S263: updating the current clustering center point of the clustering group by the third clustering algorithm to obtain an updated clustering center point;

[0169] Specifically, please refer to Figure 11 , Figure 11 is Figure 5 a refinement process diagram of step S263 in

[0170] As shown in Figure 11 , step S263: updating the current clustering center point of the clustering group by the third clustering algorithm to obtain an updated clustering center point, comprising:

[0171] Step S2631: setting a smoothing coefficient;

[0172] Specifically, please refer to Figure 12 , Figure 12 is Figure 11 a refinement process diagram of step S2631 in

[0173] As shown in Figure 12 , step S2631: setting a smoothing coefficient, comprising:

[0174] Step S6311: determining a smoothing coefficient according to the group size;

[0175] Specifically, the smoothing coefficient is determined according to the group size of the clustering group, and a calculation formula of the smoothing coefficient is as follows:

[0176] α = 2 / (γ*W + 1),

[0177] wherein, α is the smoothing coefficient, γ is a group adjustment coefficient, and W is the group size.

[0178] Step S2632: updating the current clustering center point according to the smoothing coefficient, the current clustering center point, and the current sample point to obtain an updated clustering center point;

[0179] Specifically, the calculation formula of the updated clustering center point is determined according to the smoothing coefficient, the second clustering center point, and the current sample point, and the calculation formula is as follows:

[0180] EMA t = αx t + (1-α)EMA t-1 ,

[0181] wherein, EMA t is the updated clustering center point, x t is the current sample point, EMA t-1 is the second clustering center point, and α is the smoothing coefficient, which is in a range of (0, 1). When α is larger, the weight attenuation is faster, and thus the memory of EMA is shorter, and the influence of historical data is rapidly reduced. When α is smaller, the memory of EMA is longer, and the influence of historical data lasts for a longer time.

[0182] For example, based on the calculation formula of the updated clustering center point, the specific calculation process is as follows: assuming that the time series is [10, 20, 30, 40, 50], the smoothing coefficient is 0.5, the second clustering center point EMA1 is initialized as 10, the current sample point is obtained from the time series in the order of time stamp from small to large, and the calculation formula EMA t = αx t + (1-α)EMA t-1 of the updated clustering center point is used to calculate the updated clustering center point:

[0183] When t = 2, the current sample point obtained from the time series is 20, and thus EMA2 = 0.5*20 + (1-0.5)*10 = 10 + 5 = 15;

[0184] When t=3, the current sample point is 30 from the time series, and EMA3=0.5*30+(1-0.5)*15=15+7.5=22.5;

[0185] When t=4, the current sample point is 40 from the time series, and EMA4=0.5*40+(1-0.5)*22.5=20+11.25=31.25;

[0186] t=n, and the next sample point in the time series is obtained in this way, and the second cluster center point is continuously updated until all sample points in the sample data are traversed, and the updated cluster center point is obtained.

[0187] In some embodiments, before obtaining the sample data, the grouping adjustment coefficient can be set to an initial value, and preferably, the initial value of the grouping adjustment coefficient can be set to 1. It can be understood that when the grouping adjustment coefficient is 1, γ*W in the calculation formula of the smoothing coefficient α=2 / (γ*W+1) is equal to the grouping size of the first group, and at this time, the grouping size is in a state without being adjusted. In the subsequent clustering process, the grouping adjustment coefficient can be adjusted to make the clustering effect of the algorithm better, and thus the final clustering result better reflects the trend of the new data.

[0188] In the embodiments of the present application, the size of the smoothing coefficient is adjusted by the grouping adjustment coefficient, and a differentiated forgetting mechanism can be realized. The differentiated forgetting mechanism means that the forgetting rate of the historical data should be differentiated. When the value of the smoothing coefficient increases, the weight of the current sample point increases, which means that the influence of the new sample data on the updated cluster center point increases, that is, a faster forgetting rate is set for the historical data. Conversely, when the value of the smoothing coefficient decreases, the weight of the current sample point decreases, which means that the influence of the new sample data on the updated cluster center point decreases, that is, a slower forgetting rate is set for the historical data.

[0189] Please refer again to Figure 13 , Figure 13 is a whole process schematic diagram for updating the cluster center based on the exponential moving average method provided by the embodiments of the present application;

[0190] As Figure 13 shown, the whole process of updating the cluster center based on the exponential moving average method includes:

[0191] Step (1): set a smoothing coefficient and a grouping size of the clustering group, initialize the smoothing coefficient to be a=2 / (N+1), where a is the smoothing coefficient, N is the grouping size of the clustering group, obtain a historical data point with the smallest timestamp in historical data points, and determine the historical data point as a first historical data point, and initialize a second clustering center point of the current clustering group as the first historical data point.

[0192] Step (2): after accepting a new sample point x_k, update the second clustering center according to the following calculation formula: mean_new=a*x_k+(1-a)*mean, where mean_new represents an updated clustering center, mean represents the second clustering center, x_k represents the new sample point, and a represents the smoothing coefficient.

[0193] Step (3): take the updated clustering center as the current second clustering center.

[0194] Step (4): determine whether all sample points have been accepted, if not, return to step (2), accept the next sample point, and then update the second clustering center point; if yes, obtain the updated clustering center point, and end the data clustering process.

[0195] In the embodiment of the application, in order to minimize memory overhead, the second clustering center is updated based on the exponential moving average (EMA), which gives higher weight to the latest data and gradually reduces the weight of historical data, so as to more sensitively reflect the recent changes of data. According to the current sample point x i and the second clustering center point EMA t-1 , the updated clustering center point EMA t is determined, where the updated clustering center point=a*current sample point+(1-a)*second clustering center point.

[0196] In the embodiments of the present application, a data clustering processing method is provided, which is applied to a flash device including a plurality of logical units. The method comprises: obtaining historical feature data corresponding to the logical units, and determining initial clustering center points corresponding to the historical feature data, wherein the historical feature data includes a plurality of historical data points, the historical data points are feature vectors, and the feature vectors are used to represent the hot and cold degrees of the historical data points; determining a plurality of clustering groups according to the initial clustering centers, wherein one initial clustering center corresponds to one clustering group; clustering the historical feature data according to the initial clustering center points, determining initial clustering center points corresponding to each historical data point, and dividing the historical feature data with the same initial clustering center into the same clustering group, wherein the hot and cold degrees of the historical data points in each clustering group are the same or similar; obtaining sample data to be clustered, wherein the sample data to be clustered includes a plurality of data points to be clustered; clustering the data points to be clustered based on the current clustering centers of the plurality of clustering groups, determining clustering groups corresponding to the data points to be clustered; adding the data points to be clustered to the clustering groups, and updating the current clustering center points of the clustering groups through a preset clustering algorithm to obtain updated clustering center points.

[0197] By clustering the data points to be clustered based on the current clustering centers of the plurality of clustering groups, determining clustering groups corresponding to the data points to be clustered, adding the data points to be clustered to the clustering groups, and updating the current clustering center points of the clustering groups through a preset clustering algorithm to obtain updated clustering center points, the present application can eliminate the adverse effects of historical data on the clustering centers, update the initial clustering center points to obtain updated clustering center points, so that the updated clustering centers more accurately reflect the features of the logical units, and improve the data clustering accuracy.

[0198] Please refer to Figure 14 , Figure 14 A structural schematic diagram of a flash device is provided in the embodiments of the present application.

[0199] As Figure 14 shown, the flash device 140 includes one or more processors 141 and a memory 142. Among them, Figure 14 take one processor 141 as an example.

[0200] The processor 141 and the memory 142 can be connected through a bus or other means, Figure 14 take the connection through the bus as an example.

[0201] The processor 141 is used to provide calculation and control capabilities to control the sending end to perform corresponding tasks, for example, to control the sending end to perform the above Figure 2The data clustering processing method in the title is applied to a flash memory device including a plurality of logical units, and the method includes: obtaining historical feature data corresponding to the logical units and determining initial clustering center points corresponding to the historical feature data, wherein the historical feature data includes a plurality of historical data points, the historical data points are feature vectors, and the feature vectors are used to represent the hot and cold degrees of the historical data points; determining a plurality of clustering groups according to the initial clustering centers, wherein one initial clustering center corresponds to one clustering group; clustering the historical feature data according to the initial clustering center points, determining initial clustering center points corresponding to each historical data point, and dividing the historical feature data with the same initial clustering center into the same clustering group, wherein the hot and cold degrees of the historical data points in each clustering group are the same or similar; obtaining sample data to be clustered, wherein the sample data to be clustered includes a plurality of data points to be clustered; clustering the data points to be clustered based on the current clustering centers of the plurality of clustering groups, determining the clustering groups corresponding to the data points to be clustered; adding the data points to be clustered to the clustering groups, and updating the current clustering center points of the clustering groups through a preset clustering algorithm to obtain updated clustering center points.

[0202] By clustering the data points to be clustered based on the current clustering centers of the plurality of clustering groups, determining the clustering groups corresponding to the data points to be clustered, adding the data points to be clustered to the clustering groups, and updating the current clustering center points of the clustering groups through a preset clustering algorithm to obtain updated clustering center points, the application can eliminate the adverse effects of historical data on the clustering centers, update the initial clustering center points to obtain updated clustering center points, so that the updated clustering centers more accurately reflect the features of the logical units and improve the data clustering accuracy.

[0203] The processor 141 can be a general processor, including a central processing unit (CPU), a network processor (NP), a hardware chip, or any combination thereof; and can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0204] The memory 142, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs and modules, such as program instructions / modules corresponding to the data clustering processing method in the embodiments of the present application. The processor 141 can implement the data clustering processing method in any of the method embodiments by running the non-transitory software programs, instructions and modules stored in the memory 142. Specifically, the memory 142 can include a volatile memory (VM), such as a random access memory (RAM); the memory 142 can also include a non-volatile memory (NVM), such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD), or other non-transitory solid-state storage devices; and the memory 142 can further include a combination of the above types of memories.

[0205] The memory 142 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 142 can optionally include a memory disposed remotely relative to the processor 141, and these remote memories can be connected to the processor 141 through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0206] One or more modules are stored in the memory 142, and when executed by the one or more processors 141, perform the data clustering processing method in any of the above method embodiments, for example, perform the data clustering processing method described above. Figure 2 The various steps shown.

[0207] In the embodiments of the present application, the flash device 140 can also have a wired or wireless network interface, a keyboard, and an input and output interface, and the like, so as to perform input and output, and the flash device 140 can also include other components for implementing device functions, which are not described herein.

[0208] The embodiments of the present application also provide a non-volatile computer readable storage medium, for example, a memory including program codes, the above-mentioned program codes can be executed by a processor to complete the data clustering processing method in the above-mentioned embodiments. For example, the non-volatile computer readable storage medium can be a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a read-only compact disc (Compact Disc Read-Only Memory, CDROM), a magnetic tape, a floppy disk and an optical data storage device, etc.

[0209] The embodiments of the present application also provide a computer program product, which includes one or more program codes, the program codes are stored in a non-volatile computer readable storage medium. The processor of the electronic device reads the program codes from the non-volatile computer readable storage medium, and the processor executes the program codes to complete the method steps of the data clustering processing method provided in the above-mentioned embodiments.

[0210] Those of ordinary skill in the art can understand that all or part of the steps of the above-mentioned embodiments can be completed by hardware, or by program codes related to hardware, and the program can be stored in a computer readable storage medium, and the above-mentioned storage medium can be a read-only memory, a magnetic disk or an optical disk, etc.

[0211] Through the above description of the embodiments, those skilled in the art can clearly understand that the embodiments can be implemented by means of software plus a general hardware platform, and of course can also be implemented by hardware. Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by a computer program instructing related hardware, and the program can be stored in a non-volatile computer readable storage medium. When the program is executed, it can include the processes of the above-mentioned embodiment methods. The non-volatile computer readable storage medium can be a magnetic disc, an optical disc, a read-only memory (ROM) or a random access memory (RAM) and the like.

[0212] Finally, it should be noted that: the above examples are only used to illustrate the technical solutions of the present application, and not to limit them; under the idea of the present application, the technical features of the above examples or different embodiments can also be combined, the steps can be implemented in any order, and there are many other changes of the different aspects of the present application as described above. In order to be brief, they are not provided in detail; although the present application has been described in detail with reference to the foregoing examples, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing examples, or make equivalent replacement for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A data clustering processing method, characterized by, Applied to a flash memory device including a plurality of logical units, the method comprises: obtaining historical feature data corresponding to the logical units and determining initial clustering center points corresponding to the historical feature data, wherein the historical feature data includes a plurality of historical data points, the historical data points are feature vectors, and the feature vectors are used to represent the cold and hot degrees of the historical data points; determining a plurality of clustering groups according to the initial clustering center points, wherein one initial clustering center point corresponds to one clustering group; clustering the historical feature data according to the initial clustering center points, determining initial clustering center points corresponding to each historical data point, and dividing the historical feature data with the same initial clustering center points into the same clustering group, wherein the cold and hot degrees of the historical data points in each clustering group are the same or similar; obtaining sample data to be clustered, wherein the sample data to be clustered includes a plurality of data points to be clustered; clustering the data points to be clustered based on current clustering center points of the plurality of clustering groups, determining clustering groups corresponding to the data points to be clustered; adding the data points to be clustered to the clustering groups and updating the current clustering center points of the clustering groups through a preset clustering algorithm to obtain updated clustering center points, specifically including: setting a smoothing coefficient, wherein the smoothing coefficient is determined according to the group size of the clustering groups; updating the current clustering center points based on the smoothing coefficient, the current clustering center points and the current sample points to obtain the updated clustering center points, specifically including: , wherein, is the updated cluster center point, is a smoothing coefficient, is the data point to be clustered, is the current cluster center point.

2. The method of claim 1, wherein, The clustering of the data points to be clustered based on the current clustering center points of the plurality of clustering groups to determine the clustering groups corresponding to the data points to be clustered includes: traversing the data points to be clustered in the sample data to obtain a current data point to be clustered; calculating the Euclidean distances between the current data point to be clustered and the plurality of current clustering center points to obtain a plurality of distance results; determining the minimum value in the distance results according to the plurality of distance results; determining the current clustering center point corresponding to the minimum value according to the minimum value; determining the clustering group corresponding to the current data point to be clustered according to the current clustering center point corresponding to the minimum value, and obtaining the group size of the clustering group, wherein the group size is the number of logical addresses of the logical units in the clustering group.

3. The method of claim 2, wherein, The sample data includes the timestamps of each sample point, and the traversal of the data points to be clustered in the sample data to obtain a current data point to be clustered includes: obtaining the timestamp of the data point to be clustered; determining a time sequence corresponding to the sample data to be clustered according to the timestamp of the data point to be clustered, wherein the data points to be clustered in the time sequence are sorted in ascending order of timestamps; traversing the time sequence in ascending order of timestamps to obtain the current data point to be clustered from the time sequence.

4. The method of claim 3, wherein, The preset clustering algorithm further comprises a second clustering algorithm, and the current clustering center point of the clustering group is updated by the preset clustering algorithm to obtain an updated clustering center point, comprising: The current clustering center point of the clustering group is updated by the second clustering algorithm to obtain an updated clustering center point, comprising: A moving window and a window size of the moving window are set, wherein the window size is less than or equal to a group size of the clustering group; The removed historical data point is determined according to the time stamp of the historical data point, wherein the removed historical data point is a historical data point with the smallest time stamp in the moving window; The current clustering center point is updated according to the removed historical data point, the current clustering center point and the current data point to be clustered to obtain an updated clustering center point, specifically comprising: , wherein, is the updated cluster center point, is the current cluster center point, is the current data point to be clustered, is the removed historical data point, is the window size, wherein the current cluster center point = the sum of all historical data points within the moving window / the window size.

5. The method of claim 1, wherein, The setting of the smoothing coefficient comprises: The smoothing coefficient is determined according to the group size, specifically comprising: , wherein, is a smoothing coefficient, is a grouping adjustment coefficient, is a group size.

6. A flash memory device, comprising: comprising: A processor and a memory, the processor is used to execute executable program codes in the memory, when the executable program codes are executed, the processor executes instructions of the data clustering processing method in any one of claims 1 to 5.

7. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, when the computer program is executed, the data clustering processing method in any one of claims 1 to 5 is realized.

Citation Information

Patent Citations

  • Hot data recognizing method of solid state disk by fusing various machine learning algorithms

    CN106874213A

  • Clustering method and device, computer equipment and storage medium

    CN115344692A