Semi-supervised data stream classification method and system based on clonal selection

By introducing online bootstrap sampling, differential evolution strategy and ADWIN2 sliding window technology into the cloning selection classification method, the problems of low data stream processing efficiency, insufficient concept drift detection and poor adaptability in the existing technology are solved, and efficient and accurate data stream classification is achieved.

CN119782959AInactive Publication Date: 2025-04-08HUBEI UNIV OF ECONOMICS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411752008.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2025-04-08
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

When the existing cloning selection classification method processes massive, real-time and variable data flows, there are problems such as excessive training time overhead, real-time detection of concept drift without considering concept drift, lack of processing capabilities for large-scale data flows, and poor adaptability to concept drift.

Method used

A semi-supervised data flow classification method (SS-CLONALGD) based on cloning selection is proposed. The diversity of base classifiers is improved through online bootstrap sampling technology, and the adaptive cloning selection data flow classification method (ADE-CSACDS) based on multiple differential evolution strategies is adopted as the base classifier, and the conceptual drift detection is used using ADWIN2 sliding window technology.

Benefits of technology

It significantly improves the efficiency and accuracy of data stream processing, can dynamically adapt to changes in data distribution, reduces dependence on labeled data, improves classification efficiency, and is suitable for data stream classification tasks in multiple fields.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119782959A_ABST
    Figure CN119782959A_ABST
Patent Text Reader

Abstract

The present invention belongs to the technical field of data classification, and discloses a semi-supervised data stream classification method based on clonal selection. The present invention uses online bootstrap sampling technology to sample data in a data stream to improve the diversity between the algorithm base classifiers. Secondly, an adaptive clonal selection data stream classification method based on multiple differential evolution strategies is proposed, and it is used as the base classifier of SS-CLONALGD. It uses the difference information between the memory antibody groups that participated in the evolution for the last two times and the Hofferding boundary to decide whether to stop the clonal selection evolution process. This allows the algorithm to ensure that the obtained population is the optimal population or close to the optimal population with a specific probability without fully reading all the training data, thereby speeding up the training speed of the model and reducing data storage space. Finally, the ADWIN2 sliding window technology is used to actively detect the concept drift phenomenon in the data stream.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of data classification, and in particular relates to a semi-supervised data stream classification method and system based on clonal selection. Background Art

[0002] With the rapid development of information technology, the fields of finance, Internet, medical care, education and industry are rapidly accumulating massive amounts of data. Unlike the static data stored in traditional databases, these data exist in the form of data streams, which are massive, real-time and changeable. For example, in the financial field, transaction data is generated at a speed of milliseconds and needs to be quickly analyzed to detect abnormal transactions or conduct risk assessments; in the Internet field, user behavior data streams can be used for real-time recommendations and personalized services; in the medical field, physiological signal data generated by patient monitoring equipment needs to be analyzed in real time to assist diagnosis; in industrial production, real-time data generated by sensors and equipment needs to be processed immediately for predictive maintenance and optimized control. These scenarios put forward higher requirements for data processing and classification technology, that is, how to quickly and effectively process these dynamic data streams with limited storage and computing resources, and mine useful information and laws, so as to enhance the intelligence and decision support capabilities of the system.

[0003] Traditional clonal selection classification methods are mainly targeted at small data environments. In the real world, data streams contain a huge amount of data information, and the data distribution usually changes, that is, concept drift occurs. Although the clonal selection algorithm uses incremental antigen presentation to continuously evolve and update the model to adapt to the data environment. However, this process requires all training antigens and antibodies need to undergo multiple evolutions to generate the optimal antibody group. When faced with a large number of antigens, this presentation and evolution method will cause the algorithm training time to be too expensive and unable to process massive and fast data streams in a timely manner. At the same time, this passive concept drift processing method does not use a concept drift detection mechanism to monitor the data, but only relies on constantly adjusting its own model to adapt to the new data stream distribution, so it is usually only suitable for a gradual concept drift environment. In addition, the traditional clonal selection classification method is a single classification model, and its ability to process data streams is relatively weak compared to the integrated mode classifier.

[0004] Existing clonal selection classification methods have the following major problems and defects when facing massive, real-time and changing data streams:

[0005] 1. Excessive training time overhead: Traditional clonal selection algorithms use incremental antigen presentation to update models, which requires the use of all training data and requires multiple evolution processes each time the antibody is trained. Faced with a huge amount of data, this training method results in excessive training time overhead and is unable to respond to and process a large amount of rapidly generated data streams in a timely manner.

[0006] 2. Real-time detection of concept drift is not considered: Traditional clone selection algorithms only rely on constantly adjusting their own models to adapt to the new data stream distribution, but do not use concept drift detection mechanisms to monitor and predict data streams. This passive adaptation method cannot effectively deal with the concept drift phenomenon in data streams, especially in the case of rapid changes and emergencies, resulting in reduced classification accuracy and response delays.

[0007] 3. Lack of processing capabilities for large-scale data streams: In the process of processing large-scale real-time data streams, a single clonal selection classification model is difficult to efficiently cope with the changing data characteristics and complex computing requirements, and its processing capabilities are weaker than those of integrated classifiers. The inefficiency and limited scalability of traditional methods lead to their poor applicability in practical applications, especially in fields such as finance and healthcare that require fast and accurate decision-making.

[0008] 4. Poor adaptability to concept drift: Traditional methods have poor adaptability, especially for sudden concept drift or distribution changes. The algorithm can only adapt by repeatedly training the model, which lacks pertinence and real-time performance. Especially when the data fluctuates drastically, the existing methods cannot quickly adjust the strategy, resulting in the accuracy of the classification results being affected.

[0009] Therefore, existing technologies are unable to achieve efficient, fast, and accurate classification and processing when dealing with massive, real-time data streams, especially when facing concept drift. There is an urgent need for a new method to improve and optimize the clone selection algorithm to better adapt to the changing data stream environment. Summary of the invention

[0010] In view of the problems existing in the prior art, the present invention provides a semi-supervised data stream classification method based on clonal selection.

[0011] The present invention is implemented in that a semi-supervised data stream classification method based on clone selection (SS-CLONALGD) comprises:

[0012] Step 1, use online bootstrap sampling technology to sample the data in the data stream to improve the diversity between the algorithm base classifiers;

[0013] Step 2, an adaptive clonal selection data stream classification method ADE-CSACDS based on multiple differential evolution strategies is proposed and used as the base classifier;

[0014] Step 3, using the difference information between the memory antibody groups that participated in the last two evolutions and the Hoeffding boundary to decide whether to stop the clonal selection evolution process;

[0015] Step 4: Use ADWIN2 sliding window technology to actively detect concept drift in the data stream; only when drift is detected will the classifier with the lowest accuracy in the ensemble classifier be removed and a new base classifier be created.

[0016] Furthermore, the SS-CLONALGD:

[0017] Data flow:

[0018] A data stream is composed of a large number of data sequences that evolve over time and can be expressed as:

[0019] S = {ag (i) |ag (i) =(x i ,y i ),x i ∈R d ,y i ∈{φ,1,...,C}} (1)

[0020] Among them, ag (i) is the ith antigen, x i is a d-dimensional feature vector, y i represents the corresponding class label, C is the total number of categories, when x i When it is an unlabeled antigen, y i Let φ be;

[0021] Antigen (Antigen: Ag):

[0022] In the present invention, antigen is a training sample, which can be expressed as:

[0023] AG = {ag (i) |ag (i) =(x i ,y i ),x i ∈R d ,y i ∈{φ,1,...,C}} (2)

[0024] Among them, AG is the antigen set, ag (i) is the ith antigen, x i is a d-dimensional real vector, Represents antigen ag (i) The kth attribute of i Represents the corresponding class label, C is the total number of categories, when ag(i) When it is an unlabeled antigen, y i Let φ be;

[0025] Antibody (Antibody:Ab):

[0026] Antibodies are used to describe the set of feature points in the sample space, which can be expressed as:

[0027] AB={ab (i) |ab (i) =(x i ,y i ),x i ∈R d ,y i ∈{1,...,C}} (3)

[0028] Among them, AB is the antibody set, ab (i) is the ith antibody, x i is a d-dimensional real vector, Represents antigen ab (i) The kth attribute of i represents the corresponding class label, and C is the total number of categories;

[0029] Affinity

