Abnormal client identification method, device, computer device and storage medium

By automatically identifying abnormal clients using median confidence interval and gradient distance algorithms, the problem of low accuracy in manual screening is solved, and efficient and accurate identification of abnormal clients is achieved.

CN116366357BActive Publication Date: 2026-05-12INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
INDUSTRIAL AND COMMERCIAL BANK OF CHINA
Filing Date
2023-04-14
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

In existing technologies, the method of manually screening abnormal clients has low accuracy and consumes a lot of manpower when a large number of clients transmit training data, resulting in poor recognition results.

Method used

By combining the median confidence interval algorithm and the gradient distance algorithm, abnormal clients are automatically marked by calculating the confidence interval and gradient distance of the training data, thus avoiding manual screening.

Benefits of technology

It improves the screening efficiency and accuracy of abnormal clients, enhances the identification effect, and reduces manual intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116366357B_ABST
    Figure CN116366357B_ABST
Patent Text Reader

Abstract

The application relates to an abnormal client identification method and device, a computer device and a storage medium. The application relates to the technical field of information security and artificial intelligence. The method comprises the following steps: acquiring training data of a plurality of clients; for each preset median algorithm, determining a confidence interval corresponding to the median algorithm by using a median confidence interval algorithm; based on the confidence intervals corresponding to the median algorithms, marking a client corresponding to training data that does not meet the confidence interval of each median algorithm as a first abnormal client; based on a gradient distance algorithm and the training data of each client, screening a client that meets a gradient distance condition and marking the client as a second abnormal client; and marking a client that is simultaneously marked as the first abnormal client and the second target client as a target abnormal client. The method can improve the identification effect of abnormal clients.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of information security and artificial intelligence technology, and in particular to a method, apparatus, computer device, and storage medium for identifying abnormal clients. Background Technology

[0002] With the development of the financial industry, various artificial intelligence models are needed to assist in financial data processing. However, during the training of artificial intelligence models, they are often damaged by attack data from abnormal clients, which can cause the artificial intelligence models to malfunction. Therefore, how to defend against attack data from abnormal clients is a current research focus.

[0003] Traditional methods for identifying anomalous clients involve manually inspecting the training data of each client and identifying attack data within that data. Clients corresponding to attack data are then classified as anomalous, thus mitigating the risk of attacks on AI models by anomalous clients. However, when a large number of clients transmit massive amounts of training data, the accuracy of manual screening for attack data is low, requiring significant manpower and is prone to data omissions, resulting in poor identification of anomalous clients. Summary of the Invention

[0004] Therefore, it is necessary to provide a method, apparatus, computer device, computer-readable storage medium, and computer program product for identifying abnormal clients to address the aforementioned technical problems.

[0005] Firstly, this application provides a method for identifying abnormal clients. The method includes:

[0006] Obtain training data from multiple clients;

[0007] For each preset median algorithm, the confidence interval boundary value of the training data corresponding to the median algorithm is calculated using the median confidence interval algorithm. Based on the confidence interval boundary value of the median algorithm and the training data corresponding to the median algorithm, the confidence interval corresponding to the median algorithm is determined.

[0008] Based on the confidence intervals corresponding to each of the median algorithms, clients corresponding to training data that do not satisfy the confidence intervals of each of the median algorithms are marked as first abnormal clients;

[0009] Based on the gradient distance algorithm and the training data of each client, the gradient distance of each client is calculated, and among the gradient distances, clients that meet the gradient distance conditions are selected and marked as second abnormal clients.

[0010] A client that is simultaneously marked as both the first abnormal client and the second target client is designated as the target abnormal client.

[0011] Optionally, calculating the confidence interval boundary of the training data corresponding to the median algorithm using the median confidence interval algorithm includes:

[0012] From each of the training data, multiple sample training data are randomly selected, and the data identifier of each sample training data is obtained; the data identifier is used to identify whether the training data is attack data;

[0013] All training data samples are processed to follow a normal distribution to obtain a sample distribution sequence. Based on the sample distribution sequence and the data identifiers of all training data samples, the confidence interval boundary value corresponding to the median confidence interval algorithm is calculated.

[0014] Optionally, determining the confidence interval corresponding to the median algorithm based on the confidence interval boundary of the median algorithm and the training data corresponding to the median algorithm includes:

[0015] The first confidence interval is calculated based on the training data corresponding to the median algorithm, the confidence interval boundary of the median algorithm, and the confidence interval algorithm corresponding to the median algorithm.

[0016] Based on the median of the training data corresponding to the median algorithm, the confidence interval threshold of the median algorithm, and the confidence interval algorithm of the training data, a second confidence interval is selected;

[0017] The first confidence interval and the overlapping interval with the second confidence interval are taken as the confidence interval corresponding to the median algorithm.

[0018] Optionally, calculating the first confidence interval based on the training data corresponding to the median algorithm, the confidence interval boundary of the median algorithm, and the confidence interval algorithm corresponding to the median algorithm includes:

[0019] The confidence interval threshold of the median algorithm is replaced with the threshold parameter of the confidence interval algorithm corresponding to the median algorithm to obtain the optimized confidence algorithm. Based on the training data corresponding to the median algorithm, the first confidence interval is calculated using the optimized confidence algorithm.

[0020] Optionally, the step of filtering the second confidence interval based on the median of the training data corresponding to the median algorithm, the confidence interval boundary of the median algorithm, and the confidence interval algorithm of the training data includes:

[0021] Based on the median of each training data, the training data are sorted to obtain a training data sequence, and based on the training data sequence, each training data is divided into multiple equally sized data groups.

[0022] Based on the data group containing the median and the confidence interval boundary of the median algorithm, the upper limit of the initial second confidence interval and the lower limit of the initial second confidence interval of all training data are calculated using the training data confidence interval algorithm.

[0023] In the training data of all data groups, the training data corresponding to the upper limit of the initial second confidence interval and the training data corresponding to the lower limit of the initial second confidence interval are queried, and all training data between the training data corresponding to the upper limit and the training data corresponding to the lower limit in the training data sequence are taken as the second confidence interval of each training data.

[0024] Optionally, the step of marking clients corresponding to training data that do not meet the confidence interval conditions of each of the median algorithms as first abnormal clients, based on the confidence intervals corresponding to each of the median algorithms, includes:

[0025] All training data that are outside the confidence intervals corresponding to all median algorithms are taken as target data, and the clients corresponding to the target data are marked as the first abnormal clients.

