Data stream clustering method and device and processor

By extracting the seasonal and trending characteristics of financial data flow, building a time series and performing segmentation processing, and clustering feature vectors using clustering center points, the problem of low clustering accuracy of data flows in the existing technology is solved, and more efficient and accurate data flow clustering analysis is achieved.

CN119807785APending Publication Date: 2025-04-11INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411996280.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

In the case of real-time update of data streams, the existing technology cannot effectively realize multi-time series correlation analysis and real-time update of cluster analysis results, resulting in low clustering accuracy of data streams.

Method used

By obtaining the target data flow, extracting seasonal features and trend features, constructing a time series, performing segmentation processing to obtain the time sub-sequence, determining its eigenvectors, and clustering the eigenvectors using the clustering center point to obtain the clustering result.

Benefits of technology

It improves the real-time and effectiveness of data flow clustering processing, can accurately capture seasonal changes and trend patterns, provides financial institutions with real-time market insights and customer behavior analysis, and significantly improves the efficiency and accuracy of clustering analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119807785A_ABST
    Figure CN119807785A_ABST
Patent Text Reader

Abstract

The invention discloses a data stream clustering method, a data stream clustering device and a processor. Relates to the business field, and the method comprises the following steps: obtaining a to-be-clustered target data stream, and extracting seasonal features and trend features from the target data stream, the target data stream being used for representing a fund flow state in a target account; constructing a time sequence corresponding to the target data stream at least based on the seasonal features and the trend features; segmenting the time sequence to obtain a plurality of time subsequences, and determining feature vectors corresponding to the time subsequences; and clustering processing is performed on the plurality of feature vectors corresponding to the plurality of time subsequences by using a clustering center point to obtain a clustering result, and the clustering center point is used for determining the similarity degree among the plurality of feature vectors. Through the method and the device, the technical problem of low clustering accuracy of the data stream in the related technology is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the business field, and in particular, to a data stream clustering method, device and processor. Background Art

[0002] At present, financial data stream is a continuous and dynamically changing sequence of financial data in the financial market. It is a direct reflection of the dynamic changes in the operating conditions of the financial market, economic conditions, and investor behavior, and is the economic characteristics of the financial market expressed through time series streams. Financial data stream analysis is the basis of financial market data mining, and financial data stream clustering analysis is an important component and foundation of financial data stream analysis. Its research is of great significance to the financial industry and the economic field. Financial data stream clustering analysis combines the dynamic characteristics of data streams to perform real-time clustering analysis on financial data streams. By extracting the characteristics of time series and matching clustering methods, real-time clustering analysis of financial data streams is achieved.

[0003] In the related art, the real-time clustering analysis method of financial data stream based on time series decomposition is mainly aimed at a single time series. In the clustering analysis of financial data stream, the continuity, dynamics, real-time nature of the data stream and the correlation between the features of different time series have an important impact on the effectiveness of the clustering analysis results. However, the existing method can only realize the feature extraction and clustering analysis of a single time series when the data stream is updated in real time, and cannot realize the correlation analysis of multiple time series. In addition, when the data stream is updated in real time, the clustering analysis results cannot be updated in real time and effectively, and the real-time and effectiveness of the clustering analysis results cannot be effectively improved. Therefore, there is still a technical problem of low clustering accuracy of data streams in the related art.

[0004] With respect to the technical problem of low clustering accuracy of data streams in related technologies, no effective solution has been proposed so far. Summary of the invention

[0005] The main purpose of the present application is to provide a data stream clustering method, device and processor to solve the technical problem of low accuracy of data stream clustering in related technologies.

[0006] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a data stream clustering method is provided. The method comprises: obtaining a target data stream to be clustered, and extracting seasonal characteristics and trend characteristics from the target data stream, wherein the target data stream is used to represent the capital flow status in the target account; constructing a time series corresponding to the target data stream based at least on the seasonal characteristics and trend characteristics; performing segmentation processing on the time series to obtain multiple time subsequences, and determining the feature vectors corresponding to the time subsequences; using cluster center points, clustering multiple feature vectors corresponding to the multiple time subsequences to obtain clustering results, wherein the cluster center points are used to determine the similarity between the multiple feature vectors.

[0007] Optionally, seasonal features and trend features are extracted from the target data stream, including: using a time series decomposition model to decompose the target data stream to obtain seasonal features and trend features.

[0008] Optionally, the target data stream is decomposed using a time series decomposition model to obtain seasonal characteristics and trend characteristics, including: obtaining a multiplication model corresponding to the target data stream, wherein the multiplication model is used to indicate that the seasonal characteristics, trend characteristics and residuals in the target data stream are multiplied by each other; converting the multiplication model into an addition model, wherein the addition model is used to indicate that the seasonal characteristics and trend characteristics in the target data stream are added to each other; and using the time series decomposition model to determine the seasonal characteristics and trend characteristics from the addition model.

[0009] Optionally, the time series is segmented to obtain multiple time subsequences, including: a first segmentation processing step, taking the start and end points of the time series as reference points, and taking the points with the largest distance from the reference points as segmentation points, and segmenting the time series using the segmentation points to obtain time subsequences; a second segmentation processing step, obtaining the longest subsequence from the time subsequences obtained in the first segmentation processing step, taking the start and end points of the longest subsequence as reference points, and taking the points with the largest distance from the reference points as segmentation points, and segmenting the longest subsequence using the segmentation points to obtain time subsequences; repeating the second segmentation processing step until the number of time subsequences reaches a first target number, and outputting the first target number of time subsequences obtained by the segmentation processing.

[0010] Optionally, determining the feature vector corresponding to the time subsequence includes: extracting a second target number of feature points from the time subsequence, and constructing a corresponding feature vector based on the feature points.

[0011] Optionally, extracting a second target number of feature points from the time subsequence includes: a first determination step, taking the starting point of the time subsequence as the first feature point, and taking the end point of the time subsequence as the second feature point; a second determination step, taking the point with the largest distance from the first feature point and the second feature point as the third feature point; a third determination step, from the segment formed by the first feature point and the third feature point, and from the segment formed by the third feature point and the second feature point, respectively determine the point with the largest distance from the first feature point, the second feature point and the third feature point as the fourth feature point; repeat the third determination step until the number of feature points reaches the second target number, and output the second target number of feature points.

[0012] Optionally, the method also includes: in response to the existence of candidate time subsequences to be clustered, determining the similarity of a feature vector of the candidate time subsequence with feature vectors corresponding to multiple time subsequences; incorporating the candidate time subsequence into a time subsequence whose similarity reaches a similarity threshold, and updating the feature vector corresponding to the time subsequence for clustering; in response to the absence of a time subsequence in multiple time subsequences whose similarity to the candidate time subsequence reaches a similarity threshold, treating the candidate time subsequence as a time subsequence among multiple time subsequences.

[0013] Optionally, the method also includes: randomly selecting feature vectors of a third target number from the feature vectors of the target number as cluster center points of the third target number; using the cluster center points, clustering multiple feature vectors corresponding to multiple time subseries to obtain clustering results, including: obtaining, from the feature vectors of the target number, the distances corresponding to the feature vectors other than the feature vectors of the third target number and the cluster center points of the third target number; assigning the feature vectors other than the feature vectors of the third target number to the clusters corresponding to the cluster center points with the smallest distances to obtain clustering results; the method also includes: in response to the completion of the clustering process, updating the cluster center points based on the clustering results.

[0014] In order to achieve the above-mentioned purpose, according to another aspect of the present application, a data stream clustering device is provided. The device includes: an acquisition unit, which is used to acquire a target data stream to be clustered and extract seasonal characteristics and trend characteristics from the target data stream, wherein the target data stream is used to represent the capital flow status in the target account; a construction unit, which is used to construct a time series corresponding to the target data stream based at least on the seasonal characteristics and trend characteristics; a first processing unit, which is used to segment the time series to obtain multiple time subsequences and determine the feature vectors corresponding to the time subsequences; and a second processing unit, which is used to cluster multiple feature vectors corresponding to multiple time subsequences using cluster center points to obtain clustering results, wherein the cluster center points are used to determine the similarity between multiple feature vectors.

[0015] According to another aspect of the embodiment of the present application, a processor is further provided, and the processor is used to run a program, wherein when the program is run by the processor, the data stream clustering method in the embodiment of the present application is executed.

[0016] According to another aspect of an embodiment of the present application, an electronic device is further provided, comprising: a memory storing an executable program; and a processor for running the program, wherein the data stream clustering method in each embodiment of the present application is executed when the program is running.

[0017] According to another aspect of the embodiment of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the data stream clustering method in the embodiment of the present application.

[0018] According to another aspect of an embodiment of the present application, a computer program product is further provided. The computer program product includes a computer program. When the computer program is executed by a processor, the data stream clustering method in the embodiment of the present application is implemented.