[0030] Online bootstrap sampling.

[0031] Furthermore, the affinity:

[0032] Affinity is used to measure the binding strength between an antibody and an antigen, reflecting the quality of the antibody. In the present invention, the distance between the antibody and the antigen is calculated using the Euclidean distance, and the affinity function F(.) is defined as:

[0033]

[0034]

[0035] in, Respectively represent antigen ag (i) and antibody ab (i) The kth attribute of ; λ (0<λ≤1) is a correction factor, which is usually set to a smaller value to avoid the situation where the denominator of the affinity function is zero.

[0036] Furthermore, the online bootstrap sampling:

[0037] Assume that the size of the training data set is N and there are M base classifiers, and randomly select N samples with replacement from the original training set to generate a training set for each base classifier; the probability P(K=k) that the training set of each base classifier contains k copies of the same sample in the original training set follows a binomial distribution:

[0038]

[0039] When N→∞, P(K=k) approximates the Poisson distribution Poisson(1), that is,

[0040]

[0041] Further, the ADE-CSACDS algorithm:

[0042] During the antibody initialization process, the algorithm randomly selects N from the antigen set AG according to the proportion of each type of antigen in the training antigen AG. i antigens as antibodies to form the initial antibody group AB; specifically, assuming that the total number of antigens is M and the category is y i The total number of antigens is M i , N is the total number of antibodies, then the category is y i The total number of antibodies N i for:

[0043]

[0044] The process of clonal variation and; the apoptosis mechanism in clonal selection is used to replace the premature convergence phenomenon detection method;

[0045] Hoeffding Boundary

[0046] Assume that there are n independent and identically distributed random variables, and their means are The Hoeffding bound guarantees the error between the true mean r of the variable and the mean with a probability of 1-δ does not exceed ò, and

[0047]

[0048] Among them, R is the range of variation of the random variable;

[0049] Evolution termination condition

[0050] ADE-CSACDS uses the metric function F(·) to represent the difference information between the memory antibody groups that participated in the evolution for the last two times when m training antigens are presented, that is:

[0051]

[0052] in, represents the ith antibody of the t-th evolution in the memory antibody group, N is the size of the memory antibody set, dist(·) is the distance function between antibodies, and its range is [0,1];

[0053] From the Hoeffding boundary, we know that when ΔF=F m,t -F m,t-1 >ò, the obtained memory antibody population is guaranteed to be the optimal population or close to the optimal population with a probability of 1-δ.

[0054] Furthermore, the concept drift detection:

[0055] Data streams change over time, and concept drift often occurs. In order to deal with the concept drift problem in data streams, the SS-CLONALGD algorithm uses ADWIN2 sliding window technology to actively detect concept drift. ADWIN is an adaptive sliding window that divides the window W into two sub-windows W1 and W2 and monitors the data distribution of the sub-windows. When the difference between the average values ​​of the two sub-windows is greater than cut When , it means that the data distribution of the two sub-windows is significantly different, that is, the concept drift phenomenon occurs; at this time, the window W1 storing the old data needs to be discarded; based on the Hoefding inequality, we get:

[0056]

[0057]

[0058] Among them, the parameter δ'∈(0,1 ) , |W1| and |W2| are the lengths of sub-windows W1 and W2 respectively, and |W|=|W1|+|W2|.

[0059] Another object of the present invention is to provide a semi-supervised data stream classification system based on clonal selection, comprising:

[0060] The sampling module is used to sample the data in the data stream using the online bootstrap sampling technique to improve the diversity among the algorithm base classifiers;

[0061] The classification method module is used to propose an adaptive clonal selection data stream classification method ADE-CSACDS based on multiple differential evolution strategies and use it as the base classifier;

[0062] A decision module, used to use the difference information between the memory antibody groups that participated in the evolution for the last two times and the Hoeffding boundary to decide whether to stop the clonal selection evolution process;

[0063] The detection module is used to actively detect the concept drift phenomenon in the data stream using the ADWIN2 sliding window technology; only when the drift phenomenon is detected will the classifier with the lowest accuracy in the integrated classifier be removed and a new base classifier be created.

[0064] Another purpose of the present invention is to improve the real-time classification performance in dynamic scenarios. The present invention proposes a semi-supervised data stream classification method and system based on clonal selection, which can quickly adapt to changes in data distribution for dynamic data streams such as financial transaction fraud detection, dynamically optimize the classification model through the clonal selection algorithm, effectively solve the problem of classification performance degradation caused by concept drift in real-time monitoring, and ensure the reliability of the model in dynamic scenarios.

[0065] Another purpose of the present invention is to reduce the labeling cost and improve the efficiency. The present invention introduces the immune optimization mechanism of clonal selection, uses a small amount of labeled diagnostic data in medical diagnostic data analysis, combines a large amount of unlabeled data for classification learning, significantly reduces the dependence on manual labeling, improves the efficiency and usability of the semi-supervised classification model, and provides technical support for real-time financial transactions.

[0066] Another object of the invention is to achieve efficient incremental model update for data stream classification. Aiming at the characteristics of continuous arrival and dynamic distribution of data in data stream environment, the present invention designs an incremental model update mechanism based on clonal selection algorithm. This mechanism can update the classifier in real time when the data stream arrives, without retraining the entire data set, significantly reducing the computational overhead, while improving the adaptability and classification efficiency of the model in real-time scenarios. This feature has important practical application value in scenarios that require continuous monitoring, such as network intrusion detection and real-time recommendation systems.

[0067] In combination with the above technical solutions and the technical problems solved, the advantages and positive effects of the technical solutions to be protected by the present invention are as follows:

[0068] First, the present invention proposes a semi-supervised clonal selection algorithm over data streams for classification (SS-CLONALGD) based on clonal selection. The method first uses online bootstrap sampling technology to sample data in the data stream to improve the diversity between the algorithm base classifiers. Secondly, an adaptive clonal selection data stream classification method ADE-CSACDS (Adaptive clonal selection algorithm with multiple differential evolution strategies for data stream classification: ADE-CSACDS) based on multiple differential evolution strategies is proposed and used as the base classifier. It uses the difference information between the memory antibody groups that participated in the evolution of the last two times and the Hofferding boundary to decide whether to stop the clonal selection evolution process. This allows the algorithm to ensure that the obtained population is the optimal population or close to the optimal population with a specific probability without fully reading all the training data, thereby speeding up the training speed of the model and reducing data storage space. Finally, the ADWIN2 sliding window technology is used to actively detect the concept drift phenomenon in the data stream. Only when drift is detected is the least accurate classifier in the ensemble removed and a new base classifier created.

[0069] Second, the present invention has strong dynamic adaptability and is suitable for complex data flow environments: the present invention combines the global search capability of the clonal selection algorithm and the incremental model update strategy to effectively deal with dynamic changes and concept drift problems in data flow environments. By updating the classifier in real time, it ensures that the classification model can adapt to the dynamic changes in data flow distribution, improving the applicability and reliability in scenarios such as financial risk monitoring, network traffic analysis, and real-time medical diagnosis.

[0070] Efficient processing of large-scale data streams, saving storage and computing resources: The present invention fully considers the high frequency and massive characteristics of data streams, adopts an incremental data processing mechanism, avoids redundant calculations of the entire data stream, and thus significantly reduces storage and computing overhead. This allows the present invention to operate efficiently in resource-constrained devices or environments (such as IoT sensor nodes).

[0071] Reduce the reliance on labeled data and improve classification efficiency: By adopting the idea of ​​semi-supervised learning, the present invention can achieve efficient classification by combining a small amount of labeled data with a large amount of unlabeled data. This capability not only solves the problem of high cost of obtaining labeled data, but also further improves classification efficiency, which is particularly suitable for scenarios where labels are scarce, such as medical data analysis or network security anomaly prediction.

[0072] Wide application range and high promotion value: The technical solution designed by the present invention is flexible and versatile and can be widely used in many fields, such as:

[0073] Financial field: real-time fraud detection and market fluctuation analysis;

[0074] Medical field: real-time health monitoring and disease classification;

[0075] Industrial field: sensor data stream analysis and equipment failure prediction;

[0076] Internet field: user behavior analysis and recommendation system.

