A method, device and equipment for risk prevention and control of events
Through the two-stage risk control model combined with risk control strategies and data-driven risk control model, the data bias and insufficient positive samples in risk control model training are solved, the accuracy and generalization of risk prevention and control are improved, and the more Excellent risk prevention and control effect.
Patent Information
- Application Number
- CN202210334912.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-31
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2042-03-31
AI Technical Summary
The existing risk control model has inconsistent data distribution due to the removal of training samples, and there is bias, and the number of positive samples is small, making it difficult to train an effective risk control model. The risk control strategy coverage rate is low but the accuracy rate is high, making it difficult to achieve better. risk prevention and control plan.
Using a two-stage risk prevention and control method, firstly use the risk control strategy to build an initial risk control model for risk detection, obtain the initial risk information, and then input it into the trained second risk control model to carry out further risks through a data-driven method. Evaluate to ensure the generalization and accuracy of the model.
Through the combination of two-stage models, small sample problems and data bias problems are solved, the accuracy and generalization of risk prevention and control are improved, and risk events can be detected and prevented and controlled more effectively.
Smart Images

Figure CN114723269B_ABST
Abstract
Description
Technical Field
[0001] This document relates to the field of computer technology, and in particular to a method, device and equipment for risk prevention and control of an event. Background Art
[0002] With the continuous development of network technology, handling certain business through the Internet has become an important way of handling business. As the business volume and data volume continue to increase, data risks are also increasing. This requires risk prevention and control of many online businesses to avoid information leakage and even resource loss among users.
[0003] In the risk control system, risk control can usually be achieved through risk control strategies and risk control models. However, in the case of risk control models, risk control models rely on training samples. Since the training samples rejected by the risk control system cannot obtain their real label information, the above training samples will be eliminated during model training. In this way, the data distribution of the remaining training samples after elimination is inconsistent with the actual data or the data distribution of the training samples before elimination. In addition, the eliminated training samples are often training samples with a higher probability of risk, which causes the training samples for training the risk control model to be biased. In addition, the number of positive samples in the above training samples is often relatively small, making it difficult to train the risk control model. In the case of risk control strategies, risk control strategies are the embodiment of the knowledge and experience of risk control experts. Risk control strategies often have low coverage, but their accuracy is high. Therefore, it is necessary to provide a risk control solution with better generalization and higher accuracy of risk control. Summary of the invention
[0004] The purpose of the embodiments of this specification is to provide a risk prevention and control solution with better generalization and higher accuracy of risk prevention and control.
[0005] In order to implement the above technical solution, the embodiments of this specification are implemented as follows:
[0006] An embodiment of the present specification provides a method for risk prevention and control of an event, the method comprising: obtaining event data to be processed of a target event. Based on the event data and a first risk control model corresponding to the target event, determine the risk detection result corresponding to the first risk control model, the first risk control model being a model constructed by a risk control strategy corresponding to the target event. Based on the risk detection result corresponding to the first risk control model, determine the initial risk information corresponding to the event data, and input the initial risk information corresponding to the event data and the event data into a second risk control model corresponding to the target event to obtain the risk information corresponding to the event data, the second risk control model being a model obtained by model training using event data samples corresponding to the target event.
[0007] An embodiment of the present specification provides a risk prevention and control device for an event, the device comprising: a data acquisition module, which acquires the event data to be processed of the target event. A first risk detection module, which determines the risk detection result corresponding to the first risk control model based on the event data and the first risk control model corresponding to the target event, wherein the first risk control model is a model constructed by the risk control strategy corresponding to the target event. A risk determination module, which determines the initial risk information corresponding to the event data based on the risk detection result corresponding to the first risk control model, and inputs the initial risk information corresponding to the event data and the event data into a second risk control model corresponding to the target event to obtain the risk information corresponding to the event data, wherein the second risk control model is a model obtained by model training through event data samples corresponding to the target event.
[0008] An embodiment of the present specification provides a risk prevention and control device for an event, the risk prevention and control device for the event comprising: a processor; and a memory arranged to store computer executable instructions, wherein the executable instructions, when executed, cause the processor to: obtain event data to be processed for a target event. Based on the event data and a first risk control model corresponding to the target event, determine a risk detection result corresponding to the first risk control model, wherein the first risk control model is a model constructed by a risk control strategy corresponding to the target event. Based on the risk detection result corresponding to the first risk control model, determine the initial risk information corresponding to the event data, and input the initial risk information corresponding to the event data and the event data into a second risk control model corresponding to the target event to obtain the risk information corresponding to the event data, wherein the second risk control model is a model obtained by model training using event data samples corresponding to the target event.
[0009] The embodiments of this specification also provide a storage medium, which is used to store computer executable instructions. When the executable instructions are executed by a processor, they implement the following process: obtain the event data to be processed of the target event. Based on the event data and the first risk control model corresponding to the target event, determine the risk detection result corresponding to the first risk control model, and the first risk control model is a model constructed by the risk control strategy corresponding to the target event. Based on the risk detection result corresponding to the first risk control model, determine the initial risk information corresponding to the event data, and input the initial risk information corresponding to the event data and the event data into the second risk control model corresponding to the target event to obtain the risk information corresponding to the event data, and the second risk control model is a model obtained by model training through the event data sample corresponding to the target event. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0011] Figure 1 This is an example of a risk prevention and control method for an event in this specification;
[0012] Figure 2 This is a schematic diagram of the structure of a risk prevention and control system for an event in this manual;
[0013] Figure 3 A schematic diagram of the risk prevention and control process of another event in this manual;
[0014] Figure 4 This is an embodiment of a risk prevention and control device for an event in this specification;
[0015] Figure 5 This is an example of a risk prevention and control device for an event in this specification. DETAILED DESCRIPTION
[0016] The embodiments of this specification provide a method, device and equipment for risk prevention and control of an event.
[0017] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.
[0018] Embodiment 1
[0019] like Figure 1 As shown, an embodiment of this specification provides a method for risk prevention and control of an event, and the execution subject of the method can be a terminal device or a server, wherein the terminal device can be a mobile terminal device such as a mobile phone, a tablet computer, or a computer device such as a laptop or a desktop computer, or an IoT device (specifically a smart watch, a car device, etc.), etc. The server can be an independent server or a server cluster composed of multiple different servers. In this embodiment, the server is used as the execution subject for detailed description. For the case where the execution subject is a terminal device, it can be executed based on the following content, which will not be repeated here. The method can specifically include the following steps:
[0020] In step S102, the event data to be processed of the target event is obtained.
[0021] Among them, the target event can be any event that requires risk prevention and control. For example, the target event can be a payment event, a transfer event, or an access event to certain data, etc. It can be set according to actual conditions, and the embodiments of this specification do not limit this.
[0022] In implementation, with the continuous development of network technology, handling certain business through the Internet has become an important way of handling business. As the business volume and data volume continue to increase, data risks have also increased. This requires risk prevention and control of many online businesses to avoid information leakage and even resource loss among users.
[0023] In the risk prevention and control system, risk prevention and control can usually be achieved through risk control strategies and risk control models. However, in the case of risk control models, the risk control model relies on training samples. Since the training samples rejected by the risk prevention and control system cannot obtain their real label information, the above training samples will be eliminated during model training. In this way, the data distribution of the remaining training samples after elimination is inconsistent with the actual data or the data distribution of the training samples before elimination, and the eliminated training samples are often training samples with a higher probability of risk, which causes the training samples for training the risk control model to be biased. In addition, the number of positive samples in the above training samples is often relatively small, making it difficult to train the risk control model. In the case of risk control strategies, risk control strategies are the embodiment of the knowledge and experience of risk control experts. Risk control strategies often have low coverage, but their accuracy is high. For this reason, it is necessary to provide a risk prevention and control solution with better generalization and higher accuracy of risk prevention and control. The embodiments of this specification provide a feasible implementation method, and specific references can be made to the following contents:
[0024] When risk prevention and control is required for the target event, the event data generated when the user executes the target event can be obtained in real time, and the obtained event data can be used as the event data to be processed for the target event. For example, taking the target event as a transfer event, Figure 2As shown, when a user sends a transfer request to the server through a designated application installed in his terminal device, the server can analyze the transfer request and extract the account information of the transferor, the transfer amount, and the information of the target account of the transfer. In addition, data related to the above transfer event can also be obtained, such as the relevant data of the transferor (such as the relevant data of the complaint or the complaint), the relevant data of the target account (such as the relevant data of the complaint or the complaint), the association relationship between the transferor and the user of the target account, etc., which can be set according to actual conditions. The above-mentioned acquired data can be used as the event data to be processed for the transfer event.
[0025] In step S104, based on the above event data and the first risk control model corresponding to the target event, a risk detection result corresponding to the first risk control model is determined, where the first risk control model is a model constructed by the risk control strategy corresponding to the target event.
[0026] Among them, the risk detection result can be the result of detecting whether there is a risk in a certain event data. The risk detection result can include multiple, and accordingly, the first risk control model can also include multiple, each first risk control model can perform risk detection on the above event data to obtain the corresponding risk detection result. The risk control strategy can be a strategy for risk prevention and control set by risk control experts based on expert experience and knowledge. The risk control strategy can be one or more, and the risk control strategy can be composed of one or more different conditions. For example, the risk control strategy can include not more than 18 years old and online time of more than 2 hours, etc., which can be set according to actual conditions.
[0027] In implementation, taking into account that the risk control strategy is the embodiment of the knowledge and experience of risk control experts and has the advantages of high accuracy, a corresponding model (i.e., the first risk control model) can be constructed based on the risk control strategy. Specifically, since the risk control strategy is usually composed of multiple different conditions through a preset logical operation relationship, each condition in the risk control strategy can contain three elements, namely: feature, comparison value and logical operator. For example, the following risk control strategy: (feture1>1orfeautre1<0)andfeautre2! =-1and feature3>0, the above risk control strategy consists of 4 conditions (i.e., feture1>1, feature1<0, feature2!=-1 and feature3>0) and 3 logical operation relationships (i.e., or, and and and), each condition includes features (i.e., feture1, feture1, feture2 and feture3), comparison values (1, 0, -1 and 0) and logical operators (>, <, != and >). Based on the above characteristics of the risk control strategy, each risk control strategy can be converted into a classification model, which can be constructed by a preset classification algorithm. For example, the classification model can be constructed by an algorithm such as a Bayesian classification algorithm, a neural network algorithm, a k-nearest neighbor algorithm or a support vector machine SVM (Support Vector Machine). The constructed classification model can be used as the first risk control model. Based on the classification algorithm and the conditions (including features, comparison values and logical operators) in each risk control strategy, a classification model (i.e., the first risk control model) can be constructed for each risk control strategy. In this way, for multiple risk control strategies corresponding to the target event, multiple first risk control models can be obtained.
[0028] Each risk control strategy can be used to match the above event data separately, that is, the above event data can be input into each first risk control model separately to obtain the risk detection results output by each first risk control model. For example, the risk control strategies include risk control strategy 1, risk control strategy 2 and risk control strategy 3, and each risk control strategy corresponds to a first risk control model. The above event data can be input into the first risk control model corresponding to risk control strategy 1 to obtain the corresponding risk detection results. Similarly, the above event data can be input into the first risk control model corresponding to risk control strategy 2 to obtain the corresponding risk detection results. The above event data can be input into the first risk control model corresponding to risk control strategy 3 to obtain the corresponding risk detection results.
[0029] In step S106, the initial risk information corresponding to the above-mentioned event data is determined based on the risk detection result corresponding to the first risk control model, and the initial risk information corresponding to the event data and the event data are input into the second risk control model corresponding to the target event to obtain the risk information corresponding to the event data. The second risk control model is a model obtained by model training through event data samples corresponding to the target event.
[0030] The second risk control model can be obtained by training the second risk control model constructed using a certain algorithm through training samples. The initial risk information can be information on whether there is a risk, or a probability value or a score value of the risk, etc., which can be set according to actual conditions, and the embodiments of this specification do not limit this. The risk information can be information on whether there is a risk, or a probability value or a score value of the risk, etc.
[0031] In implementation, considering that the coverage of the risk control strategy is small, a data-driven second risk control model can be used to continue risk control, so that the number of positive samples can be within a certain range, and the training samples are unbiased, which is conducive to the generalization of the model. Specifically, the risk control algorithm can be pre-set, and the model architecture of the second risk control model can be constructed through the risk control algorithm. The model architecture may include model parameters to be determined. Among them, the risk control algorithm may include multiple, such as neural network algorithm, generative adversarial network algorithm, classification algorithm, etc., which can be set according to actual conditions, and this specification embodiment does not limit this.
[0032] A corresponding loss function can be set for the second risk control model according to actual conditions, and event data generated for the target event within a certain time period can be obtained. The obtained event data can be used as event data samples corresponding to the target event. Then, the model architecture of the second risk control model can be trained through the event data samples, the initial risk information (or initial risk value) set in advance for the event data samples, and the set loss function until the second risk control model converges, and finally the trained second risk control model can be obtained.
[0033] Through the processing of the above step S104, one or more risk detection results can be obtained. If the above-mentioned risk detection results include one, the risk detection result can be determined as the initial risk information corresponding to the above-mentioned event data. If the above-mentioned risk detection results include multiple ones, the determination rule of the initial risk information can be pre-set. The rule can include multiple types. For example, the risk detection result with the largest value in the risk detection results can be used as the initial risk information, or the risk detection result with a value in the middle of the values of all risk detection results can be used as the initial risk information, etc. The specific setting can be based on actual conditions.
[0034] The initial risk information corresponding to the above-mentioned event data can be obtained in the above-mentioned manner, and the initial risk information can be used as the initial risk value of the above-mentioned event data. Then, the initial risk value of the above-mentioned event data and the event data can be input into the trained second risk control model to obtain the risk information corresponding to the event data. If the risk information indicates that the event data is risky, the target event can be refused to be executed, and a corresponding notification message can be sent to the corresponding user. If the risk information indicates that the event data is not risky, the target event can be allowed to be executed.
[0035] The embodiment of the present specification provides a risk prevention and control method for an event, by obtaining event data to be processed of a target event, and then, based on the event data and a first risk control model corresponding to the target event, determining a risk detection result corresponding to the first risk control model, wherein the first risk control model is a model constructed by a risk control strategy corresponding to the target event, and finally, based on the risk detection result corresponding to the first risk control model, determining initial risk information corresponding to the event data, and inputting the initial risk information corresponding to the event data and the event data into a second risk control model corresponding to the target event, to obtain risk information corresponding to the event data, wherein the second risk control model is obtained by training a model using event data samples corresponding to the target event. In this way, a two-stage process is used to respectively use the risk control strategy and the risk control model (including the first risk control model and the second risk control model) to finally form a unified model. In the first stage, expert knowledge (i.e., risk control strategy) is used to solve the small sample problem, and there is no data bias. In the second stage, the model output of the previous stage is used as the initial risk information to continue training the model. Since the two stages are separate, if the risk control strategy changes, only the model of the first stage needs to be adjusted, so that the final model fusion introduces expert knowledge to solve the problem of fewer positive samples. At the same time, the sample data for training the model is unbiased, which is conducive to the generalization of the model.
[0036] Embodiment 2
[0037] like Figure 3 As shown, an embodiment of this specification provides a method for risk prevention and control of an event, and the execution subject of the method can be a terminal device or a server, wherein the terminal device can be a mobile terminal device such as a mobile phone, a tablet computer, or a computer device such as a laptop or a desktop computer, or an IoT device (specifically a smart watch, a car device, etc.), etc. The server can be an independent server or a server cluster composed of multiple different servers. In this embodiment, the server is used as the execution subject for detailed description. For the case where the execution subject is a terminal device, it can be executed based on the following content, which will not be repeated here. The method can specifically include the following steps:
[0038] In step S302, a risk control strategy corresponding to the target event is obtained, and the risk control strategy includes one or more.
[0039] In implementation, the risk control strategy corresponding to the target event can be obtained in a variety of different ways. For example, for the target event, one or more experts can set the corresponding risk control strategy according to the actual situation. After the setting is completed, it can be uploaded to the set of risk control strategies corresponding to the target event, thereby obtaining the risk control strategy corresponding to the target event.
[0040] In addition, the processing of the above step S302 is performed when constructing the first risk control model. In actual applications, the processing of the above step S302 can be triggered in a variety of ways. An optional processing method is provided below, which may specifically include the following: when it is detected that the risk control strategy corresponding to the target event has changed, the risk control strategy corresponding to the target event is obtained.
[0041] During implementation, the risk control strategy corresponding to the target event can be detected regularly or irregularly. If it is detected that a risk control strategy is added or the content of a risk control strategy is modified, the risk control strategy corresponding to the target event is obtained.
[0042] In step S304, a first risk control model is constructed based on each risk control strategy.
[0043] Among them, the first risk control model is built based on the decision tree algorithm.
[0044] In implementation, since risk control strategies are usually composed of multiple different conditions through preset logical operation relationships, each condition in the risk control strategy can contain three elements, namely: characteristics, comparison values and logical operators. Based on the above characteristics of the risk control strategy, each risk control strategy can be converted into a decision tree based on the decision tree algorithm. In this way, multiple different risk control strategies can construct multiple decision trees, and each of the above-constructed decision trees can be used as the first risk control model. In this way, for multiple risk control strategies corresponding to the target event, multiple first risk control models can be obtained.
[0045] In step S306, an event data sample corresponding to the target event is obtained.
[0046] In implementation, event data samples corresponding to the target event can be obtained in a variety of different ways. For example, for the target event, each time the user triggers the execution of the target event, the event data generated during the execution of the target event can be stored. When the event data needs to be obtained, the event data generated within a preset time period can be obtained from the stored event data, or the event data of the target event can be obtained from a specified database, etc. The event data obtained in the above manner can be used as the event data sample corresponding to the target event.
[0047] In step S308, the above event data samples are input into the first risk control model, and whether there is a risk, whether the risk control strategy is hit, and whether the target event fails to execute are used as label information to obtain the sample output results for each label information output by the first risk control model.
[0048] In implementation, for each first risk control model (i.e., each decision tree), whether there is a risk, whether the risk control strategy is hit, and whether the target event fails to execute can be used as the label information of each event data, and the above event data can be input into each decision tree to obtain the sample output results for each label information corresponding to each leaf node in each decision tree. In this way, each leaf node can obtain the sample output results of 3 label information, and the above output results are the sample output results for each label information output by the first risk control model.
[0049] In step S310, based on the weight corresponding to each tag information, the sample output result is weightedly calculated to obtain the sample risk detection result corresponding to the first risk control model, and multiple risk detection results are aggregated to obtain the initial risk information corresponding to the event data sample.
[0050] In implementation, for any leaf node in any decision tree, the following formula can be used
[0051]
[0052] The sample output results of the three label information of each leaf node are weighted and calculated to obtain the sample risk detection result corresponding to the first risk control model, where υ ij Represents the sample risk detection result corresponding to the jth leaf node in the decision tree converted by the i-th risk control strategy, It represents the sample risk detection result corresponding to the jth leaf node in the decision tree converted by the i-th risk control strategy, with whether it is hit by the risk control strategy as the label information. It represents the sample risk detection result corresponding to the jth leaf node in the decision tree converted by the i-th risk control strategy, with whether the target event fails to execute as the label information. It represents the sample risk detection result corresponding to the j-th leaf node in the decision tree converted by the i-th risk control strategy with whether there is a risk as the label information. α, β, and γ are the weights corresponding to the label information of whether the risk control strategy is hit, whether the target event fails to execute, and whether there is a risk.
[0053] Through the above processing, for a certain event, prediction can be made through m (m is greater than or equal to 1) decision trees to obtain m sample risk detection results. Then, the multiple risk detection results can be aggregated. Specifically, the multiple risk detection results can be processed as follows: taking the average, taking the maximum value, taking the median and other aggregation processes to obtain an output result, which can be used as the initial risk information corresponding to the event data sample.
[0054] In step S312, the second risk control model is trained based on the initial risk information corresponding to the event data sample and the data samples in the event data sample that carry label information indicating that there is risk or label information indicating that there is no risk, to obtain a trained second risk control model.
[0055] Among them, the second risk control model can be constructed based on the boosting algorithm Boosting, for example, it can be constructed based on the gradient boosting decision tree algorithm (i.e., GBDT (Gradient Boosting Decision Tree) algorithm), etc.
[0056] In implementation, the first risk control model mainly utilizes the risk control strategy. However, the risk control strategy has the characteristics of low coverage but high accuracy, and cannot cover all event data samples. Therefore, it is necessary to use data to drive and continue to learn event data samples that are not hit by the risk control strategy. In this way, it is necessary to train the second risk control model. Based on this, the output result of the above-mentioned risk control strategy stage (or the knowledge fusion stage) can be used as the initial risk information of the event data sample (specifically, it can be the initial risk value), and the data samples with the existence of risk or the absence of risk as the label information are used to continue training the model architecture of the second risk control model constructed by the gradient boosting decision tree algorithm to generate the second stage model, that is, the trained second risk control model.
[0057] It should be noted that, in the process of training the second risk control model, the optimal splitting point of the second risk control model is determined based on the preset node splitting gain, wherein the node splitting gain is obtained by accumulating the first-order gradient of the event data samples of the tree leaf nodes of the left subtree in the second risk control model, accumulating the second-order gradient of the event data samples of the tree leaf nodes of the left subtree in the second risk control model, accumulating the first-order gradient of the event data samples of the tree leaf nodes of the right subtree in the second risk control model, accumulating the second-order gradient of the event data samples of the tree leaf nodes of the right subtree in the second risk control model, and adjusting the leaf nodes hit by the risk control strategy. The hyperparameters affecting the splitting of the point, the regularization coefficient, the number of event data samples hit by the risk control strategy in the tree leaf nodes of the left subtree in the second risk control model, the number of event data samples in the tree leaf nodes of the left subtree in the second risk control model, the number of event data samples hit by the risk control strategy in the tree leaf nodes of the right subtree in the second risk control model, the number of event data samples in the tree leaf nodes of the right subtree in the second risk control model, the accumulation of the first-order derivatives of the event data samples of the nodes that need to be split in the second risk control model, and the accumulation of the second-order derivatives of the event data samples of the nodes that need to be split in the second risk control model.
[0058] In implementation, in the process of training the second risk control model, there are the following differences from the usual process of building a model based on the gradient boosting decision tree algorithm and training the model: first, the initial risk information corresponding to the first risk control model is required as the initial risk value; second, when calculating the optimal split point of the gradient boosting decision tree of the second risk control model, it is necessary to consider the impact of being hit by the risk control strategy. Taking the XGBoost algorithm to build the second risk control model as an example, the node splitting gain can be:
[0059]
[0060] Among them, G L represents the accumulation of the first-order gradient of the event data samples of the left subtree leaf nodes, H L represents the accumulation of the second-order gradient of the event data samples of the left subtree node, G R represents the accumulation of the first-order gradient of the event data samples of the right subtree leaf nodes, H R It represents the accumulation of the second-order gradient of the event data samples of the right subtree leaf nodes. α is a hyperparameter used to adjust the impact of the risk control strategy hitting the split of the leaf nodes. λ is the regularization coefficient. represents the number of event data samples in the left subtree node that are hit by the risk control strategy, C L Represents the number of event data samples in the left subtree node, represents the number of event data samples hit by the risk control strategy in the right subtree node, C Rrepresents the number of event data samples in the right subtree leaf nodes, G represents the accumulation of the first-order derivatives of the event data samples of the nodes that need to be split, and H represents the accumulation of the second-order derivatives of the event data samples of the nodes that need to be split.
[0061] Compared with the usual XGBoost algorithm gain function, the last item is added. The main purpose of this item is that if the proportion of event data samples hit by the risk control strategy in the leaf node is relatively large, the output value of the leaf node should be as large as possible. 0, so that the risk control strategy is retained during the model training process. If the proportion of event data samples hit by the risk control strategy in the leaf node is 0, the last item is also 0, that is, the output value of the leaf node is completely based on the event data samples.
[0062] Based on the above processing, a first risk control model and a second risk control model can be obtained. After the event data to be processed of the target event is obtained, risk detection of the target event can be performed based on the first risk control model and the second risk control model, which can specifically include the processing of the following steps S314 to S322.
[0063] In step S314, the event data to be processed of the target event is obtained.
[0064] In step S316, the above event data is input into the first risk control model corresponding to the target event, and whether there is a risk, whether it is hit by the risk control strategy, and whether the target event fails to execute are used as label information to obtain the output result of the first risk control model for each label information.
[0065] In step S318, based on the weight corresponding to each tag information, the output result of the first risk control model for each tag information is weightedly calculated to obtain the risk detection result corresponding to the first risk control model.
[0066] In step S320, multiple risk detection results are aggregated to obtain an aggregated result, and the aggregated result is determined as initial risk information corresponding to the event data.
[0067] In step S322, the initial risk information corresponding to the event data and the event data are input into a second risk control model corresponding to the target event to obtain the risk information corresponding to the event data.
[0068] The embodiment of the present specification provides a risk prevention and control method for an event, by obtaining event data to be processed of a target event, and then, based on the event data and a first risk control model corresponding to the target event, determining a risk detection result corresponding to the first risk control model, wherein the first risk control model is a model constructed by a risk control strategy corresponding to the target event, and finally, based on the risk detection result corresponding to the first risk control model, determining initial risk information corresponding to the event data, and inputting the initial risk information corresponding to the event data and the event data into a second risk control model corresponding to the target event, to obtain risk information corresponding to the event data, wherein the second risk control model is obtained by training a model using event data samples corresponding to the target event. In this way, a two-stage process is used to respectively use the risk control strategy and the risk control model (including the first risk control model and the second risk control model) to finally form a unified model. In the first stage, expert knowledge (i.e., risk control strategy) is used to solve the small sample problem, and there is no data bias. In the second stage, the model output of the previous stage is used as the initial risk information to continue training the model. Since the two stages are separate, if the risk control strategy changes, only the model of the first stage needs to be adjusted, so that the final model fusion introduces expert knowledge to solve the problem of fewer positive samples. At the same time, the sample data for training the model is unbiased, which is conducive to the generalization of the model.
[0069] Embodiment 3
[0070] The above is a risk prevention and control method for an event provided in the embodiments of this specification. Based on the same idea, the embodiments of this specification also provide a risk prevention and control device for an event, such as Figure 4 shown.
[0071] The risk prevention and control device of the event includes: a data acquisition module 401, a first risk detection module 402 and a risk determination module 403, wherein:
[0072] The data acquisition module 401 acquires the event data to be processed of the target event;
[0073] A first risk detection module 402, based on the event data and a first risk control model corresponding to the target event, determines a risk detection result corresponding to the first risk control model, where the first risk control model is a model constructed by a risk control strategy corresponding to the target event;
[0074] The risk determination module 403 determines the initial risk information corresponding to the event data based on the risk detection result corresponding to the first risk control model, and inputs the initial risk information corresponding to the event data and the event data into the second risk control model corresponding to the target event to obtain the risk information corresponding to the event data. The second risk control model is a model obtained by model training through event data samples corresponding to the target event.
[0075] In the embodiment of this specification, the first risk control model is constructed based on a decision tree algorithm, and the second risk control model is constructed based on a boosting algorithm Boosting.
[0076] In the embodiment of this specification, the first risk detection module 402 includes:
[0077] A result output unit inputs the event data into a first risk control model corresponding to the target event, and uses whether there is a risk, whether the risk control strategy is hit, and whether the target event fails to execute as label information, to obtain an output result for each of the label information output by the first risk control model;
[0078] The risk detection unit performs weighted calculation on the output result of the first risk control model for each piece of the label information based on the weight corresponding to each piece of the label information, so as to obtain a risk detection result corresponding to the first risk control model.
[0079] In an embodiment of the present specification, the target event includes multiple risk control strategies, the first risk control models include multiple, and the risk determination module aggregates the multiple risk detection results to obtain an aggregated result, and determines the aggregated result as the initial risk information corresponding to the event data.
[0080] In the embodiment of this specification, the device further includes:
[0081] A strategy acquisition module, which acquires the risk control strategy corresponding to the target event, wherein the risk control strategy includes one or more;
[0082] The first model building module builds the first risk control model based on each of the risk control strategies.
[0083] In the embodiment of the present specification, the strategy acquisition module acquires the risk control strategy corresponding to the target event when detecting that the risk control strategy corresponding to the target event changes.
[0084] In the embodiment of this specification, the device further includes:
[0085] A sample acquisition module, which acquires an event data sample corresponding to the target event;
[0086] A sample output result determination module inputs the event data sample into the first risk control model, and uses whether there is a risk, whether it is hit by the risk control strategy, and whether the target event fails to execute as label information, to obtain a sample output result for each of the label information output by the first risk control model;
[0087] an initial risk information determination module, which performs weighted calculation on the sample output results based on the weight corresponding to each of the label information to obtain the sample risk detection result corresponding to the first risk control model, and aggregates the multiple risk detection results to obtain the initial risk information corresponding to the event data sample;
[0088] The model training module trains the second risk control model based on the initial risk information corresponding to the event data sample and the data samples in the event data sample that carry label information indicating that there is a risk or label information indicating that there is no risk, to obtain the trained second risk control model.
[0089] In the embodiment of this specification, the device further includes:
[0090] A split point determination module, during the training of the second risk control model, determines the optimal split point of the second risk control model based on a preset node splitting gain, wherein the node splitting gain is obtained by accumulating the first-order gradient of the event data samples of the tree leaf nodes of the left subtree in the second risk control model, accumulating the second-order gradient of the event data samples of the tree leaf nodes of the left subtree in the second risk control model, accumulating the first-order gradient of the event data samples of the tree leaf nodes of the right subtree in the second risk control model, accumulating the second-order gradient of the event data samples of the tree leaf nodes of the right subtree in the second risk control model, and adjusting the leaf nodes hit by the risk control strategy. The influence of node splitting is determined by the hyperparameters, regularization coefficient, number of event data samples hit by the risk control strategy in the tree subnode of the left subtree in the second risk control model, number of event data samples in the tree subnode of the left subtree in the second risk control model, number of event data samples hit by the risk control strategy in the tree subnode of the right subtree in the second risk control model, number of event data samples in the tree subnode of the right subtree in the second risk control model, accumulation of first-order derivatives of event data samples of nodes that need to be split in the second risk control model, and accumulation of second-order derivatives of event data samples of nodes that need to be split in the second risk control model.
[0091] The embodiment of the present specification provides a risk prevention and control device for an event, which obtains event data to be processed of a target event, and then determines the risk detection result corresponding to the first risk control model based on the event data and a first risk control model corresponding to the target event, wherein the first risk control model is a model constructed by a risk control strategy corresponding to the target event, and finally, the initial risk information corresponding to the event data can be determined based on the risk detection result corresponding to the first risk control model, and the initial risk information corresponding to the event data and the event data are input into a second risk control model corresponding to the target event to obtain the risk information corresponding to the event data, wherein the second risk control model is obtained by training a model using event data samples corresponding to the target event. In this way, a two-stage process is used to respectively use the risk control strategy and the risk control model (including the first risk control model and the second risk control model) to finally form a unified model. In the first stage, expert knowledge (i.e., risk control strategy) is used to solve the small sample problem, and there is no data bias. In the second stage, the model output of the previous stage is used as the initial risk information to continue training the model. Since the two stages are separate, if the risk control strategy changes, only the model of the first stage needs to be adjusted, so that the final model fusion introduces expert knowledge to solve the problem of fewer positive samples. At the same time, the sample data for training the model is unbiased, which is conducive to the generalization of the model.
[0092] Embodiment 4
[0093] The above is a risk prevention and control device for an event provided in the embodiment of this specification. Based on the same idea, the embodiment of this specification also provides a risk prevention and control device for an event, such as Figure 5 shown.
[0094] The risk prevention and control device for the event may provide a terminal device or a server, etc. for the above-mentioned embodiment.
[0095] The risk prevention and control device of an event may have relatively large differences due to different configurations or performances, and may include one or more processors 501 and memory 502, and one or more storage applications or data may be stored in the memory 502. Among them, the memory 502 may be a short-term storage or a persistent storage. The application stored in the memory 502 may include one or more modules (not shown in the figure), and each module may include a series of computer executable instructions in the risk prevention and control device of the event. Furthermore, the processor 501 may be configured to communicate with the memory 502 and execute a series of computer executable instructions in the memory 502 on the risk prevention and control device of the event. The risk prevention and control device of the event may also include one or more power supplies 503, one or more wired or wireless network interfaces 504, one or more input and output interfaces 505, and one or more keyboards 506.
[0096] Specifically in this embodiment, the risk prevention and control device of the event includes a memory, and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer executable instructions for the risk prevention and control device of the event, and the one or more programs are configured to be executed by one or more processors, including computer executable instructions for performing the following:
[0097] Get the event data to be processed of the target event;
[0098] Determine, based on the event data and a first risk control model corresponding to the target event, a risk detection result corresponding to the first risk control model, where the first risk control model is a model constructed by a risk control strategy corresponding to the target event;
[0099] Based on the risk detection result corresponding to the first risk control model, the initial risk information corresponding to the event data is determined, and the initial risk information corresponding to the event data and the event data are input into the second risk control model corresponding to the target event to obtain the risk information corresponding to the event data. The second risk control model is a model obtained by model training through event data samples corresponding to the target event.
[0100] In the embodiment of this specification, the first risk control model is constructed based on a decision tree algorithm, and the second risk control model is constructed based on a boosting algorithm Boosting.
[0101] In the embodiment of this specification, the determining, based on the event data and the first risk control model corresponding to the target event, a risk detection result corresponding to the first risk control model includes:
[0102] Input the event data into the first risk control model corresponding to the target event, and use whether there is a risk, whether it is hit by the risk control strategy, and whether the target event fails to execute as label information, to obtain the output result of the first risk control model for each of the label information;
[0103] Based on the weight corresponding to each piece of the tag information, a weighted calculation is performed on the output result of the first risk control model for each piece of the tag information to obtain a risk detection result corresponding to the first risk control model.
[0104] In the embodiment of this specification, the risk control strategies corresponding to the target event include multiple, the first risk control models include multiple, and the initial risk information corresponding to the event data is determined based on the risk detection result corresponding to the first risk control model, including:
[0105] Aggregation processing is performed on the plurality of risk detection results to obtain an aggregated result, and the aggregated result is determined as initial risk information corresponding to the event data.
[0106] In the embodiments of this specification, it also includes:
[0107] Obtaining a risk control strategy corresponding to the target event, wherein the risk control strategy includes one or more;
[0108] The first risk control model is constructed based on each of the risk control strategies.
[0109] In the embodiment of this specification, obtaining the risk control strategy corresponding to the target event includes:
[0110] When it is detected that the risk control strategy corresponding to the target event changes, the risk control strategy corresponding to the target event is obtained.
[0111] In the embodiments of this specification, it also includes:
[0112] Acquire an event data sample corresponding to the target event;
[0113] Input the event data sample into the first risk control model, and use whether there is a risk, whether it is hit by the risk control strategy, and whether the target event fails to execute as label information, to obtain a sample output result for each label information output by the first risk control model;
[0114] Based on the weight corresponding to each of the tag information, weighted calculation is performed on the sample output results to obtain the sample risk detection result corresponding to the first risk control model, and aggregating multiple risk detection results to obtain initial risk information corresponding to the event data sample;
[0115] The second risk control model is trained based on the initial risk information corresponding to the event data sample and data samples in the event data sample that carry label information indicating that there is risk or label information indicating that there is no risk, to obtain the trained second risk control model.
[0116] In the embodiments of this specification, it also includes:
[0117] In the process of training the second risk control model, the optimal splitting point of the second risk control model is determined based on the preset node splitting gain, wherein the node splitting gain is obtained by accumulating the first-order gradient of the event data samples of the tree leaf nodes of the left subtree in the second risk control model, accumulating the second-order gradient of the event data samples of the tree leaf nodes of the left subtree in the second risk control model, accumulating the first-order gradient of the event data samples of the tree leaf nodes of the right subtree in the second risk control model, accumulating the second-order gradient of the event data samples of the tree leaf nodes of the right subtree in the second risk control model, and adjusting the splitting of the leaf nodes hit by the risk control strategy. The hyper parameters affecting the split, the regularization coefficient, the number of event data samples hit by the risk control strategy in the tree leaf nodes of the left subtree in the second risk control model, the number of event data samples in the tree leaf nodes of the left subtree in the second risk control model, the number of event data samples hit by the risk control strategy in the tree leaf nodes of the right subtree in the second risk control model, the number of event data samples in the tree leaf nodes of the right subtree in the second risk control model, the accumulation of the first-order derivatives of the event data samples of the nodes that need to be split in the second risk control model, and the accumulation of the second-order derivatives of the event data samples of the nodes that need to be split in the second risk control model.
[0118] The embodiment of the present specification provides a risk prevention and control device for an event, which obtains event data to be processed of a target event, and then determines the risk detection result corresponding to the first risk control model based on the event data and a first risk control model corresponding to the target event, wherein the first risk control model is a model constructed by a risk control strategy corresponding to the target event, and finally, the initial risk information corresponding to the event data can be determined based on the risk detection result corresponding to the first risk control model, and the initial risk information corresponding to the event data and the event data are input into a second risk control model corresponding to the target event to obtain the risk information corresponding to the event data, wherein the second risk control model is obtained by training a model using event data samples corresponding to the target event. In this way, a two-stage process is used to respectively use the risk control strategy and the risk control model (including the first risk control model and the second risk control model) to finally form a unified model. In the first stage, expert knowledge (i.e., risk control strategy) is used to solve the small sample problem, and there is no data bias. In the second stage, the model output of the previous stage is used as the initial risk information to continue training the model. Since the two stages are separate, if the risk control strategy changes, only the model of the first stage needs to be adjusted, so that the final model fusion introduces expert knowledge to solve the problem of fewer positive samples. At the same time, the sample data for training the model is unbiased, which is conducive to the generalization of the model.
[0119] Embodiment 5
[0120] Furthermore, based on the above Figures 1 to 3In one embodiment, the present specification further provides a storage medium for storing computer executable instruction information. In a specific embodiment, the storage medium may be a USB flash drive, an optical disk, a hard disk, etc. When the computer executable instruction information stored in the storage medium is executed by the processor, the following process can be implemented:
[0121] Get the event data to be processed of the target event;
[0122] Determine, based on the event data and a first risk control model corresponding to the target event, a risk detection result corresponding to the first risk control model, where the first risk control model is a model constructed by a risk control strategy corresponding to the target event;
[0123] Based on the risk detection result corresponding to the first risk control model, the initial risk information corresponding to the event data is determined, and the initial risk information corresponding to the event data and the event data are input into the second risk control model corresponding to the target event to obtain the risk information corresponding to the event data. The second risk control model is a model obtained by model training through event data samples corresponding to the target event.
[0124] In the embodiment of this specification, the first risk control model is constructed based on a decision tree algorithm, and the second risk control model is constructed based on a boosting algorithm Boosting.
[0125] In the embodiment of this specification, the determining, based on the event data and the first risk control model corresponding to the target event, a risk detection result corresponding to the first risk control model includes:
[0126] Input the event data into the first risk control model corresponding to the target event, and use whether there is a risk, whether it is hit by the risk control strategy, and whether the target event fails to execute as label information, to obtain the output result of the first risk control model for each of the label information;
[0127] Based on the weight corresponding to each piece of the tag information, a weighted calculation is performed on the output result of the first risk control model for each piece of the tag information to obtain a risk detection result corresponding to the first risk control model.
[0128] In the embodiment of this specification, the risk control strategies corresponding to the target event include multiple, the first risk control models include multiple, and the initial risk information corresponding to the event data is determined based on the risk detection result corresponding to the first risk control model, including:
[0129] Aggregation processing is performed on the plurality of risk detection results to obtain an aggregated result, and the aggregated result is determined as initial risk information corresponding to the event data.
[0130] In the embodiments of this specification, it also includes:
[0131] Obtaining a risk control strategy corresponding to the target event, wherein the risk control strategy includes one or more;
[0132] The first risk control model is constructed based on each of the risk control strategies.
[0133] In the embodiment of this specification, obtaining the risk control strategy corresponding to the target event includes:
[0134] When it is detected that the risk control strategy corresponding to the target event changes, the risk control strategy corresponding to the target event is obtained.
[0135] In the embodiments of this specification, it also includes:
[0136] Acquire an event data sample corresponding to the target event;
[0137] Input the event data sample into the first risk control model, and use whether there is a risk, whether it is hit by the risk control strategy, and whether the target event fails to execute as label information, to obtain a sample output result for each label information output by the first risk control model;
[0138] Based on the weight corresponding to each of the tag information, weighted calculation is performed on the sample output results to obtain the sample risk detection result corresponding to the first risk control model, and aggregating multiple risk detection results to obtain initial risk information corresponding to the event data sample;
[0139] The second risk control model is trained based on the initial risk information corresponding to the event data sample and data samples in the event data sample that carry label information indicating that there is risk or label information indicating that there is no risk, to obtain the trained second risk control model.
[0140] In the embodiments of this specification, it also includes:
[0141] In the process of training the second risk control model, the optimal splitting point of the second risk control model is determined based on the preset node splitting gain, wherein the node splitting gain is obtained by accumulating the first-order gradient of the event data samples of the tree leaf nodes of the left subtree in the second risk control model, accumulating the second-order gradient of the event data samples of the tree leaf nodes of the left subtree in the second risk control model, accumulating the first-order gradient of the event data samples of the tree leaf nodes of the right subtree in the second risk control model, accumulating the second-order gradient of the event data samples of the tree leaf nodes of the right subtree in the second risk control model, and adjusting the splitting of the leaf nodes hit by the risk control strategy. The hyper parameters affecting the split, the regularization coefficient, the number of event data samples hit by the risk control strategy in the tree leaf nodes of the left subtree in the second risk control model, the number of event data samples in the tree leaf nodes of the left subtree in the second risk control model, the number of event data samples hit by the risk control strategy in the tree leaf nodes of the right subtree in the second risk control model, the number of event data samples in the tree leaf nodes of the right subtree in the second risk control model, the accumulation of the first-order derivatives of the event data samples of the nodes that need to be split in the second risk control model, and the accumulation of the second-order derivatives of the event data samples of the nodes that need to be split in the second risk control model.
[0142] The embodiment of the present specification provides a storage medium, which obtains event data to be processed of a target event, and then determines the risk detection result corresponding to the first risk control model based on the event data and a first risk control model corresponding to the target event, wherein the first risk control model is a model constructed by a risk control strategy corresponding to the target event, and finally, the initial risk information corresponding to the event data can be determined based on the risk detection result corresponding to the first risk control model, and the initial risk information corresponding to the event data and the event data are input into a second risk control model corresponding to the target event to obtain the risk information corresponding to the event data, wherein the second risk control model is a model obtained by training a model with event data samples corresponding to the target event. In this way, a two-stage process is used to respectively use the risk control strategy and the risk control model (including the first risk control model and the second risk control model) to finally form a unified model. In the first stage, expert knowledge (i.e., risk control strategy) is used to solve the small sample problem, and there is no data bias. In the second stage, the model output of the previous stage is used as the initial risk information to continue training the model. Since the two stages are separate, if the risk control strategy changes, only the model of the first stage needs to be adjusted, so that the final model fusion introduces expert knowledge to solve the problem of fewer positive samples. At the same time, the sample data for training the model is unbiased, which is conducive to the generalization of the model.
[0143] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0144] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.
[0145] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.
[0146] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0147] For the convenience of description, the above devices are described in terms of functions and are divided into various units. Of course, when implementing one or more embodiments of this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0148] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Therefore, one or more embodiments of this specification may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, one or more embodiments of this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0149] The embodiments of this specification are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes 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, an embedded processor, or other programmable fraud case serial and parallel device to produce a machine, so that the instructions executed by the processor of the computer or other programmable fraud case serial and parallel device generate instructions for implementing the process in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0150] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable fraud case serial and parallel device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0151] These computer program instructions may also be loaded onto a computer or other programmable device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0152] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0153] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0154] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0155] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0156] It should be understood by those skilled in the art that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, one or more embodiments of this specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, one or more embodiments of this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0157] One or more embodiments of the present specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. One or more embodiments of the present specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0158] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0159] The above description is only an embodiment of this specification and is not intended to limit the present application. For those skilled in the art, this specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this specification should be included in the scope of the claims of this specification.
Claims
1. A method for risk prevention and control of an event, the method comprising: Obtaining event data to be processed of a target event, wherein the target event includes a payment event, a transfer event, or a data access event; Determine, based on the event data and a first risk control model corresponding to the target event, a risk detection result corresponding to the first risk control model, where the first risk control model is a model constructed by a risk control strategy corresponding to the target event; Based on the risk detection result corresponding to the first risk control model, the initial risk information corresponding to the event data is determined, and the initial risk information corresponding to the event data and the event data are input into the second risk control model corresponding to the target event to obtain the risk information corresponding to the event data, the second risk control model is a model obtained by model training through event data samples corresponding to the target event, the second risk control model is trained based on the initial risk information corresponding to the event data samples and data samples in the event data samples that carry label information indicating that there is a risk or label information indicating that there is no risk, the initial risk information corresponding to the event data samples is output by the first risk control model after obtaining the event data samples corresponding to the target event, and the initial risk information corresponding to the event data samples is a probability value or a score value of the existence of a risk; The determining, based on the event data and the first risk control model corresponding to the target event, a risk detection result corresponding to the first risk control model includes: Input the event data into the first risk control model corresponding to the target event, and use whether there is a risk, whether it is hit by the risk control strategy, and whether the target event fails to execute as label information, to obtain the output result of the first risk control model for each of the label information; Based on the weight corresponding to each piece of the tag information, a weighted calculation is performed on the output result of the first risk control model for each piece of the tag information to obtain a risk detection result corresponding to the first risk control model.
2. According to the method of claim 1, the first risk control model is constructed based on a decision tree algorithm, and the second risk control model is constructed based on a boosting algorithm Boosting.
3. According to the method of claim 1 or 2, the target event corresponds to a plurality of risk control strategies, the first risk control models include a plurality of risk control models, and the determining the initial risk information corresponding to the event data based on the risk detection result corresponding to the first risk control model includes: Aggregation processing is performed on the plurality of risk detection results to obtain an aggregated result, and the aggregated result is determined as initial risk information corresponding to the event data.
4. The method according to claim 2, further comprising: Obtaining a risk control strategy corresponding to the target event, wherein the risk control strategy includes one or more; The first risk control model is constructed based on each of the risk control strategies.
5. According to the method of claim 4, the step of obtaining the risk control strategy corresponding to the target event comprises: When it is detected that the risk control strategy corresponding to the target event changes, the risk control strategy corresponding to the target event is obtained.
6. The method according to claim 4 or 5, further comprising: Acquire an event data sample corresponding to the target event; Input the event data sample into the first risk control model, and use whether there is a risk, whether it is hit by the risk control strategy, and whether the target event fails to execute as label information, to obtain a sample output result for each label information output by the first risk control model; Based on the weight corresponding to each of the tag information, weighted calculation is performed on the sample output results to obtain the sample risk detection result corresponding to the first risk control model, and aggregating multiple risk detection results to obtain initial risk information corresponding to the event data sample; The second risk control model is trained based on the initial risk information corresponding to the event data sample and the data samples in the event data sample that carry label information indicating that there is risk or label information indicating that there is no risk, to obtain the trained second risk control model.
7. The method according to claim 6, further comprising: In the process of training the second risk control model, the optimal splitting point of the second risk control model is determined based on the preset node splitting gain, wherein the node splitting gain is obtained by regularization coefficient, accumulation of first-order gradient of event data samples of the tree leaf node of the left subtree in the second risk control model, accumulation of second-order gradient of event data samples of the tree leaf node of the left subtree in the second risk control model, accumulation of first-order gradient of event data samples of the tree leaf node of the right subtree in the second risk control model, accumulation of second-order gradient of event data samples of the tree leaf node of the right subtree in the second risk control model, and used to adjust the risk control strategy hit pair The hyper parameters affecting the splitting of leaf nodes, the number of event data samples hit by the risk control strategy in the tree leaf nodes of the left subtree in the second risk control model, the number of event data samples in the tree leaf nodes of the left subtree in the second risk control model, the number of event data samples hit by the risk control strategy in the tree leaf nodes of the right subtree in the second risk control model, the number of event data samples in the tree leaf nodes of the right subtree in the second risk control model, the accumulation of the first-order derivatives of the event data samples of the nodes that need to be split in the second risk control model, and the accumulation of the second-order derivatives of the event data samples of the nodes that need to be split in the second risk control model.
8. A risk prevention and control device for an event, the device comprising: A data acquisition module, which acquires event data to be processed of a target event, wherein the target event includes a payment event, a transfer event, or a data access event; A first risk detection module, based on the event data and a first risk control model corresponding to the target event, determines a risk detection result corresponding to the first risk control model, where the first risk control model is a model constructed by a risk control strategy corresponding to the target event; a risk determination module, which determines the initial risk information corresponding to the event data based on the risk detection result corresponding to the first risk control model, and inputs the initial risk information corresponding to the event data and the event data into the second risk control model corresponding to the target event to obtain the risk information corresponding to the event data, wherein the second risk control model is a model obtained by model training through event data samples corresponding to the target event, and the second risk control model is trained based on the initial risk information corresponding to the event data samples and data samples in the event data samples that carry label information indicating that there is a risk or label information indicating that there is no risk, and the initial risk information corresponding to the event data samples is output by the first risk control model after obtaining the event data samples corresponding to the target event, and the initial risk information corresponding to the event data samples is a probability value or a score value of the existence of a risk; The determining, based on the event data and the first risk control model corresponding to the target event, a risk detection result corresponding to the first risk control model includes: Input the event data into the first risk control model corresponding to the target event, and use whether there is a risk, whether it is hit by the risk control strategy, and whether the target event fails to execute as label information, to obtain the output result of the first risk control model for each of the label information; Based on the weight corresponding to each piece of the tag information, a weighted calculation is performed on the output result of the first risk control model for each piece of the tag information to obtain a risk detection result corresponding to the first risk control model.
9. A risk prevention and control device for an event, the risk prevention and control device for the event comprising: processor; as well as a memory arranged to store computer executable instructions which, when executed, cause the processor to: Obtaining event data to be processed of a target event, wherein the target event includes a payment event, a transfer event, or a data access event; Determine, based on the event data and a first risk control model corresponding to the target event, a risk detection result corresponding to the first risk control model, where the first risk control model is a model constructed by a risk control strategy corresponding to the target event; Based on the risk detection result corresponding to the first risk control model, the initial risk information corresponding to the event data is determined, and the initial risk information corresponding to the event data and the event data are input into the second risk control model corresponding to the target event to obtain the risk information corresponding to the event data, the second risk control model is a model obtained by model training through event data samples corresponding to the target event, the second risk control model is trained based on the initial risk information corresponding to the event data samples and data samples in the event data samples that carry label information indicating that there is a risk or label information indicating that there is no risk, the initial risk information corresponding to the event data samples is output by the first risk control model after obtaining the event data samples corresponding to the target event, and the initial risk information corresponding to the event data samples is a probability value or a score value of the existence of a risk; The determining, based on the event data and the first risk control model corresponding to the target event, a risk detection result corresponding to the first risk control model includes: Input the event data into the first risk control model corresponding to the target event, and use whether there is a risk, whether it is hit by the risk control strategy, and whether the target event fails to execute as label information, to obtain the output result of the first risk control model for each of the label information; Based on the weight corresponding to each piece of the tag information, a weighted calculation is performed on the output result of the first risk control model for each piece of the tag information to obtain a risk detection result corresponding to the first risk control model.
10. A storage medium for storing computer executable instructions, wherein the executable instructions implement the following process when executed by a processor: Obtaining event data to be processed of a target event, wherein the target event includes a payment event, a transfer event, or a data access event; Determine, based on the event data and a first risk control model corresponding to the target event, a risk detection result corresponding to the first risk control model, where the first risk control model is a model constructed by a risk control strategy corresponding to the target event; Based on the risk detection result corresponding to the first risk control model, the initial risk information corresponding to the event data is determined, and the initial risk information corresponding to the event data and the event data are input into the second risk control model corresponding to the target event to obtain the risk information corresponding to the event data, the second risk control model is a model obtained by model training through event data samples corresponding to the target event, the second risk control model is trained based on the initial risk information corresponding to the event data samples and data samples in the event data samples that carry label information indicating that there is a risk or label information indicating that there is no risk, the initial risk information corresponding to the event data samples is output by the first risk control model after obtaining the event data samples corresponding to the target event, and the initial risk information corresponding to the event data samples is a probability value or a score value of the existence of a risk; The determining, based on the event data and the first risk control model corresponding to the target event, a risk detection result corresponding to the first risk control model includes: Input the event data into the first risk control model corresponding to the target event, and use whether there is a risk, whether it is hit by the risk control strategy, and whether the target event fails to execute as label information, to obtain the output result of the first risk control model for each of the label information; Based on the weight corresponding to each piece of the tag information, a weighted calculation is performed on the output result of the first risk control model for each piece of the tag information to obtain a risk detection result corresponding to the first risk control model.