[0019] In an embodiment of the present application, if it is necessary to cluster the target data stream (e.g., financial data stream), the capital flow status of the target account (e.g., customer) in the target data stream to be clustered can be analyzed to extract seasonal characteristics and trend characteristics. At least based on seasonal characteristics and trend characteristics, a time series corresponding to the target data stream can be constructed. The time series can be segmented, each segment can be a time subsequence, and the feature vectors corresponding to each time subsequence can be determined respectively. The cluster center point can be used to cluster multiple feature vectors corresponding to multiple time subsequences to obtain a clustering result. In this embodiment, by extracting key features from the target data stream, segmenting the time series, and dynamically updating the clustering steps, the real-time and effectiveness of the data stream clustering processing are effectively improved. Especially in the analysis of financial data streams, the above method can accurately capture seasonal changes, trends, and potential abnormal patterns, provide real-time market insights and customer behavior analysis for financial institutions, and support more accurate decision making. Through the above steps, the customer funds flow analysis process is simplified, which is conducive to enhancing the understanding of customer characteristics, significantly improving the efficiency and accuracy of clustering analysis, solving the technical problem of low clustering accuracy of data flow in related technologies, and achieving the technical effect of improving the clustering accuracy of data flow. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0021] Figure 1 A hardware structure block diagram of a computer terminal for implementing a data stream clustering method is shown;

[0022] Figure 2 is a flow chart of a data stream clustering method provided according to an embodiment of the present application;

[0023] Figure 3 is a schematic diagram of a financial data stream clustering system based on morphological features provided according to an embodiment of the present application;

[0024] Figure 4 is a schematic diagram of a data stream clustering device provided according to an embodiment of the present application;

[0025] Figure 5 It is a structural block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0026] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0028] It should be noted that the collected information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for display, data for analysis, etc.) involved in this application are information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of relevant data are in compliance with relevant laws, regulations and standards, necessary confidentiality measures are taken, and public order and good customs are not violated, and corresponding operation entrances are provided for users to choose to authorize or refuse. For example, an interface is set up between this system and relevant users or institutions to provide users with corresponding operation entrances for users to choose to agree or refuse the results of automated decision-making; if the user chooses to refuse, the expert decision-making process will be entered.

[0029] Example 1

[0030] According to an embodiment of the present application, a method embodiment of clustering data streams is also provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0031] The method embodiment provided in the first embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 FIG. 1 shows a hardware structure block diagram of a computer terminal (or mobile device) for implementing a data stream clustering method. Figure 1 As shown, the computer terminal 10 (or mobile device) may include one or more (102a, 102b, ..., 102n are used to illustrate) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. 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 electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.

[0032] It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10 (or mobile device). As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).

[0033] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the data flow clustering method in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, the data flow clustering method described above is realized. 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 computer terminal 10 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.

[0034] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, 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 (RF) module, which is used to communicate with the Internet wirelessly.

[0035] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 (or mobile device).

[0036] Under the above operating environment, this application provides Figure 2 Clustering method for the data stream shown. Figure 2 is a flow chart of a data stream clustering method provided according to an embodiment of the present application, such as Figure 2 As shown, the method may include the following steps:

[0037] Step S201 , obtaining a target data stream to be clustered, and extracting seasonal features and trend features from the target data stream.

[0038] In step S201 of the embodiment of the present application, the target data stream may be a dynamic data set that needs to be clustered, which is usually continuously updated in time and contains a sequence of data points over a period of time. In a financial scenario, the target data stream may be a financial data stream, which may be used to represent the state of fund flow in a target account, and may be a record of fund flow in a target account (e.g., a certain customer or a group of customers) over a period of time. The above data points form a time series that changes over time, reflecting the dynamic characteristics of customer fund flow. In the embodiment of the present application, for the sake of convenience, the target data stream is referred to as a data stream.

[0039] Alternatively, seasonal features can be periodic patterns that appear in the target data stream, which are usually associated with specific time periods of the year, such as holidays, quarter-ends, or specific events. In financial data streams, seasonal features may be manifested as significant fluctuations in trading volume in certain months or weeks. Extracting seasonal features helps analyze the cyclical laws of financial activities and provides a basis for predicting future behaviors and market trends. Trend features can be long-term patterns of gradual changes in the target data stream over time, which can reflect the overall direction of the financial data stream. In the financial field, trend features can be manifested as long-term economic growth, interest rate changes, rising or falling stock market trends, etc. Identifying and extracting trend features is crucial to understanding the fundamental drivers and long-term impact of capital flows, helping financial institutions predict future market conditions and conduct risk management.

[0040] In this embodiment, a target data stream to be clustered may be obtained, and the target data stream may be analyzed to extract seasonal features and trend features therefrom.

[0041] Optionally, obtain the target data stream to be clustered. The goal of the above steps is to prepare the raw data required for analysis. In a financial scenario, this may involve retrieving transaction records of a specific account within a certain period of time from a database, or collecting the latest data from a real-time data stream.

[0042] Optionally, seasonal and trend features are extracted from the target data stream. The above steps can rely on time series analysis techniques, such as the STL (Seasonal and Trend decomposition using Loess) algorithm, which can decompose the time series into three components: seasonality, trend, and residual. By using STL or other similar algorithms, seasonal and trend features can be decoupled from the original data stream. The importance of the above steps is that it can help remove random noise and short-term fluctuations in the data, focus on long-term trends and periodic patterns, and thus improve the accuracy and effectiveness of clustering analysis.

[0043] Optionally, after extracting the above features, a clearer and more concise representation, namely a feature vector, can be constructed for subsequent clustering processing. By converting seasonal and trend features into feature vectors, the intrinsic characteristics of the data stream can be captured in a mathematical form, so that the clustering algorithm can perform data analysis based on these key features instead of processing the original data stream, thereby improving processing speed and clustering effect.

[0044] Step S202: construct a time series corresponding to the target data stream based at least on the seasonal characteristics and the trend characteristics.

[0045] In step S202 of the embodiment of the present application, the time series can be a sequence of data points arranged in chronological order, where each data point corresponds to a timestamp. In the financial field, time series are usually used to represent the fund flow status such as account balance, transaction amount, transaction frequency, etc. of a certain customer or a group of customers at different time points. Time series analysis is a powerful statistical method used to study the change patterns of data points over time and identify patterns therein, such as trends, cyclical changes, and random fluctuations.

[0046] In this embodiment, after the seasonal features and the trend features are extracted from the target data stream to be clustered, a time series corresponding to the target data stream may be constructed based at least on the seasonal features and the trend features.

[0047] Optionally, constructing the time series is based on seasonality and trend features extracted from the target data stream.

[0048] Optionally, the extracted seasonal and trend features can be combined to form a more comprehensive description of the characteristics of fund flows. In the case of financial data streams, this may mean combining cyclical fluctuation patterns with long-term growth or decline trends.

[0049] Optionally, ensure that the data points are arranged in the order in which they occurred, which is a basic requirement for constructing a time series. When dealing with financial data, this means that transaction records or account balance changes must be sorted by the date and time they occurred.

[0050] Optionally, ensure that the data points are arranged in the order in which they occurred, which is a basic requirement for constructing a time series. When dealing with financial data, this means that transaction records or account balance changes must be sorted by the date and time they occurred.

[0051] Optionally, in order to better capture trends and seasonal characteristics, it may be necessary to smooth the data to reduce the impact of short-term fluctuations and outliers. This can be achieved by using methods such as moving average, exponential smoothing, etc.

[0052] Optionally, the seasonality and trend characteristics of each time point are converted into numerical form to construct a set of feature vectors, each of which corresponds to the seasonality and trend characteristics description of a time point. These feature vectors will be used for subsequent clustering analysis.

[0053] In the embodiment of the present application, by constructing a time series based on seasonal and trend characteristics, a clearer data representation can be obtained, which contains the key characteristics of capital flow. This step is crucial to improving the accuracy and effectiveness of cluster analysis because it ensures that the clustering process can focus on the core attributes of the data rather than being subject to noise or short-term fluctuations. The constructed time series will serve as input for the next step of analysis to help identify patterns of different customer groups or market behaviors.

[0054] Step S203, segmenting the time series to obtain multiple time subsequences, and determining the feature vectors corresponding to the time subsequences.

[0055] In step S203 of the embodiment of the present application, the time subsequence is a continuous segment of the original time series, and the time series is divided into several segments with similar time lengths. In the cluster analysis of financial data streams, the division of time subsequences is based on the temporal characteristics of the data, aiming to decompose the data into smaller, more manageable blocks, each of which can independently reflect the fund flow pattern over a period of time. The above segmentation process helps to capture specific behavior patterns in different time periods, such as seasonal changes, periodicity of market fluctuations, etc. In a financial scenario, feature vectors may include average transaction amounts, transaction frequencies, seasonal transaction fluctuations, and slope or trend changes of fund flows, etc., which are only used as examples here without specific limitations.

[0056] In this embodiment, after constructing the time series corresponding to the target data stream based on at least the seasonal characteristics and the trend characteristics, the time series can be segmented to obtain multiple time subsequences, and the feature vectors corresponding to the time subsequences can be determined.

