Early warning method, device, electronic device and storage medium

By training the early warning model and flexibly determining the sample weight, the target number is judged, and the problem of inaccurate post-warning in the existing technology is solved, and more accurate pre-identification of fraud numbers is achieved.

CN115460610BActive Publication Date: 2024-12-10CHINA MOBILE GROUP JIANGSU +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202110636916.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-08
Publication Date
2024-12-10
Estimated Expiration
2041-06-08

AI Technical Summary

Technical Problem

The existing technology can only provide inaccurate post-warning, and cannot effectively identify whether the target number is a fraud number.

Method used

By training the early warning model, the sample weight is flexibly determined, and the detection data is determined based on the early warning model, to determine whether the target number is the waiting number, and to optimize the weight update process using the tree model and accelerate the convergence loss function to improve the generalization performance of the model.

Benefits of technology

More accurate pre-warning is achieved, and the inaccurate identification problem caused by fixed weights of early warning samples and non-warning samples in the prior art is overcome, and the accuracy of identification of target numbers is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115460610B_ABST
    Figure CN115460610B_ABST
Patent Text Reader

Abstract

The present invention provides an early warning method, device, electronic device and storage medium, the method comprising: obtaining data to be detected of a target number; judging the data to be detected based on an early warning model, and determining that the target number is a number to be warned; wherein the early warning model is obtained based on first sample data training; and the target weight of the first sample data is determined during the training process of the early warning model. The present invention can overcome the defect of inaccurate recognition caused by setting fixed weights for early warning samples and non-earning samples in the prior art, and can achieve more accurate advance early warning of the target number by flexibly determining the weight of the sample during training, and then training the early warning model, and judging the data to be detected through the early warning model, and determining that the target number is a number to be warned.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information processing technology, and in particular to an early warning method, device, electronic equipment and storage medium. Background Art

[0002] In order to locate fraudulent numbers, from a business perspective, by dividing the thresholds of sensitive features of telephone communications, a series of rules are formulated to determine whether a mobile phone number is a fraudulent number; on the other hand, from a data mining perspective, fraudulent and non-fraudulent mobile phone numbers are labeled, corresponding features are generated, and a classifier is constructed to classify new mobile phone numbers and determine whether they are fraudulent numbers or non-fraudulent numbers. However, at this stage, only inaccurate post-warning can be carried out. Summary of the invention

[0003] The present invention provides an early warning method, device, electronic device and storage medium, which are used to solve the defect that only inaccurate post-event early warning can be performed in the prior art, and realize accurate pre-event early warning through an early warning model.

[0004] In a first aspect, the present invention provides an early warning method, comprising:

[0005] Obtain the data to be detected of the target number;

[0006] Based on the early warning model, the data to be detected is judged to determine that the target number is a number to be warned;

[0007] Wherein, the early warning model is obtained based on the first sample data training;

[0008] The target weight of the first sample data is determined during the training process of the early warning model.

[0009] Optionally, according to the early warning method provided by the present invention, the method further includes:

[0010] For the weight of the first sample data, performing at least one weight updating process;

[0011] After it is determined that the number of times of the weight updating process reaches a preset number, the weight of the first sample data determined in the last weight updating process is used as the target weight of the first sample data.

[0012] Optionally, according to the early warning method provided by the present invention, the weight updating process includes:

[0013] Based on the target features of the first sample data, construct a tree model;

[0014] Determining a target gradient value of a first target sample based on the tree model and a current loss function;

[0015] Based on the target gradient value, updating the weight of the first target sample;

[0016] Based on the updated weight of the first target sample, the current loss function is updated.

[0017] Optionally, according to the early warning method provided by the present invention, the method further comprises constructing a first accelerated convergence loss function based on the absolute value of the gradient value of the early warning sample in the first sample data;

[0018] Based on the first accelerated convergence loss function, training the warning sample in the first sample data to obtain a first adjustment parameter value;

[0019] Constructing a second accelerated convergence loss function based on the absolute value of the gradient value of the non-warning sample in the first sample data;

[0020] Based on the second accelerated convergence loss function, training the non-warning samples in the first sample data to obtain a second adjustment parameter value;

[0021] The early warning model is obtained based on the first adjustment parameter value and the second adjustment parameter value.

[0022] Optionally, according to the early warning method provided by the present invention, the method further includes:

[0023] Extracting two first target features from the first sample data;

[0024] Based on the two first target features, determining the range values ​​of the two first target features;