[0026] Optionally, after using all the training data of each of the target abnormal clients as attack data, the method further includes:

[0027] Obtain all training data for each of the clients except the target abnormal client;

[0028] Gaussian distribution processing is applied to all training data of all clients except the target abnormal client to obtain a Gaussian distribution sequence of training data;

[0029] In the Gaussian distribution sequence of the training data, training data that meets the conditions of the Gaussian distribution sequence of the training data are selected, marked as attack data, and all attack data are deleted.

[0030] Optionally, calculating the gradient distance between each client based on the gradient distance algorithm and the training data of each client includes:

[0031] For each client, the gradient between each adjacent training data point of the client is calculated based on all training data of the client.

[0032] The sub-Euclidean distance between each gradient is calculated using the Euclidean distance algorithm.

[0033] All sub-Euclidean distances are sorted according to the chronological order of the acquisition time of the training data corresponding to the gradient of each sub-Euclidean distance to obtain the Euclidean distance sequence of the client, and all sub-Euclidean distances containing the Euclidean distance sequence are used as the gradient distance of the client.

[0034] Optionally, the step of filtering clients that meet the gradient distance conditions from among the gradient distances and marking them as second abnormal clients includes:

[0035] For each client, a score value for the distance vector of each client is calculated using a scoring algorithm based on the distance vector of the gradient distance of the client.

[0036] Clients whose distance vectors correspond to ratings exceeding the rating threshold are marked as second abnormal clients.

[0037] Optionally, after designating the client that is simultaneously marked as both the first abnormal client and the second target client as the target abnormal client, the method further includes:

[0038] Use all training data from each of the target abnormal clients as attack data;

[0039] Delete all the attack data and store all the target abnormal clients in the blacklist database.

[0040] Optionally, after designating the client that is simultaneously marked as both the first abnormal client and the second target client as the target abnormal client, the method further includes:

[0041] In the historical cache training database, the cache training data of each of the target abnormal clients is filtered out, and the cache training data of each of the target abnormal clients is used as historical attack data;

[0042] In the historical cache training database, delete each of the historical attack data.

[0043] Secondly, this application also provides a device for identifying abnormal clients. The device includes:

[0044] The acquisition module is used to acquire training data from multiple clients;

[0045] The determination module is used to calculate the confidence interval boundary value of the training data corresponding to the median algorithm for each preset median algorithm using the median confidence interval algorithm, and determine the confidence interval corresponding to the median algorithm based on the confidence interval boundary value of the median algorithm and the training data corresponding to the median algorithm.

[0046] The first labeling module is used to label clients corresponding to training data that do not meet the confidence interval of each of the median algorithms as first abnormal clients, based on the confidence interval corresponding to each of the median algorithms.

[0047] The second marking module is used to calculate the gradient distance of each client based on the gradient distance algorithm and the training data of each client, and to filter out clients that meet the gradient distance conditions from the gradient distances and mark them as second abnormal clients.

[0048] The filtering module is used to identify clients that are simultaneously marked as both the first abnormal client and the second target client as target abnormal clients.

[0049] Optionally, the determining module is specifically used for:

[0050] From each of the training data, multiple sample training data are randomly selected, and the data identifier of each sample training data is obtained; the data identifier is used to identify whether the training data is attack data;

[0051] All training data samples are processed to follow a normal distribution to obtain a sample distribution sequence. Based on the sample distribution sequence and the data identifiers of all training data samples, the confidence interval boundary value corresponding to the median confidence interval algorithm is calculated.

[0052] Optionally, the determining module is specifically used for:

[0053] The first confidence interval is calculated based on the training data corresponding to the median algorithm, the confidence interval boundary of the median algorithm, and the confidence interval algorithm corresponding to the median algorithm.

[0054] Based on the median of the training data corresponding to the median algorithm, the confidence interval threshold of the median algorithm, and the confidence interval algorithm of the training data, a second confidence interval is selected;

[0055] The first confidence interval and the overlapping interval with the second confidence interval are taken as the confidence interval corresponding to the median algorithm.

[0056] Optionally, the determining module is specifically used for:

[0057] The confidence interval threshold of the median algorithm is replaced with the threshold parameter of the confidence interval algorithm corresponding to the median algorithm to obtain the optimized confidence algorithm. Based on the training data corresponding to the median algorithm, the first confidence interval is calculated using the optimized confidence algorithm.

[0058] Optionally, the determining module is specifically used for:

[0059] Based on the median of each training data, the training data are sorted to obtain a training data sequence, and based on the training data sequence, each training data is divided into multiple equally sized data groups.

[0060] Based on the data group containing the median and the confidence interval boundary of the median algorithm, the upper limit of the initial second confidence interval and the lower limit of the initial second confidence interval of all training data are calculated using the training data confidence interval algorithm.

[0061] In the training data of all data groups, the training data corresponding to the upper limit of the initial second confidence interval and the training data corresponding to the lower limit of the initial second confidence interval are queried, and all training data between the training data corresponding to the upper limit and the training data corresponding to the lower limit in the training data sequence are taken as the second confidence interval of each training data.

[0062] Optionally, the first marking module is specifically used for:

[0063] All training data that are outside the confidence intervals corresponding to all median algorithms are taken as target data, and the clients corresponding to the target data are marked as the first abnormal clients.

[0064] Optionally, the device further includes:

[0065] The reacquisition module is used to acquire all training data from all clients except the target abnormal client;

[0066] The Gaussian distribution module is used to perform Gaussian distribution processing on all training data of all clients except the target abnormal client to obtain a Gaussian distribution sequence of training data.

[0067] The deletion module is used to filter training data that meet the conditions of the Gaussian distribution sequence of the training data, mark them as attack data, and delete all attack data.

[0068] Optionally, the second marking module is specifically used for:

[0069] For each client, the gradient between each adjacent training data point of the client is calculated based on all training data of the client.

[0070] The sub-Euclidean distance between each gradient is calculated using the Euclidean distance algorithm.

[0071] All sub-Euclidean distances are sorted according to the chronological order of the acquisition time of the training data corresponding to the gradient of each sub-Euclidean distance to obtain the Euclidean distance sequence of the client, and all sub-Euclidean distances containing the Euclidean distance sequence are used as the gradient distance of the client.

[0072] Optionally, the second marking module is specifically used for:

[0073] For each client, a score value for the distance vector of each client is calculated using a scoring algorithm based on the distance vector of the gradient distance of the client.

[0074] Clients whose distance vectors correspond to ratings exceeding the rating threshold are marked as second abnormal clients.

[0075] Optionally, the device further includes:

[0076] The attack data determination module is used to use all training data of each of the target abnormal clients as attack data.

[0077] The blacklist module is used to delete the attack data and store the target abnormal clients in the blacklist database.

[0078] Optionally, the device further includes:

[0079] The historical query module is used to filter the cached training data of each of the target abnormal clients in the historical cached training database, and use the cached training data of each of the target abnormal clients as historical attack data.

[0080] The historical data deletion module is used to delete each of the historical attack data in the historical cache training database.

[0081] Thirdly, this application provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the method described in any one of the first aspects.

[0082] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the steps of the method described in any one of the first aspects.

[0083] Fifthly, this application provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the steps of the method described in any one of the first aspects.

[0084] The aforementioned method, apparatus, computer device, storage medium, and computer program product for identifying abnormal clients acquire training data from multiple clients; for each preset median algorithm, a median confidence interval algorithm is used to calculate the confidence interval boundary of the training data corresponding to the median algorithm; based on the confidence interval boundary of the median algorithm and the training data corresponding to the median algorithm, the confidence interval corresponding to the median algorithm is determined; based on the confidence interval corresponding to each median algorithm, clients whose training data does not meet the confidence interval of each median algorithm are marked as first abnormal clients; based on the gradient distance algorithm and the training data of each client, the gradient distance of each client is calculated, and clients that meet the gradient distance condition are selected from the gradient distances and marked as second abnormal clients; clients that are simultaneously marked as first abnormal clients and second target clients are designated as target abnormal clients. The confidence interval of the training data for each client is calculated using the median confidence interval algorithm to mark the first anomalous client. The gradient distance algorithm is then used to mark the second anomalous client among the clients. Clients that are marked as both the first and second anomalous clients are then used as target anomalous clients. This avoids the need for manual screening of attack data and improves the efficiency of anomalous client screening. By using two data screening methods to filter anomalous clients, the accuracy of anomalous client screening is improved, thereby comprehensively enhancing the identification effect of anomalous clients. Attached Figure Description

[0085] Figure 1 This is a flowchart illustrating a method for identifying abnormal clients in one embodiment;

[0086] Figure 2 This is a flowchart illustrating the steps for determining the confidence interval in one embodiment;

[0087] Figure 3 This is a flowchart illustrating the filtering steps for the second confidence interval in one embodiment;

[0088] Figure 4 This is a flowchart illustrating the method for identifying abnormal clients in another embodiment;

[0089] Figure 5 This is a structural block diagram of an abnormal client device in one embodiment;

[0090] Figure 6 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0091] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0092] The method for identifying abnormal clients provided in this application can be applied to terminals, servers, and systems including both terminals and servers, and is implemented through interaction between the terminal and the server. The terminal can include, but is not limited to, various personal computers, laptops, tablets, etc. The terminal uses a median algorithm to calculate the confidence interval of the training data for each client, thereby labeling a first client. It then uses a Euclidean distance algorithm to label a second client among the clients. Clients simultaneously labeled as both the first and second abnormal clients are designated as target clients, and all training data of these target clients are considered abnormal data. This avoids manual screening of attack data and improves the efficiency of attack data screening. By using two data screening methods to filter attack data from abnormal clients, the accuracy of abnormal client screening is improved, thus comprehensively enhancing the effectiveness of identifying abnormal clients.

[0093] In one embodiment, such as Figure 1 As shown, a method for identifying abnormal clients is provided. Taking the application of this method to a terminal as an example, the method includes the following steps:

[0094] Step S101: Obtain training data from multiple clients.

[0095] In this embodiment, the terminal responds to the user's model training operation by selecting the user-selected client from among the initial clients and sending the model to each client. The terminal presets a time point and simultaneously collects training data from each client's model training, obtaining training data for each client. This training data can be the model training parameters used by the client to train the model. These parameters characterize the current training status and progress of the model. For example, model training parameters may include, but are not limited to, 50% model training progress, 30% model fitness, and 30% parameter acquisition capability. These parameters also include the specific content information of the model corresponding to the aforementioned proportions. The model may be, but is not limited to, a federated learning model and related artificial intelligence models.

[0096] Step S102: For each preset median algorithm, calculate the confidence interval boundary value of the training data corresponding to the median algorithm using the median confidence interval algorithm, and determine the confidence interval corresponding to the median algorithm based on the confidence interval boundary value of the median algorithm and the training data corresponding to the median algorithm.

[0097] In this embodiment, the terminal presets multiple median algorithms and, for each median algorithm, calculates the confidence interval boundary value corresponding to each median algorithm using a median confidence interval algorithm. The specific calculation process will be explained in detail later. The terminal determines the confidence interval corresponding to each median algorithm based on the confidence interval boundary value of each median algorithm and the training data. The median algorithms vary depending on the training data they correspond to, including median algorithms based on sequential order, median algorithms based on mutual fusion, and median algorithms based on interactive fusion. These median algorithms are used to calculate the median of all model training parameters for each client (sequential order principle), the median of model training parameters for all clients at the same time point (mutual fusion principle), and the median of all model training parameters for all clients (interactive fusion principle).

[0098] Step S103: Based on the confidence intervals corresponding to each median algorithm, the clients corresponding to the training data that do not meet the confidence intervals of each median algorithm are marked as the first abnormal clients.

[0099] In this embodiment, the terminal filters out clients whose confidence intervals do not satisfy the confidence intervals of each median algorithm within each confidence interval, and identifies these as first abnormal clients. The confidence intervals that do not satisfy the confidence intervals of each median algorithm are all training data that are not within the training data corresponding to the confidence intervals of all median algorithms. The specific labeling process will be explained in detail later.

[0100] Step S104: Based on the gradient distance algorithm and the training data of each client, calculate the gradient distance of each client, and select clients that meet the gradient distance conditions from each gradient distance and mark them as the second abnormal clients.

[0101] In this embodiment, the terminal calculates the Euclidean distance between all training data of each client based on the gradient distance algorithm, and determines the Euclidean distance of that client based on the Euclidean distance between all training data. The terminal presets gradient distance conditions, and selects clients that meet the gradient distance conditions from the gradient distances of each client, and marks these clients as the second abnormal client. The specific marking process will be described in detail later, wherein the Euclidean distance algorithm is the Euclidean distance algorithm.