[0077] Third, the expected benefits and commercial value of the technical solution of the present invention after transformation are: Improve the efficiency and accuracy of real-time data stream processing: The present invention optimizes data stream classification by introducing a clonal selection algorithm, effectively solves the problem of concept drift and noise interference in dynamic data streams, and greatly improves the accuracy of classification. At the same time, the incremental model update method is adopted to significantly reduce the computing cost, meeting the needs of efficient and real-time data processing in the fields of financial transaction monitoring, medical diagnosis, network security, etc. Reduce dependence on labeled data and save labor costs: In practical applications, a large number of data streams are not labeled, and the labeling cost is high. The present invention combines semi-supervised learning technology with a clonal selection mechanism to achieve efficient classification of unlabeled data under the guidance of limited labeled data. This feature can significantly reduce the investment cost of enterprises and institutions in the data labeling link, and is particularly suitable for scenarios where labeled data is scarce, such as medical diagnosis, finance and network security. Enable intelligent upgrading of multiple industries: The present invention has a wide range of cross-industry application potential: in the financial field, it can be used for real-time risk monitoring and fraud detection; in the medical field, it is suitable for patient health monitoring and disease diagnosis; in network security, it can quickly identify abnormal behavior in network traffic; in the industrial field, it helps to realize intelligent analysis and predictive maintenance of sensor data. The wide applicability of this technology will significantly promote the intelligent upgrading of related industries. Market competitiveness and scalability of the technical solution: Compared with traditional supervised learning methods, the clone selection semi-supervised classification technology of the present invention has stronger adaptability and robustness, and can cope with complex and dynamic data flow environments. Its high efficiency and low cost give it a greater competitive advantage in the technology service market, and it can be widely used in enterprise-level solutions with high commercial promotion value. The above-mentioned expected benefits and commercial value reflect the innovativeness and practical application value of the technical solution of the present invention, and provide important support for the technological development and market expansion in related fields.

[0078] Fourth, the technical solution of the present invention solves multiple technical problems in the prior art in industrial applications and has achieved significant technical progress, which is specifically reflected in the following aspects:

[0079] 1. Solved the efficiency problem of traditional clone selection method in processing massive data streams

[0080] The existing clonal selection algorithm, due to its incremental antigen presentation method, usually needs to use all training data and iterate multiple times, resulting in a large training time overhead, especially when facing massive data streams, it cannot respond to the rapid changes of data streams in a timely manner. In contrast, the adaptive clonal selection data stream classification method (ADE-CSACDS) based on multiple differential evolution strategies proposed in the present invention effectively improves the diversity between base classifiers, reduces the amount of data and computing time required for each evolution, and thus significantly improves the efficiency of the algorithm in processing large-scale data streams.

[0081] 2. Solved the passive adaptability problem of concept drift detection

[0082] Existing technologies usually rely on passive model updates to adapt to concept drift, and fail to effectively detect and respond to changes in data streams in real time, especially in rapidly changing environments, and often fail to adjust models in a timely manner. By introducing ADWIN2 sliding window technology, the present invention can actively detect concept drift in data streams and make necessary adjustments only when drift occurs, thereby improving the model's adaptability to rapidly changing environments, so that the classification model can always accurately reflect the current data distribution.

[0083] 3. Solve the limitations of a single classifier

[0084] Traditional clonal selection methods are mostly single classification models, and their classification capabilities are limited when faced with complex and changeable data streams. In contrast, the present invention integrates multiple base classifiers and optimizes them through an adaptive clonal selection method, thereby avoiding the shortcomings of a single classifier in a complex environment. Through this integration model, the present invention can achieve collaborative work between multiple classifiers, improving the overall classification performance and robustness.

[0085] 4. Significantly improve the real-time and accuracy of data stream processing

[0086] Since traditional algorithms are prone to response delays when facing huge data streams and cannot perform timely analysis and processing, the present invention uses online bootstrap sampling technology to improve the real-time performance of the algorithm in processing data streams, ensuring that each base classifier completes data processing in a short time, and improving the timeliness of classification decisions. In addition, based on the adaptive clone selection and concept drift detection mechanism, the accuracy of data classification is further improved, avoiding the negative impact of incorrect classification.

[0087] 5. Widely applicable to data stream classification tasks in multiple fields

[0088] The method proposed in the present invention not only has strong real-time and adaptability, but also can process variable and large-scale data streams, and is widely applicable to data stream classification tasks in multiple industries such as finance, Internet, medical care, and industry, and has broad application prospects. In these fields, real-time analysis and classification of data streams are crucial for decision support, risk control, and the provision of intelligent services. The technical progress of the present invention provides these industries with more efficient and accurate data stream processing solutions.

[0089] In summary, the present invention solves the problems of data processing efficiency, accuracy and real-time performance in the prior art by proposing an innovative clonal selection algorithm combined with active concept drift detection and multi-classifier integration mechanism, significantly improves the application performance in complex dynamic data streams, and has significant technological progress. BRIEF DESCRIPTION OF THE DRAWINGS

[0090] Figure 1 It is a flow chart of a semi-supervised data stream classification method based on clonal selection provided by an embodiment of the present invention.

[0091] Figure 2 It is a structural block diagram of a semi-supervised data stream classification system based on clone selection provided by an embodiment of the present invention.

[0092] Figure 3 A Poisson distribution diagram with different values ​​is provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0093] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0094] like Figure 1 As shown, a semi-supervised data stream classification method based on clonal selection provided by an embodiment of the present invention includes the following steps:

[0095] S101, using online bootstrap sampling technology to sample data in the data stream to improve the diversity between the algorithm base classifiers;

[0096] S102, propose an adaptive clonal selection data stream classification method ADE-CSACDS based on multiple differential evolution strategies and use it as a base classifier;

[0097] S103, using the difference information between the memory antibody groups that participated in the last two evolutions and the Hoeffding boundary to decide whether to stop the clonal selection evolution process;

[0098] S104, using ADWIN2 sliding window technology to actively detect concept drift in the data stream; only when drift is detected, the classifier with the lowest accuracy in the integrated classifier is removed and a new base classifier is created.

[0099] The working principle of the semi-supervised data stream classification method based on clonal selection provided by the embodiment of the present invention can be described in detail through the following four steps:

[0100] S101: Data Stream Sampling and Diversity Enhancement

[0101] In data stream classification, the data in the data stream is first sampled using the online bootstrap sampling technique. This technique can effectively generate a diverse training set by randomly selecting training samples, avoiding classification bias caused by uneven data distribution. In this way, the diversity between base classifiers is improved, ensuring the robustness and adaptability of the classifier in data stream classification.

[0102] S102: Adaptive clonal selection method (ADE-CSACDS) as base classifier

[0103] An adaptive clonal selection data stream classification method based on multiple differential evolution strategies (ADE-CSACDS) is proposed and used as the base classifier. By introducing the differential evolution strategy, this method can flexibly optimize the parameters in the clonal selection algorithm and improve the classification ability of the base classifier. The differential evolution strategy adaptively adjusts the antibody group so that each base classifier can be dynamically optimized and improved according to the characteristics of the data stream, thereby improving the performance of the entire classification model.

[0104] S103: Determining the timing of clonal selection termination based on differences in memory antibody populations and the Hoeffding boundary

[0105] In the process of clonal selection, the difference information between memory antibody groups and the Hoeffding boundary are used to determine whether to stop the clonal selection evolution process. The Hoeffding boundary can accurately estimate the confidence of the classifier output results. When the output confidence of the base classifier exceeds the set threshold, it means that the classifier has reached a certain stability and its evolution can be terminated. In this way, invalid evolutionary calculations are avoided and the waste of time and computing resources is reduced.

[0106] S104: Concept drift detection and classifier update mechanism

[0107] In order to deal with concept drift in data streams, ADWIN2 sliding window technology is used to actively detect concept drift in data streams. ADWIN2 can detect concept drift in real time without relying on historical data. When drift is detected, it automatically identifies and removes the classifier with the lowest accuracy in the ensemble classifier and creates a new base classifier to supplement it. This mechanism ensures that the model can adjust in time to deal with concept drift in data streams and maintain the high accuracy and stability of the classifier.

[0108] Through the above four steps, the method of the present invention can not only effectively deal with the concept drift problem, but also improve the performance and efficiency of the classifier, especially showing excellent performance when processing large-scale, dynamically changing data streams.

[0109] SS-CLONALGD provided in the embodiment of the present invention:

[0110] Data flow:

[0111] A data stream is composed of a large number of data sequences that evolve over time and can be expressed as:

[0112] S = {ag (i) |ag (i) =(x i ,y i ),x i ∈R d ,y i ∈{φ,1,...,C}} (1)

[0113] Among them, ag (i) is the ith antigen, x i is a d-dimensional feature vector, y i represents the corresponding class label, C is the total number of categories, when x i When it is an unlabeled antigen, y i Let φ be;

[0114] Antigen (Antigen: Ag):

[0115] In the present invention, antigen is a training sample, which can be expressed as:

[0116] AG = {ag (i) |ag (i) =(x i ,y i ),x i ∈R d ,y i ∈{φ,1,...,C}} (2)

[0117] Among them, AG is the antigen set, ag (i) is the ith antigen, x i is a d-dimensional real vector, Represents antigen ag (i) The kth attribute of i Represents the corresponding class label, C is the total number of categories, when ag (i) When it is an unlabeled antigen, y i Let φ be;

[0118] Antibody (Antibody:Ab):

[0119] Antibodies are used to describe the set of feature points in the sample space, which can be expressed as:

[0120] AB={ab (i) |ab (i) =(x i ,y i ),xi ∈R d ,y i ∈{1,...,C}} (3)

[0121] Among them, AB is the antibody set, ab (i) is the ith antibody, x i is a d-dimensional real vector, Represents antigen ab (i) The kth attribute of i represents the corresponding class label, and C is the total number of categories;

[0122] Affinity

[0123] Online bootstrap sampling.

[0124] Affinity provided by the embodiment of the present invention:

[0125] Affinity is used to measure the binding strength between an antibody and an antigen, reflecting the quality of the antibody. In the present invention, the distance between the antibody and the antigen is calculated using the Euclidean distance, and the affinity function F(.) is defined as:

[0126]

[0127]

[0128] in, Respectively represent antigen ag (i) and antibody ab (i) The kth attribute of ; λ (0<λ≤1) is a correction factor, which is usually set to a smaller value to avoid the situation where the denominator of the affinity function is zero.

[0129] The online bootstrap sampling provided by the embodiment of the present invention is as follows:

[0130] Assume that the size of the training data set is N and there are M base classifiers, and randomly select N samples with replacement from the original training set to generate a training set for each base classifier; the probability P(K=k) that the training set of each base classifier contains k copies of the same sample in the original training set follows a binomial distribution:

[0131]

[0132] When N→∞, P(K=k) approximates the Poisson distribution Poisson(1), that is,

[0133]

[0134] The ADE-CSACDS algorithm provided by the embodiment of the present invention:

[0135] During the antibody initialization process, the algorithm randomly selects N from the antigen set AG according to the proportion of each type of antigen in the training antigen AG. i antigens as antibodies to form the initial antibody group AB; specifically, assuming that the total number of antigens is M and the category is y i The total number of antigens is M i , N is the total number of antibodies, then the category is y i The total number of antibodies N i for:

[0136]

[0137] The process of clonal variation and; the apoptosis mechanism in clonal selection is used to replace the premature convergence phenomenon detection method;

[0138] Hoeffding Boundary

[0139] Assume there are n independent and identically distributed random variables, and their mean is r, then the Hoeffding bound guarantees with probability 1-δ that the error r between the true mean r of the variable and the mean does not exceed ò, and

[0140]

[0141] Among them, R is the range of variation of the random variable;

[0142] Evolution termination condition

[0143] ADE-CSACDS uses the metric function F(·) to represent the difference information between the memory antibody groups that participated in the evolution for the last two times when m training antigens are presented, that is:

[0144]

[0145] in, represents the ith antibody of the t-th evolution in the memory antibody group, N is the size of the memory antibody set, dist(·) is the distance function between antibodies, and its range is [0,1];

[0146] From the Hoeffding boundary, we know that when ΔF=F m,t -F m,t-1 >ò, the obtained memory antibody population is guaranteed to be the optimal population or close to the optimal population with a probability of 1-δ.

[0147] The concept drift detection provided by the embodiment of the present invention:

[0148] Data streams change over time, and concept drift often occurs. In order to deal with the concept drift problem in data streams, the SS-CLONALGD algorithm uses ADWIN2 sliding window technology to actively detect concept drift. ADWIN is an adaptive sliding window that divides the window W into two sub-windows W1 and W2 and monitors the data distribution of the sub-windows. When the difference between the average values ​​of the two sub-windows is greater than cut When , it means that the data distribution of the two sub-windows is significantly different, that is, the concept drift phenomenon occurs; at this time, the window W1 storing the old data needs to be discarded; based on the Hoefding inequality, we get:

[0149]

[0150]

[0151] Among them, the parameter δ'∈(0,1 ) , |W1| and |W2| are the lengths of sub-windows W1 and W2 respectively, and |W|=|W1|+|W2|.

[0152] like Figure 2 As shown, a semi-supervised data stream classification system based on clonal selection provided by an embodiment of the present invention includes:

[0153] The sampling module is used to sample the data in the data stream using the online bootstrap sampling technique to improve the diversity among the algorithm base classifiers;

[0154] The classification method module is used to propose an adaptive clonal selection data stream classification method ADE-CSACDS based on multiple differential evolution strategies and use it as the base classifier of SS-CLONALGD;

[0155] A decision module, used to use the difference information between the memory antibody groups that participated in the evolution for the last two times and the Hoeffding boundary to decide whether to stop the clonal selection evolution process;

[0156] The detection module is used to actively detect the concept drift phenomenon in the data stream using the ADWIN2 sliding window technology; only when the drift phenomenon is detected will the classifier with the lowest accuracy in the integrated classifier be removed and a new base classifier be created.

[0157] Another purpose of the present invention is to improve the real-time classification performance in dynamic scenarios. The present invention proposes a semi-supervised data stream classification method and system based on clonal selection, which can quickly adapt to changes in data distribution for dynamic data streams such as financial transaction fraud detection, dynamically optimize the classification model through the clonal selection algorithm, effectively solve the problem of classification performance degradation caused by concept drift in real-time monitoring, and ensure the reliability of the model in dynamic scenarios.

[0158] Another purpose of the present invention is to reduce the labeling cost and improve the efficiency. The present invention introduces the immune optimization mechanism of clonal selection, uses a small amount of labeled diagnostic data in medical diagnostic data analysis, combines a large amount of unlabeled data for classification learning, significantly reduces the dependence on manual labeling, improves the efficiency and usability of the semi-supervised classification model, and provides technical support for real-time financial transactions.

[0159] Another object of the invention is to achieve efficient incremental model update for data stream classification. Aiming at the characteristics of continuous arrival and dynamic distribution of data in data stream environment, the present invention designs an incremental model update mechanism based on clonal selection algorithm. This mechanism can update the classifier in real time when the data stream arrives, without retraining the entire data set, significantly reducing the computational overhead, while improving the adaptability and classification efficiency of the model in real-time scenarios. This feature has important practical application value in scenarios that require continuous monitoring, such as network intrusion detection and real-time recommendation systems.

[0160] The present invention is specifically implemented:

[0161] 1.1 This paper proposes a semi-supervised clonal selection algorithm over data streams for classification (SS-CLONALGD) based on clonal selection. This method improves the SS-CLONALGD algorithm proposed in Chapter 4 to handle the classification problem in the data stream environment. First, the data in the data stream is sampled using online bootstrap sampling technology to improve the diversity between the algorithm base classifiers. Secondly, an adaptive clonal selection data stream classification method ADE-CSACDS (Adaptive clonal selection algorithm with multiple differential evolution strategies for data stream classification: ADE-CSACDS) based on multiple differential evolution strategies is proposed and used as the base classifier. It uses the difference information between the memory antibody groups that participated in the evolution of the last two times and the Hofferding boundary to decide whether to stop the clonal selection evolution process. This allows the algorithm to ensure that the obtained population is the optimal population or close to the optimal population with a specific probability without fully reading all the training data, thereby speeding up the training speed of the model and reducing data storage space. Finally, the ADWIN2 sliding window technique is used to actively detect concept drift in the data stream. Only when drift is detected is the classifier with the lowest accuracy in the ensemble removed and a new base classifier created.