[0025] Divide the extreme difference values ​​of the two first target features into N parts respectively, and obtain a position interval sequence of two extreme difference values;

[0026] Determine a two-dimensional feature derivative function based on the difference between the positions of the two first target features of the target sample in the first sample data in the position interval sequence of the two extreme difference values;

[0027] Determining two-dimensional feature data based on the two-dimensional feature derivative function;

[0028] The type of the first target feature is a numerical type, and N is a natural number greater than 1.

[0029] Optionally, according to the early warning method provided by the present invention, the method further includes:

[0030] Extracting a second target feature from the first sample data;

[0031] Determining a first splitting threshold set based on the mean of the second target feature;

[0032] Determining a second splitting threshold set based on the median of the second target feature;

[0033] Based on the set of the first splitting threshold set and the second splitting threshold set, a splitting threshold of the second target feature is determined.

[0034] Optionally, according to the early warning method provided by the present invention, the method further includes:

[0035] Based on a preset threshold, obtaining a first sample in the training sample whose gradient value is greater than the preset threshold;

[0036] Based on the number of the first samples, extracting samples whose gradient values ​​are less than the preset threshold from the training samples to obtain second samples;

[0037] The first sample data is determined based on a set of the first sample and the second sample.

[0038] In a second aspect, the present invention provides an early warning device, comprising:

[0039] An acquisition module is used to acquire the data to be detected of the target number;

[0040] A determination module, used to determine the data to be detected based on a fraud warning model, and determine that the target number is a number to be warned;

[0041] Wherein, the early warning model is obtained based on the first sample data training;

[0042] The target weight of the first sample data is determined during the training process of the early warning model.

[0043] In a third aspect, the present invention further provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the early warning method as described in the first aspect when executing the program.

[0044] In a fourth aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the early warning method as described in the first aspect.

[0045] The present invention provides an early warning method, device, electronic device and storage medium, which flexibly determines the weight of samples during training, thereby training an early warning model, and uses the early warning model to judge the data to be detected and determine that the target number is the number to be warned. This can overcome the defect of inaccurate recognition caused by setting fixed weights for warning samples and non-warning samples in the prior art, and can achieve more accurate advance warning of the target number. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0047] Figure 1 It is a flow chart of the early warning method provided by the present invention;

[0048] Figure 2 is a schematic diagram of a flow chart of sample weight updating provided by the present invention;

[0049] Figure 3 It is a schematic diagram of the two-dimensional feature derivation function flow provided by the present invention;

[0050] Figure 4 It is a schematic diagram of the sample feature splitting threshold flow provided by the present invention;

[0051] Figure 5 It is a schematic diagram of the sample screening process provided by the present invention;

[0052] Figure 6 It is a structural schematic diagram of the early warning device provided by the present invention;

[0053] Figure 7 The schematic diagram of the physical structure of an electronic device is illustrated. DETAILED DESCRIPTION

[0054] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0055] Figure 1 It is a schematic diagram of the process of the early warning method provided by the present invention, such as Figure 1 As shown, the method comprises the following steps:

[0056] Step 110, obtaining the data to be detected of the target number;

[0057] Optionally, the target number includes but is not limited to a target telephone number.

[0058] Optionally, the data to be detected may include voice and / or network data.

[0059] Optionally, the data to be detected includes: basic user information, mobile phone card and terminal information, voice package and behavior information, traffic package and behavior information, web browsing preferences and app browsing preferences.

[0060] Specifically, the features screened out from the data to be detected can be mainly divided into six categories. The first category can be the user's basic information, the second category can be the mobile phone card and terminal information, the third category can be the voice package and behavior information, the fourth category can be the traffic package and behavior information, the fifth category can be the network browsing preference, and the sixth category can be the app browsing preference.

[0061] Among them, the six types of features are specifically shown in Table 1-Table 6:

[0062] Table 1: User basic information table

[0063]

[0064] Table 2: Mobile phone card and terminal information

[0065]

[0066]

[0067] Table 3: Voice package and behavior information table

[0068]

[0069] Table 4: Data plan and behavior information table

[0070]

[0071]

[0072] Table 5: Web browsing preference table

[0073]

[0074] Table 6: App browsing preference table

[0075]

[0076] Optionally, the detailed features screened out from the above-mentioned data to be detected can be divided into numerical features and character features.

[0077] Optionally, the warning feature is a feature before the warning event occurs, rather than a feature after the event, so that the warning number can be quickly located before the warning event occurs; wherein, the warning event may include but is not limited to fraud events, and the warning number may include but is not limited to fraud numbers.

