Abnormal transaction identification methods, devices, equipment, storage media and products
By constructing multiple transaction nodes and calculating node offsets, the problem of low accuracy in identifying abnormal transactions caused by a single strategy in existing technologies is solved, and efficient identification of abnormal transactions in complex transaction scenarios is achieved.
Patent Information
- Application Number
- CN202311596503.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-27
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2043-11-27
AI Technical Summary
Existing methods for identifying abnormal transactions mainly rely on a single strategy, resulting in low accuracy in complex transaction application scenarios and an inability to effectively identify abnormal behavior in complex transactions.
Multiple transaction nodes are constructed, transaction behavior characteristic information of each transaction node is obtained, node offset is calculated, and the transaction is judged as abnormal by comprehensively considering the offsets of multiple transaction nodes.
It improves the accuracy of abnormal transaction identification in complex transaction application scenarios, and enhances transaction security and user protection.
Smart Images

Figure CN117635148B_ABST
Abstract
Description
Technical Field
[0001] This application pertains to anomaly detection technology, and particularly relates to an anomaly transaction identification method, apparatus, equipment, storage medium, and product. Background Technology
[0002] With the rapid development of mobile payment, online payment methods are becoming increasingly diverse, including APP (Application) payment, web payment including PC (Personal Computer) and H5 terminals, mini-programs, official accounts, and many other payment methods.
[0003] The separation of merchant and payment applications could lead to situations where legitimate merchant orders are transferred to fraudulent applications, thereby inducing others to make payments. Such abnormal transactions need to be identified promptly to stop the payment process and minimize financial losses for users.
[0004] Existing methods for identifying abnormal transactions primarily rely on a single strategy. For example, they may use IP verification or signature comparison to determine whether a transaction is abnormal. However, because these strategies are relatively simplistic, the accuracy of identifying abnormal transactions using existing methods is low for complex transaction scenarios. Summary of the Invention
[0005] This application provides an abnormal transaction identification method, apparatus, device, storage medium, and product, which can improve the accuracy of abnormal transaction identification.
[0006] In a first aspect, embodiments of this application provide a method for identifying abnormal transactions, the method comprising: Construct multiple trading nodes based on the characteristics of the target trading system; For each of the plurality of transaction nodes, the transaction behavior feature information corresponding to the target transaction on the transaction node is obtained as the node attribute information of the transaction node, wherein the target transaction is a transaction executed based on the target transaction system; Based on the normal node attribute information corresponding to the transaction node and the node attribute information, the node offset of the transaction node is calculated to obtain the first node offset; If there is a first transaction node among the plurality of transaction nodes whose first node offset is greater than a first preset threshold, the target transaction will be identified as an abnormal transaction.
[0007] Secondly, embodiments of this application provide an abnormal transaction identification device, the device comprising: The node building module is used to build multiple trading nodes based on the characteristics of the target trading system. The information acquisition module is used to acquire, for each of the plurality of transaction nodes, the transaction behavior feature information corresponding to the target transaction on the transaction node, as the node attribute information of the transaction node, wherein the target transaction is a transaction executed based on the target transaction system; The offset calculation module is used to calculate the node offset of the transaction node based on the normal node attribute information corresponding to the transaction node and the node attribute information, and obtain the first node offset. An anomaly detection module is used to identify the target transaction as an abnormal transaction when there is a first transaction node among the multiple transaction nodes whose first node offset is greater than a first preset threshold.
[0008] Thirdly, embodiments of this application provide an electronic device, which includes: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, it implements the steps of the abnormal transaction identification method as described in any embodiment of the first aspect.
[0009] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer program instructions, which, when executed by a processor, implement the steps of the abnormal transaction identification method as described in any embodiment of the first aspect.
[0010] Fifthly, embodiments of this application provide a computer program product in which instructions, when executed by a processor of an electronic device, cause the electronic device to perform the steps of the abnormal transaction identification method as described in any embodiment of the first aspect.
[0011] The abnormal transaction identification method, apparatus, device, storage medium, and product in this application embodiment construct multiple transaction nodes according to the characteristics of the target transaction system. The transaction behavior feature information corresponding to the target transaction at each transaction node is used as the node attribute information of each transaction node. The corresponding node offset is calculated based on the normal node attribute information and the node attribute information of each transaction node, resulting in a first node offset for each transaction node. If a first transaction node with a first node offset greater than a first preset threshold exists among these multiple transaction nodes, the target transaction is identified as an abnormal transaction. Thus, since this application embodiment constructs several important transaction nodes in the transaction process based on the characteristics of the target transaction system, and comprehensively determines whether the target transaction is abnormal based on the offset of the target transaction's transaction behavior from normal transaction behavior at each transaction node, this application embodiment can improve the accuracy of abnormal transaction identification for complex transaction application scenarios. Attached Figure Description
[0012] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0013] Figure 1 This is an architecture diagram of a transaction system provided in this application; Figure 2 This is a flowchart illustrating an abnormal transaction identification method provided in one embodiment of this application; Figure 3 This is a schematic diagram of a node offset distribution provided in this application; Figure 4 This is a schematic diagram of adjusting the distribution of node offsets provided in this application; Figure 5 This is a schematic diagram of adjusting attribute information based on a priority search tree, as provided in this application; Figure 6 This is a schematic diagram of adjusting attribute information based on a priority search tree, as provided in this application; Figure 7 This is a schematic diagram of the structure of an abnormal transaction identification device provided in one embodiment of this application; Figure 8 This is a schematic diagram of the structure of an electronic device provided in one embodiment of this application. Detailed Implementation
[0014] The features and exemplary embodiments of various aspects of this application will be described in detail below. To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain this application and not to limit it. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples.
[0015] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes said element.
[0016] Currently, when identifying abnormal transactions, a single strategy is mainly used to determine whether a transaction is abnormal. For example, for website applications, one strategy such as IP, Referer, or cookie verification is mainly used; while for mobile devices, one strategy such as package name comparison or signature comparison is mainly used.
[0017] The single strategy used above is inherently unreliable and prone to forgery and instability. For example, it can evade identification by forging Referer information or misidentify normal transactions with fluctuating IP addresses as abnormal transactions. If a merchant application supports multiple payment methods, the single-strategy approach becomes even more unreliable. Therefore, for complex transaction scenarios, traditional abnormal transaction identification methods cannot effectively identify potential abnormal transactions, thus reducing the accuracy of abnormal transaction identification.
[0018] To address the problems of existing technologies, embodiments of this application provide an abnormal transaction identification method, apparatus, device, storage medium, and product. This abnormal transaction identification method can be applied to scenarios involving the identification of abnormal transactions. The system architecture to which the abnormal transaction identification method provided in this application is applicable is described below.
[0019] Figure 1 This is an architecture diagram of a transaction system provided in this application.
[0020] like Figure 1 As shown, the transaction system may include a front-end server 11, a gateway 12, an application client 13, a browser client 14, and a payment server 15. The gateway 12 may include a browser gateway and a control gateway, etc.
[0021] For example, a user can initiate a transaction and place an order on the front-end server 11. The front-end server 11 distributes the transaction order to different gateways, and then the gateway 12 sends the transaction order to the application client 13 or the browser client 14. The application client 13 can use a fallback browser, and the browser client 14 can also redirect to the application, etc., without limitation. The application client 13 and the browser 14 upload the transaction order to the payment server 15 for order payment.
[0022] Based on the architecture of the above-described transaction system, the abnormal transaction identification method provided in this application embodiment will be described in detail below.
[0023] Figure 2 This is a flowchart illustrating an abnormal transaction identification method provided in one embodiment of this application. The abnormal transaction identification method can be executed by an electronic device, such as... Figure 1 The electronic device at either end shown can also be another third-party electronic device.
[0024] like Figure 2 As shown, the abnormal transaction identification method may specifically include the following steps: S210. Construct multiple trading nodes based on the characteristics of the target trading system; S220. For each of the multiple transaction nodes, obtain the transaction behavior feature information corresponding to the target transaction on the transaction node, as the node attribute information of the transaction node. The target transaction is a transaction executed based on the target transaction system. S230. Based on the normal node attribute information and node attribute information corresponding to the transaction node, calculate the node offset of the transaction node to obtain the first node offset. S240. If there is a first transaction node among multiple transaction nodes whose first node offset is greater than a first preset threshold, the target transaction is identified as an abnormal transaction.
[0025] Therefore, by constructing multiple transaction nodes according to the characteristics of the target transaction system, and using the transaction behavior feature information corresponding to the target transaction on each transaction node as the node attribute information of each transaction node, the corresponding node offset is calculated based on the normal node attribute information and the node attribute information of each transaction node to obtain the first node offset of each transaction node. Then, if there is a first transaction node among these multiple transaction nodes whose first node offset is greater than a first preset threshold, the target transaction is identified as an abnormal transaction. Thus, since this embodiment constructs several important transaction nodes in the transaction process based on the characteristics of the target transaction system, and comprehensively determines whether the target transaction is an abnormal transaction based on the offset of the target transaction's transaction behavior from the normal transaction behavior on each transaction node, this embodiment can improve the accuracy of abnormal transaction identification for complex transaction application scenarios.
[0026] The specific implementation methods for each of the above steps are described below.
[0027] In some implementations, in S210, the target trading system can be any form of trading system, for example... Figure 1 The example shown is a dual-form composite trading system with both website and application components.
[0028] For example, based on the system characteristics of the target transaction system itself, nodes with representative or transitional significance can be selected as transaction nodes, thereby constructing multiple transaction nodes. Transaction nodes can be user behavior nodes such as browser redirection, application launch, and payment confirmation, or traditional security nodes such as IP change, Referer comparison, cookie verification, and application package name verification, or application-specific nodes such as product mode and call order.
[0029] In some implementations, in S220, the target transaction can be any transaction to be identified generated by the target transaction system. The transaction behavior feature information can be feature information that can identify abnormal transaction behavior at a single transaction node, such as traditional prevention and control feature information such as the number of IP changes, Refer comparison results, cookie verification results, and application package name verification results, or application-specific feature information such as product mode and call order.
[0030] In addition, each trading node can have node attributes, where the node attribute information can be attribute information of the trading node's node attributes. Different trading nodes may have different types and numbers of node attributes.
[0031] In some specific examples, for the transaction node corresponding to the browser homepage when the front-end system redirects, information such as the comparison results of the merchant referrer in the target transaction, the number of IP changes, and the number of times the transaction node appears in the current transaction can be obtained as the attribute information of the node attribute of the transaction node, that is, the node attribute information.
[0032] For example, suppose that for a target trading system, N trading nodes are constructed along the trading path. If the i-th trading node has m node attributes, then the i-th trading node can be identified as... =( ).in, This refers to the attribute information of the m node attributes of the i-th transaction node, i.e., the node attribute information. For example... When the corresponding attribute is the number of times the node IP changes, the value of the number of times the target transaction's IP changes on the i-th transaction node is: .
[0033] In addition, due to the inconsistency of attribute units, and in order to ensure that the difference in the offset of the transaction nodes themselves is not too large, in some implementations, the node attribute information can also be normalized, for example, by using the interval distribution of [0-1] for normalization.
[0034] In some examples, different normalization algorithms can be used to normalize different types of node attributes.
[0035] For example, the node attributes of the change class can be normalized using the following formula (1).
[0036] in, For attribute values, These are the normalized attribute values. This refers to the number of changes within a preset time period, such as the number of IP address changes.
[0037] For example, the node attributes of the judgment class can be normalized using the following formula (2).
[0038] in, For attribute values, The value is the normalized attribute value. The node attributes to which formula (2) above applies can be, for example, package name verification results.
[0039] In some implementations, in S230, the normal node attribute information can be the node attribute information corresponding to a known normal transaction on the transaction node. For example, for the number of IP changes, the normal node attribute information can be 0.
[0040] For example, the node offset of a transaction node, also known as the first node offset, can be obtained by calculating the Euclidean distance between the node attribute information of each transaction node and its corresponding normal node attribute information.
[0041] For example, taking the normal node attribute information as 0, the node offset of the transaction node can be calculated according to the following formula (3).
[0042] in, Let be the normalized attribute value corresponding to the attribute of the i-th node. This is the offset of the first node. The node attributes to which the above formula (3) applies can be, for example, the package name verification result, etc.
[0043] In some implementations, in S240, the first preset threshold can be a value set based on experience, or a more reasonable value determined based on the isolated forest algorithm, and is not limited here.
[0044] For example, according to the above steps, a corresponding first node offset can be calculated for each transaction node. Based on this, if a first transaction node exists among the constructed multiple transaction nodes, and the first node offset corresponding to the first transaction node is greater than a first preset threshold, then the target transaction can be determined to be an abnormal transaction.
[0045] Furthermore, for each transaction node, the behavior of abnormal transactions can be categorized into those with obvious characteristics and those with inconspicuous characteristics. For example, ... Figure 3 As shown, the first node offset corresponding to a target transaction at a certain transaction node may be large, for example, the offset reaches point B, which is much larger than the first node offset corresponding to other transactions at that transaction node; of course, the first node offset corresponding to a target transaction at a certain transaction node may also be small, for example, the offset only reaches point A, which is not much different from the first node offset corresponding to other transactions at that transaction node.
[0046] Based on this, in order to further improve the identification of abnormal transactions, in some embodiments, after S230 above, the abnormal transaction identification method provided in this application embodiment may further include: If there is abnormal attribute information in the node attribute information, the number N of the required auxiliary offset sliding window is determined according to the arrangement position of the abnormal attribute information in the node attribute information, where N is a positive integer. The first node offset is updated by adding the offsets of N auxiliary offset sliding windows to the first node offset.
[0047] Here, different abnormal node distribution windows can be set for different node attributes. For example, ... Figure 4 As shown, the first region 41 can be set as the abnormal node distribution window corresponding to the first node attribute, the second region 42 can be set as the abnormal node distribution window corresponding to the second node attribute, and the third region 43 can be set as the abnormal node distribution window corresponding to the third node attribute.
[0048] For example, an auxiliary offset sliding window can be pre-set. If the attribute information of the target transaction corresponding to a certain node attribute on the transaction node is obviously abnormal, the first node offset of the target transaction on the transaction node can be increased to the abnormal node distribution window corresponding to the node attribute by using the auxiliary offset sliding window, so as to distinguish the target transaction from other normal transactions on the transaction node.
[0049] For example, such as Figure 4 As shown, if the attribute information corresponding to the first node attribute of a target transaction at a certain transaction node is obviously abnormal, then the offset of the first node corresponding to that transaction node (e.g., point A) can be increased to the offset corresponding to point C in the first area 41; if the attribute information corresponding to the second node attribute is obviously abnormal, then the offset of the first node corresponding to that transaction node (e.g., point A) can be increased to the offset corresponding to point D in the second area 42; if the attribute information corresponding to the third node attribute is obviously abnormal, then the offset of the first node corresponding to that transaction node (e.g., point A) can be increased to the offset corresponding to point E in the third area 43. And so on.
[0050] Based on this, in some examples, the first node offset of the target transaction on a single transaction node can be updated according to the following formula (4).
[0051] in, This is the offset of the first node. This is the updated offset of the first node. Indicates the first The additional offset corresponding to each node attribute. Specifically, it can be calculated according to the following formula (5).
[0052] in, This represents the number of node attributes corresponding to this transaction node.
[0053] It should be noted that when updating the offset of the first node, if during the process of traversing the attribute information corresponding to the m node attributes of a certain transaction node, it is determined that the attribute information of the i-th node is obviously abnormal, then only the additional offset corresponding to the i-th node attribute can be added to the original offset of the first node. And stop traversing the attributes of other nodes, that is, only accumulate the extra offset once.
[0054] Based on this, the size of the auxiliary offset sliding window can be When the abnormal attribute information is the attribute information of the i-th node, the required number of auxiliary offset sliding windows N=i can be determined. This is achieved by adding the offset of i auxiliary offset sliding windows to the offset of the first node, i.e. This gives us the updated offset of the first node.
[0055] Based on the above embodiments, the first preset threshold can be set to, for example, a value of 100%. That is, when the updated first node offset If this is the case, the target transaction can be identified as an abnormal transaction, and thus the target transaction can be rejected. Of course, the first preset threshold can also be set more strictly. .
[0056] Furthermore, if the target transaction does not have obviously abnormal attribute information at a certain transaction node, the node attribute information of that transaction node can be adjusted to further improve the identification of abnormal transactions, and then the identification can be performed again. Based on this, in some embodiments, when there is no first transaction node among multiple transaction nodes, the abnormal transaction identification method provided in this application embodiment may further include: Adjust the node attribute information to obtain the adjusted node attribute information; The node offset of the transaction node is recalculated based on the adjusted node attribute information and the normal node attribute information to obtain the second node offset. If there is a second transaction node among multiple transaction nodes whose offset is greater than a second preset threshold, the target transaction will be identified as an abnormal transaction.
[0057] If the above methods are still insufficient to effectively identify abnormal transactions, further identification can be achieved by adjusting node attribute information.
[0058] For example, the node attribute information can be adjusted according to a preset method, and then the node offset can be recalculated based on the adjusted node attribute information to obtain a second node offset. The method for recalculating the second node offset can be the same as the method for calculating the first node offset, and will not be repeated here. Using this second node offset, it can be used to re-determine whether there is a second transaction node among multiple transaction nodes whose second node offset is greater than a second preset threshold. If so, the target transaction can be identified as an abnormal transaction. The second preset threshold can be the same as or different from the first preset threshold; this is not limited here.
[0059] In addition, in some implementations, the aforementioned node attribute information may include attribute information of a first type of attribute, or attribute information of a second type of attribute. The first type of attribute may be, for example, an attribute whose anomaly threshold can be clearly identified; for instance, when the number of IP changes exceeds 2, the attribute value can be clearly determined to be abnormal. The second type of attribute may be, for example, an attribute whose anomaly threshold is unknown.
[0060] Based on this, the attribute information for the different types of attributes mentioned above can be adjusted in different ways.
[0061] In some implementations, when the node attribute information includes attribute information of a first node attribute, and the first node attribute is a first type attribute, before adjusting the node attribute information as described above to obtain the adjusted node attribute information, the abnormal transaction identification method provided in this application embodiment may further include: Obtain the attribute information corresponding to the first node attribute for each of the multiple transactions; Based on the priority search tree algorithm, the first correction formula is determined according to the attribute information corresponding to the first node attribute of multiple transactions.
[0062] Based on this, the above adjustments to the node attribute information yield the adjusted node attribute information, which may specifically include: According to the first correction formula, the attribute information corresponding to the target transaction on the first node attribute is adjusted to obtain the adjusted node attribute information.
[0063] For example, for the first type of attribute, such as an attribute that can clearly identify an anomaly threshold, a priority search tree based on the Makarov chain model can be used to adjust the corresponding attribute information.
[0064] In some examples, taking IP change counts as an example, the number of IP changes corresponding to multiple transactions on this transaction node can be obtained as a sample set, and a structure can be built using this sample set as the root node. Figure 5The priority search tree shown categorizes samples in each tree node. Each tree node has a probability distribution representing the probability of the next suffix subsequence, classifying most low-probability sequences as outliers. For example... Figure 5 As shown, when the number of IP changes is greater than 1, the target transaction can be determined to be an abnormal transaction, and the first correction formula shown in the following formula (6) can be obtained.
[0065] in, For the number of IP changes, This refers to the adjusted node attribute information.
[0066] In other embodiments, when the node attribute information includes attribute information of a second node attribute, and the second node attribute is a second type attribute, before adjusting the node attribute information as described above to obtain the adjusted node attribute information, the abnormal transaction identification method provided in this application embodiment may further include: Retrieve the attribute information corresponding to each of the multiple transactions on the second node attribute; Based on the isolated forest algorithm, unsupervised training is performed using the attribute information corresponding to multiple transactions on the second node attributes to determine the second correction formula.
[0067] Based on this, the above adjustments to the node attribute information yield the adjusted node attribute information, which may specifically include: According to the second correction formula, the attribute information corresponding to the target transaction on the second node attribute is adjusted to obtain the adjusted node attribute information.
[0068] For example, for the second type of attribute, such as the attribute of an unknown anomaly threshold point, the Isolation Forest algorithm can be used to adjust the corresponding attribute information. For instance, for a specific transaction node, the offset of the second node can be obtained. The attribute information corresponding to the second node attribute of multiple transactions is collected and used as a sample set. Unsupervised training is then performed using the Isolation Forest algorithm to adjust the attribute values of the second node attribute under that transaction node. Specifically, the isolated tree corresponding to the Isolation Forest algorithm is determined through unsupervised training, and then a corresponding second correction formula is determined through this isolated tree. This second correction formula can then be used to adjust the attribute information corresponding to the second node attribute of the target transaction. Further details are omitted here.
[0069] Furthermore, to further improve the rationality of the offset threshold setting, the isolated forest algorithm can also be used to set the aforementioned second preset threshold. Based on this, in some embodiments, before identifying the target transaction as an abnormal transaction in the case where there is a second transaction node among multiple transaction nodes with a second node offset greater than the second preset threshold, the abnormal transaction identification method provided in this application embodiment may further include: Based on the isolated forest algorithm, the first preset threshold is adjusted to obtain the second preset threshold.
[0070] For example, such as Figure 6 As shown, the first preset threshold can be used as the root node in the isolated tree, and the tree can be divided by binary search to train the isolated forest. This allows for a reasonable selection between normal and abnormal transactions, thereby adjusting the first preset threshold and obtaining a more reasonable second preset threshold. The depth of the isolated tree can be defined as shown in the following formula (7).
[0071] Deep(x) = number of attributes * value of each attribute + 1 (7) Where Deep(x) is the depth of the isolated tree.
[0072] Based on this, suitable samples can be selected for traversal, and the root node depth can be calculated using the isolated forest algorithm. The path length of a node can be defined as shown in the following formula (8).
[0073] in, The path length of the node. This represents the number of edges from the current node to the root node. This is a correction value. The corresponding calculation formula can be shown in formula (9) below.
[0074] Where n is the number of nodes in the isolated tree.
[0075] In addition, the outlier score of a node in an isolated tree can be defined as shown in the following formula (10).
[0076] Using the first preset threshold as the root node of the isolated tree, the threshold is adjusted for a large interval distribution. When E(h(x)) approaches 0 and s(x,n)=1, a more reasonable second preset threshold can be obtained. Alternatively, the obtained threshold can be modified to an acceptable second preset threshold based on the severity of the transaction judgment.
[0077] It should be noted that the aforementioned Isolation Forest algorithm can adjust the offset threshold of a single transaction node to improve the accuracy of abnormal transaction identification. In addition, the Isolation Forest algorithm can also be used to comprehensively adjust the order of multiple node attributes based on the values of a single transaction node across multiple node attributes, arranging them according to their importance. This results in more accurate offset values when adjusting node offsets.
[0078] Furthermore, when abnormal transactions cannot be effectively identified using node offsets, abnormal transactions can also be identified by calculating transaction path offsets. Based on this, in some embodiments, when there is no second transaction node among multiple transaction nodes, the abnormal transaction identification method provided in this application may further include: Obtain the transaction path offset of the target transaction across multiple transaction nodes; If the transaction path offset is greater than the third preset threshold, the target transaction will be identified as an abnormal transaction.
[0079] Here, the transaction path offset can be the offset of the attribute information corresponding to the target transaction on the transaction path composed of multiple transaction nodes.
[0080] For example, the transaction path offset can be calculated using the path attribute information corresponding to the target transaction on the transaction path, or it can be calculated by accumulating the node offsets corresponding to the target transaction on multiple transaction nodes. If the transaction path offset exceeds a third preset threshold, the target transaction is identified as an abnormal transaction. The third preset threshold can be a threshold set specifically for the transaction path offset.
[0081] Based on this, in some implementations, obtaining the transaction path offset of the target transaction across multiple transaction nodes may specifically include: Obtain the transaction path feature information of the target transaction at multiple transaction nodes, as the path attribute information of the target transaction; Based on the normal path attribute information and the target transaction's path attribute information, calculate the transaction path offset corresponding to the target transaction on multiple transaction nodes.
[0082] Here, transaction path feature information can be characteristic information that can identify abnormal transaction behavior within the overall transaction path, such as the time difference before and after a transaction node, or the order in which transaction nodes appear. Based on this, the transaction path feature information corresponding to the target transaction on multiple transaction nodes can be used as the transaction path feature information of the target transaction. Additionally, the transaction path feature information may include attribute information corresponding to multiple path attributes. In some implementations, the transaction path feature information can also be normalized, and the processing method is similar to that for normalizing node attribute information, which will not be elaborated here.
[0083] For example, a transaction path can be understood as a complex transaction node. Similar to the method of calculating the offset of a single transaction node, the transaction path offset corresponding to the target transaction can be calculated through path attribute information.
[0084] For example, the transaction path offset of the target transaction on multiple transaction nodes can be calculated according to the following formula (11).
[0085] in, This is the transaction path offset. For the first The normalized attribute values corresponding to each path attribute, where n is the number of path attributes. Indicates the first The additional offset corresponding to each path attribute. Specifically, it can be calculated according to the following formula (12).
[0086] At this point, the third preset threshold can be set to That is, when the transaction path offset... If this is the case, the target transaction can be identified as an abnormal transaction, and thus rejected. Of course, the third preset threshold can also be set more strictly. .
[0087] In other embodiments, obtaining the transaction path offset of the target transaction across multiple transaction nodes may specifically include: The transaction path offset of the target transaction on multiple transaction nodes is obtained by cumulatively calculating the second node offset of multiple transaction nodes.
[0088] For example, a transaction path can be understood as a set of multiple transaction nodes, that is, the transaction path offset of the target transaction is calculated by accumulating the second node offsets of multiple transaction nodes.
[0089] For example, the transaction path offset of the target transaction on multiple transaction nodes can be calculated according to the following formula (13).
[0090] in, This is the transaction path offset. This is the offset of the second node. This represents the number of transaction nodes. At this point, the third preset threshold can be set to... That is, when the transaction path offset... If so, the target transaction can be identified as an abnormal transaction, and thus the target transaction can be rejected.
[0091] In addition, to improve the rationality of the third preset threshold setting, in some embodiments, before identifying the target transaction as an abnormal transaction when the transaction path offset is greater than the third preset threshold, the abnormal transaction identification method provided in this application embodiment may further include: Based on the isolated forest algorithm, the initial transaction path offset threshold is adjusted to obtain the third preset threshold.
[0092] Here, the initial transaction path offset threshold can be, for example, as described above. Or the above Similar to the above method of adjusting the first preset threshold, the embodiments of this application can also adjust the preset initial transaction path offset threshold based on the isolated forest algorithm, thereby obtaining a more reasonable third preset threshold. Among them, the depth of the isolated tree in the isolated forest algorithm can be defined as shown in the following formula (14).
[0093] Deep(x) = k (14) Where Deep(x) is the depth of the isolated tree, and k is the number of transaction nodes.
[0094] In this way, the Isolation Forest algorithm can optimize thresholds, attribute values, and the order of attribute importance. Once stable, it can accurately identify abnormal transactions, providing risk alerts and blocking them to protect user rights and improve transaction security.
[0095] It should be noted that the application scenarios described in the above embodiments of this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.
[0096] Based on the same inventive concept, this application also provides an abnormal transaction identification device. Specifically, in conjunction with... Figure 7 Please provide a detailed explanation.
[0097] Figure 7 This is a schematic diagram of the structure of an abnormal transaction identification device provided in one embodiment of this application.
[0098] like Figure 7 As shown, the abnormal transaction identification device 700 may include: Node building module 701 is used to build multiple trading nodes according to the characteristics of the target trading system; The information acquisition module 702 is used to acquire, for each of the plurality of transaction nodes, the transaction behavior feature information corresponding to the target transaction on the transaction node, as the node attribute information of the transaction node, wherein the target transaction is a transaction executed based on the target transaction system; The offset calculation module 703 is used to calculate the node offset of the transaction node based on the normal node attribute information corresponding to the transaction node and the node attribute information, and obtain the first node offset. The anomaly identification module 704 is used to identify the target transaction as an abnormal transaction when there is a first transaction node among the plurality of transaction nodes whose first node offset is greater than a first preset threshold.
[0099] The abnormal transaction identification device 700 described above is explained in detail below: In some embodiments, the abnormal transaction identification device 700 further includes: The first determining module is used to calculate the node offset of the transaction node based on the normal node attribute information corresponding to the transaction node and the node attribute information, and obtain the first node offset. Then, if there is abnormal attribute information in the node attribute information, it determines the number N of the required auxiliary offset sliding windows based on the arrangement position of the abnormal attribute information in the node attribute information, where N is a positive integer. The offset increment module is used to add the offset of N auxiliary offset sliding windows to the first node offset to obtain the updated first node offset.
[0100] In some embodiments, the abnormal transaction identification device 700 further includes: The first adjustment module is used to adjust the node attribute information when the first transaction node is not present among the plurality of transaction nodes, so as to obtain the adjusted node attribute information. The first calculation module is used to recalculate the node offset of the transaction node based on the adjusted node attribute information and the normal node attribute information to obtain the second node offset. The first identification module is used to identify the target transaction as an abnormal transaction when there is a second transaction node among the plurality of transaction nodes whose second node offset is greater than the second preset threshold.
[0101] In some embodiments, the abnormal transaction identification device 700 further includes: The first acquisition module is used to acquire the attribute information corresponding to multiple transactions on the first node attribute before adjusting the node attribute information to obtain the adjusted node attribute information when the node attribute information includes the attribute information of the first node attribute and the first node attribute is a first type attribute. The second determining module is used to determine the first correction formula based on the priority search tree algorithm and the attribute information corresponding to the multiple transactions on the first node attribute respectively. The first adjustment module includes: The first adjustment submodule is used to adjust the attribute information of the target transaction on the first node attribute according to the first correction formula, so as to obtain the adjusted node attribute information.
[0102] In some embodiments, the abnormal transaction identification device 700 further includes: The second acquisition module is used to acquire the attribute information corresponding to multiple transactions on the second node attribute before adjusting the node attribute information to obtain the adjusted node attribute information when the node attribute information includes the attribute information of the second node attribute and the second node attribute is a second type attribute. The third determination module is used to perform unsupervised training based on the isolated forest algorithm, according to the attribute information corresponding to the multiple transactions on the second node attribute, to determine the second correction formula. The first adjustment module includes: The second adjustment submodule is used to adjust the attribute information of the target transaction on the second node attribute according to the second correction formula, so as to obtain the adjusted node attribute information.
[0103] In some embodiments, the abnormal transaction identification device 700 further includes: The second adjustment module is used to adjust the first preset threshold based on the isolated forest algorithm to obtain the second preset threshold before identifying the target transaction as an abnormal transaction, in the case where there is a second transaction node among the multiple transaction nodes with a second node offset greater than the second preset threshold.
[0104] In some embodiments, the abnormal transaction identification device 700 further includes: The third acquisition module is used to acquire the transaction path offset of the target transaction on the multiple transaction nodes when the second transaction node is not present among the multiple transaction nodes. The second identification module is used to identify the target transaction as an abnormal transaction when the transaction path offset is greater than a third preset threshold.
[0105] In some embodiments, the third acquisition module includes: The first acquisition submodule is used to acquire the transaction path feature information corresponding to the target transaction on the multiple transaction nodes, as the path attribute information of the target transaction; The first calculation submodule is used to calculate the transaction path offset of the target transaction on multiple transaction nodes based on the normal path attribute information and the path attribute information of the target transaction.
[0106] In some embodiments, the third acquisition module includes: The second calculation submodule is used to accumulate the second node offsets of the multiple transaction nodes to obtain the transaction path offset of the target transaction on the multiple transaction nodes.
[0107] In some embodiments, the abnormal transaction identification device 700 further includes: The third adjustment module is used to adjust the initial transaction path offset threshold based on the isolated forest algorithm before identifying the target transaction as an abnormal transaction if the transaction path offset is greater than the third preset threshold, so as to obtain the third preset threshold.
[0108] Therefore, by constructing multiple transaction nodes according to the characteristics of the target transaction system, and using the transaction behavior feature information corresponding to the target transaction on each transaction node as the node attribute information of each transaction node, the corresponding node offset is calculated based on the normal node attribute information and the node attribute information of each transaction node to obtain the first node offset of each transaction node. Then, if there is a first transaction node among these multiple transaction nodes whose first node offset is greater than a first preset threshold, the target transaction is identified as an abnormal transaction. Thus, since this embodiment constructs several important transaction nodes in the transaction process based on the characteristics of the target transaction system, and comprehensively determines whether the target transaction is an abnormal transaction based on the offset of the target transaction's transaction behavior from the normal transaction behavior on each transaction node, this embodiment can improve the accuracy of abnormal transaction identification for complex transaction application scenarios.
[0109] Figure 8 This is a schematic diagram of the structure of an electronic device provided in one embodiment of this application.
[0110] Electronic device 800 may include processor 801 and memory 802 storing computer program instructions.
[0111] Specifically, the processor 801 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.
[0112] Memory 802 may include mass storage for data or instructions. For example, and not limitingly, memory 802 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 802 may include removable or non-removable (or fixed) media. Where appropriate, memory 802 may be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, memory 802 is non-volatile solid-state memory.
[0113] In certain embodiments, the memory may include read-only memory (ROM), random access memory (RAM), disk storage media devices, optical storage media devices, flash memory devices, and electrical, optical, or other physical / tangible memory storage devices. Thus, generally, memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to one aspect of this application.
[0114] The processor 801 reads and executes computer program instructions stored in the memory 802 to implement any of the abnormal transaction identification methods in the above embodiments.
[0115] In some examples, the electronic device 800 may also include a communication interface 803 and a bus 810. For example, Figure 8 As shown, the processor 801, memory 802, and communication interface 803 are connected through bus 810 and complete communication with each other.
[0116] The communication interface 803 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.
[0117] Bus 810 includes hardware, software, or both, that couples components of an online data traffic metering device together. For example, and not as a limitation, bus 810 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 810 may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, any suitable bus or interconnect is contemplated herein.
[0118] For example, the electronic device 800 can be a mobile phone, tablet computer, laptop computer, handheld computer, in-vehicle electronic device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc.
[0119] The electronic device 800 can execute the abnormal transaction identification method in the embodiments of this application, thereby achieving a combination of Figure 2 and Figure 7 The described method and apparatus for identifying abnormal transactions.
[0120] Furthermore, in conjunction with the abnormal transaction identification methods in the above embodiments, this application embodiment can provide a computer-readable storage medium for implementation. This computer-readable storage medium stores computer program instructions; when these computer program instructions are executed by a processor, they implement any of the abnormal transaction identification methods in the above embodiments. Examples of computer-readable storage media include non-transitory computer-readable storage media, such as portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, etc.
[0121] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.
[0122] The functional blocks shown in the above-described structural diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.
[0123] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
[0124] The aspects of this application have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by dedicated hardware performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.
[0125] The above description is merely a specific implementation of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.
Claims
1. A method for identifying abnormal transactions, characterized in that, include: Construct multiple trading nodes based on the characteristics of the target trading system; For each of the plurality of transaction nodes, the transaction behavior feature information corresponding to the target transaction on the transaction node is obtained as the node attribute information of the transaction node. The target transaction is a transaction executed based on the target transaction system, and the node attribute information is the number of IP changes. Based on the normal node attribute information corresponding to the transaction node and the node attribute information, the node offset of the transaction node is calculated to obtain the first node offset; If there is a first transaction node among the plurality of transaction nodes whose first node offset is greater than a first preset threshold, the target transaction will be identified as an abnormal transaction. If the first transaction node is not present among the plurality of transaction nodes, the node attribute information is adjusted to obtain the adjusted node attribute information; The node offset of the transaction node is recalculated based on the adjusted node attribute information and the normal node attribute information to obtain the second node offset. If there is no second transaction node among the plurality of transaction nodes whose second node offset is greater than a second preset threshold, the transaction path offset of the target transaction on the plurality of transaction nodes is obtained; if the transaction path offset is greater than a third preset threshold, the target transaction is identified as an abnormal transaction.
2. The method according to claim 1, characterized in that, After calculating the node offset of the transaction node based on the normal node attribute information corresponding to the transaction node and the node attribute information, and obtaining the first node offset, the method further includes: If abnormal attribute information exists in the node attribute information, the number N of the required auxiliary offset sliding windows is determined according to the arrangement position of the abnormal attribute information in the node attribute information, where N is a positive integer. The first node offset is updated by adding N offsets of the auxiliary offset sliding window to the first node offset.
3. The method according to claim 1, characterized in that, If the first transaction node is not present among the plurality of transaction nodes, the method further includes: If there is a second transaction node among the multiple transaction nodes whose offset is greater than a second preset threshold, the target transaction will be identified as an abnormal transaction.
4. The method according to claim 3, characterized in that, When the node attribute information includes attribute information of a first node attribute, and the first node attribute is a first type attribute, before adjusting the node attribute information to obtain the adjusted node attribute information, the method further includes: Obtain the attribute information corresponding to each of the multiple transactions on the first node attribute; Based on the priority search tree algorithm, the first correction formula is determined according to the attribute information corresponding to the multiple transactions on the first node attribute; The first correction formula is: in, This refers to the attribute information corresponding to the transaction on the first node attribute. The adjusted node attribute information; The step of adjusting the node attribute information to obtain the adjusted node attribute information includes: According to the first correction formula, the attribute information corresponding to the target transaction on the first node attribute is adjusted to obtain the adjusted node attribute information.
5. The method according to claim 3, characterized in that, Before identifying the target transaction as an abnormal transaction, if a second transaction node with a second node offset greater than a second preset threshold exists among the plurality of transaction nodes, the method further includes: Based on the isolated forest algorithm, the first preset threshold is adjusted to obtain the second preset threshold.
6. The method according to claim 1, characterized in that, The step of obtaining the transaction path offset of the target transaction on the multiple transaction nodes includes: Obtain the transaction path feature information corresponding to the target transaction on the multiple transaction nodes, and use it as the path attribute information of the target transaction; Based on the normal path attribute information and the path attribute information of the target transaction, the transaction path offset of the target transaction on multiple transaction nodes is calculated.
7. The method according to claim 1, characterized in that, The step of obtaining the transaction path offset of the target transaction on the multiple transaction nodes includes: The second node offsets of the multiple transaction nodes are cumulatively calculated to obtain the transaction path offset of the target transaction on the multiple transaction nodes.
8. The method according to claim 1, characterized in that, Before identifying the target transaction as an abnormal transaction if the transaction path offset is greater than a third preset threshold, the method further includes: Based on the isolated forest algorithm, the initial transaction path offset threshold is adjusted to obtain the third preset threshold.
9. An abnormal transaction identification device, characterized in that, include: The node building module is used to build multiple trading nodes based on the characteristics of the target trading system. The information acquisition module is used to acquire, for each of the plurality of transaction nodes, the transaction behavior feature information corresponding to the target transaction on the transaction node, as the node attribute information of the transaction node, wherein the target transaction is a transaction executed based on the target transaction system, and the node attribute information is the number of IP changes; The offset calculation module is used to calculate the node offset of the transaction node based on the normal node attribute information corresponding to the transaction node and the node attribute information, and obtain the first node offset. An anomaly detection module is used to identify the target transaction as an abnormal transaction when there is a first transaction node among the plurality of transaction nodes whose first node offset is greater than a first preset threshold. The first adjustment module is used to adjust the node attribute information when the first transaction node is not present among the plurality of transaction nodes, so as to obtain the adjusted node attribute information. The first calculation module is used to recalculate the node offset of the transaction node based on the adjusted node attribute information and the normal node attribute information to obtain the second node offset. The third acquisition module is used to acquire the transaction path offset of the target transaction on the multiple transaction nodes when there is no second transaction node with a second node offset greater than a second preset threshold among the multiple transaction nodes. The second identification module is used to identify the target transaction as an abnormal transaction when the transaction path offset is greater than a third preset threshold.
10. An electronic device, characterized in that, The device includes: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, it implements the steps of the abnormal transaction identification method as described in any one of claims 1-8.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions, which, when executed by a processor, implement the steps of the abnormal transaction identification method as described in any one of claims 1-8.
12. A computer program product, characterized in that, When the instructions in the computer program product are executed by the processor of the electronic device, the electronic device performs the steps of the abnormal transaction identification method as described in any one of claims 1-8.
Citation Information
Patent Citations
Method and device for detecting abnormal transaction cluster
CN111340622A