[0162] The present invention proposes a semi-supervised data stream classification method SS-CLONALGD based on clonal selection, which uses the Hoefding inequality, online bootstrap sampling and sliding window techniques to deal with classification problems in data stream environments. In order to clearly describe the algorithm flow, the present invention section introduces the symbol definition, online bootstrap sampling, base classifier ADE-CSACDS algorithm, concept drift detection and method framework in detail.

[0163] Symbol Definition

[0164] In order to better understand the methods proposed in the remaining sections of the present invention, some key terms are defined as follows:

[0165] Data Flow

[0166] A data stream is composed of a large number of data sequences that evolve over time and can be expressed as:

[0167] S = {ag (i) |ag (i)=(x i ,y i ),x i ∈R d ,y i ∈{φ,1,...,C}} (1)

[0168] Among them, ag (i) is the ith antigen, x i is a d-dimensional feature vector, y i represents the corresponding class label, C is the total number of categories, when x i When it is an unlabeled antigen, y i Let φ.

[0169] Antigen (Antigen:Ag)

[0170] In the present invention, antigen is a training sample, which can be expressed as:

[0171] AG = {ag (i) |ag (i) =(x i ,y i ),x i ∈R d ,y i ∈{φ,1,...,C}} (2)

[0172] Among them, AG is the antigen set, ag (i) is the ith antigen, x i is a d-dimensional real vector, Represents antigen ag (i) The kth attribute of i Represents the corresponding class label, C is the total number of categories, when ag (i) When it is an unlabeled antigen, y i Let φ.

[0173] Antibody (Antibody:Ab)

[0174] Antibodies are used to describe the set of feature points in the sample space, which can be expressed as:

[0175] AB={ab (i) |ab (i) =(x i ,y i ),x i ∈R d ,y i ∈{1,...,C}} (3)

[0176] Among them, AB is the antibody set, ab (i) is the ith antibody, x i is a d-dimensional real vector, Represents antigen ab (i) The kth attribute of i represents the corresponding class label, and C is the total number of categories.

[0177] Affinity

[0178] Affinity is used to measure the binding strength between an antibody and an antigen, reflecting the quality of the antibody. In the present invention, the distance between the antibody and the antigen is calculated using the Euclidean distance, and the affinity function F(.) is defined as:

[0179]

[0180]

[0181] in, Respectively represent antigen ag (i) and antibody ab (i) λ(0<λ≤1) is a correction factor, which is usually set to a small value to avoid the situation where the denominator of the affinity function is zero.

[0182] Online bootstrap sampling

[0183] Inspired by the Online Bagging method, SS-CLONALGD uses the online bootstrap sampling method to replace bootstrap sampling. It uses the Poisson distribution (1) with parameter λ = 1 to assign weights to each sample in the original training set, and samples the samples using the weight size as the number of sample samplings. The pseudo code of the algorithm is shown in Algorithm 1, and the principle of the algorithm is explained as follows:

[0184] Assume that the size of the training data set is N and there are M base classifiers, and randomly select N samples from the original training set with replacement for each base classifier to generate a training set. The probability P(K=k) that the training set of each base classifier contains k copies of the same sample in the original training set follows a binomial distribution:

[0185]

[0186] When N→∞, P(K=k) approximates the Poisson distribution Poisson(1), that is,

[0187]

[0188] Algorithm 1 Pseudocode of online bootstrap sampling algorithm

[0189]

[0190] Figure 3The figure shows the Poisson distribution with different λ values. It can be seen from the figure that when λ = 1, about 37% of the k values ​​are equal to 0, 37% of the k values ​​are equal to 1, and the remaining 26% of the k values ​​are greater than 1, and a total of about 63% of the k values ​​are greater than or equal to 1. This conclusion is consistent with the conclusion that "when the training set is large enough, about 63.2% of the samples in the bootstrap samples come from the original training set." Therefore, the online bootstrap sampling method can replace bootstrap sampling and be effectively applied to the data stream.

[0191] Base classifier ADE-CSACDS algorithm

[0192] This section proposes an adaptive clonal selection data stream classification method (ADE-CSACDS) based on multiple differential evolution strategies. This method uses the difference information between the memory antibody groups that participated in the last two evolutions and the Hoeffding boundary to determine whether to stop the clonal selection evolution process. It enables the algorithm to ensure that the obtained population is the optimal population or close to the optimal population with a certain probability while not completely reading all the training data in the data stream, thereby speeding up the training speed of the model and reducing data storage space. The specific implementation is as follows:

[0193] Adaptive clonal selection classification method based on differential evolution strategy

[0194] The adaptive clonal selection classification method ADE-CSAC based on differential evolution strategy is used as the base classifier in the SS-CLONALGD algorithm. The specific algorithm description is shown in Algorithm 2.

[0195] In the antibody initialization process of line 2, the algorithm randomly selects N from the antigen set AG according to the proportion of each type of antigen in the training antigen AG. i antigens as antibodies to form the initial antibody group AB. Specifically, assuming that the total number of antigens is M and the category is y i The total number of antigens is M i , N is the total number of antibodies, then the category is y i The total number of antibodies N i for:

[0196]

[0197] Lines 8 to 13 are the clonal variation process. Line 17 uses the cell apoptosis mechanism in clonal selection to replace the premature convergence phenomenon detection method.

[0198] Algorithm 2 ADE-CSAC algorithm description

[0199]

[0200] Hoeffding Boundary

[0201] Assume that there are n independent and identically distributed random variables, and their means are The Hoeffding bound guarantees the error between the true mean r of the variable and the mean with a probability of 1-δ does not exceed ò, and

[0202]

[0203] Among them, R is the range of variation of the random variable.

[0204] Evolution termination condition

[0205] ADE-CSACDS uses the metric function F(·) to represent the difference information between the memory antibody groups that participated in the evolution for the last two times when m training antigens are presented, that is:

[0206]

[0207] in, represents the ith antibody of the t-th evolution in the memory antibody group, N is the size of the memory antibody set, and dist(·) is the distance function between antibodies, which ranges from [0,1].

[0208] From the Hoeffding boundary, we know that when ΔF=F m,t -F m,t-1 When >ò, the obtained memory antibody population is guaranteed to be the optimal population or close to the optimal population with a probability of 1-δ, and the antibody evolution process can be terminated at this time. The parameter ò can be calculated by formula (5.4).

[0209] Concept Drift Detection

[0210] Data streams change over time, and concept drift often occurs. In order to deal with the concept drift problem in data streams, the SS-CLONALGD algorithm uses ADWIN2 sliding window technology to actively detect concept drift. ADWIN is an adaptive sliding window that divides the window W into two sub-windows W1 and W2 and monitors the data distribution of the sub-windows. When the difference between the average values ​​of the two sub-windows is greater than cut When , it means that the data distribution of the two sub-windows is significantly different, that is, the concept drift phenomenon occurs. At this time, the window W1 storing the old data needs to be discarded. Based on the Hoefding inequality, we get:

[0211]

[0212]

[0213] Among them, the parameter δ'∈(0,1 ), |W1| and |W2| are the lengths of sub-windows W1 and W2 respectively, and |W|=|W1|+|W2|. Due to the limitations of ADWIN algorithm in terms of time and storage, ADWIN2 improves it by using exponential histogram.

[0214] SS-CLONALGD uses the error rate of the classifier as the data in the ADWIN2 sliding window to detect concept drift. When concept drift is detected, the classifier with the lowest accuracy in the ensemble classifier is removed and a new base classifier is created using the incoming data block to adapt to the changing data stream environment.

[0215] Methodology Framework

[0216] The training process of the SS-CLONALGD algorithm mainly includes the establishment of the initial model, the detection of concept drift and the update process of the model. The algorithm first uses a sliding window of fixed length to divide the data stream into several data blocks B with the same number of samples W. i , where data block B i From the labeled dataset L i And the unlabeled dataset U i After online bootstrap sampling of the labeled data set L1, the initialization model H is generated. * Then, using the unlabeled dataset U i For model H * The base classifier in is updated. Finally, the ADWIN2 sliding window technology is used to monitor the error rate of the classifier to determine whether there is concept drift in the data stream. When concept drift occurs, the classifier with the lowest accuracy in the ensemble classifier is removed, and a new base classifier is created and added to the ensemble classifier. The pseudo code of the SS-CLONALGD algorithm is shown in Algorithm 3, where the steps are described in detail as follows:

[0217] Line 1: Initialize the parameters of the SS-CLONALGD algorithm, set the integrated model H* to empty, and the base classification h (i) Set to null.

[0218] Line 2: Use a fixed-length sliding window to divide the data stream into several data blocks B with the same number of samples W i .

[0219] Lines 3 to 11: First, check whether there is an initial model H * Make a judgment, if it exists, then for each newly arrived data block B i Perform concept drift detection. Otherwise, create the initial model H * . Secondly, if data block B iIf concept drift occurs in the ensemble classifier, remove the classifier with the lowest accuracy in the ensemble classifier and create a new base classifier in the subsequent step; otherwise, continue to process the next data block B i+1 .

[0220] Lines 12 to 25: Create the uninitialized base classifier and the new base classifier. Specifically, use the online bootstrap sampling technology to select the data block B. i The labeled dataset L in i Sampling is performed to generate the base classifier h (j) The training dataset T i,j And the evaluation dataset E i,j , and use the training set T i,j Generate set classifier h (j) .

[0221] Algorithm 3SS-CLONALGD algorithm pseudo code

[0222]

[0223] Lines 26 to 48: Using the collaborative ensemble classifier H i From the unlabeled dataset U j,t Select the sample with higher confidence level from the base classification h (j) This process is consistent with the SS-CLONALGD algorithm except for the update of the base classifier.

[0224] Experiment and analysis

[0225] In order to verify the effectiveness of the SS-CLONALGD algorithm, this section uses the well-known data stream analysis platform MOA (Massive Online Analysis) to generate four artificial data sets containing concept drift, and on this basis, experimentally compares the SS-CLONALGD algorithm with the semi-supervised data stream classification method.

[0226] Experimental Dataset

[0227] In real production, most data is private and has high storage and transmission costs, making it difficult to obtain and save. Even though some of the massive data sets in the public UCI datasets can be used to evaluate the performance of data stream classifiers, it is difficult to accurately determine whether there is concept drift in these data sets and when concept drift occurs. For the above reasons, this section uses the MOA framework to generate RandomTree data streams, SEA data streams, Waveform data streams, and ForestCoverType data streams to evaluate the classification performance of the algorithm. These datasets are widely used to evaluate the performance of data stream classification methods and contain different sample sizes, number of attributes, attribute types, and number of categories. The sample size ranges from 900,000 to 1,000,000, the feature dimension ranges from 3 to 64, the attribute categories include continuous, discrete, and mixed types, and the number of concept drifts ranges from 2 to 3. The specific details are shown in Table 1.

[0228] Table 1 Description of the concept drift dataset

[0229]

[0230] RandomTree dataset: It is a data stream generated by a random tree generator. First, it creates a random tree generator by randomly selecting the separation attributes of the tree nodes and randomly assigning a class label to each leaf node. Secondly, it generates the attribute values ​​of the samples using a uniformly distributed random function, and determines the class label of the samples through a random tree. Finally, a RandomTree dataset containing 1,000,000 samples is generated using a random tree generator, and a sigmoid function is used to introduce a concept drift every 250,000 samples, creating a total of 3 concept drifts.

[0231] SEA dataset: The SEA generator is proposed in the SEA algorithm. It contains 3 attributes, only the first two attributes are related to the category, and all attribute values ​​are between 0 and 10. The data in the dataset is divided into 4 different data blocks by the threshold θ, and the most commonly used θ values ​​​​are used here 9, 8, 7, and 9.5. The SEA dataset is generated by this generator. It contains 1,000,000 sample data, and a concept drift is introduced every 300,000, 300,000, and 400,000 samples, respectively, creating a total of 2 concept drifts.

[0232] Waveform Dataset: The Waveform generator contains three different types of waveforms, each of which is a combination of two or three fundamental waves. The Waveform dataset was created using this generator. It contains 1,000,000 sample data, and introduces a concept drift every 250,000 samples, creating a total of 3 concept drifts. Since there is a binary classification method in the comparison algorithm, only samples of categories 1 and 2 in the dataset are retained.

[0233] Forest CoverType dataset: It is a UCI dataset provided by the United States Forest Service, containing 581,012 data samples, each with 54 attributes and 7 forest cover categories. Due to the binary classification method in the comparison algorithm, samples with low frequency of occurrence are removed, and only samples with categories 1 and 2 in the dataset are retained. At the same time, the ForestCoverType dataset is combined with the created RandomTree dataset to generate a hybrid data stream containing 900,000 samples and 2 concept drifts.

[0234] Comparison Algorithms

[0235] In the comparative experiment, this section compares the SS-CLONALGD algorithm with the current mainstream semi-supervised data stream classification methods to verify the performance of SS-CLONALGD. Semi-supervised data stream classification methods include: clone selection algorithm based on self-training mode, clone selection algorithm based on co-training mode, MPSVM algorithm and KNN-WDM algorithm. Among them, the clone selection algorithm based on self-training mode and the clone selection algorithm based on co-training mode are both incremental semi-supervised data stream classification methods. MPSVM and KNN-WDM are non-incremental semi-supervised classification methods. Here, the sliding window technology is used to extend the MPSVM and KNN-WDM algorithms to the data stream environment with concept drift.

[0236] Experimental setup

[0237] SS-CLONALGD is implemented based on the WEKA platform, and its parameters are set as follows: antibody population size N = 800, clone selection number n = 200, clone scale C = 5, high-frequency mutation probability P m=1 / d, the size of historical storage variables H=100, the percentage of replaced antibodies in the antibody group r is {2%, 5%, 10%, 15%, 20%}, the size of the ensemble classifier K=10, the maximum number of iterations T=100, the parameter δ=0.05, the confidence threshold θ and the k value used in the classification process are determined by cross-validation, the sliding window is set to W=2000, and the parameter δ' of the ADWIN2 algorithm is 0.002. In the clone selection algorithm based on the Self-training mode and the clone selection algorithm based on the Co-training mode, the antibody group size N=800, the number of clone selections n=10, the clone factor β=0.1, the percentage of replaced antibodies in the antibody group r=20%, and the k value and confidence threshold θ used in the confidence calculation process are determined by cross-validation. The sliding window sizes of the comparison algorithms MPSVM and KNN-WDM are set to 2000 and 3000 respectively, and the other parameters use the default values ​​mentioned in the literature.

[0238] In addition, this experiment uses the Interleaved Test-Then-Train strategy to evaluate the classification error rate of the classification model. This method uses each sample in the data stream to evaluate the error rate of the classification model before using it in the training or update process of the model.

[0239] Comparison with Semi-Supervised Data Stream Classification Methods

[0240] In order to verify the performance of SS-CLONALGD, this section compares SS-CLONALGD with the clone selection algorithm based on the self-training mode, the clone selection algorithm based on the co-training mode, the MPSVM algorithm and the KNN-WDM algorithm on four artificial datasets with concept drift.

[0241] Tables 2 to 5 give the average classification error rate and the corresponding standard deviation when the proportion of labeled samples μ on the data stream is 20%, 40%, 60% and 80%, respectively. Each column in the table consists of three fields: the baseline error rate (initial), the final error rate (final) and the improvement rate (improv). Among them, the baseline error rate is the average error rate obtained using the labeled dataset L; the final error rate is the average error rate obtained using the labeled dataset L and the unlabeled dataset U; and the improvement rate is the difference between the baseline error rate and the final error rate divided by the baseline error rate. The last row "AVG." gives the average classification error rate and the average improvement rate of the algorithm on all datasets. And the minimum average final error rate of each dataset is shown in bold blue.

[0242] As can be seen from the table, compared with the clone selection algorithm based on the self-training mode and the clone selection algorithm based on the co-training mode, SS-CLONALGD has achieved a more obvious improvement in performance by utilizing the information in the unlabeled samples. By calculating the average improvement rate of each algorithm on all datasets under all labeled sample ratios, it can be seen that the error rate of SS-CLONALGD decreased by 2.46%, while the error rates of the clone selection algorithms in the self-training and co-training modes increased by 9.04% and 9.46% respectively. The accuracy of the SS-CLONALGD algorithm only decreased on the SEA dataset with a labeled sample ratio of μ of 60%. The performance of the self-training and co-training algorithms decreased in most datasets, and the co-training algorithm was more obvious on datasets with fewer attributes. For example, in the SEA dataset with 3 attributes, when the labeled sample ratio μ is 20%, 40%, 60%, and 80%, the error rate of the Co-training algorithm increases by 28.31%, 39.45%, 39.75%, and 26.31% respectively relative to the baseline error rate. This is because the algorithm randomly divides the attributes in the dataset into two views of similar size. When the dataset contains fewer attributes, it violates the assumption of "two sufficiently redundant views", resulting in a decrease in the performance of the Co-training algorithm.