[0078] The present invention uses the detailed features in the six categories of features to not only analyze and warn the target number from the perspective of voice communication, but also analyze and warn the target number from the perspective of the network behavior performed by the target number. This is more in line with actual scenarios, has stronger model generalization performance, and can warn the target number more accurately and comprehensively.

[0079] Optionally, the data to be detected of the target number may be voice and / or network data of the target number within N days after the target number is applied for, where N is a natural number greater than 0.

[0080] Optionally, the data to be detected of the target number may be voice and / or network data of the target number within one week after the target number is applied for.

[0081] Optionally, based on actual scenarios, according to existing samples to be warned, trace back the voice and network features X and label y (warning) of the warning sample within four days of just applying, and combine them to generate the warning sample sample_1=(X, y); according to existing non-warning samples, trace back the voice and network features X and label y (non-warning) of the non-warning sample within four days of just applying, and trace back the voice and network features X and label y (non-warning) of the non-warning sample within N days of just applying, and combine them to generate a non-warning sample sample_2=(X, y); merge the warning sample and the non-warning sample to generate all samples.

[0082] Optionally, the warning samples may be fraud samples and non-fraud samples.

[0083] Step 120, based on the early warning model, judging the data to be detected, and determining that the target number is a number to be warned;

[0084] Wherein, the early warning model is obtained based on the first sample data training;

[0085] The target weight of the first sample data is determined during the training process of the early warning model.

[0086] The first sample data is sample data after weight update.

[0087] Optionally, through the early warning model, the target number is determined to be a number to be warned by taking the data to be detected of the target number as input.

[0088] Optionally, if the target number is a number to be warned, the target number is classified as a number to be warned, and when the target number communicates, a warning is given to the communication target, indicating that the target number is a warning number.

[0089] Optionally, if the target number is a number to be warned, the target number is classified as a fraud number, and when the target number communicates, a warning is given to the communication target, indicating that the target number is a fraud number.

[0090] For example, if the telephone number 12345678901 is determined to be a fraudulent number through the early warning model, when the telephone number makes a call to another terminal device, the other terminal device will be prompted that the telephone number is a fraudulent number.

[0091] Optionally, the first sample data is trained to obtain an early warning model, wherein the target weight of the first sample data is determined during the training process of the early warning model.

[0092] Specifically, during the training process, the weight of the sample is in a state of gradient decrease. Based on the gradient decrease principle, the present invention reconstructs the weight of the first sample data during the training process, so that the operator can accurately perform advance warning.

[0093] The present invention flexibly determines the weight of samples during training, thereby training an early warning model, and uses the early warning model to judge the data to be detected and determine that the target number is the number to be warned. This can overcome the defect of inaccurate recognition caused by setting fixed weights for warning samples and non-warning samples in the prior art, and can achieve more accurate advance warning of the target number.

[0094] Optionally, performing at least one weight updating process for the weight of the first sample data;

[0095] After it is determined that the number of times of the weight updating process reaches a preset number, the weight of the first sample data determined in the last weight updating process is used as the target weight of the first sample data.

[0096] Optionally, at least one weight updating process is performed for the weights of all samples in the first sample data, and after it is determined that the number of weight updating processes reaches a preset number, the weights of all samples of the first sample data determined in the last weight updating process are used as the target weights of the first sample data. The preset number may be a natural number greater than 1.

[0097] Optionally, the first sample data may generate different gradient values ​​during the training process, and the weights of all samples in the first sample data are updated based on the different gradient values, wherein the gradient value includes the value corresponding to the direction in which the loss of the first sample data decreases fastest during the training process.

[0098] The present invention reconstructs the sample weight update mechanism by performing multiple weight update processes on the weight of the first sample data and incorporates it into the loss function, thereby improving the generalization performance of the model.

[0099] Optionally, the weight updating process includes:

[0100] Based on the target features of the first sample data, construct a tree model;

[0101] Determining a target gradient value of a first target sample based on the tree model and a current loss function;

[0102] Based on the target gradient value, updating the weight of the first target sample;

[0103] Based on the updated weight of the first target sample, the current loss function is updated.

[0104] Optionally, the target features of the first sample data are six major categories of features extracted from the first sample data and detailed features in the six major categories of features.

[0105] Optionally, the number of warning samples and non-warning samples are n_1 and n_0 respectively, the ratio is 1:K, and the number of tree models constructed by XGBOOST is m, where K can be a natural number greater than 1, and m can be a natural number greater than 1.