[0102] Step S105: The client that is simultaneously marked as the first abnormal client and the second target client is designated as the target abnormal client.

[0103] In this embodiment, the terminal will use the client that is simultaneously marked as the first abnormal client and the second target client as the target abnormal client, and use all the training data of each target abnormal client as the attack data.

[0104] Based on the above scheme, the confidence interval of the training data of each client is calculated using the median confidence interval algorithm to mark the first abnormal client. Then, the second abnormal client among the clients is marked using the gradient distance algorithm. The client that is marked as both the first and second abnormal client is then used as the target abnormal client. This avoids the need for manual screening of attack data, thereby improving the efficiency of abnormal client screening. By using two data screening methods to filter abnormal clients, the accuracy of abnormal client screening is improved, thus comprehensively enhancing the identification effect of abnormal clients.

[0105] Optionally, the confidence interval boundary value of the training data corresponding to the median confidence interval algorithm is calculated using the median confidence interval algorithm. This includes: randomly selecting multiple training data samples from each training data set and obtaining the data identifier of each training data sample; the data identifier is used to identify whether the training data is attack data; performing normal distribution processing on all training data samples to obtain a sample distribution sequence; and calculating the confidence interval boundary value corresponding to the median algorithm based on the sample distribution sequence and the data identifiers of all training data samples using the median confidence interval algorithm.

[0106] In this embodiment, the terminal can randomly select a preset number of training data points from all training data as sample training data. The terminal sends all sample training data to the client and obtains the data identifier of each sample training data point input by the user. This data identifier is used to characterize whether the sample training data is attack data. The terminal performs normal distribution processing on each sample training data point to obtain an initial sample distribution sequence. Within this initial sample distribution sequence, the terminal uses the data identifier of each sample training data point to label the initial sample distribution sequence, obtaining a sample distribution sequence. Based on this sample distribution sequence, the terminal determines the upper and lower limits of the sample distribution sequence and calculates the confidence interval boundary corresponding to the median algorithm using the median confidence interval algorithm.

[0107] Specifically, the formula for the median confidence interval algorithm is as follows:

[0108] Maximum:

[0109]

[0110] Lower limit:

[0111]

[0112] In the above formula, A1 is the upper limit of the sample distribution sequence, A2 is the lower limit of the sample distribution sequence, and n represents the sample size; Z α This represents the confidence interval boundary. For a traditional normal distribution with a 95% confidence level, the boundary value is Z. 0.05 =1.96, in the case of the sample distribution sequence, Z α It is determined by the upper and lower limits of the sample distribution sequence.

[0113] Based on the above scheme, by calculating the confidence interval boundary value corresponding to each median algorithm, a data foundation is provided for subsequent calculation of the confidence interval corresponding to the median algorithm, thereby improving the accuracy of calculating the training data.

[0114] Optional, such as Figure 2 As shown, based on the confidence interval boundaries of the median algorithm and the corresponding training data, the confidence interval for the median algorithm is determined, including:

[0115] Step S201: Calculate the first confidence interval based on the training data corresponding to the median algorithm, the confidence interval boundary of the median algorithm, and the confidence interval algorithm corresponding to the median algorithm.

[0116] In this embodiment, the terminal takes the confidence interval boundary value of the median algorithm obtained in the aforementioned steps, substitutes it into the confidence interval algorithm corresponding to the median algorithm, and calculates the first confidence interval of all training data through the confidence interval algorithm of the median algorithm.

[0117] The formula for the confidence interval algorithm is as follows:

[0118]

[0119] In the above formula, S1 and S2 represent the positions of the upper and lower limits of the confidence interval, respectively. n is the sample size. Z α This represents the confidence interval boundary for the median algorithm.

[0120] Step S202: Based on the median of the training data corresponding to the median algorithm, the confidence interval boundary of the median algorithm, and the confidence interval algorithm of the training data, a second confidence interval is selected.

[0121] In this embodiment, for each median algorithm, the terminal sorts the training data in descending order and divides all training data into multiple data groups of equal size based on the sorted data. The terminal substitutes the confidence interval threshold of the median algorithm into the training data confidence interval algorithm to adjust the algorithm. The terminal inputs the median into the adjusted training data confidence interval algorithm to obtain the upper and lower limits of the second confidence interval. Here, the median is the training data corresponding to the median size of all training data. In each data group, the terminal queries the training data corresponding to the upper limit and the training data corresponding to the lower limit, and uses all training data between the upper and lower limits as the second confidence interval.

[0122] The formula for calculating the confidence interval of the training data is as follows:

[0123]

[0124] M is the data value corresponding to the median of all training data, f M Z represents the number of training data points in the dataset containing the median, where n is the total number of training data points. α The cutoff point is the confidence interval corresponding to this median algorithm.

[0125] Step S203: The first confidence interval and the overlapping interval of the second confidence interval are taken as the confidence interval corresponding to the median algorithm.

[0126] In this embodiment, the terminal uses the first confidence interval and the overlapping interval of the second confidence interval as the confidence interval corresponding to the median algorithm.

[0127] Based on the above scheme, by calculating the first confidence interval and the overlapping interval with the second confidence interval, the confidence interval corresponding to the median algorithm is determined, which improves the accuracy of the confidence interval and thus improves the accuracy of the obtained attack data.

[0128] Optionally, based on the training data corresponding to the median algorithm, the confidence interval threshold of the median algorithm, and the confidence interval algorithm corresponding to the median algorithm, the first confidence interval is calculated, including: replacing the confidence interval threshold of the median algorithm with the threshold parameter of the confidence interval algorithm corresponding to the median algorithm to obtain an optimized confidence algorithm, and calculating the first confidence interval based on the training data corresponding to the median algorithm using the optimized confidence algorithm.

[0129] In this embodiment, for each median algorithm, the terminal substitutes the confidence interval thresholds of the median algorithm obtained in the preceding steps into the corresponding confidence interval algorithm to obtain an optimized confidence interval algorithm for the median algorithm. The terminal sorts the training data in descending order to obtain a training data sequence, and based on this training data sequence, calculates the first confidence interval for all training data using the optimized confidence interval algorithm for the median algorithm.

[0130] Based on the above scheme, the confidence interval algorithm corresponding to the median algorithm is optimized by using the confidence interval boundary of the median algorithm, thereby calculating the first confidence interval of all training data and improving the accuracy of the first confidence interval.