[0057] Optionally, by converting the time subseries into feature vectors, the characteristics of the capital flow in each time period can be concisely described in numerical form, making it a direct input for subsequent clustering algorithm processing.

[0058] Optionally, perform segmentation of the time series. Split the time series into multiple time subseries according to specific rules or algorithms. The segmentation strategy may be based on the periodicity of the data (such as division by month, quarter, or year), the number of data points (such as fixed-length window rolling), or the dynamic changes of the data (such as automatic division based on the detection of change points), all in order to capture the characteristics of capital flows within different time frames.

[0059] In the embodiment of the present application, the process of dividing the time series into time subsequences and determining their feature vectors can significantly improve the accuracy and efficiency of cluster analysis. It allows the algorithm to operate on smaller, more manageable data blocks while ensuring that the information in each block is complete and self-contained. This divide-and-conquer strategy is particularly beneficial for processing large-scale, high-dimensional time series data, and can help financial institutions quickly identify changes in customer behavior and fluctuations in market trends, thereby formulating more accurate strategies and decisions.

[0060] Step S204: clustering the multiple feature vectors corresponding to the multiple time subsequences using the cluster center points to obtain clustering results.

[0061] In step S204 of the embodiment of the present application, the cluster center point is used to determine the similarity between multiple feature vectors, which can be the initial cluster center point. The cluster center point is a crucial concept in the clustering algorithm, which can represent the central feature or average attribute of a cluster. In cluster analysis, the cluster center point is used to represent the core feature of each group (cluster), and each data point (feature vector in the present application) will be assigned to the group where the center point closest to it is located. The selection and updating of the cluster center point has a direct impact on the accuracy and effectiveness of the clustering results.

[0062] In this embodiment, after the feature vectors corresponding to the time subsequences are determined, clustering processing can be performed on multiple feature vectors corresponding to multiple time subsequences using cluster centers to obtain clustering results.

[0063] Optionally, at the beginning of the clustering process, it is usually necessary to randomly select or determine the initial cluster center based on some rules. As the clustering algorithm iterates, the cluster center will be continuously adjusted according to the feature vectors assigned to it to minimize the distance or maximize the similarity within the cluster. The final cluster center will reflect the typical characteristics of the cluster to which it belongs, such as the average seasonal pattern of capital flow, trend pattern, etc.

[0064] Optionally, clustering is an unsupervised learning method in data mining and machine learning, which aims to group objects in a data set according to their intrinsic similarities. In the embodiment of the present application, the object of clustering is the feature vector of the time subsequence.

[0065] Optionally, in the initialization phase, the selection of cluster centers is very important and determines the starting point of clustering. The selection of the initial center point can be random or based on the distribution characteristics of the data, such as selecting an extreme point or a center point in the data set. The allocation and update phase is an iterative process of the clustering algorithm. In the above iterative process, each feature vector is assigned to the most similar cluster according to its distance or similarity to the cluster center point. At the same time, the center point of each cluster will be continuously adjusted according to the newly added feature vector to ensure that it represents the average attribute within the cluster. When the center point is stable, the algorithm will stop iterating, and the clustering results obtained at this time will reflect the division of different capital flow patterns. The clustering results can be used for a variety of financial analysis purposes, such as customer behavior analysis, risk assessment, market trend forecasting, etc., to help financial institutions understand and respond to customer needs more effectively.

[0066] In an embodiment of the present application, by clustering the characteristic vectors of time subseries using cluster centers, different patterns and trends in financial data streams can be discovered and classified, providing a dynamic and efficient method for processing cluster analysis of real-time data streams, thereby supporting financial institutions to make more accurate decisions in a rapidly changing market environment.

[0067] In step S201 to step S204 of the embodiment of the present application, if it is necessary to cluster the target data stream (e.g., financial data stream), the capital flow status of the target account (e.g., customer) in the target data stream to be clustered can be analyzed to extract seasonal characteristics and trend characteristics. At least based on seasonal characteristics and trend characteristics, the time series corresponding to the target data stream can be constructed. The time series can be segmented, each segment can be a time subsequence, and the feature vectors corresponding to each time subsequence can be determined respectively. The cluster center point can be used to cluster multiple feature vectors corresponding to multiple time subsequences to obtain clustering results. In this embodiment, by extracting key features from the target data stream, segmented processing of the time series, dynamic clustering update and other steps, the real-time and effectiveness of data stream clustering processing are effectively improved. Especially in the analysis of financial data streams, the above method can accurately capture seasonal changes, trends and potential abnormal patterns, provide real-time market insights and customer behavior analysis for financial institutions, and support more accurate decision making. Through the above steps, the customer funds flow analysis process is simplified, which is conducive to enhancing the understanding of customer characteristics, significantly improving the efficiency and accuracy of clustering analysis, solving the technical problem of low clustering accuracy of data flow in related technologies, and achieving the technical effect of improving the clustering accuracy of data flow.

[0068] The above method of this embodiment is further introduced below.

[0069] As an optional implementation manner, step S201, extracting seasonal features and trend features from the target data stream, includes: using a time series decomposition model to decompose the target data stream to obtain seasonal features and trend features.

[0070] In this embodiment, in the process of extracting seasonal features and trend features from the target data stream, the target data stream may be decomposed using a time series decomposition model to obtain seasonal features and trend features.

[0071] Optionally, in the above-mentioned selected embodiment, the target data stream is preprocessed by using a time series decomposition model, aiming to extract seasonal characteristics and trend characteristics in the data stream.

[0072] Optionally, a time series decomposition model is a statistical method for segmenting time series data into several components, where the components represent different characteristics in the data, such as trend, seasonality, cyclicity, and residual. In this application, the main focus is on seasonality and trend characteristics.

[0073] Alternatively, seasonality reflects cyclical patterns in the data that change with the seasons. For example, in a financial data stream, the volume or amount of transactions at certain points in time may fluctuate regularly due to specific time factors such as holidays, working days, and the end of the month. Trend characteristics describe the direction of long-term changes in data over time, which may be caused by factors such as economic environment, market trends, and policy changes. In a financial data stream, trend characteristics may be manifested as a long-term increase or decrease in capital inflows or outflows.

[0074] In the embodiment of the present application, the selection and implementation of the time series decomposition model focuses on extracting seasonal features and trend features from the target data stream.

[0075] Optionally, in the process of selecting a time series decomposition model, a suitable time series decomposition model can be selected according to the characteristics of the financial data flow. For example, it can be a decomposition part including STL, a classical decomposition method (such as a multiplication model and an addition model). No specific restrictions are made here.

[0076] Optionally, the selected time series decomposition model is applied to the target data stream for decomposition processing. This usually involves adjusting the parameters of the model to ensure that the model can accurately capture the seasonal and trend characteristics in the data. After the decomposition process, seasonal and trend characteristics are extracted from the output of the model. Seasonal characteristics are usually manifested as patterns corresponding to the time period after the model decomposition, while trend characteristics are manifested as the parts that change monotonically over time after the model decomposition. The extracted seasonal and trend characteristics are key inputs for subsequent clustering analysis. The above characteristics can help the algorithm identify regularities and patterns in the data stream, so that the data can be grouped more accurately during the clustering process. For example, in financial data analysis, account fund flows with similar seasonal patterns (such as trading peaks at the end of the quarter) and trend characteristics (such as long-term growth trends) will be classified into the same cluster, which helps financial institutions identify common characteristics of customer behavior for customer segmentation, risk assessment, and market forecasting.

[0077] In an embodiment of the present application, by using a time series decomposition model to decompose the target data stream, seasonal and trend characteristics in the data stream can be effectively extracted. This preprocessing step provides high-quality data representation for subsequent cluster analysis, which can significantly improve the accuracy and effectiveness of clustering tasks, especially when processing data sets with complex time dependencies such as financial data streams. Correctly selecting and implementing a time series decomposition model is the key to ensuring the success of the entire cluster analysis process. It can help to more deeply understand and utilize the inherent patterns in the data and support more accurate data mining and business decisions.

[0078] As an optional implementation method, a time series decomposition model is used to decompose the target data stream to obtain seasonal characteristics and trend characteristics, including: obtaining a multiplication model corresponding to the target data stream, wherein the multiplication model is used to indicate that the seasonal characteristics, trend characteristics and residuals in the target data stream are multiplied by each other; converting the multiplication model into an addition model, wherein the addition model is used to indicate that the seasonal characteristics and trend characteristics in the target data stream are added to each other; and using the time series decomposition model to determine the seasonal characteristics and trend characteristics from the addition model.

[0079] In this embodiment, in the process of decomposing the target data stream using the time series decomposition model, the multiplication model corresponding to the target data stream can be obtained. The multiplication model can be converted into an addition model, and the seasonal characteristics and trend characteristics can be determined from the addition model using the time series decomposition model. Among them, the multiplication model can be used to indicate that the seasonal characteristics, trend characteristics and residuals in the target data stream are multiplied with each other. The addition model can be used to indicate that the seasonal characteristics and trend characteristics in the target data stream are added.