[0106] Optionally, XGBOOST can construct a tree model with the six major categories of features in the first sample data and the detailed features in the six major categories of features as nodes.

[0107] Optionally, the preset number may be the number of all constructed tree models.

[0108] Optionally, the weight update step is as follows:

[0109] A, Sample weight initialization. The warning sample weight weight_1 can be 1, and the non-warning sample weight weight_2 is 1 / k, where k can be a natural number greater than 1.

[0110] B. Each time XGBOOST builds a tree model, it updates the sample weight of each sample based on the target gradient value calculated by the current loss function. The update formula is as follows:

[0111] for i in range(n_1+n_0):

[0112] for j in range(2,m):

[0113]

[0114] Where γ is the updated learning rate, which is a hyperparameter. i is the gradient of the loss function to the predicted value, and the calculation formula is as follows:

[0115]

[0116] Figure 2 is a schematic diagram of the sample weight update process provided by the present invention. The sample weight update process of the first sample data is as follows: Figure 2 shown.

[0117] Optionally, the update of sample weights is that each tree model calculates a target gradient value based on the current loss function. After the weights of all samples are updated, the weights are brought into the loss function of the next tree model, and the target gradient value is calculated again. The cycle continues until the number of constructed tree models reaches a preset value, wherein the preset value shown can be a natural number greater than or equal to 1, and the preset value can also be the number of all constructed tree models.

[0118] Optionally, the loss function of each tree model is:

[0119]

[0120] Among them, obj t refers to the objective function of the t-th tree model, It refers to the regularization term of the first t tree models.

[0121] The updating of sample weights in the present invention is only related to the target gradient value of the sample, and can be calculated in parallel when updating sample weights, thereby reducing the calculation time and solving the problem of imbalance in the amount of data between warning samples and non-warning samples in the target number warning scenario.

[0122] Optionally, based on the absolute value of the gradient value of the warning sample in the first sample data, a first accelerated convergence loss function is constructed;

[0123] Based on the first accelerated convergence loss function, training the warning sample in the first sample data to obtain a first adjustment parameter value;

[0124] Constructing a second accelerated convergence loss function based on the absolute value of the gradient value of the non-warning sample in the first sample data;

[0125] Based on the second accelerated convergence loss function, training the non-warning samples in the first sample data to obtain a second adjustment parameter value;

[0126] The early warning model is obtained based on the first adjustment parameter value and the second adjustment parameter value.

[0127] Optionally, the warning samples in the first sample data are trained through a first accelerated convergence loss function, and the parameter values ​​in the warning model are adjusted. The non-warning samples in the first sample data are trained through a second accelerated convergence loss function, and the parameter values ​​in the warning model are adjusted. After all samples in all the first sample data are trained, the warning model is obtained.

[0128] Optionally, different classification problems generally use a logarithmic loss function, which may be an XGBOOST loss function, and its calculation formula is as follows:

[0129]

[0130] Optionally, for the warning samples in the first sample data, a first accelerated convergence loss function is constructed by calculating the absolute value of the gradient value. For the non-warning samples in the first sample data, a second accelerated convergence loss function is constructed by calculating the absolute value of the gradient value.

[0131] Specifically, let the label y i =1 indicates a warning sample, y i =0 indicates a non-warning sample. The constructed accelerated convergence loss function is shown in the following formula 1-formula 3:

[0132] Formula 1:

[0133] Formula 2:

[0134] Formula 3:

[0135] Among them, t1 and t2 are hyperparameters set according to actual needs, and are values ​​set by continuous attempts before early warning model training to enable the loss function to converge quickly. Among them, hyperparameters can be parameters set before starting model training.

[0136] Formula 2 represents the first accelerated convergence loss function. In Formula 2, when When it is less than or equal to 0, the absolute value of the gradient is The quadratic term of Between 0 and 1, the absolute value of the gradient is One-time term; when When it is greater than 1, the absolute value of the gradient is The fourth-order term is the inverse. It shows that in y i When =1, the greater the loss, the greater the absolute value of the gradient, and the faster the loss function converges.

[0137] Formula 2 represents the second accelerated convergence loss function. In Formula 3, when When it is less than or equal to 0, the absolute value of the gradient is The fourth term of Between 0 and 1, the absolute value of the gradient is One-time term; when When it is greater than 1, the absolute value of the gradient is The quadratic term. i = 0, the greater the loss, the greater the absolute value of the gradient, and the faster the loss function converges.

[0138] The present invention constructs a first accelerated convergence loss function through warning samples and a second accelerated convergence loss function through non-warning samples, thereby improving the model fitting speed and reducing the training time.