[0131] Optional, such as Figure 3 As shown, the second confidence interval is selected based on the median of the training data corresponding to the median algorithm, the confidence interval boundary of the median algorithm, and the confidence interval algorithm of the training data, including:

[0132] Step S301: Sort the training data based on the median of each training data to obtain a training data sequence, and divide each training data into multiple equally sized data groups based on the training data sequence.

[0133] In this embodiment, the terminal calculates the median of all training data from all clients. Based on this median, the terminal sorts all training data in descending order, obtaining a training data sequence. The terminal presets equal intervals and divides each training data into multiple equally sized data groups based on this training data sequence. The number of training data points in each data group is different.

[0134] Step S302: Based on the data group containing the median and the confidence interval boundary of the median algorithm, calculate the upper limit and lower limit of the initial second confidence interval for all training data using the training data confidence interval algorithm.

[0135] In this embodiment, for each median algorithm, the terminal substitutes the confidence interval boundary of the median algorithm into the training data confidence interval algorithm to obtain the adjusted training data confidence interval algorithm. The terminal inputs the median of each training data and the data group in which the median is located into the adjusted training data confidence interval algorithm (i.e., the above formula (4)) to obtain the upper and lower limits of the second confidence interval of each training data.

[0136] Step S303: In the training data of all data groups, query the training data corresponding to the upper limit of the initial second confidence interval and the training data corresponding to the lower limit of the initial second confidence interval, and take all the training data between the training data corresponding to the upper limit and the training data corresponding to the lower limit in the training data sequence as the second confidence interval of each training data.

[0137] In this embodiment, the terminal queries the training data in each data group for the training data corresponding to the value closest to the upper limit of the second confidence interval and the training data corresponding to the value closest to the lower limit of the second confidence interval, and uses these as boundary value training data. The terminal then uses all training data between two boundary value training data in the training data sequence as the second confidence interval for each training data.

[0138] For example: The terminal acquires a total of 35 training data points from all clients. The confidence level of these 35 data points is:

[0139] 0.88 1.14 1.40 1.40 1.64 1.68 1.72 1.90 2.00 1.35 1.22 1.58 1.65 1.77 1.25 1.88 1.98 1.79 0.95 0.90 1.50 1.90 1.96 2.05 2.20 2.15 2.38 1.00 1.25 1.43 1.45 2.36 2.34 1.68 2.33

[0140] The terminal divides all data into four equal intervals:

[0141]

[0142]

[0143] Therefore, M = 1.68. Z obtained through the above steps α =1.96, then the upper and lower limits of the second confidence interval obtained by the terminal are: The boundary value training data are 1.50 and 1.88. Therefore, the second confidence interval for each training data obtained by the terminal is (1.50, 1.88).

[0144] Based on the above scheme, the confidence interval of the training data is input into the confidence interval algorithm corresponding to each median algorithm, thereby calculating the second confidence interval of each training data, which improves the accuracy of the second confidence interval.

[0145] Optionally, based on the confidence intervals corresponding to each median algorithm, clients corresponding to training data that do not meet the confidence interval conditions of each median algorithm are marked as first anomalous clients. This includes: taking all training data that are not within the confidence intervals corresponding to all median algorithms as target data, and marking the clients corresponding to the target data as first anomalous clients.

[0146] In this embodiment, the terminal filters out first training data that is outside the confidence interval corresponding to each median algorithm from all training data. Then, from all the filtered first training data, it filters out second training data that is simultaneously outside the confidence interval corresponding to all median algorithms. The terminal uses the filtered second training data as target data. The terminal queries the clients corresponding to each target data among all the clients corresponding to the training data and marks each client corresponding to the target data as a first abnormal client.

[0147] Based on the above scheme, by filtering the data that have been marked by each median algorithm as target data, and marking the client corresponding to each target data as the first abnormal client, the accuracy of marking the first abnormal client is improved.

[0148] Optionally, after using all training data of each target abnormal client as attack data, the method further includes: obtaining all training data of each client other than the target abnormal client; performing Gaussian distribution processing on all training data of each client other than the target abnormal client to obtain a Gaussian distribution sequence of training data; in the Gaussian distribution sequence of training data, filtering out training data that meet the conditions of the Gaussian distribution sequence of training data, marking them as attack data, and deleting all attack data.

[0149] In this embodiment, the terminal presets a Gaussian distribution algorithm and selects all clients except the target anomalous client from among all clients. Based on all training data from each client other than the target anomalous client, the terminal applies a Gaussian distribution algorithm to the training data of all clients other than the target anomalous client, obtaining a Gaussian distribution sequence of the training data for all training data from each client other than the target anomalous client. The terminal presets a condition for the Gaussian distribution sequence of the training data, such as the number of training data points distributed at both ends accounting for 10% of all training data. Based on this Gaussian distribution sequence of the training data, the terminal filters out training data points in the Gaussian distribution sequence that exceed a threshold value and marks these training data points as attack data. The terminal then deletes all attack data.

[0150] Based on the above scheme, by further identifying and filtering attack data from clients other than the target abnormal clients, the ability to identify abnormal clients is further improved.

[0151] Optionally, based on the gradient distance algorithm and the training data of each client, the gradient distance of each client is calculated, including: for each client, calculating the gradient between each adjacent training data of the client according to all training data of the client; calculating the sub-Euclidean distance between each gradient using the Euclidean distance algorithm; sorting all the sub-Euclidean distances according to the order of acquisition time of the training data corresponding to the gradient of each sub-Euclidean distance to obtain the Euclidean distance sequence of the client, and taking all the sub-Euclidean distances containing the Euclidean distance sequence as the gradient distance of the client.

[0152] In this embodiment, for each client, the terminal calculates the gradient between each training data of the client based on all training data of the client; based on the gradient between each training data of the client, the terminal calculates the sub-Euclidean distance between each gradient using the Euclidean distance algorithm; all sub-Euclidean distances are sorted according to the order of the acquisition time points of the training data corresponding to the gradient of each sub-Euclidean distance to obtain the client's Euclidean distance sequence, and all sub-Euclidean distances containing the Euclidean distance sequence are used as the client's Euclidean distance.

[0153] The specific calculation process is as follows:

[0154] For t = 1, 2, ..., use the L-BFGS algorithm to calculate the Hessian matrix (i.e., the gradient algorithm):