[0080] Optionally, in this embodiment, the process of processing the target data stream using the time series decomposition model involves a transformation from a multiplication model to an addition model to better extract seasonal features and trend features.

[0081] Optionally, the existing financial data stream: account fund flow situation can be decomposed into: seasonality, trend, residual: Y(t)=T(t)+S(t)+R(t) through a time series decomposition algorithm.

[0082] Among them, Y(t) can be used to represent the observation value at time point t, T(t) can be used to represent trend factors (trend characteristics), S(t) can be used to represent seasonal factors (seasonal characteristics), and R(t) can be used to represent random residuals (usually regarded as white noise).

[0083] Alternatively, the multiplication model usually expresses the interaction of seasonality, trend and residual (random fluctuation) in time series data as a product relationship. For example, the fluctuation of trading volume or amount of a financial data stream under the influence of holidays (seasonal factors) and economic cycles (trend factors) is related to the product of these two factors. The multiplication model can be expressed as follows:

[0084] Y(t)=T(t)·S(t)·R(t)

[0085] Optionally, converting the multiplicative model to an additive model can simplify the separation of seasonality and trend. The additive model represents an additive relationship between seasonality, trend, and residuals. The purpose of the conversion is that the additive model is more intuitive and linear when dealing with seasonal decomposition, and is easier to model and analyze. Usually, the above conversion is achieved by logarithmically transforming the data in the multiplicative model, that is:

[0086] log(Y(t))=log(T(t)·S(t)·R(t))

[0087] log(Y(t))=log(T(t))+log(S(t))+log(R(t))

[0088] After conversion, the additive model can be:

[0089] log(F(t))=log(T(t))+log(S(t))

[0090] Optionally, a time series decomposition model is used to determine seasonal and trend features from the additive model. After conversion to an additive model, a time series decomposition model, such as STL, can be applied to decompose the data to extract seasonal and trend features from the additive model. STL is a flexible decomposition method that can handle seasonality with non-fixed periods and trends that change over time. The decomposition process can be expressed as:

[0091] Optionally, the STL decomposition model can accurately separate trends, seasonality, and residuals through local weighted regression, even in the presence of complex nonlinear relationships and irregular periodic changes in the data. This process can help better understand the inherent patterns of the data stream, especially seasonal changes and long-term trends.

[0092] In the embodiment of the present application, the multiplication model of the target data stream is obtained, and then converted into an addition model to simplify the decomposition process, and finally the seasonality and trend characteristics are determined from the addition model using a time series decomposition model such as STL. Such a processing method can not only effectively separate the effects of seasonality and trend, but also make the residual (random fluctuation) more obvious, which is convenient for subsequent cluster analysis and anomaly detection. It is an efficient strategy for processing complex time series data with seasonality and trend.

[0093] As an optional implementation method, step S203, segmenting the time series to obtain multiple time subsequences, includes: a first segmentation processing step, taking the starting point and the end point of the time series as reference points, and taking the point with the largest distance from the reference point as the segmentation point, and segmenting the time series using the segmentation points to obtain time subsequences; a second segmentation processing step, obtaining the longest subsequence from the time subsequences obtained in the first segmentation processing step, taking the starting point and the end point of the longest subsequence as reference points, and taking the point with the largest distance from the reference point as the segmentation point, and segmenting the longest subsequence using the segmentation points to obtain time subsequences; repeating the second segmentation processing step until the number of time subsequences reaches the first target number, and outputting the first target number of time subsequences obtained by the segmentation processing.

[0094] In this embodiment, in the process of segmenting the time series, a first segmentation processing step and a second segmentation processing step can be performed. In the first segmentation processing step, the starting point and the focus of the time series can be used as reference points, and the point with the largest distance from the reference point can be used as the segmentation point. The time series can be segmented using the segmentation points to obtain a time subsequence. In the second segmentation processing step, the longest subsequence can be obtained from the time subsequence obtained in the first segmentation processing step. The starting point and the end point of the longest subsequence can be used as reference points, and the point with the largest distance from the reference point can be used as the segmentation point. The longest subsequence is segmented using the segmentation points to obtain a time subsequence. The second segmentation processing step is repeatedly performed until the number of time subsequences reaches the first target number, and the first target number of time subsequences is output.

[0095] Optionally, in the above embodiment, the segmentation processing of the time series is implemented through two steps, aiming to divide the time series into multiple smaller time subsequences, so as to better perform subsequent feature extraction and cluster analysis.

[0096] Optionally, the purpose of the first segmentation step is to preliminarily segment the time series into two subsequences by finding the point with the largest distance from the start point and the end point of the sequence as the segmentation point. The specific steps are as follows:

[0097] Determine the reference points and set the start and end points of the time series as reference points. These two points are the boundaries of the time series and provide positioning references for subsequent segmentation.

[0098] Find the segmentation point, and find the point in the sequence that is farthest from the start or end point. This point can usually reflect significant changes or fluctuations in the sequence and is suitable as a basis for segmentation.

[0099] Segmentation processing, using the found segmentation points to split the sequence into two subsequences. This not only allows the initial identification of major turning points in the sequence, but also ensures that each subsequence contains a complete part of the time series, which helps to understand local trends and periodic characteristics in subsequent analysis.

[0100] Optionally, after the first segmentation processing step, the second segmentation processing step aims to further subdivide the longest time subsequence until a predetermined first target number of time subsequences is reached. The specific steps are as follows:

[0101] Select the longest time subsequence, and select the subsequence with the longest time span from all the subsequences obtained in the first segmentation processing step.

[0102] The reference point is determined again, and the starting point and the end point of the selected longest subsequence are used as new reference points, which provides a new reference for the subsequent search for segmentation points.

[0103] Repeat the search for segmentation points and segmentation. In the longest subsequence, repeat the process of searching for segmentation points in the first segmentation processing step until the time series is segmented to the predetermined first target number. Each time a segmentation point is found, the subsequence set is updated and the longest subsequence is ensured to continue to be processed until the total number of all subsequences reaches the preset number.

[0104] Output subsequence sets, when the number of subsequences reaches the first target number, output the set of all subsequences. These subsequences are used for feature vector construction and cluster analysis in subsequent steps.

[0105] In the embodiment of the present application, the subtlety of the above method is that it can dynamically identify important turning points in the time series, thereby effectively segmenting the data stream, making it easier to manage and analyze. By repeatedly applying the second segmentation processing step until a predetermined number of subsequences are obtained, it can be ensured that each subsequence is balanced in length and information content. This method is particularly suitable for financial data streams, because the pattern of financial transaction activities may fluctuate significantly with changes in market conditions, customer behavior and policy environment. The characteristics of these changes can be captured through segmentation processing, providing a more accurate and detailed data basis for subsequent cluster analysis.

[0106] In addition, the above method can handle outliers and noise in time series, because the selection of segmentation points is based on the points with the farthest distance, which can filter out data points that do not reflect typical patterns to a certain extent, thereby reducing the impact of outliers in cluster analysis. In summary, the embodiments of the first segmentation processing step and the second segmentation processing step provide a systematic method for segmenting a time series into multiple subsequences that can reflect specific patterns and characteristics at different stages in the time series. This method lays a solid foundation for subsequent clustering analysis and data mining tasks, and helps to more deeply understand and utilize the seasonality, trend and abnormal behavior of financial data streams.

[0107] For example, the original account fund flow sequence R{r1,r2,…,r n} is divided into k segments, represented by R{R1,R2,…,R k}. The division steps are as follows:

[0108] 1) The starting and ending points of the original account fund flow sequence are taken as the reference points, and the point with the largest distance to the reference point is taken as the segmentation point, so the account fund flow sequence will be divided into two segments;

[0109] 2)2) The starting and ending points of the longest account fund flow subsequence are used as the reference points, and the point with the largest distance to the reference point is used as the segmentation point, so the sequence will be divided into three segments;

[0110] 3) Repeat step 2) until the sequence is divided into k segments.

[0111] As an optional implementation manner, step S203, determining the feature vector corresponding to the time subsequence, includes: extracting a second target number of feature points from the time subsequence, and constructing a corresponding feature vector based on the feature points.

[0112] In this embodiment, in the process of determining the feature vector corresponding to the time subsequence, a second target number of feature points may be extracted from the time subsequence, and the corresponding feature vector may be constructed based on the feature points.

[0113] Optionally, determining the feature vector corresponding to the time subseries is a key step in converting the time subseries into a numerical representation that can be processed by the clustering algorithm. Constructing feature vectors based on feature points extracted from the time subseries can capture the key properties of the subsequence, thereby obtaining more meaningful results in clustering analysis.

[0114] Optionally, feature points are representative data points selected from the time subseries, which can reflect some important characteristics of the subsequence, such as trends, cycles, peaks or valleys. The number of extracted feature points (second target number) can be determined according to specific application requirements, data complexity and algorithm efficiency. For example, when analyzing the flow of account funds, feature points representing the peaks and valleys of fund inflows or outflows, or points reflecting the trend of fund flows may be selected.

