Transaction security index determination method and device and electronic equipment
By receiving transaction requests, recalling transaction security parameters, and generating transaction security indexes based on historical transaction data and characteristic items, the problem of inaccuracy of transaction security index caused by differences in user habits is solved, and an accurate transaction security assessment is achieved.
Patent Information
- Application Number
- CN202510448955.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-10
- Publication Date
- 2025-07-11
AI Technical Summary
Because different users have different trading habits, the problem of inaccurate determination of transaction security index is caused.
By receiving transaction requests, the transaction security parameters in the target trading scenario are retrieved, and the transaction security index is generated using multiple historical transaction subsets and transaction feature items, and a comprehensive evaluation is carried out in combination with the target trading parameters.
It realizes accurate evaluation of transaction security while considering users' unique trading habits, solves the problem of inaccurate determination of transaction security index, and improves transaction reliability and security.
Smart Images

Figure CN120298113A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing, and in particular, to a method, apparatus, and electronic device for determining a transaction security index. Background Art
[0002] In the related art, when a user conducts a transaction, it is necessary to judge the transaction security index to determine whether the transaction needs to continue. However, due to different transaction habits of different users and other reasons, there is a technical problem that the determination of the transaction security index is inaccurate.
[0003] In view of the above problems, no effective solution has been proposed yet. Summary of the Invention
[0004] Embodiments of the present invention provide a method, apparatus, and electronic device for determining a transaction security index, so as to at least solve the technical problem that the determination of the transaction security index is inaccurate due to different transaction habits of different users and other reasons.
[0005] According to one aspect of the embodiments of the present invention, a method for determining a transaction security index is provided, including: receiving a transaction request of a target object, where the transaction request carries target transaction parameters and a target transaction scenario corresponding to a target transaction; in response to the transaction request, retrieving transaction security parameters corresponding to the target object in the target transaction scenario, where the transaction security parameters are determined based on a plurality of historical transaction subsets and a plurality of transaction feature items, the plurality of historical transaction subsets and the plurality of transaction feature items are determined based on historical transaction data, and the historical transaction data includes transaction data corresponding to the target transaction scenario; determining a transaction security index corresponding to the target transaction based on the target transaction parameters and the transaction security parameters.
[0006] Optionally, before retrieving the transaction security parameters corresponding to the target object in the target transaction scenario in response to the transaction request, it further includes: in the case that the plurality of historical transaction subsets include a transaction subset corresponding to the target transaction scenario, determining a plurality of sub-feature items respectively corresponding to the plurality of historical transaction subsets based on the plurality of transaction feature items, where the number of the plurality of sub-feature items is greater than 0 and less than the number of the plurality of transaction feature items; determining the transaction security parameters corresponding to the target object based on the plurality of sub-feature items respectively corresponding to the plurality of historical transaction subsets.
[0007] Optionally, determining the transaction security parameter corresponding to the target object according to the multiple sub-feature items respectively corresponding to the multiple historical transaction subsets includes: when the multiple historical transaction subsets include historical transaction records respectively corresponding to multiple transaction scenarios, determining the transaction security types respectively corresponding to the multiple historical transaction records, where the multiple transaction scenarios include the target transaction scenario; determining the security thresholds respectively corresponding to the multiple sub-feature items respectively corresponding to the multiple historical transaction subsets according to the multiple transaction scenarios; and determining the transaction security parameters respectively corresponding to the multiple transaction scenarios according to the transaction security types respectively corresponding to the multiple historical transaction records, the multiple sub-feature items respectively corresponding to the multiple historical transaction subsets, and the security thresholds respectively corresponding to the corresponding multiple sub-feature items.
[0008] Optionally, determining the security thresholds respectively corresponding to the multiple sub-feature items respectively corresponding to the multiple historical transaction subsets according to the multiple transaction scenarios includes: determining the initial thresholds respectively corresponding to the multiple sub-feature items respectively corresponding to the multiple historical transaction subsets according to the multiple transaction scenarios; determining the amplitude adjustment index corresponding to the multiple transaction scenarios; and determining the security thresholds respectively corresponding to the multiple sub-feature items respectively corresponding to the multiple historical transaction subsets according to the amplitude adjustment index corresponding to the multiple transaction scenarios and the initial thresholds respectively corresponding to the corresponding multiple sub-feature items.
[0009] Optionally, when the multiple historical transaction subsets include a transaction subset corresponding to the target transaction scenario, determining the multiple sub-feature items respectively corresponding to the multiple historical transaction subsets according to the multiple transaction features includes: determining the importance indices respectively corresponding to the multiple transaction features; determining the selection indices respectively corresponding to the multiple historical transaction subsets, where the selection index represents the number of transaction features respectively selected by the multiple historical transaction subsets; and determining the multiple sub-feature items respectively corresponding to the multiple historical transaction subsets according to the multiple transaction features, the importance indices respectively corresponding to the multiple transaction features, and the selection indices respectively corresponding to the multiple historical transaction subsets.
[0010] Optionally, before retrieving the transaction security parameters corresponding to the target object in the target transaction scenario in response to the transaction request, the method further includes: determining a plurality of initial feature items according to the historical transaction data and the target transaction scenario; determining a missing index corresponding to each of the plurality of initial feature items according to the plurality of initial feature items and the historical transaction data; determining a plurality of correlation indices corresponding to the plurality of initial feature items respectively, where the plurality of correlation indices represent the correlation degrees of the corresponding initial feature items with other initial feature items respectively; and determining the plurality of transaction feature items from the plurality of initial feature items according to the missing indices and the plurality of correlation indices corresponding to the plurality of initial feature items respectively.
[0011] Optionally, after determining the transaction security index corresponding to the target transaction according to the target transaction parameters and the transaction security parameters, the method further includes: determining a transaction operation corresponding to the target transaction when the transaction security index is less than a predetermined threshold, where the transaction operation includes terminating the execution of the target transaction.
[0012] According to one aspect of an embodiment of the present invention, there is provided a device for determining a transaction security index, including: a receiving module, configured to receive a transaction request of a target object, where the transaction request carries target transaction parameters and a target transaction scenario corresponding to a target transaction; a response module, configured to, in response to the transaction request, retrieve transaction security parameters corresponding to the target object in the target transaction scenario, where the transaction security parameters are determined according to a plurality of historical transaction subsets and a plurality of transaction feature items, the plurality of historical transaction subsets and the plurality of transaction feature items are determined according to historical transaction data, and the historical transaction data includes transaction data corresponding to the target transaction scenario; and a first determination module, configured to determine a transaction security index corresponding to the target transaction according to the target transaction parameters and the transaction security parameters.
[0013] According to one aspect of an embodiment of the present invention, there is provided an electronic device, including: a processor; and a memory for storing executable instructions of the processor; where the processor is configured to execute the instructions to implement the transaction security index determination method according to any one of the above.
[0014] According to one aspect of an embodiment of the present invention, there is provided a computer-readable storage medium, when instructions in the computer-readable storage medium are executed by a processor of an electronic device, enabling the electronic device to execute the transaction security index determination method according to any one of the above.
[0015] In an embodiment of the present invention, a transaction request of a target object is received, where the transaction request carries target transaction parameters and a target transaction scenario corresponding to the target transaction; in response to the transaction request, transaction security parameters corresponding to the target object in the target transaction scenario are retrieved, where the transaction security parameters are determined based on a plurality of historical transaction subsets and a plurality of transaction feature items, the plurality of historical transaction subsets and the plurality of transaction feature items are determined based on historical transaction data, and the historical transaction data includes transaction data corresponding to the target transaction scenario; a transaction security index corresponding to the target transaction is determined based on the target transaction parameters and the transaction security parameters. By adopting the method of generating transaction security parameters based on historical transaction data and transaction feature items, and comprehensively evaluating transaction risks by combining the target transaction parameters and the transaction security parameters, it is possible to accurately evaluate transaction security on the premise of fully considering the unique transaction habits of users, thereby solving the technical problem that the determination of the transaction security index is inaccurate due to different users often having different transaction habits and other reasons. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The illustrative embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation to the present invention. In the drawings:
[0017] Figure 1 is a flowchart of the method for determining the transaction security index according to the embodiment of the present invention;
[0018] Figure 2 is a schematic diagram of the overall model module in an alternative embodiment of the present invention;
[0019] Figure 3 is a block diagram of the structure of the device for determining the transaction security index according to the embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0020] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0021] It should be noted that the terms "first", "second", etc. in the description, claims and the above-mentioned drawings of the present invention are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that such data used can be interchanged under appropriate circumstances, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0022] First, some nouns or terms that appear in the process of describing the embodiments of the present application are applicable to the following explanations:
[0023] CART algorithm: The CART algorithm (Classification and Regression Trees) is a decision tree algorithm for classification and regression. It constructs a decision tree by recursively dividing the data set into smaller subsets, and the division of each node is based on the optimal feature and threshold.
[0024] Information gain: Information gain is an index to measure the predictive ability of a feature for the target variable. Based on the concept of information entropy, it represents the degree of reduction in information uncertainty after dividing the data set by a certain feature.
[0025] Gini coefficient: The Gini coefficient is an index to measure the purity of a data set, used to evaluate the quality of feature division, and represents the probability that two randomly selected samples have different categories.
[0026] ID3 algorithm: The ID3 algorithm (Iterative Dichotomiser 3) is a decision tree classification algorithm that constructs a decision tree by recursively selecting the optimal feature for division.
[0027] C4.5 algorithm: The C4.5 algorithm is an improved version of the ID3 algorithm, which solves the problem of the preference of information gain for the number of feature values by introducing the information gain ratio.
[0028] AUC: AUC (Area Under the ROC Curve) is the area under the ROC curve (Receiver Operating Characteristic Curve), used to evaluate the performance of a classification model. The ROC curve is obtained by plotting the true positive rate (TPR) and false positive rate (FPR) at different thresholds.
[0029] Python: Python is a programming language used in data analysis, machine learning, artificial intelligence, web development and other fields.
[0030] KS: The KS value is an indicator to measure the performance of the classification model, indicating the model's ability to distinguish between positive and negative samples.
[0031] Example 1
[0032] According to an embodiment of the present invention, an embodiment of a method for determining a transaction security index is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0033] Figure 1 is a flow chart of a method for determining a transaction security index according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:
[0034] S102, receiving a transaction request of a target object, wherein the transaction request carries a target transaction parameter and a target transaction scenario corresponding to the target transaction;
[0035] In step S102 provided in the present application, a transaction request of a target object is received.
[0036] Among them, the target object is involved, and the target object is the subject that initiates the transaction request during the transaction process.
[0037] Among them, a transaction request is involved, which is a request initiated by the target object to perform a certain transaction operation.
[0038] Among them, target transaction parameters are involved, which are specific parameters directly related to the current transaction request, and these parameters are used to describe the details and characteristics of the transaction.
[0039] Among them, the target transaction scenario is involved, which is the specific environment or background in which the transaction occurs.
[0040] Receive a transaction request from a target object, wherein the transaction request carries target transaction parameters and target transaction scenarios corresponding to the target transaction, which can provide the necessary information basis for subsequent security analysis of the transaction information.
[0041] S104, in response to the transaction request, retrieve transaction security parameters corresponding to the target object in the target transaction scenario, wherein the transaction security parameters are determined based on a plurality of historical transaction subsets and a plurality of transaction feature items, and the plurality of historical transaction subsets and the plurality of transaction feature items are determined based on historical transaction data, and the historical transaction data includes transaction data corresponding to the target transaction scenario;
[0042] In step S104 provided in the present application, the transaction request is responded to, and the transaction security parameters corresponding to the target object in the target transaction scenario are retrieved.
[0043] Among them, transaction security parameters are involved. The transaction security parameters are obtained based on historical transaction data and transaction feature items and are used to determine the risk level of the transaction. The transaction security parameters can be a collection of a series of judgment conditions. The transaction security parameters can include historical transaction behaviors, risk levels, device information, transaction time and other conditional parameters of the target object.
[0044] Therein, multiple historical transaction subsets are involved, and the multiple historical transaction subsets are multiple transaction subsets extracted from historical transaction data, and the extraction method can be random sampling, such as replacement sampling.
[0045] Among them, multiple transaction feature items are involved. The multiple transaction feature items are items extracted from historical transaction data and used to describe the characteristics or attributes of transaction behaviors, which can be used to evaluate the security of transactions.
[0046] Among them, historical transaction data is involved, which is a collection of transaction records that occurred in the past.
[0047] By extracting multiple historical transaction subsets and transaction feature items from historical transaction data, combined with the user's historical transaction behavior, risk level, device information and other conditional parameters, it is possible to accurately characterize the target object's transaction habits, which in turn helps to formulate targeted transaction security parameters for the user. When the target object initiates a transaction request, the transaction security parameters corresponding to the target object in the target transaction scenario can be directly retrieved to provide a risk assessment judgment benchmark for the current transaction, thereby facilitating the subsequent quantitative assessment of transaction risks.
[0048] S106, determining a transaction security index corresponding to the target transaction based on the target transaction parameters and the transaction security parameters.
[0049] In step S106 provided in the present application, a transaction security index corresponding to the target transaction is determined based on the target transaction parameters and the transaction security parameters.
[0050] Among them, a transaction security index is involved. The transaction security index is an index used to evaluate the security or risk level of a transaction. The transaction security index is determined based on target transaction parameters (such as transaction amount, transaction time, transaction location, etc.) and transaction security parameters (such as the user's historical transaction behavior, risk level, device information, etc.).
[0051] By retrieving the transaction security parameters matching the target object, it is possible to accurately evaluate the security of the current transaction by combining the specific parameters of the current transaction (such as amount, time, location, etc.) on the premise of fully considering the user's unique transaction habits, thus effectively solving the problem of inaccurate security judgment caused by differences in user transaction habits, and then achieving an accurate evaluation of transaction security and ensuring the reliability and security of the transaction.
[0052] Through the above steps S102 - S106, receive the transaction request of the target object. Among them, the transaction request carries the target transaction parameters and the target transaction scenario corresponding to the target transaction; in response to the transaction request, retrieve the transaction security parameters corresponding to the target object in the target transaction scenario. Among them, the transaction security parameters are determined based on multiple historical transaction subsets and multiple transaction feature items. The multiple historical transaction subsets and the multiple transaction feature items are determined based on historical transaction data, and the historical transaction data includes transaction data corresponding to the target transaction scenario; determine the transaction security index corresponding to the target transaction based on the target transaction parameters and the transaction security parameters. By adopting the method of generating transaction security parameters based on historical transaction data and transaction feature items, and comprehensively evaluating transaction risks by combining target transaction parameters and transaction security parameters, it is possible to accurately evaluate transaction security on the premise of fully considering the user's unique transaction habits, and then solve the technical problem of inaccurate determination of the transaction security index due to different users often having different transaction habits and other reasons.
[0053] As an optional embodiment, before retrieving the transaction security parameters corresponding to the target object in the target transaction scenario in response to the transaction request, it further includes: in the case that the multiple historical transaction subsets include the transaction subset corresponding to the target transaction scenario, determine multiple sub - feature items corresponding to the multiple historical transaction subsets respectively based on the multiple transaction feature items, where the number of the multiple sub - feature items is greater than 0 and less than the number of the multiple transaction feature items; determine the transaction security parameters corresponding to the target object based on the multiple sub - feature items corresponding to the multiple historical transaction subsets respectively.
[0054] In this embodiment, the specific steps before retrieving the transaction security parameters corresponding to the target object in the target transaction scenario in response to the transaction request are described.
[0055] Among them, multiple sub - feature items are involved. These multiple sub - feature items are multiple feature items extracted from multiple transaction feature items, which can be all transaction feature items or partial transaction feature items among multiple transaction feature items.
[0056] In the steps involved in this embodiment, when multiple historical transaction subsets include a transaction subset corresponding to the target transaction scenario, first, according to multiple transaction feature items, multiple sub - feature items respectively corresponding to multiple historical transaction subsets are determined. Then, according to the multiple sub - feature items respectively corresponding to multiple historical transaction subsets, the transaction security parameters corresponding to the target object are determined.
[0057] By extracting different multiple sub - feature items from multiple transaction feature items for different historical transaction subsets and determining transaction security parameters based on these sub - feature items, not only can the feature dimensions of historical transaction data analysis be reduced, but also through different multiple sub - feature items corresponding to different historical transaction subsets, multi - angle analysis of historical transaction data can be achieved, which helps to fully understand the user's transaction habits, and further helps to generate more targeted and accurate transaction security parameters for each target object, providing a more reliable basis for subsequent transaction security assessment.
[0058] As an alternative embodiment, determining the transaction security parameters corresponding to the target object based on multiple sub - feature items respectively corresponding to multiple historical transaction subsets includes: when multiple historical transaction subsets include historical transaction records respectively corresponding to multiple transaction scenarios, determining the transaction security types respectively corresponding to multiple historical transaction records, where multiple transaction scenarios include the target transaction scenario; determining the security thresholds respectively corresponding to multiple sub - feature items respectively corresponding to multiple historical transaction subsets according to multiple transaction scenarios; and determining the transaction security parameters respectively corresponding to multiple transaction scenarios based on the transaction security types respectively corresponding to multiple historical transaction records, multiple sub - feature items respectively corresponding to multiple historical transaction subsets, and the security thresholds respectively corresponding to the corresponding multiple sub - feature items.
[0059] In this embodiment, the specific steps of determining the transaction security parameters corresponding to the target object based on multiple historical transaction subsets and multiple sub - feature items respectively corresponding to multiple historical transaction subsets are described.
[0060] Among them, historical transaction records are involved. The historical transaction record is the detailed information of the transactions in the historical transaction subset, which may include the transaction time, amount, information of both trading parties, trading device, trading location, etc.
[0061] Among them, transaction security types are involved. The transaction security type is a transaction security classification analyzed from historical transaction records and is used to describe the security or risk level of transactions.
[0062] Among them, a security threshold is involved. The security threshold is a critical value set for each sub-feature item and is used to determine whether a transaction is within the normal range or whether there is a risk.
[0063] In the steps involved in this embodiment, when multiple historical transaction subsets include historical transaction records corresponding to multiple transaction scenarios respectively, first, determine the transaction security types corresponding to the multiple historical transaction records respectively, where the multiple transaction scenarios include the target transaction scenario. Then, according to the multiple transaction scenarios, determine the security thresholds corresponding to the multiple sub-feature items corresponding to the multiple historical transaction subsets respectively. Finally, according to the transaction security types corresponding to the multiple historical transaction records respectively, the multiple sub-feature items corresponding to the multiple historical transaction subsets respectively, and the security thresholds corresponding to the corresponding multiple sub-feature items respectively, determine the transaction security parameters corresponding to the multiple transaction scenarios respectively.
[0064] Through the above steps, by comprehensively considering the transaction security types corresponding to the multiple historical transaction records respectively, the multiple sub-feature items corresponding to the multiple historical transaction subsets respectively, and the security thresholds corresponding to the corresponding multiple sub-feature items respectively, a comprehensive and multi-angle analysis of the user's historical transaction data can be achieved, which helps to accurately determine the user's transaction habits, and further enables the generation of more targeted transaction security parameters for each transaction scenario of the user.
[0065] As an optional embodiment, determining the security thresholds corresponding to the multiple sub-feature items corresponding to the multiple historical transaction subsets respectively according to the multiple transaction scenarios includes: determining the initial thresholds corresponding to the multiple sub-feature items corresponding to the multiple historical transaction subsets respectively according to the multiple transaction scenarios; determining the amplitude adjustment index corresponding to the multiple transaction scenarios; and determining the security thresholds corresponding to the multiple sub-feature items corresponding to the multiple historical transaction subsets respectively according to the amplitude adjustment index corresponding to the multiple transaction scenarios and the initial thresholds corresponding to the corresponding multiple sub-feature items respectively.
[0066] In this embodiment, the specific steps of determining the security thresholds corresponding to the multiple sub-feature items corresponding to the multiple historical transaction subsets respectively according to the multiple transaction scenarios are described.
[0067] Among them, an initial threshold is involved. The initial threshold is an initial security judgment standard value set for each sub-feature item. The initial threshold is a reference value statistically obtained based on historical transaction data and is used to preliminarily judge whether a transaction feature item is within the normal range or whether there is a risk.
[0068] Among them, an amplitude adjustment index is involved. The amplitude adjustment index is an index used to adjust the initial threshold, and the specific adjustment index corresponding to it is different in different transaction scenarios.
[0069] In the steps involved in this embodiment, first, according to multiple transaction scenarios, initial thresholds corresponding to multiple sub-feature items respectively corresponding to multiple historical transaction subsets are determined. Then, an amplitude adjustment index corresponding to multiple transaction scenarios is determined. Finally, according to the amplitude adjustment index corresponding to multiple transaction scenarios and the initial thresholds respectively corresponding to multiple sub-feature items, safety thresholds respectively corresponding to multiple sub-feature items respectively corresponding to multiple historical transaction subsets are determined.
[0070] By combining the initial threshold and the amplitude adjustment index, the safety threshold of each sub-feature item can be flexibly adjusted according to different transaction scenarios, so as to more accurately identify the transaction security in different scenarios, improving the adaptability and accuracy of transaction security assessment.
[0071] As an alternative embodiment, in the case where multiple historical transaction subsets include a transaction subset corresponding to a target transaction scenario, determining multiple sub-feature items respectively corresponding to multiple historical transaction subsets based on multiple transaction feature items includes: determining importance indices respectively corresponding to multiple transaction feature items; determining selection indices respectively corresponding to multiple historical transaction subsets, where the selection index represents the number of transaction feature items respectively selected by multiple historical transaction subsets; and determining multiple sub-feature items respectively corresponding to multiple historical transaction subsets based on multiple transaction feature items, the importance indices respectively corresponding to multiple transaction feature items, and the selection indices respectively corresponding to multiple historical transaction subsets.
[0072] In this embodiment, the specific steps of determining multiple sub-feature items respectively corresponding to multiple historical transaction subsets based on multiple transaction feature items and multiple historical transaction subsets are described.
[0073] Among them, an importance index is involved, and this importance index is the relative importance of each transaction feature item in evaluating transaction security, reflecting the contribution degree of a certain feature item in judging transaction security.
[0074] Among them, a selection index is involved, and this selection index is the number of transaction feature items respectively selected in multiple historical transaction subsets. For example, for the first historical transaction subset, 3 feature items are selected, and for the second transaction subset, 4 feature items are selected.
[0075] In the steps involved in this embodiment, first, importance indices respectively corresponding to multiple transaction feature items are determined, and selection indices respectively corresponding to multiple historical transaction subsets are determined. Then, multiple sub-feature items respectively corresponding to multiple historical transaction subsets are determined based on multiple transaction feature items, the importance indices respectively corresponding to multiple transaction feature items, and the selection indices respectively corresponding to multiple historical transaction subsets.
[0076] By quantifying the importance of each feature item and its representativeness in different historical transaction subsets, it is possible to accurately identify the feature items that contribute most to the evaluation of transaction security. At the same time, this feature screening method based on importance and selectivity can better adapt to the differences in the feature distributions of different historical transaction subsets, ensuring that the generated sub-feature items are more targeted and representative, thus contributing to the accurate analysis of the transaction habits of the target object and further helping to improve the accuracy of the current transaction security.
[0077] As an alternative embodiment, before retrieving the transaction security parameters corresponding to the target object in the target transaction scenario in response to a transaction request, it further includes: determining a plurality of initial feature items based on the historical transaction data and the target transaction scenario; determining the missing index corresponding to each of the plurality of initial feature items based on the plurality of initial feature items and the historical transaction data; determining a plurality of correlation indices corresponding to each of the plurality of initial feature items, where the plurality of correlation indices represent the degree of correlation of the corresponding initial feature items with other initial feature items; and determining a plurality of transaction feature items from the plurality of initial feature items based on the missing index and the plurality of correlation indices corresponding to each of the plurality of initial feature items.
[0078] In this embodiment, the specific steps before retrieving the transaction security parameters corresponding to the target object in the target transaction scenario in response to a transaction request are described.
[0079] Among them, a plurality of initial feature items are involved. The plurality of initial feature items are all possible feature items initially extracted from the historical transaction data that can be used to describe transaction behaviors. These feature items are an unfiltered set of original features, covering all aspects of transactions, such as transaction amount, transaction time, transaction location, user device information, transaction frequency, etc.
[0080] Among them, the missing index is involved. The missing index is the proportion or frequency of a certain initial feature item missing in the historical transaction data. This missing index reflects the integrity of the data corresponding to this feature item in the historical transaction data.
[0081] Among them, a plurality of correlation indices are involved. The plurality of correlation indices represent the degree of correlation between a certain initial feature item and other initial feature items.
[0082] In the steps involved in this embodiment, first, a plurality of initial feature items are determined according to the historical transaction data and the target transaction scenario. Then, the missing index corresponding to each of the plurality of initial feature items is determined based on the plurality of initial feature items and the historical transaction data. Next, a plurality of correlation indices corresponding to each of the plurality of initial feature items are determined. Finally, a plurality of transaction feature items are determined from the plurality of initial feature items based on the missing index and the plurality of correlation indices corresponding to each of the plurality of initial feature items.
[0083] By screening out feature items with low missing rates, feature items with insufficient data integrity can be removed, and redundant features can be eliminated using a correlation index, thereby streamlining the feature set, improving the quality and representativeness of the features, which helps reduce the computational complexity and ensures that the selected feature items are more informative and discriminative.
[0084] As an alternative embodiment, after determining the transaction security index corresponding to the target transaction based on the target transaction parameters and the transaction security parameters, it further includes: in the case where the transaction security index is less than a predetermined threshold, determining the transaction operation corresponding to the target transaction, where the transaction operation includes terminating the execution of the target transaction.
[0085] In this embodiment, the specific steps after determining the transaction security index corresponding to the target transaction based on the target transaction parameters and the transaction security parameters are described.
[0086] Among them, a predetermined threshold is involved. The predetermined threshold is a critical value set in advance and is used to determine whether the transaction security index is within an acceptable security range.
[0087] Among them, a transaction operation is involved. The transaction operation is the specific operation taken for the target transaction when the transaction security index is lower than the predetermined threshold. For example, terminating the execution of the target transaction.
[0088] In the steps involved in this embodiment, in the case where the transaction security index is less than the predetermined threshold, the transaction operation corresponding to the target transaction is determined, where the transaction operation includes terminating the execution of the target transaction.
[0089] Through the above steps, in the case where the transaction security index is less than the predetermined threshold, the transaction operation corresponding to the target transaction (such as terminating the execution of the target transaction) is determined, thereby effectively reducing the potential losses brought by non - secure transactions and further ensuring the security of the transaction.
[0090] Based on the above - mentioned embodiments and alternative embodiments, an alternative implementation manner is provided, which is described in detail below.
[0091] In the related art, when a user conducts a transaction, it is necessary to judge the transaction security index to determine whether the transaction needs to continue. However, due to reasons such as different users often having different transaction habits, there is a technical problem that the determination of the transaction security index is inaccurate.
[0092] For the above - mentioned problems, no effective solution has been proposed yet.
[0093] Figure 2 It is a schematic diagram of the overall model module in an alternative implementation manner of the present invention, as Figure 2 shown, and is described in detail below.
[0094] In view of this, in an alternative embodiment of the present invention, a method for determining a transaction security index is provided, which can also be referred to as a risk control rule mining method based on random forest and decision tree, and can effectively solve the technical problem of inaccurate determination of the transaction security index due to different users often having different transaction habits and other reasons.
[0095] S1. Receive a transaction request of a target object, where the transaction request carries target transaction parameters and a target transaction scenario corresponding to the target transaction.
[0096] S2. Respond to the transaction request.
[0097] Specifically, S2 further includes:
[0098] S21. When multiple historical transaction subsets include transaction subsets corresponding to the target transaction scenario, determine multiple sub-feature items respectively corresponding to the multiple historical transaction subsets according to multiple transaction feature items, where the number of the multiple sub-feature items is greater than 0 and less than the number of the multiple transaction feature items.
[0099] Specifically, S21 further includes:
[0100] S211. Determine importance indexes respectively corresponding to the multiple transaction feature items.
[0101] S212. Determine selection indexes respectively corresponding to the multiple historical transaction subsets, where the selection index represents the number of transaction feature items respectively selected by the multiple historical transaction subsets.
[0102] S213. Determine multiple sub-feature items respectively corresponding to the multiple historical transaction subsets according to the multiple transaction feature items, the importance indexes respectively corresponding to the multiple transaction feature items, and the selection indexes respectively corresponding to the multiple historical transaction subsets.
[0103] For example, obtain transaction data and perform preprocessing on the data, that is, perform preprocessing operations such as cleaning and filtering on the original transaction, operation and other data to prepare a data set for model feature processing. Specifically, it includes:
[0104] A1. Define m non-safe transaction, operation and other tabular data, and perform operations such as cleaning and filtering on the m tabular data to screen out n pieces of data.
[0105] A2. Perform feature engineering processing on the data cleaned in A1, including operations such as feature processing and feature selection.
[0106] Specifically, for the n pieces of data in A1, according to the security situation, the n pieces of data are processed into k different features (the same as the above-mentioned multiple feature items), the missing feature values are filled with corresponding values, the random function in Python is used to randomly sample and combine the k features, and important features are selected according to the information value (iv) and the degree of feature importance (the same as the above-mentioned importance index), providing different groups of features for subsequent modeling (the same as the multiple sub-feature items corresponding to the above-mentioned multiple historical transaction subsets). Among them, the sampling length range (the same as the above-mentioned selection index) is set to li~lj, where 0 < li < lj < k.
[0107] S22. Determine the transaction security parameters corresponding to the target object according to the multiple sub-feature items corresponding to the multiple historical transaction subsets respectively.
[0108] Specifically, S22 further includes:
[0109] S221. When the multiple historical transaction subsets include historical transaction records corresponding to multiple transaction scenarios respectively, determine the transaction security types corresponding to the multiple historical transaction records respectively, where the multiple transaction scenarios include the target transaction scenario;
[0110] S222. Determine the initial thresholds corresponding to the multiple sub-feature items corresponding to the multiple historical transaction subsets respectively according to the multiple transaction scenarios;
[0111] S223. Determine the amplitude adjustment index corresponding to the multiple transaction scenarios;
[0112] S224. Determine the security thresholds corresponding to the multiple sub-feature items corresponding to the multiple historical transaction subsets respectively according to the amplitude adjustment index corresponding to the multiple transaction scenarios and the initial thresholds corresponding to the multiple sub-feature items respectively;
[0113] S225. Determine the transaction security parameters corresponding to the multiple transaction scenarios respectively according to the transaction security types corresponding to the multiple historical transaction records respectively, the multiple sub-feature items corresponding to the multiple historical transaction subsets respectively, and the security thresholds corresponding to the multiple sub-feature items respectively.
[0114] For example, construct a random forest classification model and a decision tree classification model. Use the random forest algorithm to construct multiple decision tree models. Each decision tree learns different features and security parameters (the same as the above-mentioned transaction security parameters) from the dataset based on the principles of random sampling and random feature selection. Construct a single decision tree. The decision tree extracts different combinations of features and security parameters from different parameter sets based on all samples and the random sampling parameter set.
[0115] Specifically, a random forest classification model is constructed. That is, the parameter range of the random forest model is set. For example, in order to limit the combination of parameters from being too large, the range of the maximum depth max_depth of the tree is set to [3, 7]. Usually, in order to limit the number of trees participating in training, the range of the number of decision tree parameters n_estimators is set to [10, 50]. Finally, knum features randomly selected from A2 are input into the model for training. i groups of experiments can be set, with different feature numbers knum and parameters in each group. The established random forests are different, and the generated parameters (the same as the above transaction security parameters) are also different.
[0116] Specifically, a single decision tree model is constructed. That is, the model parameter range is set, similar to the random forest. In order to limit the combination of parameters from being too large, the range of the maximum depth max_depth of the tree is set to [3, 7]. The parameter range of the minimum number of samples min_samples_leaf at the leaf node (sub-dataset) is selected as [50, 100], and the parameter range of the minimum number of samples min_samples_split required for further splitting the sub-dataset is selected as [10, 30]. Finally, knum features randomly selected from A2 are input into the model for training. i groups of experiments can be set, with different feature numbers knum and parameters in each group. The established decision trees are different, and the generated parameters (the same as the above transaction security parameters) are also different.
[0117] By analyzing the importance indicators of each feature in the random forest, such as information gain, Gini coefficient, etc., determine the contribution degree and influence of each feature in the model. For the constructed random forest and decision tree, determine the evaluation indicators, screen the features. There are two types: information gain and Gini coefficient. ID3 and C4.5 algorithms (using information gain ratio) use information gain, and the CART algorithm uses the Gini coefficient, with the default being the gini coefficient.
[0118] According to the tree structure and feature importance of each decision tree, extract a set of security parameters (the same as the above transaction security parameters) with high importance and interpretability.
[0119] Merge and optimize the extracted set of security parameters to reduce the redundancy and complexity of the parameters, while retaining the coverage and predictive ability of the parameters.
[0120] For the constructed random forest and decision tree, after configuring the evaluation indicators for feature screening, train the two models. AUC is used as the training evaluation of the model. The model training maximizes the AUC index value. Continuously repeat the experiment to select the best parameters and the best model of the model, and retain the parameters of each round of experiment.
[0121] For each set of optimal parameters and optimal models obtained through training under different experiments, output the parameters generated by the random forest and decision tree, and merge and optimize the extracted parameter set to reduce the redundancy and complexity of the parameters while retaining the coverage and predictive ability of the parameters.
[0122] Adjust the threshold of the generated parameters according to the actual business (the same as the above transaction scenario). For example, divide the transaction amount within the past 1 hour that is less than or equal to 33.05 yuan. To ensure that the threshold (the same as the above security threshold) is more suitable for the actual business needs, construct a threshold oscillator, adjust the threshold to be less than or equal to 35 yuan, take the remainder of 5, keep the threshold as an integer and a multiple of 5, and the maximum absolute value of the up and down oscillation (the same as the above amplitude adjustment index) is 5. Then filter and remove duplicate parameters that appear repeatedly.
[0123] Evaluate and verify the generated set of security parameters, including indicators such as the accuracy, coverage rate, and generalization ability of the parameters, to ensure the effectiveness and reliability of the parameters. It includes: for the parameters screened to meet the business needs, recalculate the parameters in the training samples, validation samples, and test samples, set evaluation indicators such as KS, accuracy, and recall rate, calculate whether the KS in the corresponding samples is consistent, and whether the accuracy and recall rate are high, and then screen out parameters with high stability, high accuracy, and high interpretability. Check whether the black samples of the model are covered by the screened parameter combinations, whether they are completely covered, and whether the coverage rate meets the business requirements. Finally, determine whether the screened parameter combinations can be applied to production.
[0124] S23, retrieve the transaction security parameters corresponding to the target object in the target transaction scenario, where the transaction security parameters are determined based on multiple historical transaction subsets and multiple transaction feature items, and the multiple historical transaction subsets and multiple transaction feature items are determined based on historical transaction data, and the historical transaction data includes transaction data corresponding to the target transaction scenario.
[0125] Specifically, before S2, it also includes:
[0126] Determine multiple initial feature items based on historical transaction data and the target transaction scenario;
[0127] S201, determine the missing index corresponding to each of the multiple initial feature items based on the multiple initial feature items and historical transaction data;
[0128] S202, determine multiple correlation indices corresponding to each of the multiple initial feature items, where the multiple correlation indices represent the degree of correlation between the corresponding initial feature items and other initial feature items;
[0129] S203. Determine multiple transaction feature items from multiple initial feature items according to the missing indexes and multiple correlation indexes respectively corresponding to the multiple initial feature items.
[0130] S3. Determine a transaction security index corresponding to the target transaction according to the target transaction parameter and the transaction security parameter;
[0131] S4. When the transaction security index is less than a predetermined threshold, determine a transaction operation corresponding to the target transaction, where the transaction operation includes terminating the execution of the target transaction.
[0132] Through the above steps, a detailed introduction will be given below in combination with specific examples.
[0133] B1. Data preprocessing:
[0134] Perform preprocessing operations such as cleaning and filtering on the original transaction, operation and other data to prepare a data set for model feature processing. Specifically, extract data from the user's historical transaction records and operation records, and extract part of the data of the scenario of transferring money to other users from January to June 2024 from 1 transaction table, 1 operation table and 1 user table, and screen out 50 fields such as user mobile phone number, operator number, transaction number, transaction time, transaction amount, transaction category, withdrawal method, deposit method, etc. The total number of data is 300,000 (w) records, including 2,000 non-safe samples. Then divide the selected data set by month. The training set months are from January to April 2024, the validation set month is May 2024, and the test set month is June 2024.
[0135] B2. Feature engineering:
[0136] Perform feature engineering processing on the cleaned data, including feature processing, feature selection and other operations. Specifically, process the 300,000 transfer data and 50 fields screened out, and a total of 100 different features are processed, such as features of transfer amount within the past 1 hour, number of transfer transactions, total number of transaction transactions, total transaction amount, proportion of transfer transactions, proportion of transfer amount, etc.
[0137] Use the random function in Python to randomly sample and combine 50 features to determine the parameter ranges of their missing rates (same as the above missing indexes), correlations (same as the above correlation indexes), iv values, and stability indexes (psi values). And select appropriate features according to these parameters. The correlation value range is determined to be [0, 0.6], the missing rate value range is selected to be [0, 0.35], the iv value range is selected to be [0.05, 0.5], and the psi value range is selected to be [0, 0.2] to provide different groups of features for subsequent modeling. The sampling length range is set to 15 - 30, that is, 15 - 30 features are randomly selected each time.
[0138] B3. Construction of Random Forest and Decision Tree:
[0139] Multiple decision tree models are constructed using the random forest algorithm. Each decision tree learns different features and security parameters from the dataset based on the principles of random sampling and random feature selection. A single decision tree is constructed, which extracts different combinations of features and security parameters from different parameter sets based on all samples and a random sampling parameter set.
[0140] Specifically, a random forest classification model and a decision tree classification model are constructed respectively.
[0141] First, construct a random forest classification model and set the parameter range of the random forest model. To limit the combination of parameters from being too large, set the range of the maximum depth max_depth of the tree to [3, 7]. To limit the number of trees participating in training, set the range of the parameter n_estimators to [10, 50]. Finally, select 10 - 30 randomly selected features to be included in the model for model training. Set 100 groups of experiments, where the number of features and parameters in each group are different, and the established random forest classification models are also different, generating different parameters.
[0142] Secondly, construct a single decision tree model and set the parameter range of the model. Similar to the random forest, to limit the combination of parameters from being too large, set the range of the maximum depth max_depth of the tree to [3, 7]. For other parameters, select the range of the minimum number of samples min_samples_leaf for leaf nodes (sub - datasets) to be [50, 100], and the range of the minimum number of samples required for further splitting of the sub - dataset min_samples_split to be [10, 30]. Finally, select 10 - 30 randomly selected features to be included in the model for model training. Set 2000 groups of experiments, where the number of features and parameters in each group are different, and different decision classification trees are established, generating different decision parameters.
[0143] B4. Feature Importance Evaluation:
[0144] By analyzing the importance indicators of each feature in the random forest, such as information gain, Gini coefficient, etc., determine the contribution and influence of each feature in the model. Specifically, for the constructed random forest classification model and decision tree classification model, the default parameter Gini coefficient is used to measure the split.
[0145] B5. Security Parameter Extraction:
[0146] According to the tree structure and feature importance of each decision tree, extract a set of security parameters with high importance and interpretability.
[0147] Specifically, for the constructed random forest classification model and decision tree classification model, after configuring the evaluation indicators for feature screening, the two models are trained. AUC is used as the training evaluation of the model, and the model training maximizes the AUC index value. The experiment is continuously repeated to select the best parameters and the best model of the model, and the parameters of each round of experiment are retained.
[0148] B6. Parameter combination and optimization:
[0149] The extracted set of security parameters is merged and optimized to reduce the redundancy and complexity of the parameters, while retaining the coverage and predictive ability of the parameters.
[0150] Specifically, for the different best parameters and best models obtained under each group of experiments during training, the parameters generated by the random forest classification model and the decision tree classification model are output. The thresholds of the generated parameters are adjusted according to the actual business, such as dividing the transfer amount within the past 1 hour as less than or equal to 33.05 yuan. To ensure that the threshold is more suitable for the actual business needs, a threshold oscillator is constructed to adjust the threshold to less than or equal to 35 yuan, taking the remainder of 5, and the threshold is retained as an integer and a multiple of 5, with the maximum absolute value of the up and down oscillation being 5. Then, the repeatedly occurring parameters are filtered and de-duplicated.
[0151] B7. Parameter evaluation and verification:
[0152] The generated set of security parameters is evaluated and verified, including indicators such as the accuracy, coverage rate, and generalization ability of the parameters, to ensure the effectiveness and reliability of the parameters.
[0153] Specifically, for the parameters that meet the business requirements selected, the parameters are sent to the training samples, verification samples, and test samples for recalculation, and evaluation indicators are set, such as KS, accuracy rate, and recall rate. Calculate whether the KS in the corresponding samples is consistent, and whether the accuracy rate and recall rate are high, and then select the appropriate parameters. Finally, check the black sample coverage of the selected parameter combination, whether it is completely covered, and whether the coverage rate meets the business requirements, and finally determine whether the selected parameter combination can be applied.
[0154] Through the above optional implementation manners, at least the following beneficial effects can be achieved:
[0155] (1) Compared with the related technologies, the present invention generates transaction security parameters by adopting a method based on historical transaction data and transaction feature items, and comprehensively evaluates transaction risks by combining target transaction parameters and transaction security parameters. It can accurately evaluate transaction security on the premise of fully considering the unique transaction habits of users, and thus solves the technical problem that the determination of the transaction security index is inaccurate due to different users often having different transaction habits and other reasons.
[0156] (2) Compared with the related art, the present invention extracts different multiple sub-feature items from multiple transaction feature items for different historical transaction subsets, and determines transaction security parameters based on these sub-feature items. This can not only reduce the feature dimensions for analyzing historical transaction data, but also achieve multi-angle analysis of historical transaction data through different multiple sub-feature items corresponding to different historical transaction subsets, thereby helping to fully understand the user's transaction habits, and further helping to generate more targeted and accurate transaction security parameters for each target object, providing a more reliable basis for subsequent transaction security evaluation.
[0157] (3) Compared with the related art, by quantifying the importance and representativeness of each feature item in different historical transaction subsets, the present invention can accurately identify the feature items that contribute the most to transaction security evaluation. At the same time, this feature screening method based on importance and selectivity can better adapt to the feature distribution differences of different historical transaction subsets, ensuring that the generated sub-feature items are more targeted and representative, thus helping to achieve accurate analysis of the transaction habits of target objects, and further helping to improve the accuracy of current transaction security.
[0158] (4) Compared with the related art, by screening out feature items with low missing rates, the present invention can remove feature items with insufficient data integrity, and at the same time use correlation indices to eliminate redundant features, thereby streamlining the feature set, improving the quality and representativeness of features, which helps to reduce the computational complexity and ensures that the selected feature items have more information value and discrimination ability.
[0159] (5) Compared with the related art, the present invention generates a large number of security parameters by combining a random forest classification model and a decision tree classification model. And a threshold oscillator is designed, which can reasonably set appropriate thresholds according to business requirements. At the same time, corresponding evaluation indicators are designed to better ensure the reliability and stability of security parameters.
[0160] It should be noted that for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the present invention.
[0161] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases, the former is a better implementation. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disc), and includes several instructions to enable a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of various embodiments of the present invention.
[0162] Embodiment 2
[0163] According to an embodiment of the present invention, there is also provided a device for implementing the above-mentioned method for determining a transaction security index. Figure 3 It is a structural block diagram of the device for determining a transaction security index according to an embodiment of the present invention, as Figure 3 shown. The device includes: a receiving module 302, a response module 304, and a first determination module 306. The device will be described in detail below.
[0164] The receiving module 302 is configured to receive a transaction request of a target object, where the transaction request carries target transaction parameters and a target transaction scenario corresponding to the target transaction.
[0165] The response module 304 is connected to the above-mentioned receiving module 302 and is configured to, in response to the transaction request, retrieve transaction security parameters corresponding to the target object in the target transaction scenario. The transaction security parameters are determined based on a plurality of historical transaction subsets and a plurality of transaction feature items. The plurality of historical transaction subsets and the plurality of transaction feature items are determined based on historical transaction data, and the historical transaction data includes transaction data corresponding to the target transaction scenario.
[0166] The first determination module 306 is connected to the above-mentioned response module 304 and is configured to determine a transaction security index corresponding to the target transaction based on the target transaction parameters and the transaction security parameters.
[0167] It should be noted here that the above-mentioned receiving module 302, response module 304, and first determination module 306 correspond to steps S102 to S106 in the method for determining a transaction security index. The instances and application scenarios implemented by the multiple modules and the corresponding steps are the same, but are not limited to the content disclosed in the above-mentioned Embodiment 1.
[0168] Embodiment 3
[0169] According to another aspect of the embodiments of the present invention, there is also provided an electronic device, including: a processor; a memory for storing instructions executable by the processor, wherein the processor is configured to execute the instructions to implement the transaction security index determination method of any one of the above.
[0170] Embodiment 4
[0171] According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium. When the instructions in the computer-readable storage medium are executed by the processor of an electronic device, the electronic device can implement the transaction security index determination method of any one of the above.
[0172] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0173] In the above embodiments of the present invention, the descriptions of the respective embodiments have their own emphases. For parts not detailed in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.
[0174] In several embodiments provided in the present application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only illustrative. For example, the division of the units can be a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of units or modules can be in electrical or other forms.
[0175] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0176] In addition, the functional units in the various embodiments of the present invention can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.
[0177] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, read-only memories (ROMs), random access memories (RAMs), mobile hard disks, magnetic disks, or optical discs.
[0178] The above are only the preferred embodiments of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention.
Claims
1. A method for determining a transaction security index, characterized in that Including: Receiving a transaction request of a target object, where the transaction request carries target transaction parameters and a target transaction scenario corresponding to a target transaction; In response to the transaction request, retrieving transaction security parameters corresponding to the target object in the target transaction scenario, where the transaction security parameters are determined based on multiple historical transaction subsets and multiple transaction feature items, the multiple historical transaction subsets and the multiple transaction feature items are determined based on historical transaction data, and the historical transaction data includes transaction data corresponding to the target transaction scenario; Determining a transaction security index corresponding to the target transaction based on the target transaction parameters and the transaction security parameters.
2. The method according to claim 1, wherein Before retrieving the transaction security parameters corresponding to the target object in the target transaction scenario in response to the transaction request, further including: In the case that the multiple historical transaction subsets include a transaction subset corresponding to the target transaction scenario, determining multiple sub-feature items respectively corresponding to the multiple historical transaction subsets based on the multiple transaction feature items, where the number of the multiple sub-feature items is greater than 0 and less than the number of the multiple transaction feature items; Determining the transaction security parameters corresponding to the target object based on the multiple sub-feature items respectively corresponding to the multiple historical transaction subsets.
3. The method according to claim 2, wherein The determining the transaction security parameters corresponding to the target object based on the multiple sub-feature items respectively corresponding to the multiple historical transaction subsets includes: In the case that the multiple historical transaction subsets include historical transaction records respectively corresponding to multiple transaction scenarios, determining transaction security types respectively corresponding to the multiple historical transaction records, where the multiple transaction scenarios include the target transaction scenario; Determining security thresholds respectively corresponding to the multiple sub-feature items respectively corresponding to the multiple historical transaction subsets based on the multiple transaction scenarios; Determining transaction security parameters respectively corresponding to multiple transaction scenarios based on the transaction security types respectively corresponding to the multiple historical transaction records, the multiple sub-feature items respectively corresponding to the multiple historical transaction subsets, and the security thresholds respectively corresponding to the corresponding multiple sub-feature items.
4. The method according to claim 3, wherein The determining the security thresholds respectively corresponding to the multiple sub-feature items respectively corresponding to the multiple historical transaction subsets based on the multiple transaction scenarios includes: Determining initial thresholds respectively corresponding to the multiple sub-feature items respectively corresponding to the multiple historical transaction subsets based on the multiple transaction scenarios; Determining amplitude adjustment indexes corresponding to the multiple transaction scenarios; Determining the security thresholds respectively corresponding to the multiple sub-feature items respectively corresponding to the multiple historical transaction subsets based on the amplitude adjustment indexes corresponding to the multiple transaction scenarios and the initial thresholds respectively corresponding to the corresponding multiple sub-feature items.
5. The method according to claim 2, wherein The determining the multiple sub-feature items respectively corresponding to the multiple historical transaction subsets based on the multiple transaction feature items in the case that the multiple historical transaction subsets include a transaction subset corresponding to the target transaction scenario includes: Determining importance indexes respectively corresponding to the multiple transaction feature items; Determine selection indexes respectively corresponding to the multiple historical transaction subsets, where the selection indexes represent the number of transaction feature items respectively selected by the multiple historical transaction subsets; Determine multiple sub-feature items respectively corresponding to the multiple historical transaction subsets according to the multiple transaction feature items, the importance indexes respectively corresponding to the multiple transaction feature items, and the selection indexes respectively corresponding to the multiple historical transaction subsets.
6. The method according to claim 1, characterized in that, Before retrieving the transaction security parameters corresponding to the target object in the target transaction scenario in response to the transaction request, further include: Determine multiple initial feature items according to the historical transaction data and the target transaction scenario; Determine missing indexes respectively corresponding to the multiple initial feature items according to the multiple initial feature items and the historical transaction data; Determine multiple correlation indexes respectively corresponding to the multiple initial feature items, where the multiple correlation indexes represent the correlation degrees of the corresponding initial feature items with other initial feature items respectively; Determine the multiple transaction feature items from the multiple initial feature items according to the missing indexes and the multiple correlation indexes respectively corresponding to the multiple initial feature items.
7. The method according to any one of claims 1 to 6, characterized in that, After determining the transaction security index corresponding to the target transaction according to the target transaction parameters and the transaction security parameters, further include: In the case where the transaction security index is less than a predetermined threshold, determine a transaction operation corresponding to the target transaction, where the transaction operation includes terminating the execution of the target transaction.
8. A device for determining a transaction security index, characterized in that, Include: A receiving module, configured to receive a transaction request of a target object, where the transaction request carries target transaction parameters and a target transaction scenario corresponding to a target transaction; A response module, configured to, in response to the transaction request, retrieve transaction security parameters corresponding to the target object in the target transaction scenario, where the transaction security parameters are determined according to multiple historical transaction subsets and multiple transaction feature items, the multiple historical transaction subsets and the multiple transaction feature items are determined according to historical transaction data, and the historical transaction data includes transaction data corresponding to the target transaction scenario; A first determination module, configured to determine a transaction security index corresponding to the target transaction according to the target transaction parameters and the transaction security parameters.
9. An electronic device, characterized in that, Include: A processor; A memory for storing executable instructions of the processor; Wherein, the processor is configured to execute the instructions to implement the transaction security index determination method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, When the instructions in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device is enabled to execute the transaction security index determination method according to any one of claims 1 to 7.