[0243] In terms of classifier accuracy, the average classification error rate of SS-CLONALGD is 15.06% lower than that of the clone selection algorithm based on the self-training mode and the clone selection algorithm based on the co-training mode, respectively. The error rate of the SS-CLONALGD algorithm is higher than that of the co-training algorithm only on the Forest CoverType dataset with a labeled sample ratio of μ of 20%, and its error rate on all datasets is lower than that of the self-training algorithm. This is because the SS-CLONALGD algorithm uses the bagging ensemble mechanism to calculate the confidence of unlabeled data, which can effectively reduce the deviation brought by a single classifier compared with the self-training algorithm that only contains a single classifier, and eliminates the restriction of two "sufficiently redundant views" in the co-training algorithm, thus having better classification performance. In addition, SS-CLONALGD uses ADWIN2 technology to actively detect concept drift in data streams. Once the concept drift phenomenon is found, the classifier with the lowest accuracy in the ensemble classifier is removed and a new base classifier is created to adapt to the changing data stream environment.

[0244] Table 2 Average error rate of semi-supervised algorithm when the proportion of labeled samples is 20% (mean% ± variance)

[0245]

[0246] Table 3 Average error rate of semi-supervised algorithm when the proportion of labeled samples is 40% (mean% ± variance)

[0247]

[0248] Table 4 Average error rate of semi-supervised algorithm when the proportion of labeled samples is 60% (mean% ± variance)

[0249]

[0250] Table 5 Average error rate of semi-supervised algorithm when the proportion of labeled samples is 80% (mean% ± variance)

[0251]

[0252] Compared with the semi-supervised data stream classification methods of MPSVM and KNN-WDM of non-artificial immune type, the SS-CLONALGD algorithm also shows good performance. Specifically, compared with the KNN-WDM algorithm, the performance of SS-CLONALGD is significantly lower than that of KNN-WDM algorithm only on the SEA dataset, because the samples in each concept drift block of SEA are divided into different blocks, and the K nearest neighbor samples of the query data almost belong to the same type of data, and this data distribution is more conducive to the use of KNN algorithm. Compared with the MPSVM algorithm, the performance of the two algorithms is comparable, and is significantly lower than that of the MPSVM algorithm only on the SEA and Waveform datasets. This is due to the high correlation between attributes and non-linear boundaries in the Waveform dataset. In terms of performance improvement, the accuracy of the SS-CLONALGD algorithm only decreased on the SEA dataset with a labeled sample ratio of 60%, while the performance of the MPSVM and KNN-WDM algorithms decreased in some datasets. For example, the error rates of the MPSVM algorithm on the RandomTree and Waveform datasets with a labeled sample ratio of 60% increased by 0.2% and 0.31% respectively, and the error rates of the KNN-WDM on the SEA and Forest CoverType datasets with a labeled sample ratio of 80% increased by 0.27% and 2.77% respectively.

[0253] In summary, the experiments in this section verify the effectiveness of the SS-CLONALGD algorithm on multiple artificial datasets with concept drift. The experimental results show that the SS-CLONALGD algorithm can make full use of the information in the unlabeled data to improve the performance of the algorithm under the condition of limited labeled data. In the process of comparing with semi-supervised data stream classification methods such as the clone selection algorithm based on the self-training mode, the clone selection algorithm based on the co-training mode, MPSVM and KNN-WDM, the performance of SS-CLONALGD on most dynamic data streams is significantly better than the clone selection algorithm based on the self-training and co-training modes and the KNN-WDM algorithm, and is comparable to the performance of MPSVM. In addition, the experiment analyzes the reasons for the relatively poor performance of SS-CLONALGD on a few datasets, and points out that this is caused by the characteristics of the data distribution and attribute correlation of the dataset.

[0254] 1.4 Conclusion

[0255] Inspired by the artificial immune system, the present invention proposes a semi-supervised data stream classification method based on clonal selection, namely the SS-CLONALGD algorithm, in view of the problem that the traditional clonal selection algorithm mainly processes small data sets and cannot adapt to the massive, real-time and changeable data stream environment. First, it uses the difference information between the memory antibody groups that participated in the evolution for the last two times and the Hoeffding boundary to determine whether to stop the clonal selection evolution process. This allows the algorithm to ensure that the obtained population is the optimal population or close to the optimal population with a specific probability without fully reading all the training data, thereby reducing the number of antigens that need to be presented and improving the model update speed. Secondly, the data in the data stream is sampled using the online bootstrap sampling technology to improve the diversity between the base classifiers in the algorithm. Finally, the ADWIN2 sliding window technology is used to actively detect the concept drift phenomenon in the data stream. When the concept drift is detected, the model will automatically make corresponding adjustments. In addition, the present invention verifies the performance of the SS-CLONALGD algorithm through comparative experiments. The experimental results show that SS-CLONALGD can effectively use the information in the unlabeled data to improve the classification performance of the algorithm. Compared with other semi-supervised data stream classification methods, the SS-CLONALGD algorithm also has better classification performance on most data sets. In particular, in the comparison with the clone selection algorithm based on the self-training mode and the clone selection algorithm based on the co-training mode, the average classification error rate of the algorithm decreased by 15.06% and 24.83% respectively compared with the other two algorithms.

[0256] Example 1: Real-time transaction risk monitoring system in the financial field

[0257] In financial transaction scenarios, massive amounts of transaction data are generated in a high-speed flow, usually accompanied by abnormal transaction behaviors (such as fraud, money laundering) or market fluctuations. Traditional supervised learning methods are difficult to quickly adapt to these dynamic data distributions. The present invention combines the adaptive characteristics of the clonal selection algorithm, and through real-time analysis of transaction data streams, only a small number of labeled normal and abnormal transaction data samples are needed to accurately distinguish normal transactions from potential risk transactions. The system adopts an incremental model update mechanism, which enables the classifier to dynamically adapt to market changes and effectively improve the real-time and accuracy of anomaly detection. At the same time, it reduces the dependence on labeled data, significantly reduces labor costs, and provides reliable protection for the security and efficiency of financial transactions.

[0258] Example 2: Health monitoring and early disease diagnosis system in the medical field

[0259] The physiological data streams generated in real time by medical equipment (such as electrocardiogram monitors, blood oxygen detectors, etc.) provide an important basis for early diagnosis of diseases and patient health management. However, these data streams are dynamic and changeable, and there is a large amount of unlabeled data. The present invention classifies the patient's real-time physiological data through a semi-supervised clonal selection algorithm, and combines a small number of labeled healthy and abnormal samples to achieve rapid classification of abnormal data points and prediction of disease risks. The system adopts an immune optimization mechanism that can adaptively adjust the model to cope with individual differences among different patients. This method effectively reduces the dependence on labeled samples, improves the efficiency of real-time health monitoring, and provides doctors with accurate auxiliary diagnosis suggestions.

[0260] Example 3: Real-time anomaly detection system in network security

[0261] In a network environment, the dynamics and complexity of data flows make abnormal traffic detection a major challenge. Threats such as DDoS attacks and malware propagation require rapid responses. The present invention applies a semi-supervised clonal selection algorithm to a network traffic monitoring system, and builds an efficient real-time classification model through a small number of labeled normal traffic and abnormal traffic samples. The system can automatically update the model when traffic characteristics change, maintain a high level of detection accuracy, and reduce the false alarm rate. The system can quickly identify abnormal traffic and trigger protective measures, providing strong protection for the network security of enterprises and institutions.

[0262] The specific description of these embodiments further demonstrates the creativity and technical value of the technical solution of the present invention, and demonstrates its wide applicability and high efficiency in actual products and application scenarios.