[0115] Optionally, the process of extracting feature points may involve the following techniques or methods: statistical methods, such as calculating the mean, median, extreme value, etc. of the sequence; signal processing techniques, such as peak detection, Fourier transform (identifying periodic features), etc.; machine learning algorithms, such as clustering-based methods to identify points with similar features, or using other supervised learning models to predict key points.

[0116] Optionally, constructing a feature vector based on the extracted feature points is a step of converting the feature points into a multi-dimensional numerical representation. Usually, each dimension of the feature vector corresponds to a certain attribute of a feature point, such as transaction amount, transaction time, transaction frequency, etc. For example, for each extracted feature point, the feature vector may contain the following information: the value of the feature point, that is, the specific value of the point in the time series; the position of the feature point, the relative position in the time series, which helps to analyze periodic patterns. Other possible attributes, such as rate of change, deviation from the mean of the series, etc.

[0117] Optionally, the process of constructing feature vectors may require the following steps: Normalization or standardization, to ensure that feature vectors of different time series are comparable and to avoid excessive influence of certain features on clustering results due to large numerical ranges. Feature selection, to determine which attributes should be included in the feature vector to maximize information content while reducing redundancy and improve the efficiency of subsequent clustering analysis. Feature combination, which may require combining multiple attributes into one feature to reflect more complex patterns, such as combining transaction amount and transaction frequency to form a composite indicator.

[0118] In an embodiment of the present application, through the above steps, a feature vector composed of a second target number of feature points is obtained, which contains the key information of the time subsequence and can be used for subsequent cluster analysis. The constructed feature vector can not only reduce the dimension of the data and make the processing more efficient, but also help the clustering algorithm to better identify and distinguish the feature differences between different subsequences, thereby obtaining more accurate and meaningful clustering results. In the application of financial data streams, the construction of feature vectors is based on a deep understanding of the flow of funds in accounts. By carefully selecting and extracting feature points, complex patterns of customer behavior can be captured, such as time deposits, salary payments, holiday consumption peaks, etc. This helps financial institutions to more accurately identify customer groups and make business decisions such as accurate recommendations, risk assessments, and product optimization.

[0119] As an optional implementation method, extracting a second target number of feature points from a time subsequence includes: a first determination step, taking the starting point of the time subsequence as the first feature point, and taking the end point of the time subsequence as the second feature point; a second determination step, taking the point with the largest distance from the first feature point and the second feature point as the third feature point; a third determination step, from a segment formed by the first feature point and the third feature point, and from a segment formed by the third feature point and the second feature point, respectively determine the point with the largest distance from the first feature point, the second feature point, and the third feature point as the fourth feature point; repeat the third determination step until the number of feature points reaches the second target number, and output the second target number of feature points.

[0120] In this embodiment, the process of extracting the second target number of feature points from the time subsequence may include a first determination step, a second determination step, and a third determination step. In the first determination step, the starting point of the time subsequence may be used as the first feature point, and the end point of the time subsequence may be used as the second feature point. In the second determination step, the point with the largest distance from the first feature point and the second feature point may be used as the third feature point. In the third determination step, the point with the largest distance from the first feature point, the second feature point, and the third feature point may be determined from the segment formed by the first feature point and the third feature point, and the segment formed by the third feature point and the second feature point, respectively, as the fourth feature point. Repeat the above third determination step until the number of feature points reaches the second target number, and output the second target number of feature points.

[0121] Optionally, in the above embodiment, the process of extracting the second target number of feature points from the time subsequence is implemented by a series of determination steps. The above method is particularly designed to select the most representative and distinguishing points from the data to construct a feature vector for subsequent cluster analysis.

[0122] Optionally, in the first determination step, feature points may be initialized. Specifically, the starting point of the time subsequence may be used as the first feature point, and the end point may be used as the second feature point. The above steps may provide a basis for subsequent feature point selection, ensuring that both end points of the time series are considered, which helps to cover the entire time span.

[0123] Optionally, in the second determination step, the maximum distance point in the middle can be found. Specifically, a point can be found in the time subsequence, which has the largest distance from the first feature point (starting point) and the second feature point (end point), and it can be used as the third feature point. By selecting the point farthest from the two end points, it can be ensured that the selected feature point can represent a significant fluctuation or turning point in the sequence, thereby better reflecting the structure and dynamic characteristics of the time series.

[0124] Optionally, in the third determination step, the feature points may be determined recursively and segmented. Specifically, the point with the largest distance from the first feature point, the second feature point, and the third feature point may be determined from the two sub-segments from the first feature point to the third feature point and from the third feature point to the second feature point, respectively, as a new feature point (such as the fourth feature point).

[0125] Optionally, the third determination step is repeated by recursively performing, each time selecting the maximum distance point from the two newly formed segments until the number of feature points reaches a predetermined second target number. The process of recursive segmentation and selection of the maximum distance point ensures that the feature points are evenly and strategically distributed throughout the time series. The above method can identify and include significant features of different parts of the time series, while balancing the complexity of feature expression and computational efficiency by controlling the number of feature points (the second target number).

[0126] For example, from the account fund flow sequence R i Extract m from (1≤i≤k) i feature points, construct R i The eigenvector V of (1≤i≤k) i (p1,t1,p2,t2,…,p mi ,t mi ,μ).p j (1≤j≤mi) represents the extracted feature points, t j (1≤j≤mi) is the corresponding time tag, μ is the segment R i The mean value, m i =length(R i )×c, where c is the defined compression ratio. The steps are as follows:

[0127] 1) Sequence the account funds flow status R i The first endpoint of R is taken as the first feature point P1.i The end point of the segment P1P3 and P3P2 is taken as the second feature point P2; 2) the point with the largest distance to P1P2 is taken as the third feature point P3; 3) the point with the largest distance is found in the segments P1P3 and P3P2 formed by the two adjacent feature points, and the point with the largest distance is selected as the fourth feature point P4; 4) repeat the above step 3) until m is found. i feature points.

[0128] In the embodiment of the present application, through the above steps, a series of feature points can be systematically extracted from the time subsequence, which not only reflects the endpoint information of the time series, but also covers the significant changes and turning points within the sequence. The number of feature points (the second target number) can be adjusted according to the specific application requirements to balance the exhaustiveness of the feature description and the feasibility of subsequent processing. The selection strategy of feature points, especially the recursive segmentation through the maximum distance point, helps to identify the nonlinear structure and potential patterns of the time series, which is particularly important for financial data flow analysis because financial data often contains complex periodicity, trend and burst behavior. For example, the feature points extracted from the flow of account funds may reveal the time points of regular income and expenditure, the peaks and troughs of fund flow, and abnormal transactions at specific time points, which are all key inputs for subsequent clustering analysis. The output second target number of feature point sets can be further used to construct feature vectors as inputs to clustering algorithms. The construction of feature vectors may involve converting the values, timestamps, and statistical properties (such as mean values, standard deviations, etc.) of each feature point into the dimensions of the vector, so that the clustering algorithm can identify and group time subsequences with similar patterns based on these multi-dimensional information.

[0129] In summary, the above embodiment provides an effective method for selecting key feature points from a time subseries. By segmenting and selecting the maximum distance point, the complex changes and patterns in the time series can be captured, providing high-quality feature representation for subsequent clustering analysis. This strategy is particularly useful when processing real-time data streams, because it can dynamically identify and track important turning points in the data stream, thereby providing real-time customer behavior monitoring and market trend analysis for financial institutions.

[0130] As an optional implementation mode, the method also includes: in response to the existence of candidate time subsequences to be clustered, determining the feature vector of the candidate time subsequence and the similarity with the feature vectors corresponding to multiple time subsequences; incorporating the candidate time subsequence into the time subsequence whose similarity reaches a similarity threshold, and updating the feature vector corresponding to the time subsequence for clustering processing; in response to the absence of a time subsequence in multiple time subsequences whose similarity with the candidate time subsequence reaches a similarity threshold, using the candidate time subsequence as a time subsequence among the multiple time subsequences.

[0131] In this embodiment, when there are candidate time subsequences to be clustered, the feature vector of the candidate time subsequence can be determined, and the similarity of the feature vectors corresponding to multiple time subsequences can be determined, and the candidate word sequence can be incorporated into the time subsequence whose similarity reaches the similarity threshold. And the feature vector corresponding to the time subsequence is updated to perform clustering. If there is no time subsequence in the multiple subsequences whose similarity reaches the similarity threshold with the candidate sub-time sequence, the candidate time subsequence can be used as a new time subsequence in the multiple time subsequences. The candidate time subsequence can be a new subsequence L.

[0132] Optionally, in the above embodiment, a dynamic clustering processing mechanism is described for continuously updating and forming clusters in real-time data streams. This method is particularly suitable for the analysis of financial data streams, where data flows continuously over time and the clustering structure needs to reflect the latest form of these data streams.