[0155]

[0156] For i = 1, 2, ..., n, calculate the gradient of client i at time t:

[0157]

[0158] Calculate the Euclidean distance between gradients (i.e., the Euclidean distance algorithm):

[0159]

[0160] Standardize the vectors of the sub-Euclidean distances:

[0161]

[0162] Obtain the distance vectors of each sub-Euclidean distance.

[0163] In the above formula, ΔW t : Parameter difference of the global model on the client side; ΔG t : Gradient update difference of the global model on the client side; H: Hessian matrix calculated using the L-BFGS algorithm; d t : Represents the sub-Euclidean distance at time t after n iterations.

[0164] Based on the above scheme, the Euclidean distance algorithm is used to calculate the Euclidean distance of each client and quantify each client, which improves the efficiency of identifying clients as abnormal clients.

[0165] Optionally, among the gradient distances, clients that meet the gradient distance conditions are selected and marked as second abnormal clients. This includes: for each client, calculating the score value of the distance vector of each client based on the distance vector of the client's gradient distance using a scoring algorithm; and marking the clients whose distance vectors correspond to score values ​​greater than the scoring threshold as second abnormal clients.

[0166] In this embodiment, the terminal processes the Euclidean distance vector of each client using a scoring algorithm to obtain a score value for each client. The calculation formula for the scoring algorithm is as follows:

[0167]

[0168] d t-r : represents the sub-Euclidean distance at time tr after n iterations, where N is the number of all sub-Euclidean distances. Using the above method, the terminal obtains the ratings of all clients. The terminal presets a rating threshold and marks clients with distance vectors corresponding to ratings exceeding this threshold as the second abnormal client.

[0169] Based on the above scheme, the second abnormal client is screened using a scoring algorithm, which improves the accuracy of the second abnormal client screening.

[0170] Optionally, after designating a client that is simultaneously marked as both the first abnormal client and the second target client as a target abnormal client, the method further includes: using all training data of each target abnormal client as attack data; deleting each attack data and storing each target abnormal client in a blacklist database.

[0171] In this embodiment, the terminal uses all training data from each target anomalous client as attack data. The terminal removes the training data marked as attack data from each training data set and stores the target anomalous client corresponding to each training data set in a blacklist database. This blacklist database is used to prevent clients in the database from transmitting data to the artificial intelligence model.

[0172] Based on the above scheme, by deleting each attack data and storing each target abnormal client in the blacklist database, not only is the accuracy of identifying abnormal clients improved, but the possibility of the attack data attacking the model is also prevented from the source, thus improving the effectiveness of identifying abnormal clients.

[0173] Optionally, after designating a client that is simultaneously marked as both the first abnormal client and the second target client as a target abnormal client, the process further includes: filtering the cached training data of each target abnormal client in the historical cached training database and using the cached training data of each target abnormal client as historical attack data; and deleting each historical attack data in the historical cached training database.

[0174] In this embodiment, the terminal filters the cached training data of each target abnormal client in the historical cached training database. The historical cached training database is a database that stores the training data of each client historically acquired by the terminal. The terminal uses the cached training data of each target abnormal client as historical attack data; and deletes each piece of historical attack data from the historical cached training database.

[0175] Based on the above solution, by deleting all historical attack data from the historical cache training database, the possibility of all attack data from the target abnormal client attacking the model is eliminated.

[0176] This application also provides an example of model defense training, such as Figure 4 As shown, the specific processing procedure includes the following steps:

[0177] Step S401: Obtain training data from multiple clients.

[0178] Step S402: For each preset median algorithm, randomly select multiple sample training data from each training data set and obtain the data identifier of each sample training data set.

[0179] Step S403: Perform normal distribution processing on all sample training data to obtain the sample distribution sequence. Based on the sample distribution sequence and the data identifiers of all sample training data, calculate the confidence interval boundary value corresponding to the median algorithm using the median confidence interval algorithm.

[0180] Step S404: The confidence interval boundary value of the median algorithm is replaced with the boundary value parameter of the confidence interval algorithm corresponding to the median algorithm to obtain the optimized confidence algorithm. Based on the training data corresponding to the median algorithm, the first confidence interval is calculated using the optimized confidence algorithm.

[0181] Step S405: Sort the training data based on the median of each training data to obtain a training data sequence, and divide each training data into multiple equally sized data groups based on the training data sequence.

[0182] Step S406: Based on the data group containing the median and the confidence interval boundary of the median algorithm, calculate the upper limit and lower limit of the initial second confidence interval for all training data using the training data confidence interval algorithm.

[0183] Step S407: In the training data of all data groups, query the training data corresponding to the upper limit of the initial second confidence interval and the training data corresponding to the lower limit of the initial second confidence interval, and take all the training data between the training data corresponding to the upper limit and the training data corresponding to the lower limit in the training data sequence as the second confidence interval of each training data.

[0184] Step S408: The first confidence interval and the overlapping interval of the second confidence interval are taken as the confidence interval corresponding to the median algorithm.

[0185] Step S409: Take all training data outside the training data that are simultaneously within the confidence intervals of all median algorithms as target data, and mark the client corresponding to the target data as the first abnormal client.

[0186] Step S410: For each client, calculate the gradient between each adjacent training data of the client based on all training data of the client.

[0187] Step S411: Calculate the sub-Euclidean distance between each gradient using the Euclidean distance algorithm.

[0188] Step S412: Sort all sub-Euclidean distances according to the order in which the training data corresponding to the gradient of each sub-Euclidean distance is acquired, to obtain the client's Euclidean distance sequence, and take all sub-Euclidean distances containing the Euclidean distance sequence as the client's gradient distance.

[0189] Step S413: For each client, calculate the score value of the distance vector of each client based on the distance vector of the gradient distance of the client using the scoring algorithm.

[0190] Step S414: The client whose distance vector corresponds to a score value greater than the score threshold is marked as the second abnormal client.

[0191] Step S415: Use all training data from each target abnormal client as attack data.

[0192] Step S416: Delete each attack data and store each target abnormal client in the blacklist database.

[0193] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0194] Based on the same inventive concept, this application also provides an abnormal client identification device for implementing the abnormal client identification method described above. The solution provided by this device is similar to the implementation described in the above method; therefore, the specific limitations in one or more embodiments of the abnormal client identification device provided below can be found in the limitations of the abnormal client identification method described above, and will not be repeated here.