[0139] Optionally, extracting two first target features from the first sample data;

[0140] Based on the two first target features, determining the range values ​​of the two first target features;

[0141] Divide the extreme difference values ​​of the two first target features into N parts respectively, and obtain a position interval sequence of two extreme difference values;

[0142] Determine a two-dimensional feature derivative function based on the difference between the positions of the two first target features of the target sample in the first sample data in the position interval sequence of the two extreme difference values;

[0143] Determining two-dimensional feature data based on the two-dimensional feature derivative function;

[0144] The type of the first target feature is a numerical type, and N is a natural number greater than 1.

[0145] Optionally, two first target features of numerical type of the first sample data are selected, two extreme value values ​​of the two first target features are determined, the two extreme value values ​​are divided into N parts, a position interval sequence of the two extreme value values ​​is obtained, a sample in the first sample data is selected, the position difference between the two first target features of the sample in the position interval sequence of the two extreme value values ​​is calculated, and the two-dimensional feature derivative function of the two first target features is determined.

[0146] Specifically, Figure 3 It is a schematic diagram of the two-dimensional feature derivative function flow provided by the present invention, and its steps are as follows:

[0147] First, select two numerical variables x_i and x_j in the first sample data, find the maximum and minimum values ​​x_i_max, x_i_min, x_j_max, x_j_min of the two variables respectively, then calculate the ranges x_i_R and x_j_R, and finally divide the ranges into equal-frequency bins, with the number of bins being N.

[0148] Second, select the sample data sample_i in the first sample data, the sample values ​​on x_i and x_j are xi and xj respectively, calculate the position of x1 in the equal division of the variable, assume the position is k_i, similarly, calculate the position k_j of xj in the equal division of the variable, and construct a two-dimensional derivative function based on k_i and k_j. If k_i and k_j are equal, the derived feature is (1, 0). If k_i and k_j are not equal, the derived feature is (0, k_i-k_j). The expression is as follows:

[0149]

[0150] Specifically, the feature vector derived from the two-dimensional feature derivative function records whether the positions of the samples on the two numerical variables are consistent. If they are consistent, it indicates that the difference between the positions on the two variables is 0. Therefore, the derived feature vector is (1, 0), where 1 in the vector indicates consistent positions and 0 indicates the difference between the positions. If they are inconsistent, (0, k_i-k_j) is used, where 0 indicates inconsistent positions and k_i-k_j indicates the difference between the positions.

[0151] Optionally, according to the two-dimensional feature derivative function, two-dimensional feature derivative data may be extracted, and the two-dimensional feature derivative data may be added as a new feature to the first sample data for training.

[0152] The present invention constructs a two-dimensional feature derivative function through two numerical features, reduces the dimension of calculation between numerical features, reduces the amount of calculation for final model fitting, captures the position information of the sorting between features, generates new feature data, and improves model performance.

[0153] Optionally, extracting a second target feature from the first sample data;

[0154] Determining a first splitting threshold set based on the mean of the second target feature;

[0155] Determining a second splitting threshold set based on the median of the second target feature;

[0156] Based on the set of the first splitting threshold set and the second splitting threshold set, a splitting threshold of the second target feature is determined.

[0157] Optionally, a second target feature is extracted from the first sample data, and a mean and a median of the second target feature are calculated.

[0158] A first splitting threshold set is determined according to the mean value of the second target feature.

[0159] A second splitting threshold set is determined according to the median of the second target feature.

[0160] Optionally, based on the second target feature extracted from the first sample data, a standard deviation of the second target feature is calculated,

[0161] Optionally, a first splitting threshold is obtained based on the mean of the second target feature plus the standard deviation of the second target feature,

[0162] Based on the mean of the second target feature, the standard deviation of the second target feature is subtracted to obtain a second splitting threshold,

[0163] Determine a first splitting threshold set based on the first splitting threshold and the second splitting threshold;

[0164] Optionally, a third splitting threshold is obtained based on the median of the second target feature plus the standard deviation of the second target feature,

[0165] Based on the median of the second target feature, subtract the standard deviation of the second target feature to obtain a fourth splitting threshold,

[0166] Determine a second splitting threshold set based on the third splitting threshold and the fourth splitting threshold;

[0167] The splitting threshold of the second target feature of the first sample data may be a set of a first splitting threshold set and a second splitting threshold set.