[0133] Optionally, the aforementioned time series decomposition and feature point extraction methods are applied to the newly-inflowing candidate time subsequence to obtain the feature vector of the subsequence. This feature vector contains key information of the candidate subsequence, such as seasonal features, trend features, and possible periodic and burst features. The feature vector of the candidate time subsequence is compared with the feature vectors of multiple existing time subsequences to calculate the similarity. There are many methods for calculating the similarity, such as using Euclidean distance, cosine similarity, or more complex data similarity measurement methods. The similarity reflects the proximity between the candidate subsequence and the existing subsequence in the feature space. If the similarity between the candidate time subsequence and an existing time subsequence reaches a preset similarity threshold (θ), it means that the new data stream has similar patterns or features to the data stream in the existing cluster. At this point, the algorithm merges the candidate time subsequence into the existing cluster and updates the feature vector of the cluster center to reflect the latest form of the merged cluster. Updating the feature vector of the cluster center is usually achieved by calculating the mean or weighted mean of the feature vectors of all cluster members to ensure that the cluster center can accurately represent the overall characteristics of the cluster.

[0134] Alternatively, if the similarity between the candidate time subsequence and all existing time subsequences does not reach the similarity threshold, it indicates that the data stream presents a new pattern or feature. In this case, the candidate time subsequence will be treated as a new time subsequence to form a new cluster. This means that the algorithm has identified a type of financial data stream that has not been seen before and can start collecting and analyzing information related to this type.

[0135] Optionally, when a new subsequence L with a length of l that expresses the account funds situation arrives, determine whether L can be incorporated into the current account funds flow situation sequence Rk , if possible, merge L into the current R k , forming a new R k , and update the corresponding feature vector V k ;

[0136] (2) If L cannot be incorporated into the current R k , then determine whether R1 can be moved out of the current time window:

[0137] 1) If t1<θ, where θ can be the set time threshold, then R1 and its V1 are moved into the offline historical data, R j (2≤j≤k) moves forward one by one, and the subsequence L becomes R k , and update the corresponding feature vector V j (1≤j≤k);

[0138] 2) If t1 ≥ θ, that is, R1 cannot be moved out of the current time window, then merge the two adjacent segments with the smallest mean difference.

[0139] Optionally, how to determine whether the account fund flow situation subsequence L can be incorporated into the current account fund flow situation sequence R k The setting of the threshold θ is as follows:

[0140] How to determine whether subsequence L can be incorporated into the current R k :Let subsequence L be merged into R k After forming the sequence R k ,

[0142] D(R k ,R′ k ) represents R k and R′ k If D(R k ,R′ k )>v, then the subsequence L cannot be merged into the current R k , otherwise, it can be merged.

[0143] For the setting of threshold θ: Let the data streams involved in clustering be S1, S2, ..., S n There are n data streams in total, t i Represents the i-th data stream S i The first time mark of the first segment in , t is the current time mark, then: θ = tW, where Since the setting of the threshold θ is continuously updated as the data stream changes, this dynamic sliding window design ensures data synchronization in multiple data streams.

[0144] In the embodiment of the present application, the above-mentioned dynamic clustering processing mechanism enables cluster analysis to adapt to changes in data streams in real time, introduce new data in a timely manner, and update or create new clusters when necessary to reflect the latest structure of the data. For the financial field, this dynamicity is particularly important because customers' financial behavior, market trends, and economic conditions are constantly changing. By setting the similarity threshold (θ), the sensitivity of clustering and the update frequency of cluster centers can be controlled to ensure the accuracy and timeliness of clustering results.

[0145] For example, when identifying fund flow patterns of different types of accounts, new customer accounts may exhibit transaction behaviors similar to existing clusters. By calculating the similarity and comparing it with the threshold, it can be decided whether to incorporate the transaction data of the new account into the existing customer model or whether a new customer type needs to be identified. This dynamic update capability helps financial institutions to more accurately segment customers, assess risks, and predict the market, thereby optimizing their products and services and improving customer satisfaction and market competitiveness.

[0146] As an optional implementation method, the method also includes: randomly selecting feature vectors of a third target number from the feature vectors of the target number as cluster centers of the third target number; step S204, using the cluster centers to cluster multiple feature vectors corresponding to multiple time subsequences to obtain clustering results, including: obtaining, from the feature vectors of the target number, the distances corresponding to the feature vectors other than the feature vectors of the third target number and the cluster centers of the third target number; assigning the feature vectors other than the feature vectors of the third target number to the clusters corresponding to the cluster centers with the smallest distances to obtain clustering results; the method also includes: in response to the completion of the clustering process, updating the cluster centers based on the clustering results.

[0147] In this embodiment, feature vectors of the third target number can be randomly selected from the feature vectors of the target number as the cluster center points of the third target number. In the process of clustering multiple feature vectors corresponding to multiple time subsequences using the cluster center points, feature vectors other than the feature vectors of the third target number can be obtained from the feature vectors of the target number, and the distances corresponding to the cluster centers of the third target number can be obtained. Feature vectors other than the feature vectors of the third target number can be assigned to the cluster corresponding to the cluster center point with the smallest distance to obtain a clustering result. If the clustering process is completed, the cluster center points can be updated based on the clustering results.

[0148] Optionally, in the above embodiment, the process of constructing clusters from the feature vector space and dynamically updating them is described in detail, and the above method is applicable to real-time data streams that are constantly changing, such as financial transaction data.

[0149] Optionally, a third target number of feature vectors are randomly selected from the target number of feature vectors as initial cluster centers. The third target number mentioned above usually refers to the expected number of clusters. Selecting random initial centers is a method used by many clustering algorithms to break the pre-bias against any particular data point and avoid the initial setting affecting the final clustering result.

[0150] Optionally, for the remaining feature vectors except the feature vector selected as the cluster center, the distance between them and each cluster center is calculated. The distance metric can be Euclidean distance, Manhattan distance, Mahalanobis distance, etc., and the specific choice depends on the nature of the data and the requirements of the clustering algorithm. The distance is calculated to evaluate the similarity between each feature vector and the current cluster center.

[0151] Optionally, each feature vector is assigned to the cluster represented by the nearest cluster center point based on the calculated distance. This assignment process helps to form a preliminary clustering structure, where each cluster contains a group of feature vectors that are relatively closer in the feature space. This step is the core of the clustering algorithm, which classifies data points based on the principle of similarity.

[0152] Optionally, after completing a cluster assignment, the algorithm will update the location of the cluster center based on the current clustering results. Usually, the cluster center is updated by calculating the mean or weighted mean of all feature vectors in each cluster, which ensures that the cluster center can truly reflect the characteristics of the data points in the cluster. After that, the distances of all data points to the new cluster center can be calculated again and reallocated. This process will be repeated until the location of the cluster center no longer changes significantly or the preset number of iterations is reached, thereby obtaining the final clustering result.

[0153] Optionally, for real-time data streams, this process is dynamic, meaning that the above steps are repeated as new data continues to flow in. Each time a new data point is extracted as a feature vector and added to the cluster analysis, the distance is recalculated, the cluster is assigned, and the cluster center is updated. This dynamic optimization ensures that the cluster structure can reflect the latest status of the data stream in a timely manner, which is crucial for real-time analysis and prediction of financial data.

[0154] Optionally, the data stream of the current account fund flow situation can be clustered at any time stage, and each data stream retains the feature data of the latest k segments.

[0155] Randomly find s data streams as the initial s cluster centers; calculate the distances between the remaining (ks) account fund flow data streams and the s cluster centers respectively, assign each account fund flow data stream to the center point data stream closest to it, and obtain s clustering results; recalculate the center point data stream for each cluster, and take the data stream with the smallest average distance to other data streams in each category as the latest cluster center; repeat the above steps to continuously update the center data stream until it is no longer updated.

[0156] In the embodiment of the present application, through the above embodiment, it is possible to effectively process large-scale real-time data streams, and dynamically adjust the clustering structure to reflect the latest changes in the data stream. In the financial field, this method can be applied to real-time monitoring of account fund flows, such as identifying abnormal transaction patterns, analyzing changes in customer behavior patterns, and predicting market trends. By dynamically updating the cluster center points, the timeliness and accuracy of cluster analysis can be ensured, providing real-time insight and decision support for financial institutions.

[0157] In an embodiment of the present application, if it is necessary to cluster the target data stream (e.g., financial data stream), the capital flow status of the target account (e.g., customer) in the target data stream to be clustered can be analyzed to extract seasonal characteristics and trend characteristics. At least based on seasonal characteristics and trend characteristics, a time series corresponding to the target data stream can be constructed. The time series can be segmented, each segment can be a time subsequence, and the feature vectors corresponding to each time subsequence can be determined respectively. The cluster center point can be used to cluster multiple feature vectors corresponding to multiple time subsequences to obtain a clustering result. In this embodiment, by extracting key features from the target data stream, segmenting the time series, and dynamically updating the clustering steps, the real-time and effectiveness of the data stream clustering processing are effectively improved. Especially in the analysis of financial data streams, the above method can accurately capture seasonal changes, trends, and potential abnormal patterns, provide real-time market insights and customer behavior analysis for financial institutions, and support more accurate decision making. Through the above steps, the customer funds flow analysis process is simplified, which is conducive to enhancing the understanding of customer characteristics, significantly improving the efficiency and accuracy of clustering analysis, solving the technical problem of low clustering accuracy of data flow in related technologies, and achieving the technical effect of improving the clustering accuracy of data flow.