[0263] In order to verify the performance of the SS-CLONALGDS algorithm, the embodiment of the present invention compares and analyzes its performance with the clone selection algorithm based on the self-training mode, the clone selection algorithm based on the co-training mode, the MPSVM algorithm and the KNN-WDM algorithm on four artificial data sets containing concept drift. The experiment comprehensively evaluates the classification performance of each algorithm by adjusting the proportion of labeled samples to 20%, 40%, 60% and 80% for multiple rounds of testing. In the experiment, Tables 2 to 5 respectively record the average classification error rate and its corresponding standard deviation of each algorithm under different proportions of labeled samples. Each column of data consists of three fields: the baseline error rate (initial), the final error rate (final) and the improvement rate (improv). Among them, the baseline error rate is the average error rate obtained using the labeled data set L; the final error rate is the average error rate obtained using the labeled data set L and the unlabeled data set U; and the improvement rate is the difference between the baseline error rate and the final error rate divided by the baseline error rate.

[0264] The experimental results show that the SS-CLONALGD algorithm makes full use of the information in the unlabeled data to improve the performance of the algorithm under the condition of limited labeled data. When the proportion of labeled samples is 20%, 40%, 60% and 80%, the average final error rate of the SS-CLONALGD algorithm on most test data sets is lower than that of the comparison algorithm, showing a significant classification performance advantage. Especially when the proportion of labeled samples is low (20% and 40%), the improvement rate of SS-CLONALGDD is particularly outstanding, which verifies its robustness in the environment of scarce labeled data. Further analysis shows that compared with other comparison algorithms, the SS-CLONALGD algorithm has a lower standard deviation of classification error rate in the experiment, more stable performance, and can effectively cope with dynamic changes in data distribution. These experimental results fully demonstrate the superiority of the SS-CLONALGD algorithm in semi-supervised data stream classification tasks, and provide a solid basis for the innovation and technical effects of the present invention.

[0265] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any modifications, equivalent substitutions and improvements made by any technician familiar with the technical field within the technical scope disclosed by the present invention and within the spirit and principle of the present invention should be covered by the protection scope of the present invention.

Claims

1. A semi-supervised data stream classification method based on clonal selection, characterized in that: The following steps are involved: Step 1, use online bootstrap sampling technology to sample the data in the data stream to improve the diversity between the algorithm base classifiers; Step 2, an adaptive clonal selection data stream classification method ADE-CSACDS based on multiple differential evolution strategies is proposed and used as the base classifier of SS-CLONALGD; Step 3, using the difference information between the memory antibody groups that participated in the last two evolutions and the Hoeffding boundary to decide whether to stop the clonal selection evolution process; Step 4: Use ADWIN2 sliding window technology to actively detect concept drift in the data stream; only when drift is detected will the classifier with the lowest accuracy in the ensemble classifier be removed and a new base classifier be created.

2. The semi-supervised data stream classification method based on clonal selection as claimed in claim 1, characterized in that: The SS-CLONALGD: Data flow: A data stream is composed of a large number of data sequences that evolve over time and can be expressed as: S={ag (i) |ag (i) =(x i ,y i ),x i ∈R d ,y i ∈{φ,1,...,C}} (1) Among them, ag (i) is the ith antigen, x i is a d-dimensional feature vector, y i represents the corresponding class label, C is the total number of categories, when x i When it is an unlabeled antigen, y i Let φ be; Antigen (Antigen: Ag): In the present invention, antigen is a training sample, which can be expressed as: AG (i) |ag (i) =(x i ,y i ),x i ∈R d ,y i ∈{φ,1,...,C}} (2) Among them, AG is the antigen set, ag (i) is the ith antigen, x i is a d-dimensional real vector, Represents antigen ag (i) The kth attribute of i Represents the corresponding class label, C is the total number of categories, when ag (i) When it is an unlabeled antigen, y i Let φ be; Antibody (Antibody:Ab): Antibodies are used to describe the set of feature points in the sample space, which can be expressed as: AB={ab (i) |from (i) =(x i ,y i ),x i ∈R d ,y i ∈{1,...,C}} (3) Among them, AB is the antibody set, ab (i) is the ith antibody, x i is a d-dimensional real vector, Represents antigen ab (i) The kth attribute of i represents the corresponding class label, and C is the total number of categories; Affinity Online bootstrap sampling.

3. The semi-supervised data stream classification method based on clonal selection as claimed in claim 2, characterized in that: The affinity (Affinity): Affinity is used to measure the binding strength between an antibody and an antigen, reflecting the quality of the antibody. In the present invention, the distance between the antibody and the antigen is calculated using the Euclidean distance, and the affinity function F(.) is defined as: in, Respectively represent antigen ag (i) and antibody ab (i) The kth attribute of ; λ (0<λ≤1) is a correction factor, which is usually set to a smaller value to avoid the situation where the denominator of the affinity function is zero.

4. The semi-supervised data stream classification method based on clonal selection as claimed in claim 2, characterized in that: The online bootstrap sampling: Assume that the size of the training data set is N and there are M base classifiers, and randomly select N samples with replacement from the original training set to generate a training set for each base classifier; the probability P(K=k) that the training set of each base classifier contains k copies of the same sample in the original training set follows a binomial distribution: When N→∞, P(K=k) approximates the Poisson distribution Poisson(1), that is, 5. The semi-supervised data stream classification method based on clonal selection as claimed in claim 1, characterized in that: The ADE-CSACDS algorithm: During the antibody initialization process, the algorithm randomly selects N from the antigen set AG according to the proportion of each type of antigen in the training antigen AG. i antigens as antibodies to form the initial antibody group AB; specifically, assuming that the total number of antigens is M and the category is y i The total number of antigens is M i , N is the total number of antibodies, then the category is y i The total number of antibodies N i for: The process of clonal variation and; the apoptosis mechanism in clonal selection is used to replace the premature convergence phenomenon detection method; Hoeffding Boundary Assume there are n independent and identically distributed random variables, and their mean is r, then the Hoeffding bound guarantees with probability 1-δ that the error r between the true mean r of the variable and the mean does not exceed ò, and Among them, R is the range of variation of the random variable; Evolution termination condition ADE-CSACDS uses the metric function F(·) to represent the difference information between the memory antibody groups that participated in the evolution for the last two times when m training antigens are presented, that is: in, represents the ith antibody of the t-th evolution in the memory antibody group, N is the size of the memory antibody set, dist(·) is the distance function between antibodies, and its range is [0,1]; From the Hoeffding boundary, we know that when ΔF=F m,t -F m,t-1 >ò, the obtained memory antibody population is guaranteed to be the optimal population or close to the optimal population with a probability of 1-δ.

6. The semi-supervised data stream classification method based on clonal selection as claimed in claim 5, characterized in that: The concept drift detection: Data streams change over time, and concept drift often occurs. In order to deal with the concept drift problem in data streams, the SS-CLONALGD algorithm uses ADWIN2 sliding window technology to actively detect concept drift. ADWIN is an adaptive sliding window that divides the window W into two sub-windows W1 and W2 and monitors the data distribution of the sub-windows. When the difference between the average values ​​of the two sub-windows is greater than cut When , it means that the data distribution of the two sub-windows is significantly different, that is, the concept drift phenomenon occurs; at this time, the window W1 storing the old data needs to be discarded; based on the Hoefding inequality, we get: Wherein, parameter δ'∈(0,1), |W1| and |W2| are the lengths of sub-windows W1 and W2 respectively, and |W|=|W1|+|W2|.

7. A semi-supervised data stream classification system based on clonal selection implementing the semi-supervised data stream classification method based on clonal selection as claimed in any one of claims 1 to 6, characterized in that: The semi-supervised data stream classification system based on clonal selection includes: The sampling module is used to sample the data in the data stream using online bootstrap sampling technology to improve the diversity between the algorithm base classifiers; The classification method module is used to propose an adaptive clonal selection data stream classification method ADE-CSACDS based on multiple differential evolution strategies and use it as the base classifier of SS-CLONALGD; A decision module, used to use the difference information between the memory antibody groups that participated in the evolution for the last two times and the Hoefding boundary to decide whether to stop the clonal selection evolution process; The detection module is used to actively detect the concept drift phenomenon in the data stream using the ADWIN2 sliding window technology; only when the drift phenomenon is detected will the classifier with the lowest accuracy in the integrated classifier be removed and a new base classifier be created.

8. A computer device, characterized in that: The computer device includes a memory and a processor, the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the semi-supervised data stream classification method based on clonal selection as claimed in any one of claims 1 to 6.