[0168] Optionally, the mean, median and standard deviation of the features of the first sample data are calculated, and the mean plus double the standard deviation is calculated to obtain value v1, the standard deviation minus one is calculated to obtain value v2, the mean plus two times the standard deviation is calculated to obtain value v3, the standard deviation minus two is calculated to obtain value v4, the mean plus three times the standard deviation is calculated to obtain value v5, the standard deviation minus three is calculated to obtain value v6, the median plus double the standard deviation is calculated to obtain value v7, the standard deviation minus one is calculated to obtain value v8, the median plus two times the standard deviation is calculated to obtain value v9, the standard deviation minus two is calculated to obtain value v10, the median plus three times the standard deviation is calculated to obtain value v11, the standard deviation minus three is calculated to obtain value v12. These twelve values ​​can be used as split thresholds, and the features can be split based on these split thresholds to calculate subsequent evaluation indicators.

[0169] Figure 4 : is a schematic diagram of the sample feature splitting threshold flow provided by the present invention, such as Figure 4 shown.

[0170] The present invention calculates the splitting threshold through the mean, median and standard deviation of the characteristics of the first sample data, thereby improving the calculation speed of the early warning model.

[0171] Optionally, based on a preset threshold, obtaining a first sample in the training sample whose gradient value is greater than the preset threshold;

[0172] Based on the number of the first samples, extracting samples whose gradient values ​​are less than the preset threshold from the training samples to obtain second samples;

[0173] The first sample data is determined based on a set of the first sample and the second sample.

[0174] Specifically, the gradient values ​​of the training samples calculated in the previous round are sorted, a preset gradient value threshold is set, and all samples greater than the preset threshold are retained to obtain the first sample.

[0175] Specifically, samples smaller than a preset threshold are sampled, and the number of the sampled samples is consistent with the number of the first samples, to obtain a second sample.

[0176] The first sample data may be a set of a first sample and a second sample.

[0177] Optionally, samples smaller than a preset threshold may be sampled multiple times.

[0178] Optionally, the number of samples extracted that are greater than a preset threshold is m, the number of samples extracted that are less than the preset threshold is repeated n times, and the number of calculations for the final samples is 2mn times.

[0179] Figure 5 is a schematic diagram of the sample screening process provided by the present invention. The sample screening process of the first sample data is as follows Figure 5 shown.

[0180] Optionally, the present invention can evaluate the optimized model through performance evaluation indicators to evaluate the effectiveness of the model, thereby having a general understanding of the accuracy of the model in predicting future fraudulent numbers.

[0181] For example, using the ROC curve and the corresponding AUC value as evaluation indicators, the ROC curve data generated in the test set are: ROC fold 0.00 (area = 0.82), ROC fold1.00 (area = 0.81), ROC fold 0.20 (area = 0.82), ROC fold 3.00 (area = 0.81), ROC fold 4.00 (area = 0.81), ROC fold 5.00 (area = 0.82), among which the mean AUC under the ROC curve is 0.81, and the fraud model has good classification performance and can be applied to actual scenarios.

[0182] In the process of model training, the loss function needs to use all sample information when calculating the segmentation standard index. The present invention adopts the method of setting the gradient value threshold to sample the training samples and calculate the segmentation standard index, which greatly improves the calculation speed of the early warning model and reduces the training time of the early warning model.

[0183] The present invention flexibly determines the weight of samples during training, thereby training an early warning model, and uses the early warning model to judge the data to be detected and determine that the target number is the number to be warned. This can overcome the defect of inaccurate recognition caused by setting fixed weights for warning samples and non-warning samples in the prior art, and can achieve more accurate advance warning of the target number.

[0184] The early warning device provided by the present invention is described below. The early warning device described below and the early warning method described above can be referenced to each other.

[0185] Figure 6 Schematic diagram of the structure of the early warning device provided by the present invention. Figure 6 As shown, the early warning device includes: an acquisition module 610 and a determination module 620, wherein:

[0186] An acquisition module is used to acquire the data to be detected of the target number;

[0187] A determination module, used to determine the data to be detected based on a fraud warning model, and determine that the target number is a number to be warned;

[0188] Wherein, the early warning model is obtained based on the first sample data training;

[0189] The target weight of the first sample data is determined during the training process of the early warning model.

[0190] Optionally, the determination module 620 uses the data to be detected of the target number obtained by the acquisition module 610 as input, and judges the data to be detected through the warning model of the weight of the first sample data determined in the training process to determine that the target number is a number to be warned.