[0158] The technical solution of the embodiment of the present application is illustrated below in conjunction with preferred implementation modes.

[0159] At present, cluster analysis is an important method to find the natural clustering structure of data. As a very important task in the field of data mining, clustering is one of the prerequisites for other data mining tasks, which helps to establish a classification hierarchy for objects based on similarity. After the entire data set is divided into several similar subsets through clustering, other data mining methods can more easily and more effectively find useful rules and patterns based on the clustering results. Time series clustering is also one of the hot topics in the current data mining field. Most time series clustering methods first transform the time series and use the feature values ​​or models of the transformed time series to perform clustering calculations.

[0160] Cluster analysis groups data objects based only on information found in the data that describes the objects and their relationships. The goal is that objects within a group are similar to each other, while objects in different groups are different. The greater the similarity within the group and the greater the difference between the groups, the better the clustering. Currently, the following methods of cluster analysis are commonly used: K-means clustering algorithm and hierarchical clustering algorithm.

[0161] For the K-means clustering algorithm, K initial centroids are selected, where K is a user-specified parameter, i.e., the number of clusters desired. Each point is assigned to the nearest centroid, and the set of points assigned to a centroid is a cluster. Then, the centroid of each cluster is updated based on the points assigned to the cluster. The assignment and update steps are repeated until the clusters do not change, or until the centroids do not change.

[0162] Regarding hierarchical clustering algorithms, hierarchical clustering algorithms are also an important class of clustering methods. There are two basic methods for generating hierarchical clusters: (1) agglomerative hierarchical clustering, which starts with points as individual clusters and merges the two closest clusters at each step; (2) divisive hierarchical clustering, which starts with a cluster containing all points and splits a cluster at each step until only single-point clusters remain.

[0163] However, when clustering time series using existing general technologies, it is not possible to dynamically adjust and update the clustering results to truly reflect the clustering form of the data stream as new data continues to flow in while clustering the data stream. Therefore, there is still a technical problem of low clustering accuracy of data streams in related technologies.

[0164] In recent years, data statistics for real-time data streams have become a hot topic in the field of data mining, and there are also related studies on clustering data streams: the main purpose of clustering on data streams is to analyze the new data that is constantly added while clustering the current data, so as to dynamically update the clustering results of the new data. However, the current clustering model method for data streams is universal, and there is no special analysis of data streams with a certain characteristic. However, data streams in different fields have different characteristics, and the purpose of retaining analysis is not the same. For example, compared with other types of stream data, it is more important to retain the shape and trend characteristics of data streams in the financial field. The clustering algorithm can be used to analyze the flow of account funds for this customer type and make accurate recommendations for them in the future.

[0165] To solve the above problems, the present application provides a financial data stream clustering method based on morphological features, introduces a time series decomposition algorithm to pre-process the financial data stream, eliminates part of the influence of residual factors, and only considers its seasonal factors and trend factors, which are exactly the parts that the study of financial data streams is concerned about; through the time sliding window, new data streams are continuously introduced, and the influence of new data streams on the overall data stream weight is controlled, which can update data in time and maintain the validity of the data stream, thereby achieving a more accurate financial data stream clustering effect.

[0166] Figure 3 is a schematic diagram of a financial data stream clustering system based on morphological features provided in an embodiment of the present application, such as Figure 3 As shown, the system may include: a financial data stream preprocessing module 301 , a data initialization module 302 , a data update module 303 and a clustering result module 304 .

[0167] Alternatively, if Figure 3 As shown, the financial data stream preprocessing module 301 can perform the following steps:

[0168] The time series decomposition algorithm can be used to decompose the existing financial data flow: account fund flow into: seasonality, trend, residual: Y(t)=T(t)+S(t)+R(t).

[0169] If we only focus on the form and trend characteristics of account fund flow, then: F(t)=T(t)+S(t) is the new financial data flow sequence.

[0170] Among them, if the multiplication model can be processed into an additive model through logarithmic transformation:

[0171] Y(t)=T(t)·S(t)·R(t)

[0172] log(Y(t))=log(T(t)·S(t)·R(t))

[0173] log(Y(t))=log(T(t))+log(S(t))+log(R(t))

[0174] log(F(t))=log(T(t))+log(S(t))

[0175] The STL time series decomposition algorithm is used here to process the financial data stream. The STL time series decomposition algorithm is one of the most commonly used algorithms in time series decomposition algorithms: based on local weighted regression processing, it can effectively handle various types of seasonal factors; it allows seasonal factors to change over time, and the rate of change can change; it is insensitive to outliers.

[0176] Alternatively, if Figure 3 As shown, the data initialization module 302 can perform the following steps:

[0177] The original account fund flow sequence R{r1,r2,…,r n} is divided into k segments, represented by R{R1,R2,…,R k}. The division steps are as follows:

[0178] 1) The starting and ending points of the original account fund flow sequence are taken as the reference points, and the point with the largest distance to the reference point is taken as the segmentation point, so the account fund flow sequence will be divided into two segments;

[0179] 2) The starting and ending points of the longest account fund flow subsequence are used as the reference points, and the point with the largest distance to the reference point is used as the segmentation point, so the sequence will be divided into three segments;

[0180] 3) Repeat step 2) until the sequence is divided into k segments.

[0181] From the account funds flow sequence R i Extract m from (1≤i≤k) i feature points, construct R i The eigenvector V of (1≤i≤k) i (p1,t1,p2,t2,…,p mi ,t mi ,μ).p j (1≤j≤mi) represents the extracted feature points, t j (1≤j≤mi) is the corresponding time tag, μ is the segment R i The mean value, m i =length(R i )×c, where c is the defined compression ratio. The steps are as follows:

[0182] 1) Sequence the account funds flow status Ri The first endpoint of R is taken as the first feature point P1. i The end point is taken as the second feature point P2;

[0183] 2) The point with the largest distance to P1P2 is taken as the third feature point P3;

[0184] 3) Find the point with the largest distance in the segments P1P3 and P3P2 formed by two adjacent feature points, and select the point with the largest distance as the fourth feature point P4;

[0185] 4) Repeat the above steps until m is found i feature points.

[0186] Alternatively, if Figure 3 As shown, the update data module 303 can perform the following steps:

[0187] (1) When a new subsequence L with a length of l that expresses the account funds situation arrives, determine whether L can be incorporated into the current account funds flow situation sequence R k , if possible, merge L into the current R k , forming a new R k , and update the corresponding feature vector V k ;

[0188] (2) If L cannot be incorporated into the current R k , then determine whether R1 can be moved out of the current time window:

[0189] 1) If t1<θ, where θ can be the set time threshold, then R1 and its V1 are moved into the offline historical data, R j (2≤j≤k) moves forward one by one, and the subsequence L becomes R k , and update the corresponding feature vector V j (1≤j≤k);

[0190] 2) If t1 ≥ θ, that is, R1 cannot be moved out of the current time window, then merge the two adjacent segments with the smallest mean difference.

[0191] How to determine whether the account fund flow status subsequence L can be incorporated into the current account fund flow status sequence R k The setting of the threshold θ is as follows:

[0192] How to determine whether subsequence L can be incorporated into the current R k :Let subsequence L be merged into R k After forming the sequence R k , D(R k ,R′ k ) represents R k and R′ kIf D(R k ,R′ k )>v, then the subsequence L cannot be merged into the current R k , otherwise, it can be merged.

[0193] Setting of threshold θ: Assume that the data streams involved in clustering are S1, S2, ..., S n There are n data streams in total, t i Represents the i-th data stream S i The first time mark of the first segment in , t is the current time mark, then: θ = tW, where Since the setting of the threshold θ is continuously updated as the data stream changes, this dynamic sliding window design ensures data synchronization in multiple data streams.

[0194] Alternatively, if Figure 3 As shown, the clustering result module 304 can perform the following steps:

[0195] The data stream of current account fund flow can be clustered at any time stage, and each data stream retains the feature data of the latest k segments.

[0196] (1) Randomly find s data streams as the initial s cluster centers;

[0197] (2) Calculate the distances between the remaining (ks) account fund flow data streams and the s cluster centers, assign each account fund flow data stream to the center data stream closest to it, and obtain s clustering results;

[0198] (3) Recalculate the center point data stream for each cluster, and take the data stream with the smallest average distance to other data streams in each cluster as the latest cluster center point;

[0199] (4) Repeat the above steps to continuously update the central data stream until it is no longer updated.

[0200] In the embodiments of the present application, there are alternative solutions. Specifically, due to the diverse choices of time series decomposition algorithms, different time series decomposition algorithms can be used for processing in the preprocessing stage of financial data streams. However, when other time series decomposition algorithms are used, either because the processing flow is more complicated or because the outliers cannot be handled better, the processing effect on the residuals is not as obvious as the STL time series decomposition algorithm.

