Abnormal communication card number identification method, device, equipment and storage medium
By combining semi-supervised learning with multi-base classifiers and using Gaussian kernel function and positive and negative sample weights to adjust the loss function, the data imbalance problem is solved, the recognition accuracy of abnormal communication card numbers is improved, and the robustness and generalization ability of the model are enhanced.
Patent Information
- Application Number
- CN202411999394.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2044-12-31
AI Technical Summary
In the existing technology, due to the unbalanced distribution of training data of the mobile phone card number anomaly recognition model, the recognition accuracy is low. Normal category samples are far more than abnormal category samples, and the model tends to use the normal category as the prediction result.
A semi-supervised learning method is used to train multiple base classifiers. The loss function is adjusted using the Gaussian kernel function and the weight coefficients of positive and negative samples. Combined with recurrent neural networks, bidirectional long short-term memory networks, and bidirectional gated recurrent networks, the card number abnormality is determined through the weighted outputs of multiple base classifiers. Unlabeled data is used for model training to balance the data distribution.
The recognition accuracy of abnormal communication card numbers is improved, the robustness and generalization ability of the model are enhanced, and the cost of manual data annotation is reduced. The model pays more attention to abnormal samples, converges quickly and improves the recognition accuracy.
Smart Images

Figure CN119865818B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of communication technology, and in particular relates to a method, device, equipment and storage medium for identifying abnormal communication card numbers. Background Art
[0002] An abnormal mobile phone card number means that the mobile phone card issued by the operator is not used normally by the user, but is used by illegal users to conduct illegal activities and make profits.
[0003] In related technologies, recognition models can be used to identify whether a mobile phone card number is abnormal. However, training the recognition model requires sufficient data with anomaly labels, identified by the phone number. However, in reality, mobile phone cards are used normally by users, so the number of normal samples collected far outnumbers abnormal samples, resulting in an unbalanced data distribution. In this unbalanced situation, the directed graph model is more likely to be exposed to classes with more samples during training, thereby learning more features and patterns related to that class. It is more likely to use the normal class as the prediction result, resulting in lower recognition accuracy. Summary of the Invention
[0004] The embodiments of the present application provide a method, apparatus, device, and storage medium for identifying abnormal communication card numbers, which can improve the accuracy of identifying abnormal communication card numbers.
[0005] In a first aspect, an embodiment of the present application provides a method for identifying an abnormal communication card number, the method comprising:
[0006] Obtaining the communication characteristics of the communication card number to be identified within a preset time period;
[0007] The communication characteristics of the communication card number to be identified are input into the first base classifier of the abnormal communication card number identification model to obtain a first abnormal probability value that the communication card number to be identified is an abnormal card number and a first normal probability value that it is a normal card number; the communication characteristics of the communication card number to be identified are input into the second base classifier of the abnormal communication card number identification model to obtain a second abnormal probability value that the communication card number to be identified is an abnormal card number and a second normal probability value that it is a normal card number; the communication characteristics of the communication card number to be identified are input into the third base classifier of the abnormal communication card number identification model to obtain a third abnormal probability value that the communication card number to be identified is an abnormal card number and a third normal probability value that it is a normal card number; wherein, each base classifier of the abnormal communication card number identification model is trained using a semi-supervised method, and the loss function used in training each base classifier is obtained based on the weight coefficients of positive and negative samples, the probability that the sample output by the base classifier belongs to the abnormal communication card number, and the similarity between the sample and the sample center point, and the similarity between the sample and the sample center point is obtained based on a Gaussian kernel function;
[0008] Whether the communication card number to be identified is abnormal is determined based on the abnormal probability value and normal probability value output by each base classifier and the weight corresponding to each base classifier.
[0009] In some embodiments of the present application, before inputting the communication features of the communication card number to be identified into each base classifier of the abnormal communication card number identification model, the method further includes:
[0010] Obtaining a first training sample set and a second training sample set, the first training sample set including communication features of communication card numbers and labels of communication card numbers, the labels of communication card numbers being used to identify abnormal communication card numbers or normal communication card numbers, and the second training sample set including communication features of communication card numbers;
[0011] Screening out a first sub-training sample set, a second sub-training sample set, and a third sub-training sample set having differences from the first training sample set;
[0012] Performing first-stage training on the initial first base classifier, the second base classifier, and the third base classifier according to the first sub-training sample set, the second sub-training sample set, and the third sub-training sample set, respectively, to obtain base classifiers after the first-stage training;
[0013] For any one of the three base classifiers, perform the following operations to obtain a trained base classifier, set corresponding weights for each trained base classifier, and obtain an abnormal communication card number recognition model: perform the second stage training on the base classifier trained in the first stage according to the corresponding sub-training sample set and the second training sample set to obtain a trained base classifier.
[0014] In some embodiments of the present application, obtaining a first training sample set and a second training sample set includes:
[0015] Collecting communication data of a plurality of first sample communication card numbers and a plurality of second sample communication card numbers within a preset time period, respectively, wherein the communication data of each first sample communication card number and each second sample communication card number includes at least one of a calling frequency, a calling / calling ratio, traffic usage data, a number of device changes corresponding to the communication card, a number of changes in a permanent location, a number of changes in a commonly used base station, a number of changes in a home location, a registration location, a registration time, and a network access time;
[0016] Preprocessing the communication data of the plurality of first sample communication card numbers and the plurality of second sample communication card numbers respectively to obtain communication features corresponding to the plurality of first sample communication card numbers and the plurality of second sample communication card numbers;
[0017] Constructing a first training sample based on the communication characteristics of each first sample communication card number and its corresponding label to obtain a first training sample set;
[0018] A second training sample is constructed according to the communication characteristics of each second sample communication card number to obtain a second training sample set.
[0019] In some embodiments of the present application, the initial first base classifier, the second base classifier, and the third base classifier are respectively trained in the first stage according to the first sub-training sample set, the second sub-training sample set, and the third sub-training sample set to obtain the respective base classifiers after the first stage training, including:
[0020] Input the samples in the first sub-training sample set, the second sub-training sample set, and the third sub-training sample set into the initial first base classifier, the second base classifier, and the third base classifier respectively to obtain a first prediction result, a second prediction result, and a third prediction result;
[0021] Calculate the loss function value according to the first prediction result, the second prediction result, the third prediction result and their corresponding labels;
[0022] Update the parameters of each base classifier according to the gradient information corresponding to the loss function value, and update each base classifier according to the updated parameters of each base classifier;
[0023] Determine each updated base classifier as the initial base classifier;
[0024] Return and input the samples in the first sub-training sample set, the second sub-training sample set and the third sub-training sample set into the initial first base classifier, the second base classifier and the third base classifier respectively until the models of each base classifier converge, and obtain the base classifiers after the first stage of training.
[0025] In some embodiments of the present application, the first base classifier is a recurrent neural network, the second base classifier is a bidirectional long short-term memory network, and the third base classifier is a bidirectional gated recurrent network.
[0026] In some embodiments of the present application, the loss function is:
[0027]
[0028] Where y represents the sample label, p represents the probability value of the training sample output by the base classifier belonging to an abnormal communication card number, α represents the weight for balancing positive and negative samples, and r represents the degree of proximity between the training sample and the sample center;
[0029] Among them, r is obtained by the following formula:
[0030]
[0031] Among them, σ represents the Gaussian kernel function parameter, x represents the training sample, centi Represents class C i The sample center point, C i Represents the i-th category label dataset, and n is the total number of samples.
[0032] In some embodiments of the present application, the following operations are performed for each of the three base classifiers to obtain a trained base classifier, and corresponding weights are set for each trained base classifier to obtain an abnormal communication card number recognition model: the base classifier trained in the first stage is trained in the second stage according to the corresponding sub-training sample set and the second training sample set to obtain a trained base classifier, including:
[0033] Input the samples in the second training sample set into each base classifier trained in the first stage respectively, and obtain the prediction results corresponding to each base classifier;
[0034] For each sample in the second training sample set, the following operations are performed cyclically until an expanded sample set for each base classifier is obtained:
[0035] When two of the three base classifiers predict an abnormal communication card number and the other predicts a normal communication card number, the abnormal communication card number is used as the label of the sample to obtain expanded sample data, and the expanded sample data is added to the expanded sample set of the other base classifier;
[0036] The following operations are performed for each base classifier until the preset stopping condition is reached, and the first base classifier, the second base classifier, and the third base classifier trained in the second stage are obtained:
[0037] The base classifier is trained according to the samples in the sub-training sample set and the samples in the expanded sample set corresponding to the base classifier to obtain a trained base classifier;
[0038] Calculate the classification accuracy of the trained base classifier based on the prediction results of each sample and the labels of each sample;
[0039] When the classification accuracy of this round is lower than that of the previous round, some samples are randomly deleted from the expanded sample set corresponding to the base classifier to obtain an updated expanded sample set;
[0040] The base classifier is trained according to the samples in the sub-training sample set corresponding to the base classifier and the samples in the updated expanded sample set to obtain a trained base classifier;
[0041] The weights of each base classifier are set according to the classification accuracy of each trained base classifier to obtain an abnormal communication card number recognition model.
[0042] In some embodiments of the present application, determining whether the communication card number to be identified is abnormal based on the abnormal probability value and the normal probability value output by each base classifier and the weight corresponding to each base classifier includes:
[0043] The target abnormality probability value is the sum of the product of the probability value of the communication card number to be identified belonging to the abnormal card number output by each base classifier of the abnormal communication card number recognition model and the weight corresponding to each base classifier;
[0044] The target normal probability value is the sum of the product of the probability value of the communication card number to be identified belonging to a normal card number output by each base classifier of the abnormal communication card number recognition model and the weight corresponding to each base classifier;
[0045] Determine whether the communication card number to be identified is abnormal based on the target abnormal probability value and the target normal probability value.
[0046] In a second aspect, an embodiment of the present application provides a device for identifying abnormal communication card numbers, the device comprising:
[0047] The first acquisition module is used to obtain the communication characteristics of the communication card number to be identified within a preset time period;
[0048] An input module is configured to input the communication characteristics of a communication card number to be identified into a first base classifier of an abnormal communication card number identification model to obtain a first abnormal probability value that the communication card number to be identified is an abnormal card number and a first normal probability value that the communication card number to be identified is a normal card number; input the communication characteristics of the communication card number to be identified into a second base classifier of the abnormal communication card number identification model to obtain a second abnormal probability value that the communication card number to be identified is an abnormal card number and a second normal probability value that the communication card number to be identified is a normal card number; input the communication characteristics of the communication card number to be identified into a third base classifier of the abnormal communication card number identification model to obtain a third abnormal probability value that the communication card number to be identified is an abnormal card number and a third normal probability value that the communication card number to be identified is a normal card number; wherein each base classifier of the abnormal communication card number identification model is trained using a semi-supervised method, and the loss function used in training each base classifier is obtained based on weight coefficients of positive and negative samples, the probability that the sample output by the base classifier belongs to an abnormal communication card number, and the similarity between the sample and the sample center point, and the similarity between the sample and the sample center point is obtained based on a Gaussian kernel function;
[0049] The determination module is used to determine whether the communication card number to be identified is abnormal based on the abnormal probability value and normal probability value output by each base classifier and the weight corresponding to each base classifier.
[0050] In a third aspect, an embodiment of the present application provides a device for identifying abnormal communication card numbers, the device comprising: a processor and a memory storing computer program instructions;
[0051] When the processor executes the computer program instructions, the method for identifying abnormal communication card numbers of any of the above embodiments is implemented.
[0052] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having computer program instructions stored thereon. When the computer program instructions are executed by a processor, the method for identifying abnormal communication card numbers of any of the above embodiments is implemented.
[0053] According to the abnormal communication card number identification method, device, equipment and storage medium provided in the embodiments of the present application, on the one hand, each base classifier of the abnormal communication card number identification model is trained using a semi-supervised method, which can fully utilize a large amount of unlabeled data for model training, solve the problem of uneven data distribution, enhance the model's robustness and generalization ability, and at the same time reduce manual intervention and lower the cost of labeling data. The abnormal communication card number identification model can also combine the advantages of multiple base classifiers, thereby improving the recognition accuracy of abnormal communication card numbers. On the other hand, the loss function used when training each base classifier is based on the weight coefficients of positive and negative samples, the probability that the sample output by the base classifier belongs to an abnormal communication card number, and the similarity between the sample and the sample center point. Among them, the similarity between the sample and the sample center point is obtained based on the Gaussian kernel function. The weight of the abnormal class samples in the loss function can be increased by controlling the weight coefficients of the positive and negative samples, and the weight of the normal class samples in the loss function can be reduced, thereby reducing the influence of the normal class samples on the model, making the model pay more attention to the abnormal class samples, and achieving the effect of balancing the distribution of the data set. The similarity between the sample and the sample center point is incorporated into the loss function, so that the loss function value is related to the similarity between the sample and the sample center point. Therefore, the model can be controlled to pay more attention to difficult-to-distinguish samples, and the proportion of easy-to-distinguish samples in the loss function calculation can be gradually reduced. The model converges faster and has stronger generalization ability, and can also further improve the recognition accuracy of the model. Therefore, based on the abnormal communication card number recognition model, the communication characteristics of the communication card number to be identified within a preset time period are identified to determine whether the communication card number to be identified is abnormal, which can improve the recognition accuracy of abnormal communication card numbers. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0055] Figure 1 A flow chart of a method for identifying abnormal communication card numbers provided in an embodiment of the present application;
[0056] Figure 2 Another flowchart of the method for identifying abnormal communication card numbers provided in an embodiment of the present application;
[0057] Figure 3 A flowchart of a method for training an abnormal communication card number recognition model provided in an embodiment of the present application;
[0058] Figure 4 A schematic diagram of the structure of a device for identifying abnormal communication card numbers provided in an embodiment of the present application;
[0059] Figure 5 A schematic diagram of the structure of the device for identifying abnormal communication card numbers provided in an embodiment of the present application. DETAILED DESCRIPTION
[0060] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is merely to provide a better understanding of the present application by illustrating the examples of the present application.
[0061] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, the elements defined by the phrase "comprising..." do not exclude the presence of other identical elements in the process, method, article, or device comprising the elements.
[0062] An abnormal mobile phone card number means that the mobile phone card issued by the operator is not used normally by the user, but is used by illegal users to conduct illegal activities and make profits.
[0063] In related technologies, recognition models can be used to identify whether a mobile phone card number is abnormal. However, training the recognition model requires sufficient data with anomaly labels, identified by the phone number. However, in reality, mobile phone cards are used normally by users, so the number of normal samples collected far outnumbers abnormal samples, resulting in an unbalanced data distribution. In this unbalanced situation, the directed graph model is more likely to be exposed to classes with more samples during training, thereby learning more features and patterns related to that class. It is more likely to use the normal class as the prediction result, resulting in lower recognition accuracy.
[0064] In order to solve the above problems, the embodiments of the present application provide a method, apparatus, device and storage medium for identifying abnormal communication card numbers, which can improve the recognition accuracy of abnormal communication card numbers.
[0065] Figure 1 A flow chart of a method for identifying abnormal communication card numbers provided in an embodiment of the present application. Figure 1 As shown, the method for identifying abnormal communication card numbers may specifically include the following steps:
[0066] S110, obtaining communication characteristics of the communication card number to be identified within a preset time period;
[0067] S120, inputting the communication characteristics of the communication card number to be identified into the first base classifier of the abnormal communication card number identification model to obtain a first abnormal probability value that the communication card number to be identified is an abnormal card number and a first normal probability value that the communication card number to be identified is a normal card number; inputting the communication characteristics of the communication card number to be identified into the second base classifier of the abnormal communication card number identification model to obtain a second abnormal probability value that the communication card number to be identified is an abnormal card number and a second normal probability value that the communication card number to be identified is a normal card number; inputting the communication characteristics of the communication card number to be identified into the third base classifier of the abnormal communication card number identification model to obtain a third abnormal probability value that the communication card number to be identified is an abnormal card number and a third normal probability value that the communication card number to be identified is a normal card number; wherein each base classifier of the abnormal communication card number identification model is trained using a semi-supervised method, and the loss function used in training each base classifier is obtained based on weight coefficients of positive and negative samples, the probability that the sample output by the base classifier belongs to the abnormal communication card number, and the similarity between the sample and the sample center point, and the similarity between the sample and the sample center point is obtained based on a Gaussian kernel function;
[0068] S130, determining whether the communication card number to be identified is abnormal based on the abnormal probability value and the normal probability value output by each base classifier and the weight corresponding to each base classifier.
[0069] According to the method for identifying abnormal communication card numbers provided in the embodiments of the present application, on the one hand, each base classifier of the abnormal communication card number recognition model is trained using a semi-supervised method, which can fully utilize a large amount of unlabeled data for model training, solve the problem of uneven data distribution, enhance the robustness and generalization ability of the model, and at the same time reduce manual intervention and lower the cost of labeling data. The abnormal communication card number recognition model can also combine the advantages of multiple base classifiers, thereby improving the recognition accuracy of abnormal communication card numbers. On the other hand, the loss function used when training each base classifier is based on the weight coefficients of positive and negative samples, the probability that the sample output by the base classifier belongs to an abnormal communication card number, and the similarity between the sample and the sample center point. Among them, the similarity between the sample and the sample center point is obtained based on the Gaussian kernel function. The weight of the abnormal class samples in the loss function can be increased by controlling the weight coefficients of the positive and negative samples, and the weight of the normal class samples in the loss function can be reduced, thereby reducing the influence of the normal class samples on the model, making the model pay more attention to the abnormal class samples, and achieving the effect of balancing the distribution of the data set. The similarity between the sample and the sample center point is incorporated into the loss function, so that the loss function value is related to the similarity between the sample and the sample center point. Therefore, the model can be controlled to pay more attention to difficult-to-distinguish samples, and the proportion of easy-to-distinguish samples in the loss function calculation can be gradually reduced. The model converges faster and has stronger generalization ability, and can also further improve the recognition accuracy of the model. Therefore, based on the abnormal communication card number recognition model, the communication characteristics of the communication card number to be identified within a preset time period are identified to determine whether the communication card number to be identified is abnormal, which can improve the recognition accuracy of abnormal communication card numbers.
[0070] The preset time period in the above S110 can be 1 month, and the communication data of the communication card number to be identified within 1 month can be collected, and the communication data can be cleaned, standardized and normalized to obtain communication characteristics, wherein the communication data can include calling frequency, calling and called ratio, traffic usage data, the number of changes in the device corresponding to the communication card, the number of changes in the permanent area, the number of changes in the commonly used base station, the number of changes in the place of origin, the registration place, the registration time and at least one of the time of joining the network.
[0071] Figure 2 Another flow chart of the method for identifying abnormal communication card numbers provided in the embodiment of the present application. Before the communication features of the communication card number to be identified are input into each base classifier of the abnormal communication card number identification model, such as Figure 2 As shown, the method for identifying abnormal communication card numbers may further include the following steps:
[0072] S210, obtaining a first training sample set and a second training sample set, wherein the first training sample set includes communication features of communication card numbers and labels of communication card numbers, the labels of communication card numbers being used to identify abnormal communication card numbers or normal communication card numbers, and the second training sample set includes communication features of communication card numbers;
[0073] S220, screening out a first sub-training sample set, a second sub-training sample set, and a third sub-training sample set having differences from the first training sample set;
[0074] S230, performing first-stage training on the initial first base classifier, the second base classifier, and the third base classifier according to the first sub-training sample set, the second sub-training sample set, and the third sub-training sample set, respectively, to obtain base classifiers after the first-stage training;
[0075] S240, for any one of the three base classifiers, perform the following operations respectively to obtain a trained base classifier, set corresponding weights for each trained base classifier, and obtain an abnormal communication card number recognition model: perform a second stage of training on the base classifier trained in the first stage according to the corresponding sub-training sample set and the second training sample set to obtain a trained base classifier.
[0076] The above S210 to S240 are described in detail below:
[0077] Regarding S210, the first training sample set is a labeled training sample set, and the second training sample set is an unlabeled training sample set. The communication card number can be a mobile phone card number. Communication features can be obtained by collecting and analyzing communication data from a large number of mobile phone card numbers. For labeled mobile phone card numbers, the communication features and labels of the mobile phone card numbers are used as labeled training data to obtain the first training sample set. For unlabeled mobile phone card numbers, the communication features of the mobile phone card numbers are used as unlabeled training data to obtain the second training sample set.
[0078] Regarding S220, the bootstrap sampling method can be used to screen out a first sub-training sample set, a second sub-training sample set, and a third sub-training sample set with differences from the first training sample set, and each sub-training sample set can be of a fixed size. Since the bootstrap sampling method is a sampling with replacement, the sample composition in each sub-training sample set will be different. Although the size of each data set is fixed, the specific samples included and the number of times each sample appears will be different. This difference enables each data set to capture different features and patterns in the first training sample set, thereby training a differentiated base classifier.
[0079] Regarding S230, the first base classifier, the second base classifier, and the third base classifier are three differentiated base classifiers, which can increase the coverage and information gain of the model, model and predict data from different perspectives, thereby providing more diverse information and improving model performance.
[0080] The first stage is supervised training. Each base classifier is trained in the first stage using each sub-training sample set, and each base classifier after the first stage training can be obtained. The loss function used when training each base classifier is based on the weight coefficient of the positive and negative samples, the probability that the sample output by the base classifier belongs to an abnormal communication card number, and the similarity between the sample and the sample center point. Among them, the similarity between the sample and the sample center point is obtained based on the Gaussian kernel function. The weight of the abnormal class samples in the loss function can be increased by controlling the weight coefficient of the positive and negative samples, and the weight of the normal class samples in the loss function can be reduced, thereby reducing the influence of the normal class samples on the model, making the model pay more attention to the abnormal class samples, and achieving the effect of balancing the distribution of the data set. The similarity between the sample and the sample center point is integrated into the loss function, so that the loss function value is related to the similarity between the sample and the sample center point. Therefore, the model can be controlled to pay more attention to the difficult-to-distinguish samples, and the proportion of easy-to-distinguish samples in the loss function calculation can be gradually reduced. The model converges faster, has stronger generalization ability, and can further improve the recognition accuracy of the model.
[0081] Regarding S240, after the first stage of training is completed, each base classifier is trained in the second stage. The second stage is semi-supervised training. The trained base classifier is further trained according to the labeled sub-training sample set and the unlabeled second training sample set to obtain a trained base classifier. After setting corresponding weights for each base classifier, an abnormal communication card number recognition model is obtained. In this way, multiple base classifiers are trained by a semi-supervised training method, and the abnormal communication card number recognition model is obtained after weighting. This can solve the data imbalance problem and reduce the labeling cost. The abnormal communication card number recognition model can also combine the advantages of multiple base classifiers, thereby improving the recognition accuracy of the abnormal communication card number recognition model.
[0082] In some embodiments of the present application, the above S210 includes:
[0083] Collecting communication data of a plurality of first sample communication card numbers and a plurality of second sample communication card numbers within a preset time period, respectively, wherein the communication data of each first sample communication card number and each second sample communication card number includes at least one of a calling frequency, a calling / calling ratio, traffic usage data, a number of device changes corresponding to the communication card, a number of changes in a permanent location, a number of changes in a commonly used base station, a number of changes in a home location, a registration location, a registration time, and a network access time;
[0084] Preprocessing the communication data of the plurality of first sample communication card numbers and the plurality of second sample communication card numbers respectively to obtain communication features corresponding to the plurality of first sample communication card numbers and the plurality of second sample communication card numbers;
[0085] Constructing a first training sample based on the communication characteristics of each first sample communication card number and its corresponding label to obtain a first training sample set;
[0086] A second training sample is constructed according to the communication characteristics of each second sample communication card number to obtain a second training sample set.
[0087] The preset time can be 1 month, or other time periods, which is not limited in this application.
[0088] Preprocessing of communication data can include steps such as data cleaning, standardization and normalization.
[0089] The labeled first training sample set and the unlabeled second training sample set provide sufficient data accuracy for subsequent model training, facilitating the subsequent first and second stage training of each base classifier. Moreover, the training sample set contains multiple communication features, allowing the model to identify whether the communication card number is abnormal based on multiple communication features, thereby improving the recognition accuracy.
[0090] In some embodiments of the present application, the initial first base classifier, the second base classifier, and the third base classifier are respectively trained in the first stage according to the first sub-training sample set, the second sub-training sample set, and the third sub-training sample set to obtain the respective base classifiers after the first stage training, including:
[0091] Input the samples in the first sub-training sample set, the second sub-training sample set, and the third sub-training sample set into the initial first base classifier, the second base classifier, and the third base classifier respectively to obtain a first prediction result, a second prediction result, and a third prediction result;
[0092] Calculate the loss function value according to the first prediction result, the second prediction result, the third prediction result and their corresponding labels;
[0093] Update the parameters of each base classifier according to the gradient information corresponding to the loss function value, and update each base classifier according to the updated parameters of each base classifier;
[0094] Determine each updated base classifier as the initial base classifier;
[0095] Return and input the samples in the first sub-training sample set, the second sub-training sample set and the third sub-training sample set into the initial first base classifier, the second base classifier and the third base classifier respectively until the models of each base classifier converge, and obtain the base classifiers after the first stage of training.
[0096] The first phase of training is performed on each base classifier based on each sub-training sample set. The loss function value is calculated based on the prediction results of each base classifier for the sample and the true label of the sample. The corresponding gradient information is then calculated based on the loss function value. The parameters of each base classifier are updated based on the gradient information. Specifically, a gradient descent algorithm can be used to optimize the parameters of each base classifier. The base classifiers are continuously iterated and training is terminated when a preset number of iterations is reached or the loss function value is less than a preset value. The base classifiers trained in the first phase are obtained.
[0097] The supervised training in the first stage can lay a good foundation for the subsequent semi-supervised training, so that the subsequent semi-supervised training is carried out on the basis of the trained model, which can ensure the accuracy of the abnormal communication card number recognition model training.
[0098] In some embodiments of the present application, the first base classifier is a recurrent neural network, the second base classifier is a bidirectional long short-term memory network, and the third base classifier is a bidirectional gated recurrent network. Using base classifiers with different network structures can increase the model's coverage and information gain, modeling and predicting data from different perspectives, thereby providing more diverse information and improving model performance.
[0099] In some embodiments of the present application, the loss function is:
[0100]
[0101] Where y represents the sample label (y = 1 indicates that the sample belongs to an abnormal communication card number, which is a positive sample, and y = 0 indicates that the sample belongs to a normal communication card number, which is a negative sample), p represents the probability value of the training sample output by the base classifier belonging to an abnormal communication card number, α represents the weight for balancing positive and negative samples, and r represents the degree of proximity between the training sample and the sample center;
[0102] Among them, r is obtained by the following formula:
[0103]
[0104] Among them, σ represents the Gaussian kernel function parameter, x represents the training sample, cent i Represents class C i The sample center point, C i Represents the i-th category label data set, n is the total number of samples, and i is 0 or 1.
[0105] By controlling the weight coefficients of positive and negative samples, the weight of abnormal samples in the loss function is increased, and the weight of normal samples in the loss function is reduced, thereby reducing the impact of normal samples on the model, making the model pay more attention to abnormal samples, and achieving the effect of balancing the distribution of the data set.
[0106] r represents the training sample x and the sample center cent i The closer the sample is, the smaller the value of r is. i The closer the distance is, the smaller the loss function value is, the easier it is for the sample to be correctly classified by the model, and the smaller the contribution of these easy-to-classify samples to the update of model parameters. As the number of iterations increases, the proportion of easy-to-classify samples increases, and the effect of these samples on improving model performance decreases. i The similarity is incorporated into the loss function, making the model pay more attention to difficult-to-separate samples and gradually reducing the proportion of easy-to-separate samples in the loss function calculation. The model converges faster, has stronger generalization ability, and can further improve the recognition accuracy of the model.
[0107] In some embodiments of the present application, the following operations are performed for each of the three base classifiers to obtain a trained base classifier, and corresponding weights are set for each trained base classifier to obtain an abnormal communication card number recognition model: the base classifier trained in the first stage is trained in the second stage according to the corresponding sub-training sample set and the second training sample set to obtain a trained base classifier, including:
[0108] Input the samples in the second training sample set into each base classifier trained in the first stage respectively, and obtain the prediction results corresponding to each base classifier;
[0109] For each sample in the second training sample set, the following operations are performed cyclically until an expanded sample set for each base classifier is obtained:
[0110] When two of the three base classifiers predict an abnormal communication card number and the other predicts a normal communication card number, the abnormal communication card number is used as the label of the sample to obtain expanded sample data, and the expanded sample data is added to the expanded sample set of the other base classifier;
[0111] The following operations are performed for each base classifier until the preset stopping condition is reached, and the first base classifier, the second base classifier, and the third base classifier trained in the second stage are obtained:
[0112] The base classifier is trained according to the samples in the sub-training sample set and the samples in the expanded sample set corresponding to the base classifier to obtain a trained base classifier;
[0113] Calculate the classification accuracy of the trained base classifier based on the prediction results of each sample and the labels of each sample;
[0114] When the classification accuracy of this round is lower than that of the previous round, some samples are randomly deleted from the expanded sample set corresponding to the base classifier to obtain an updated expanded sample set;
[0115] The base classifier is trained according to the samples in the sub-training sample set corresponding to the base classifier and the samples in the updated expanded sample set to obtain a trained base classifier;
[0116] The weights of each base classifier are set according to the classification accuracy of each trained base classifier to obtain an abnormal communication card number recognition model.
[0117] This approach can fully utilize unlabeled data to generate pseudo-labeled samples, reducing reliance on manually labeled data and better addressing the issue of uneven data distribution. Furthermore, using a "minority obeys majority" approach, the expanded sample set corresponding to each base classifier is collaboratively provided by the other two base classifiers, which can improve the accuracy of sample labeling.
[0118] The base classifier can be trained in the second stage according to the samples in the sub-training sample set and the samples in the expanded sample set. If the classification accuracy of the base classifier calculated in the current training round is less than the classification accuracy of the previous training round, it means that the classification effect of the base classifier in the current round is not as good as that of the base classifier in the previous round. At this time, several samples can be randomly deleted from the expanded sample set and the expanded sample set is updated. Because the expanded sample set contains pseudo-label data, there is a certain probability of mislabeling. After deletion, the impact on model training can be appropriately reduced.
[0119] The trained classifiers are obtained by continuously iteratively training each base classifier until no samples are available in the second training sample set or a preset stopping condition (such as reaching the maximum number of iterations) is reached.
[0120] The classification accuracy of each base classifier can be obtained by the following formula:
[0121]
[0122] Among them, ω i is the weight of the base classifier, P i is the classification accuracy of the i-th base classifier, and j is the label of the abnormal communication card number.
[0123] Finally, the weights of each base classifier are set according to the calculated classification accuracy of each trained base classifier to obtain the abnormal communication card number recognition model.
[0124] Figure 3 A flow chart of the training method for the abnormal communication card number recognition model provided in the embodiment of the present application is shown below in combination with Figure 3 Briefly summarize the entire process of the training method for the abnormal communication card number recognition model provided in the embodiment of the present application.
[0125] S310, first, obtain a labeled dataset;
[0126] S320, screening the difference training subsets to obtain three training subsets;
[0127] S330, training a base classifier according to the difference training subset;
[0128] S340, then, obtaining an unlabeled dataset;
[0129] S350, obtaining a pseudo-labeled dataset based on the unlabeled dataset and the trained base classifier;
[0130] S360, next, merge the original training subset and the pseudo-labeled dataset, retrain the base classifier, and randomly delete some samples based on the model accuracy;
[0131] S370, determining whether the model training meets the preset conditions. If so, executing S380; if not, returning to executing S350;
[0132] S380, calculating the weight of the base classifier;
[0133] S390, finally, after weighted voting on each base classifier, an abnormal communication card number recognition model is obtained.
[0134] In some embodiments of the present application, determining whether the communication card number to be identified is abnormal based on the abnormal probability value and the normal probability value output by each base classifier and the weight corresponding to each base classifier includes:
[0135] The target abnormality probability value is the sum of the product of the probability value of the communication card number to be identified belonging to the abnormal card number output by each base classifier of the abnormal communication card number recognition model and the weight corresponding to each base classifier;
[0136] The target normal probability value is the sum of the product of the probability value of the communication card number to be identified belonging to a normal card number output by each base classifier of the abnormal communication card number recognition model and the weight corresponding to each base classifier;
[0137] Determine whether the communication card number to be identified is abnormal based on the target abnormal probability value and the target normal probability value.
[0138] After obtaining the abnormal probability value of the communication card number to be identified belonging to an abnormal card number and the normal probability value of the communication card number to be identified belonging to a normal card number output by each base classifier, each abnormal probability value and normal probability value can be weighted by the weight corresponding to each base classifier, and finally a target abnormal probability value and a target normal probability value are obtained. Whether the communication card number to be identified is abnormal is determined based on the weighted target abnormal probability value and target normal probability value, which can improve the accuracy of judging whether the communication card number is abnormal.
[0139] In some embodiments of the present application, before using the sum of the products of the probability value of the communication card number to be identified, output by each base classifier of the abnormal communication card number identification model, and the weight corresponding to each base classifier as the target abnormality probability value, the method further includes:
[0140] Obtain the weight of each base classifier. The weight of each base classifier is calculated based on the classification accuracy of each base classifier.
[0141] The weights of each base classifier can be calculated using the formula provided in the embodiment of the abnormal communication card number recognition model training method. The corresponding weights are calculated based on the classification accuracy of each base classifier. Base classifiers with high classification accuracy can be assigned higher weights, thereby improving the accuracy of the communication card number being recognized.
[0142] In some embodiments of the present application, determining whether the communication card number to be identified is abnormal based on the target abnormal probability value and the target normal probability value includes:
[0143] When the target abnormal probability value is greater than the target normal probability value, the communication card number to be identified is determined to be an abnormal card number;
[0144] When the target normal probability value is greater than the target abnormal probability value, the communication card number to be identified is determined to be a normal card number.
[0145] Specifically, the following formula can be used to calculate the target abnormal probability value and the target normal probability value and determine the maximum value between them:
[0146]
[0147] Among them, y represents the final recognition result, which includes two recognition results: normal card number and abnormal card number. x is the communication feature vector corresponding to the communication card number to be identified. i represents the i-th base classifier. j represents the j-th communication card number label, which takes the value of 0 or 1, representing normal card number and abnormal card number respectively. ω i is the weight corresponding to the i-th base classifier, is the recognition probability of the communication card number to be identified.
[0148] For example, the communication features of the communication card number to be identified are sent to the three base classifiers respectively. Assume that the weight w1 of the first base classifier C1 is 0.2, the weight w2 of the second base classifier C2 is 0.3, and the weight w3 of the third base classifier C3 is 0.5. If the output of C1 is that the probability that the communication card number to be identified belongs to a normal card number is p10 = 0.3, and the probability that it belongs to an abnormal card number is p11 = 0.7; the output of C2 is that the probability that the communication card number to be identified belongs to a normal card number is p20 = 0.1, and the probability that it belongs to an abnormal card number is p21 = 0.9; the output of C3 is that the probability that the communication card number to be identified belongs to a normal card number is p30 = 0.6, and the probability that it belongs to an abnormal card number is p31 = 0.4. Then calculate the probability that the communication card number to be identified is a normal card number = w1*p10+w2*p20+w3*p30=0.2*0.3+0.3*0.1+0.5*0.6=0.39; the probability that it is an abnormal card number = w1*p11+w2*p21+w3*p31=0.2*0.7+0.3*0.9+0.5*0.4=0.61.
[0149] That is, the three base classifiers determine that the probability that the communication card number to be identified belongs to a normal card number is 0.39, and the probability that it is an abnormal card number is 0.61. The probability of belonging to an abnormal card number obtained through argmax calculation is the largest, and the final recognition result is an abnormal card number.
[0150] The maximum value of the target abnormal probability value and the target normal probability value is determined as the final recognition result of the communication card number to be recognized, which can obtain a more accurate recognition result.
[0151] Figure 4 This is a schematic diagram of the structure of the device for identifying abnormal communication card numbers provided in the embodiment of the present application. Figure 4 The present invention introduces an apparatus for identifying abnormal communication card numbers according to an embodiment of the present invention, which includes:
[0152] The first acquisition module 401 is used to obtain the communication characteristics of the communication card number to be identified within a preset time period;
[0153] Input module 402 is configured to input the communication characteristics of the communication card number to be identified into a first base classifier of an abnormal communication card number identification model to obtain a first abnormal probability value of the communication card number to be identified as an abnormal card number and a first normal probability value of the communication card number to be identified as a normal card number; input the communication characteristics of the communication card number to be identified into a second base classifier of the abnormal communication card number identification model to obtain a second abnormal probability value of the communication card number to be identified as an abnormal card number and a second normal probability value of the communication card number to be identified as a normal card number; input the communication characteristics of the communication card number to be identified into a third base classifier of the abnormal communication card number identification model to obtain a third abnormal probability value of the communication card number to be identified as an abnormal card number and a third normal probability value of the communication card number to be identified as a normal card number; each base classifier of the abnormal communication card number identification model is trained using a semi-supervised method, and the loss function used in training each base classifier is obtained based on weight coefficients of positive and negative samples, the probability that a sample output by the base classifier belongs to an abnormal communication card number, and the similarity between the sample and the sample center point, wherein the similarity between the sample and the sample center point is obtained based on a Gaussian kernel function;
[0154] The determination module 403 is used to determine whether the communication card number to be identified is abnormal based on the abnormal probability value and the normal probability value output by each base classifier and the weight corresponding to each base classifier.
[0155] In some embodiments of the present application, the identification device further includes:
[0156] A second acquisition module is configured to acquire a first training sample set and a second training sample set before inputting the communication features of the communication card number to be identified into each base classifier of the abnormal communication card number identification model, wherein the first training sample set includes the communication features of the communication card number and a label of the communication card number, the label of the communication card number being used to identify an abnormal communication card number or a normal communication card number, and the second training sample set includes the communication features of the communication card number;
[0157] A screening module, configured to screen out a first sub-training sample set, a second sub-training sample set, and a third sub-training sample set having differences from the first training sample set;
[0158] A first training module is used to perform a first-stage training on the initial first base classifier, the second base classifier, and the third base classifier according to the first sub-training sample set, the second sub-training sample set, and the third sub-training sample set, respectively, to obtain the base classifiers after the first-stage training;
[0159] The second training module is used to perform the following operations on any one of the three base classifiers to obtain a trained base classifier, set corresponding weights for each trained base classifier, and obtain an abnormal communication card number recognition model: the base classifier trained in the first stage is trained in the second stage according to the corresponding sub-training sample set and the second training sample set to obtain a trained base classifier.
[0160] In some embodiments of the present application, the second acquisition module includes:
[0161] a collection unit, configured to respectively collect communication data of a plurality of first sample communication card numbers and a plurality of second sample communication card numbers within a preset time period, wherein the communication data of each first sample communication card number and each second sample communication card number includes at least one of a calling frequency, a caller-called ratio, traffic usage data, a number of device changes corresponding to the communication card, a number of changes in a permanent location, a number of changes in a commonly used base station, a number of changes in a home location, a registration location, a registration time, and a network access time;
[0162] a preprocessing unit, configured to preprocess the communication data of the plurality of first sample communication card numbers and the plurality of second sample communication card numbers respectively, to obtain communication features corresponding to the plurality of first sample communication card numbers and the plurality of second sample communication card numbers;
[0163] A construction unit, configured to construct a first training sample based on the communication characteristics of each first sample communication card number and its corresponding label to obtain a first training sample set;
[0164] The construction unit is further configured to construct a second training sample according to the communication characteristics of each second sample communication card number to obtain a second training sample set.
[0165] In some embodiments of the present application, the first training module includes:
[0166] A first input unit is configured to input samples in the first sub-training sample set, the second sub-training sample set, and the third sub-training sample set into the initial first base classifier, the second base classifier, and the third base classifier, respectively, to obtain a first prediction result, a second prediction result, and a third prediction result;
[0167] A first calculation unit is used to calculate a loss function value according to the first prediction result, the second prediction result, and the third prediction result and their corresponding labels;
[0168] A first updating unit is configured to update parameters of each base classifier according to gradient information corresponding to the loss function value, and to update each base classifier according to the updated parameters of each base classifier;
[0169] a first determining unit, configured to determine each updated base classifier as an initial base classifier;
[0170] The return unit is used to return the samples in the first sub-training sample set, the second sub-training sample set and the third sub-training sample set to the initial first base classifier, the second base classifier and the third base classifier respectively until the models of each base classifier converge, thereby obtaining each base classifier after the first stage of training.
[0171] In some embodiments of the present application, the first base classifier is a recurrent neural network, the second base classifier is a bidirectional long short-term memory network, and the third base classifier is a bidirectional gated recurrent network.
[0172] In some embodiments of the present application, the loss function is:
[0173]
[0174] Where y represents the sample label, p represents the probability value of the training sample output by the base classifier belonging to an abnormal communication card number, α represents the weight for balancing positive and negative samples, and r represents the degree of proximity between the training sample and the sample center;
[0175] Among them, r is obtained by the following formula:
[0176]
[0177] Among them, σ represents the Gaussian kernel function parameter, x represents the training sample, cent i Represents class C i The sample center point, C i Represents the i-th category label dataset, and n is the total number of samples.
[0178] In some embodiments of the present application, the second training module includes:
[0179] The second input unit is used to input samples in the second training sample set into each base classifier trained in the first stage, and obtain the prediction results corresponding to each base classifier;
[0180] For each sample in the second training sample set, the following operations are performed cyclically until an expanded sample set for each base classifier is obtained:
[0181] An adding unit is used to, when two of the three base classifiers predict an abnormal communication card number and the other predicts a normal communication card number, use the abnormal communication card number as a label for the sample to obtain expanded sample data, and add the expanded sample data to the expanded sample set of the other base classifier;
[0182] The following operations are performed for each base classifier until the preset stopping condition is reached, and the first base classifier, the second base classifier, and the third base classifier trained in the second stage are obtained:
[0183] A training unit is used to train the base classifier according to the samples in the sub-training sample set and the samples in the expanded sample set corresponding to the base classifier, so as to obtain a trained base classifier;
[0184] The second calculation unit is used to calculate the classification accuracy of the trained base classifier according to the prediction results of the base classifier for each sample and the label of each sample;
[0185] The second updating unit is configured to randomly delete some samples from the expanded sample set corresponding to the base classifier when the classification accuracy of the current round is lower than the classification accuracy of the previous round, so as to obtain an updated expanded sample set;
[0186] The training unit is further used to train the base classifier according to the samples in the sub-training sample set corresponding to the base classifier and the samples in the updated expanded sample set, respectively, to obtain a trained base classifier;
[0187] The setting unit is used to set the weight of each base classifier according to the classification accuracy of each trained base classifier to obtain an abnormal communication card number recognition model.
[0188] In some embodiments of the present application, the determination module 403 is specifically configured to:
[0189] The target abnormality probability value is the sum of the product of the probability value of the communication card number to be identified belonging to the abnormal card number output by each base classifier of the abnormal communication card number recognition model and the weight corresponding to each base classifier;
[0190] The target normal probability value is the sum of the product of the probability value of the communication card number to be identified belonging to a normal card number output by each base classifier of the abnormal communication card number recognition model and the weight corresponding to each base classifier;
[0191] Determine whether the communication card number to be identified is abnormal based on the target abnormal probability value and the target normal probability value.
[0192] In some embodiments of the present application, the first acquisition module 401 is further configured to:
[0193] Before using the sum of the products of the probability value of the communication card number to be identified belonging to an abnormal card number output by each base classifier of the abnormal communication card number recognition model and the weight corresponding to each base classifier as the target abnormal probability value, the weight of each base classifier is obtained. The weight of each base classifier is calculated based on the classification accuracy of each base classifier.
[0194] In some embodiments of the present application, the determination module 403 is specifically configured to:
[0195] When the target abnormal probability value is greater than the target normal probability value, the communication card number to be identified is determined to be an abnormal card number;
[0196] When the target normal probability value is greater than the target abnormal probability value, the communication card number to be identified is determined to be a normal card number.
[0197] According to the abnormal communication card number identification device provided in the embodiment of the present application, on the one hand, each base classifier of the abnormal communication card number identification model is trained using a semi-supervised method, which can fully utilize a large amount of unlabeled data for model training, solve the problem of uneven data distribution, enhance the model's robustness and generalization ability, and at the same time reduce manual intervention and lower the cost of labeling data. The abnormal communication card number identification model can also combine the advantages of multiple base classifiers, thereby improving the recognition accuracy of abnormal communication card numbers. On the other hand, the loss function used when training each base classifier is based on the weight coefficients of positive and negative samples, the probability that the sample output by the base classifier belongs to an abnormal communication card number, and the similarity between the sample and the sample center point. Among them, the similarity between the sample and the sample center point is obtained based on the Gaussian kernel function. The weight of the abnormal class samples in the loss function can be increased by controlling the weight coefficients of the positive and negative samples, and the weight of the normal class samples in the loss function can be reduced, thereby reducing the influence of the normal class samples on the model, making the model pay more attention to the abnormal class samples, and achieving the effect of balancing the distribution of the data set. The similarity between the sample and the sample center point is incorporated into the loss function, so that the loss function value is related to the similarity between the sample and the sample center point. Therefore, the model can be controlled to pay more attention to difficult-to-distinguish samples, and the proportion of easy-to-distinguish samples in the loss function calculation can be gradually reduced. The model converges faster and has stronger generalization ability, and can also further improve the recognition accuracy of the model. Therefore, based on the abnormal communication card number recognition model, the communication characteristics of the communication card number to be identified within a preset time period are identified to determine whether the communication card number to be identified is abnormal, which can improve the recognition accuracy of abnormal communication card numbers.
[0198] Figure 5 A schematic diagram of the structure of a device for identifying abnormal communication card numbers provided in an embodiment of the present application;
[0199] The device for identifying abnormal communication card numbers may include a processor 501 and a memory 502 storing computer program instructions.
[0200] Specifically, the processor 501 may include a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0201] The memory 502 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 502 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 502 may include removable or non-removable (or fixed) media. Where appropriate, the memory 502 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 502 is a non-volatile solid-state memory.
[0202] The memory may include read-only memory (ROM), random access memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical or other physical / tangible memory storage devices. Thus, generally, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the various method embodiments.
[0203] The processor 501 implements the method for identifying abnormal communication card numbers in the above embodiment by reading and executing computer program instructions stored in the memory 502 .
[0204] In one example, the device for identifying abnormal communication card numbers may further include a communication interface 503 and a bus 510. Figure 5 As shown, the processor 501, the memory 502, and the communication interface 503 are connected via a bus 510 and communicate with each other.
[0205] The communication interface 503 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0206] Bus 510 includes hardware, software or both, and the parts of the determination equipment of base station configuration parameters are coupled to each other.For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industry standard architecture (EISA) bus, front side bus (FSB), hypertransport (HT) interconnection, industry standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 510 may include one or more buses. Although the present application embodiment describes and shows specific bus, the application considers any suitable bus or interconnection.
[0207] The abnormal communication card number identification device executes the abnormal communication card number identification method in the embodiment of the present application, thereby achieving Figure 1 、 Figure 2 A method for identifying abnormal communication card numbers.
[0208] In addition, in conjunction with the method for identifying abnormal communication card numbers in the above embodiments, embodiments of the present application may provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any of the methods for identifying abnormal communication card numbers in the above embodiments is implemented.
[0209] In combination with the method for identifying abnormal communication card numbers in the above embodiments, an embodiment of the present application also provides a computer program product. When the instructions in the computer program product are executed by the processor of an electronic device, the electronic device executes the method for identifying abnormal communication card numbers in any of the above embodiments.
[0210] It should be understood that the present application is not limited to the specific configurations and processes described above and illustrated in the figures. For the sake of brevity, a detailed description of known methods is omitted here. In the above embodiments, several specific steps are described and illustrated as examples. However, the method process of the present application is not limited to the specific steps described and illustrated. Those skilled in the art can make various changes, modifications, and additions, or change the order of the steps after understanding the spirit of the present application.
[0211] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium that can store or transmit information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROMs, flash memories, erasable ROMs (EROMs), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0212] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps. In other words, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
[0213] Aspects of the present disclosure have been described above with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor or a field programmable logic circuit. It is also understood that each box in the block diagram and / or flowchart and the combination of the boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0214] The above description is only a specific embodiment of the present application. Those skilled in the art will clearly understand that for the convenience and brevity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the scope of protection of the present application is not limited thereto. Any person skilled in the art can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the scope of protection of the present application.
Claims
1. A method for identifying abnormal communication card numbers, characterized in that: The method comprises: Obtaining the communication characteristics of the communication card number to be identified within a preset time period; The communication characteristics of the communication card number to be identified are input into the first base classifier of the abnormal communication card number identification model to obtain a first abnormal probability value that the communication card number to be identified is an abnormal card number and a first normal probability value that it is a normal card number; the communication characteristics of the communication card number to be identified are input into the second base classifier of the abnormal communication card number identification model to obtain a second abnormal probability value that the communication card number to be identified is an abnormal card number and a second normal probability value that it is a normal card number; the communication characteristics of the communication card number to be identified are input into the third base classifier of the abnormal communication card number identification model to obtain a third abnormal probability value that the communication card number to be identified is an abnormal card number and a third normal probability value that it is a normal card number; wherein, each base classifier of the abnormal communication card number identification model is trained using a semi-supervised method, and the loss function used in training each base classifier is obtained based on the weight coefficients of positive and negative samples, the probability that the sample output by the base classifier belongs to the abnormal communication card number, and the similarity between the sample and the sample center point, and the similarity between the sample and the sample center point is obtained based on a Gaussian kernel function; Whether the communication card number to be identified is abnormal is determined based on the abnormal probability value and the normal probability value output by each base classifier and the weight corresponding to each base classifier.
2. The method according to claim 1, characterized in that Before inputting the communication features of the communication card number to be identified into each base classifier of the abnormal communication card number identification model, the method further includes: Obtaining a first training sample set and a second training sample set, wherein the first training sample set includes communication features of communication card numbers and labels of communication card numbers, wherein the labels of communication card numbers are used to identify abnormal communication card numbers or normal communication card numbers, and the second training sample set includes communication features of communication card numbers; Screening out a first sub-training sample set, a second sub-training sample set, and a third sub-training sample set having differences from the first training sample set; Performing first-stage training on the initial first base classifier, the second base classifier, and the third base classifier according to the first sub-training sample set, the second sub-training sample set, and the third sub-training sample set, respectively, to obtain base classifiers after the first-stage training; For any one of the three base classifiers, perform the following operations to obtain a trained base classifier, set corresponding weights for each trained base classifier, and obtain an abnormal communication card number recognition model: perform the second stage training on the base classifier trained in the first stage according to the corresponding sub-training sample set and the second training sample set to obtain a trained base classifier.
3. The method according to claim 2, characterized in that The obtaining of the first training sample set and the second training sample set includes: Collecting communication data of a plurality of first sample communication card numbers and a plurality of second sample communication card numbers within a preset time period, respectively, wherein the communication data of each of the first sample communication card numbers and each of the second sample communication card numbers includes at least one of a calling frequency, a calling / calling ratio, traffic usage data, a number of device changes corresponding to the communication card, a number of changes in a permanent location, a number of changes in a commonly used base station, a number of changes in a home location, a registration location, a registration time, and a network access time; Preprocessing the communication data of the plurality of first sample communication card numbers and the plurality of second sample communication card numbers respectively to obtain communication features corresponding to the plurality of first sample communication card numbers and the plurality of second sample communication card numbers; Constructing a first training sample based on the communication characteristics of each first sample communication card number and its corresponding label to obtain the first training sample set; A second training sample is constructed according to the communication characteristics of each of the second sample communication card numbers to obtain the second training sample set.
4. The method according to claim 3, characterized in that The first stage of training the initial first base classifier, the second base classifier, and the third base classifier is performed according to the first sub-training sample set, the second sub-training sample set, and the third sub-training sample set, respectively, to obtain the base classifiers after the first stage of training, including: Inputting samples in the first sub-training sample set, the second sub-training sample set, and the third sub-training sample set into an initial first base classifier, a second base classifier, and a third base classifier, respectively, to obtain a first prediction result, a second prediction result, and a third prediction result; Calculating a loss function value according to the first prediction result, the second prediction result, the third prediction result, and their corresponding labels; updating the parameters of each base classifier according to the gradient information corresponding to the loss function value, and updating each base classifier according to the updated parameters of each base classifier; Determine each updated base classifier as the initial base classifier; Return and input the samples in the first sub-training sample set, the second sub-training sample set, and the third sub-training sample set into the initial first base classifier, the second base classifier, and the third base classifier respectively until the models of each base classifier converge, thereby obtaining each base classifier after the first stage of training.
5. The method according to claim 4, characterized in that The loss function is: Where y represents the sample label, p represents the probability value of the training sample output by the base classifier belonging to an abnormal communication card number, α represents the weight for balancing positive and negative samples, and r represents the degree of proximity between the training sample and the sample center; Where r is obtained by the following formula: Among them, σ represents the Gaussian kernel function parameter, x represents the training sample, cent i Represents class C i The sample center point, C i Represents the i-th category label dataset, and n is the total number of samples.
6. The method according to claim 2, characterized in that The following operations are performed on each of the three base classifiers to obtain a trained base classifier, and corresponding weights are set for each trained base classifier to obtain an abnormal communication card number recognition model: the base classifier trained in the first stage is trained in the second stage according to the corresponding sub-training sample set and the second training sample set to obtain a trained base classifier, including: Inputting samples in the second training sample set into each base classifier trained in the first stage respectively to obtain prediction results corresponding to each base classifier; For each sample in the second training sample set, the following operations are performed cyclically until an expanded sample set for each base classifier is obtained: In the case where the prediction results of two base classifiers among the three base classifiers are abnormal communication card numbers and the prediction result of the other base classifier is a normal communication card number, the abnormal communication card number is used as the label of the sample to obtain expanded sample data, and the expanded sample data is added to the expanded sample set of the other base classifier; The following operations are performed for each base classifier until a preset stopping condition is reached, thereby obtaining the first base classifier, the second base classifier, and the third base classifier trained in the second stage: The base classifier is trained according to the samples in the sub-training sample set and the samples in the expanded sample set corresponding to the base classifier to obtain a trained base classifier; Calculate the classification accuracy of the trained base classifier based on the prediction results of each sample and the labels of each sample; When the classification accuracy of this round is lower than that of the previous round, some samples are randomly deleted from the expanded sample set corresponding to the base classifier to obtain an updated expanded sample set; The base classifier is trained according to the samples in the sub-training sample set corresponding to the base classifier and the samples in the updated expanded sample set to obtain a trained base classifier; The weights of the base classifiers are set according to the classification accuracy of the trained base classifiers to obtain the abnormal communication card number recognition model.
7. The method according to any one of claims 1 to 6, characterized in that The determining whether the communication card number to be identified is abnormal based on the abnormal probability value and the normal probability value output by each base classifier and the weight corresponding to each base classifier includes: The target abnormality probability value is the sum of the product of the probability value of the communication card number to be identified belonging to the abnormal card number output by each base classifier of the abnormal communication card number recognition model and the weight corresponding to each base classifier; The target normal probability value is the sum of the product of the probability value of the communication card number to be identified belonging to a normal card number output by each base classifier of the abnormal communication card number identification model and the weight corresponding to each base classifier; Determine whether the communication card number to be identified is abnormal based on the target abnormal probability value and the target normal probability value.
8. A device for identifying abnormal communication card numbers, characterized in that: The device comprises: The first acquisition module is used to obtain the communication characteristics of the communication card number to be identified within a preset time period; An input module is configured to input the communication characteristics of the communication card number to be identified into a first base classifier of an abnormal communication card number identification model to obtain a first abnormal probability value that the communication card number to be identified is an abnormal card number and a first normal probability value that the communication card number to be identified is a normal card number; input the communication characteristics of the communication card number to be identified into a second base classifier of the abnormal communication card number identification model to obtain a second abnormal probability value that the communication card number to be identified is an abnormal card number and a second normal probability value that the communication card number to be identified is a normal card number; input the communication characteristics of the communication card number to be identified into a third base classifier of the abnormal communication card number identification model to obtain a third abnormal probability value that the communication card number to be identified is an abnormal card number and a third normal probability value that the communication card number to be identified is a normal card number; wherein each base classifier of the abnormal communication card number identification model is trained using a semi-supervised method, and the loss function used in training each base classifier is obtained based on weight coefficients of positive and negative samples, the probability that the sample output by the base classifier belongs to an abnormal communication card number, and the similarity between the sample and the sample center point, and the similarity between the sample and the sample center point is obtained based on a Gaussian kernel function; The determination module is used to determine whether the communication card number to be identified is abnormal based on the abnormal probability value and the normal probability value output by each base classifier and the weight corresponding to each base classifier.
9. A device for identifying abnormal communication card numbers, characterized in that: The device includes: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the method for identifying abnormal communication card numbers as described in any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer program instructions, which, when executed by a processor, implement the method for identifying abnormal communication card numbers as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Abnormal number identification method and device, storage medium and electronic equipment
CN116800886A
Abnormal number identification method and device, electronic equipment and storage medium
CN117939003A