[0191] The present invention flexibly determines the weight of samples during training, thereby training an early warning model, and uses the early warning model to judge the data to be detected and determine that the target number is the number to be warned. This can overcome the defect of the prior art that only post-warning can be performed, and can achieve more accurate pre-warning of the target number.

[0192] Optionally, the device further comprises:

[0193] For the weight of the first sample data, performing at least one weight updating process;

[0194] After it is determined that the number of times of the weight updating process reaches a preset number, the weight of the first sample data determined in the last weight updating process is used as the target weight of the first sample data.

[0195] Optionally, the weight updating process includes:

[0196] Based on the target features of the first sample data, construct a tree model;

[0197] Determining a target gradient value of a first target sample based on the tree model and a current loss function;

[0198] Based on the target gradient value, updating the weight of the first target sample;

[0199] Based on the updated weight of the first target sample, the current loss function is updated.

[0200] Optionally, the device further comprises constructing a first accelerated convergence loss function based on the absolute value of the gradient value of the warning sample in the first sample data;

[0201] Based on the first accelerated convergence loss function, training the warning sample in the first sample data to obtain a first adjustment parameter value;

[0202] Constructing a second accelerated convergence loss function based on the absolute value of the gradient value of the non-warning sample in the first sample data;

[0203] Based on the second accelerated convergence loss function, training the non-warning samples in the first sample data to obtain a second adjustment parameter value;

[0204] The early warning model is obtained based on the first adjustment parameter value and the second adjustment parameter value.

[0205] Optionally, extracting two first target features from the first sample data;

[0206] Based on the two first target features, determining the range values ​​of the two first target features;

[0207] Divide the extreme difference values ​​of the two first target features into N parts respectively, and obtain a position interval sequence of two extreme difference values;

[0208] Determine a two-dimensional feature derivative function based on the difference between the positions of the two first target features of the target sample in the first sample data in the position interval sequence of the two extreme difference values;

[0209] Determining two-dimensional feature data based on the two-dimensional feature derivative function;

[0210] The type of the first target feature is a numerical type, and N is a natural number greater than 1.

[0211] Optionally, extracting a second target feature from the first sample data;

[0212] Determining a first splitting threshold set based on the mean of the second target feature;

[0213] Determining a second splitting threshold set based on the median of the second target feature;

[0214] Based on the set of the first splitting threshold set and the second splitting threshold set, a splitting threshold of the second target feature is determined.

[0215] Optionally, based on a preset threshold, obtaining a first sample in the training sample whose gradient value is greater than the preset threshold;

[0216] Based on the number of the first samples, extracting samples whose gradient values ​​are less than the preset threshold from the training samples to obtain second samples;

[0217] The first sample data is determined based on a set of the first sample and the second sample.

[0218] Optionally, the data to be detected includes: basic user information, mobile phone card and terminal information, voice package and behavior information, traffic package and behavior information, web browsing preferences and app browsing preferences.

[0219] Figure 7 The physical structure diagram of the electronic device is shown as an example. Figure 7 As shown, the electronic device may include: a processor 710, a communication interface 720, a memory 730 and a communication bus 740, wherein the processor 710, the communication interface 720 and the memory 730 communicate with each other through the communication bus 740. The processor 710 may call the logic instructions in the memory 730 to execute the early warning method, which includes:

[0220] Obtain the data to be detected of the target number;

[0221] Based on the early warning model, the data to be detected is judged to determine that the target number is a number to be warned;

[0222] Wherein, the early warning model is obtained based on the first sample data training;

[0223] The target weight of the first sample data is determined during the training process of the early warning model.

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

[0225] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the early warning method provided above is implemented, and the method comprises:

[0226] Obtain the data to be detected of the target number;

[0227] Based on the early warning model, the data to be detected is judged to determine that the target number is a number to be warned;

[0228] Wherein, the early warning model is obtained based on the first sample data training;

[0229] The target weight of the first sample data is determined during the training process of the early warning model.