[0195] In one embodiment, such as Figure 5 As shown, an apparatus for identifying abnormal clients is provided, comprising: an acquisition module 510, a determination module 520, a first marking module 530, a second marking module 540, and a filtering module 550, wherein:

[0196] The acquisition module 510 is used to acquire training data from multiple clients;

[0197] The determining module 520 is used to calculate the confidence interval boundary value of the training data corresponding to the median algorithm for each preset median algorithm using the median confidence interval algorithm, and determine the confidence interval corresponding to the median algorithm based on the confidence interval boundary value of the median algorithm and the training data corresponding to the median algorithm.

[0198] The first labeling module 530 is used to label clients corresponding to training data that do not meet the confidence interval of each median algorithm as first abnormal clients based on the confidence interval corresponding to each median algorithm.

[0199] The second marking module 540 is used to calculate the gradient distance of each client based on the gradient distance algorithm and the training data of each client, and to filter out clients that meet the gradient distance conditions from the gradient distances and mark them as second abnormal clients.

[0200] The filtering module 550 is used to identify clients that are simultaneously marked as both the first abnormal client and the second target client as target abnormal clients.

[0201] Optionally, the determining module 520 is specifically used for:

[0202] From each of the training data, multiple sample training data are randomly selected, and the data identifier of each sample training data is obtained; the data identifier is used to identify whether the training data is attack data;

[0203] All training data samples are processed to follow a normal distribution to obtain a sample distribution sequence. Based on the sample distribution sequence and the data identifiers of all training data samples, the confidence interval boundary value corresponding to the median confidence interval algorithm is calculated.

[0204] Optionally, the determining module 520 is specifically used for:

[0205] The first confidence interval is calculated based on the training data corresponding to the median algorithm, the confidence interval boundary of the median algorithm, and the confidence interval algorithm corresponding to the median algorithm.

[0206] Based on the median of the training data corresponding to the median algorithm, the confidence interval threshold of the median algorithm, and the confidence interval algorithm of the training data, a second confidence interval is selected;

[0207] The first confidence interval and the overlapping interval with the second confidence interval are taken as the confidence interval corresponding to the median algorithm.

[0208] Optionally, the determining module 520 is specifically used for:

[0209] The confidence interval threshold of the median algorithm is replaced with the threshold parameter of the confidence interval algorithm corresponding to the median algorithm to obtain the optimized confidence algorithm. Based on the training data corresponding to the median algorithm, the first confidence interval is calculated using the optimized confidence algorithm.

[0210] Optionally, the determining module 520 is specifically used for:

[0211] Based on the median of each training data, the training data are sorted to obtain a training data sequence, and based on the training data sequence, each training data is divided into multiple equally sized data groups.

[0212] Based on the data group containing the median and the confidence interval boundary of the median algorithm, the upper limit of the initial second confidence interval and the lower limit of the initial second confidence interval of all training data are calculated using the training data confidence interval algorithm.

[0213] In the training data of all data groups, the training data corresponding to the upper limit of the initial second confidence interval and the training data corresponding to the lower limit of the initial second confidence interval are queried, and all training data between the training data corresponding to the upper limit and the training data corresponding to the lower limit in the training data sequence are taken as the second confidence interval of each training data.

[0214] Optionally, the first marking module 530 is specifically used for:

[0215] All training data that are outside the confidence intervals corresponding to all median algorithms are taken as target data, and the clients corresponding to the target data are marked as the first abnormal clients.

[0216] Optionally, the device further includes:

[0217] The reacquisition module is used to acquire all training data from all clients except the target abnormal client;

[0218] The Gaussian distribution module is used to perform Gaussian distribution processing on all training data of all clients except the target abnormal client to obtain a Gaussian distribution sequence of training data.

[0219] The deletion module is used to filter training data that meet the conditions of the Gaussian distribution sequence of the training data, mark them as attack data, and delete all attack data.

[0220] Optionally, the second marking module 540 is specifically used for:

[0221] For each client, the gradient between each adjacent training data point of the client is calculated based on all training data of the client.

[0222] The sub-Euclidean distance between each gradient is calculated using the Euclidean distance algorithm.

[0223] All sub-Euclidean distances are sorted according to the chronological order of the acquisition time of the training data corresponding to the gradient of each sub-Euclidean distance to obtain the Euclidean distance sequence of the client, and all sub-Euclidean distances containing the Euclidean distance sequence are used as the gradient distance of the client.

[0224] Optionally, the second marking module 540 is specifically used for:

[0225] For each client, a score value for the distance vector of each client is calculated using a scoring algorithm based on the distance vector of the gradient distance of the client.

[0226] Clients whose distance vectors correspond to ratings exceeding the rating threshold are marked as second abnormal clients.

[0227] Optionally, the device further includes:

[0228] The attack data determination module is used to use all training data of each of the target abnormal clients as attack data.

[0229] The blacklist module is used to delete the attack data and store the target abnormal clients in the blacklist database.

[0230] Optionally, the device further includes:

[0231] The historical query module is used to filter the cached training data of each of the target abnormal clients in the historical cached training database, and use the cached training data of each of the target abnormal clients as historical attack data.

[0232] The historical data deletion module is used to delete each of the historical attack data in the historical cache training database.

[0233] Each module in the aforementioned anomaly identification client device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can invoke and execute the corresponding operations of each module.

[0234] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 6As shown, the computer device includes a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When executed by the processor, the computer program implements a method for identifying abnormal clients. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device casing, or an external keyboard, touchpad, or mouse.

[0235] Those skilled in the art will understand that the structure shown in the figure is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.

[0236] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method described in any one of the first aspects.

[0237] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in any one of the first aspects.

[0238] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps of the method described in any one of the first aspects.