[0201] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0202] Example 2

[0203] The embodiment of the present application also provides a data stream clustering device. It should be noted that the data stream clustering device of the embodiment of the present application can be used to execute the data stream clustering method provided in the embodiment of the present application. The data stream clustering device provided in the embodiment of the present application is introduced below.

[0204] According to an embodiment of the present application, a device for implementing the above data stream clustering method is also provided. Figure 4 is a schematic diagram of a data stream clustering device provided according to an embodiment of the present application, such as Figure 4 As shown, the data stream clustering device 400 includes: an acquisition unit 402 , a construction unit 404 , a first processing unit 406 and a second processing unit 408 .

[0205] The acquisition unit 402 is used to acquire the target data stream to be clustered and extract seasonal characteristics and trend characteristics from the target data stream, wherein the target data stream is used to represent the capital flow status in the target account.

[0206] The construction unit 404 is used to construct a time series corresponding to the target data stream based on at least the seasonal characteristics and the trend characteristics.

[0207] The first processing unit 406 is used to perform segment processing on the time series to obtain multiple time subsequences and determine the feature vectors corresponding to the time subsequences.

[0208] The second processing unit 408 is used to perform clustering processing on multiple feature vectors corresponding to multiple time subsequences using cluster center points to obtain clustering results, wherein the cluster center points are used to determine the similarity between the multiple feature vectors.

[0209] The data stream clustering device provided in the embodiment of the present application obtains the target data stream to be clustered by the acquisition unit 402, and extracts seasonal characteristics and trend characteristics from the target data stream, wherein the target data stream is used to represent the capital flow status in the target account; constructs the time series corresponding to the target data stream by the construction unit 404 at least based on the seasonal characteristics and trend characteristics; performs segmentation processing on the time series by the first processing unit 406 to obtain multiple time subsequences, and determines the feature vectors corresponding to the time subsequences; and performs clustering processing on multiple feature vectors corresponding to the multiple time subsequences by the second processing unit 408 using the cluster center point to obtain a clustering result, wherein the cluster center point is used to determine the similarity between multiple feature vectors, thereby solving the technical problem of low clustering accuracy of data streams in the related art. Thus, the technical effect of improving the clustering accuracy of data streams is achieved.

[0210] It should be noted that the acquisition unit 402, the construction unit 404, the first processing unit 406 and the second processing unit 408 correspond to steps S201 to S204 in Example 1, and the four modules are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the contents disclosed in the above-mentioned Example 1. It should be noted that the above-mentioned modules or units can be hardware components or software components stored in a memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n), and the above-mentioned modules can also be run in the computer terminal 10 provided in Example 1 as part of the device.

[0211] Example 3

[0212] An embodiment of the present application may provide an electronic device, Figure 5 is a structural block diagram of an electronic device according to an embodiment of the present application. Figure 5 As shown, the electronic device may include: one or more ( Figure 5 (only one is shown) processor 502, memory 504, storage controller, and peripheral interface, wherein the peripheral interface is connected to the radio frequency module, audio module and display.

[0213] Among them, the memory can be used to store software programs and modules, such as program instructions / modules corresponding to the methods and devices in the embodiments of the present application, and the processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the above-mentioned method. The memory 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 may further include a memory remotely arranged relative to the processor, 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.

[0214] The processor may call the information and application programs stored in the memory through the transmission device to execute the steps in the above embodiments.

[0215] It can be understood by those skilled in the art that Figure 5 The structure shown is for illustration only, and the electronic device may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, MID), a PAD, or other terminal devices. Figure 5 The structure of the electronic device is not limited. Figure 5 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Figure 5 Different configurations shown.

[0216] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0217] Example 4

[0218] The embodiment of the present application further provides a storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the data stream clustering method provided in the first embodiment.

[0219] Optionally, in this embodiment, the above storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.

[0220] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing the steps of the data stream clustering method.

[0221] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0222] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0223] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0224] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0225] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0226] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.

[0227] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A data stream clustering method, characterized in that: include: Acquire a target data stream to be clustered, and extract seasonal features and trend features from the target data stream, wherein the target data stream is used to represent the capital flow status in the target account; Based at least on the seasonal characteristics and the trend characteristics, construct a time series corresponding to the target data stream; Segmenting the time series to obtain multiple time subsequences, and determining feature vectors corresponding to the time subsequences; The plurality of feature vectors corresponding to the plurality of time subsequences are clustered using cluster center points to obtain clustering results, wherein the cluster center points are used to determine the degree of similarity between the plurality of feature vectors.

2. The method according to claim 1, characterized in that Seasonal features and trend features are extracted from the target data stream, including: The target data stream is decomposed by using a time series decomposition model to obtain the seasonal characteristics and the trend characteristics.

3. The method according to claim 2, characterized in that The target data stream is decomposed by using a time series decomposition model to obtain the seasonal characteristics and the trend characteristics, including: Acquire a multiplication model corresponding to the target data stream, wherein the multiplication model is used to represent a relationship in which the seasonal feature, the trend feature, and the residual in the target data stream are multiplied by each other; Converting the multiplication model into an addition model, wherein the addition model is used to represent that the seasonal feature and the trend feature in the target data stream are in an additive relationship; The seasonal characteristics and the trend characteristics are determined from the additive model using the time series decomposition model.

4. The method according to claim 1, characterized in that The time series is segmented to obtain multiple time subsequences, including: The first segmentation processing step is to use the starting point and the end point of the time series as reference points, and use the point with the largest distance from the reference point as a segmentation point, and use the segmentation points to segment the time series to obtain the time subsequence; a second segmentation processing step, obtaining the longest subsequence from the time subsequence obtained in the first segmentation processing step, taking the starting point and the end point of the longest subsequence as the reference points, taking the point with the largest distance from the reference point as the segmentation point, and performing segmentation processing on the longest subsequence using the segmentation points to obtain the time subsequence; The second segmentation processing step is repeatedly performed until the number of the time subsequences reaches a first target number, and the first target number of the time subsequences obtained by the segmentation processing is output.

5. The method according to claim 1, characterized in that Determining a feature vector corresponding to the time subsequence includes: A second target number of feature points are extracted from the time subsequence, and corresponding feature vectors are constructed based on the feature points.

6. The method according to claim 5, characterized in that Extracting a second target number of feature points from the time subsequence includes: A first determining step is to use the starting point of the time subsequence as a first characteristic point and the end point of the time subsequence as a second characteristic point; In a second determination step, a point with the largest distance from the first feature point and the second feature point is taken as a third feature point; A third determining step, determining, from the segment formed by the first feature point and the third feature point, and the segment formed by the third feature point and the second feature point, respectively, a point with the largest distance from the first feature point, the second feature point, and the third feature point as a fourth feature point; The third determining step is repeatedly performed until the number of the feature points reaches the second target number, and the second target number of feature points is output.

7. The method according to claim 1, characterized in that The method further comprises: In response to the existence of a candidate time subsequence to be clustered, determining a similarity between a feature vector of the candidate time subsequence and feature vectors corresponding to a plurality of the time subsequences; Incorporating the candidate time subsequence into the time subsequence whose similarity reaches a similarity threshold, and updating the feature vector corresponding to the time subsequence to perform the clustering process; In response to the absence of the time subsequence whose similarity with the candidate time subsequence reaches the similarity threshold in the multiple time subsequences, the candidate time subsequence is used as the time subsequence in the multiple time subsequences.

8. The method according to claim 1, characterized in that The method further comprises: Randomly selecting a third target number of feature vectors from the target number of feature vectors as the third target number of cluster center points; Using the cluster center point, clustering is performed on the plurality of feature vectors corresponding to the plurality of time subsequences to obtain a clustering result, including: Obtaining, from the feature vectors of the target number, distances respectively corresponding to the feature vectors other than the feature vectors of the third target number and the cluster center points of the third target number; Allocating the feature vectors other than the third target number of feature vectors to the cluster corresponding to the cluster center point with the smallest distance, to obtain the clustering result; The method further includes: in response to the clustering process being completed, updating the cluster center point based on the clustering result.

9. A data stream clustering device, characterized in that: include: An acquisition unit, used to acquire a target data stream to be clustered, and extract seasonal characteristics and trend characteristics from the target data stream, wherein the target data stream is used to represent the capital flow status in the target account; A construction unit, configured to construct a time series corresponding to the target data stream based at least on the seasonal characteristics and the trend characteristics; A first processing unit is used to perform segment processing on the time series to obtain multiple time subsequences, and determine feature vectors corresponding to the time subsequences; The second processing unit is used to perform clustering processing on the multiple feature vectors corresponding to the multiple time subsequences using cluster center points to obtain clustering results, wherein the cluster center points are used to determine the similarity between the multiple feature vectors.

10. A processor, characterized in that: The processor is used to run a program, wherein the program, when run by the processor, executes the data stream clustering method according to any one of claims 1 to 8.

Citation Information

Cited By

  • Industrial rotation comprehensive analysis system based on data flow

    CN121072982A