[0230] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0231] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0232] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. An early warning method, characterized in that: include: Obtain the data to be detected of the target number; Based on the early warning model, the data to be detected is judged to determine that the target number is a number to be warned; Wherein, the early warning model is obtained based on the first sample data training; The target weight of the first sample data is determined during the training process of the early warning model; For the weight of the first sample data, performing at least one weight updating process; After determining that the number of times of the weight updating process reaches a preset number, taking the weight of the first sample data determined in the last weight updating process as the target weight of the first sample data; The weight updating process comprises: Based on the target features of the first sample data, construct a tree model; Determining a target gradient value of a first target sample based on the tree model and a current loss function; Based on the target gradient value, updating the weight of the first target sample; Based on the updated weight of the first target sample, updating the current loss function; Constructing a first accelerated convergence loss function based on the absolute value of the gradient value of the warning sample in the first sample data; Based on the first accelerated convergence loss function, training the warning sample in the first sample data to obtain a first adjustment parameter value; Constructing a second accelerated convergence loss function based on the absolute value of the gradient value of the non-warning sample in the first sample data; Based on the second accelerated convergence loss function, training the non-warning samples in the first sample data to obtain a second adjustment parameter value; Based on the first adjustment parameter value and the second adjustment parameter value, obtaining the early warning model; Let label y i =1 indicates a warning sample, =0 indicates a non-warning sample. The constructed accelerated convergence loss function is shown in the following formula 1-formula 3: Formula 1: , Formula 2: , Formula 3: , Among them, t1 and t2 are hyperparameters set according to actual needs. They are values ​​set by continuous attempts before early warning model training to enable the loss function to converge quickly. Among them, hyperparameters are parameters set before starting model training.

2. The early warning method according to claim 1, characterized in that: The method further comprises: Extracting two first target features from the first sample data; Based on the two first target features, determining the range values ​​of the two first target features; Divide the extreme difference values ​​of the two first target features into N parts respectively, and obtain a position interval sequence of two extreme difference values; Determine a two-dimensional feature derivative function based on the difference between the positions of the two first target features of the target sample in the first sample data in the position interval sequence of the two extreme difference values; Determining two-dimensional feature data based on the two-dimensional feature derivative function; The type of the first target feature is a numerical type, and N is a natural number greater than 1.

3. The early warning method according to claim 1, characterized in that: The method further comprises: Extracting a second target feature from the first sample data; Determining a first splitting threshold set based on the mean of the second target feature; Determining a second splitting threshold set based on the median of the second target feature; Based on the set of the first splitting threshold set and the second splitting threshold set, a splitting threshold of the second target feature is determined.

4. The early warning method according to claim 1, characterized in that: The method further comprises: Based on a preset threshold, obtaining a first sample in the training sample whose gradient value is greater than the preset threshold; Based on the number of the first samples, extracting samples whose gradient values ​​are less than the preset threshold from the training samples to obtain second samples; The first sample data is determined based on a set of the first sample and the second sample.

5. An early warning device, characterized in that: include: An acquisition module is used to acquire the data to be detected of the target number; A determination module, used to determine the data to be detected based on a fraud warning model, and determine that the target number is a number to be warned; Wherein, the early warning model is obtained based on the first sample data training; The target weight of the first sample data is determined during the training process of the early warning model; The device also includes: For the weight of the first sample data, performing at least one weight updating process; After determining that the number of times of the weight updating process reaches a preset number, taking the weight of the first sample data determined in the last weight updating process as the target weight of the first sample data; The weight updating process comprises: Based on the target features of the first sample data, construct a tree model; Determining a target gradient value of a first target sample based on the tree model and a current loss function; Based on the target gradient value, updating the weight of the first target sample; Based on the updated weight of the first target sample, updating the current loss function; The device also includes constructing a first accelerated convergence loss function based on the absolute value of the gradient value of the warning sample in the first sample data; Based on the first accelerated convergence loss function, training the warning sample in the first sample data to obtain a first adjustment parameter value; Constructing a second accelerated convergence loss function based on the absolute value of the gradient value of the non-warning sample in the first sample data; Based on the second accelerated convergence loss function, training the non-warning samples in the first sample data to obtain a second adjustment parameter value; Based on the first adjustment parameter value and the second adjustment parameter value, obtaining the early warning model; Let label y i =1 indicates a warning sample, =0 indicates a non-warning sample. The constructed accelerated convergence loss function is shown in the following formula 1-formula 3: Formula 1: , Formula 2: , Formula 3: , Among them, t1 and t2 are hyperparameters set according to actual needs. They are values ​​set by continuous attempts before early warning model training to enable the loss function to converge quickly. Among them, hyperparameters are parameters set before starting model training.

6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the early warning method according to any one of claims 1 to 4 are implemented.

7. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the early warning method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Telecommunication fraud method for virtual number segments

    CN106385693A

  • Machine learning model training method and device

    CN106548210A

  • Abnormal sample detection method and device

    CN110414555A

  • Systems and methods for automatically conducting risk assessments for telephony communications

    US20180324297A1

  • Machine learning model training method and apparatus, server, and storage medium

    US20190318202A1