[0239] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0240] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0241] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0242] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for identifying abnormal clients, characterized in that, The method includes: Acquire training data from multiple clients; For each preset median algorithm, multiple sample training data are randomly selected from each of the training data, and the data identifier of each sample training data is obtained; the data identifier is used to identify whether the training data is attack data; All training data samples are processed to follow a normal distribution to obtain a sample distribution sequence. Based on the sample distribution sequence and the data identifiers of all training data samples, the confidence interval threshold corresponding to the median algorithm is calculated using the median confidence interval algorithm. The confidence interval corresponding to the median algorithm is determined based on the confidence interval threshold of the median algorithm and the training data corresponding to the median algorithm. Based on the confidence intervals corresponding to each of the median algorithms, clients corresponding to training data that do not satisfy the confidence intervals of each of the median algorithms are marked as first abnormal clients; For each client, the gradient between each adjacent training data point of the client is calculated based on all training data of the client. The sub-Euclidean distance between each gradient is calculated using the Euclidean distance algorithm. All sub-Euclidean distances are sorted according to the order in which the training data corresponding to the gradient of each sub-Euclidean distance is acquired, to obtain the Euclidean distance sequence of the client, and all sub-Euclidean distances containing the Euclidean distance sequence are used as the gradient distance of the client. And among the gradient distances, clients that meet the gradient distance conditions are selected and marked as second abnormal clients; A client that is simultaneously marked as both the first abnormal client and the second target client is designated as the target abnormal client.

2. The method according to claim 1, characterized in that, The step of determining the confidence interval corresponding to the median algorithm based on the confidence interval boundary of the median algorithm and the training data corresponding to the median algorithm includes: The first confidence interval is calculated based on the training data corresponding to the median algorithm, the confidence interval boundary of the median algorithm, and the confidence interval algorithm corresponding to the median algorithm. Based on the median of the training data corresponding to the median algorithm, the confidence interval threshold of the median algorithm, and the confidence interval algorithm of the training data, a second confidence interval is selected; The first confidence interval and the overlapping interval with the second confidence interval are taken as the confidence interval corresponding to the median algorithm.

3. The method according to claim 2, characterized in that, The step of calculating the first confidence interval based on the training data corresponding to the median algorithm, the confidence interval boundary of the median algorithm, and the confidence interval algorithm corresponding to the median algorithm includes: The confidence interval threshold of the median algorithm is replaced with the threshold parameter of the confidence interval algorithm corresponding to the median algorithm to obtain the optimized confidence algorithm. Based on the training data corresponding to the median algorithm, the first confidence interval is calculated using the optimized confidence algorithm.

4. The method according to claim 2, characterized in that, The second confidence interval is selected based on the median of the training data corresponding to the median algorithm, the confidence interval boundary of the median algorithm, and the confidence interval algorithm of the training data, including: Based on the median of each training data, the training data are sorted to obtain a training data sequence, and based on the training data sequence, each training data is divided into multiple equally sized data groups. Based on the data group containing the median and the confidence interval boundary of the median algorithm, the upper limit of the initial second confidence interval and the lower limit of the initial second confidence interval of all training data are calculated using the training data confidence interval algorithm. In the training data of all data groups, the training data corresponding to the upper limit of the initial second confidence interval and the training data corresponding to the lower limit of the initial second confidence interval are queried, and all training data between the training data corresponding to the upper limit and the training data corresponding to the lower limit in the training data sequence are taken as the second confidence interval of each training data.

5. The method according to claim 1, characterized in that, The step of marking clients corresponding to training data that do not meet the confidence interval conditions of each of the median algorithms as first abnormal clients, based on the confidence intervals corresponding to each of the median algorithms, includes: All training data that are outside the confidence intervals corresponding to all median algorithms are taken as target data, and the clients corresponding to the target data are marked as the first abnormal clients.

6. The method according to claim 1, characterized in that, The phrase "the client simultaneously marked as both the first abnormal client and the second target client, after being designated as the target abnormal client" further includes: Obtain all training data for each of the clients except the target abnormal client; Gaussian distribution processing is applied to all training data of all clients except the target abnormal client to obtain a Gaussian distribution sequence of training data; In the Gaussian distribution sequence of the training data, training data that meets the conditions of the Gaussian distribution sequence of the training data are selected, marked as attack data, and all attack data are deleted.

7. The method according to claim 1, characterized in that, The step of filtering clients that meet the gradient distance conditions from each of the gradient distances and marking them as second abnormal clients includes: For each client, a score value for the distance vector of each client is calculated using a scoring algorithm based on the distance vector of the gradient distance of the client. Clients whose distance vectors correspond to ratings exceeding the rating threshold are marked as second abnormal clients.

8. The method according to claim 1, characterized in that, The phrase "the client simultaneously marked as both the first abnormal client and the second target client, after being designated as the target abnormal client" further includes: Use all training data from each of the target abnormal clients as attack data; Delete all the attack data and store all the target abnormal clients in the blacklist database.

9. The method according to claim 1, characterized in that, The phrase "the client simultaneously marked as both the first abnormal client and the second target client, after being designated as the target abnormal client" further includes: In the historical cache training database, the cache training data of each of the aforementioned target abnormal clients are filtered out, and the cache training data of each of the aforementioned target abnormal clients are used as historical attack data; In the historical cache training database, delete each of the historical attack data.

10. A device for identifying abnormal client applications, characterized in that, The device includes: The acquisition module is used to acquire training data from multiple clients; The determination module is used to calculate the confidence interval boundary value of the training data corresponding to each preset median algorithm using the median confidence interval algorithm, and determine the confidence interval corresponding to the median algorithm based on the confidence interval boundary value of the median algorithm and the training data corresponding to the median algorithm. The first labeling module is used to label clients corresponding to training data that do not meet the confidence interval of each of the median algorithms as first abnormal clients, based on the confidence interval corresponding to each of the median algorithms. The second marking module is used to calculate the gradient distance of each client based on the gradient distance algorithm and the training data of each client, and to filter out clients that meet the gradient distance conditions from the gradient distances and mark them as second abnormal clients. The filtering module is used to identify clients that are simultaneously marked as both the first abnormal client and the second target client as target abnormal clients. The determining module is specifically used to randomly select multiple sample training data from each of the training data, and obtain the data identifier of each sample training data; the data identifier is used to identify whether the training data is attack data; All training data samples are processed to follow a normal distribution to obtain a sample distribution sequence. Based on the sample distribution sequence and the data identifiers of all training data samples, the confidence interval threshold corresponding to the median confidence interval algorithm is calculated. The second labeling module is specifically used to calculate the gradient between each adjacent training data of each client, based on all training data of the client. The sub-Euclidean distance between each gradient is calculated using the Euclidean distance algorithm. All sub-Euclidean distances are sorted according to the chronological order of the acquisition time points of the training data corresponding to the gradient of each sub-Euclidean distance to obtain the Euclidean distance sequence of the client, and all sub-Euclidean distances containing the Euclidean distance sequence are used as the gradient distance of the client.

11. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 9.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 9.

13. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 9.