Abnormal transaction detection method and related device

By generating directed graphs of transaction networks and analyzing transaction category characteristics using target graph neural networks, the problem of low accuracy of abnormal transaction detection in the prior art is solved, and higher detection accuracy and effective detection in complex trading scenarios are achieved.

CN118886907APending Publication Date: 2024-11-01TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410903085.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-05
Publication Date
2024-11-01

AI Technical Summary

Technical Problem

The accuracy of abnormal transaction detection in online transactions in prior art is low, especially in complex transactions, and abnormal transaction rules are easily bypassed.

Method used

By generating directed graphs of the transaction network, using the target graph neural network to analyze transaction category characteristics, detect whether there are abnormal transactions in the to-be-account, and reflect the global implementation of the transaction operations.

Benefits of technology

It improves the accuracy of abnormal transaction detection, avoids the risk of illegal users bypassing detection rules, and is suitable for complex transaction scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118886907A_ABST
    Figure CN118886907A_ABST
Patent Text Reader

Abstract

The invention discloses an abnormal transaction detection method and a related device, and the method comprises the steps: taking a transaction type as a node according to the transaction types corresponding to N transaction operations and the implementation sequence of the N transaction operations, and generating a transaction network directed graph comprising M nodes; for a transaction operation pair formed by an ith transaction operation and an (i + 1) th transaction operation, when the ith transaction operation is a first transaction category and the (i + 1) th transaction operation is a second transaction category, the transaction network directed graph has a target edge pointing from a first node to a second node, the first node is used for representing the first transaction category, and the second node is used for representing the second transaction category. The second node is used for representing the second transaction category. Therefore, the direction of the edge can reflect the transaction operation of which transaction category is implemented after the transaction operation of a certain transaction category is implemented, and the weight of the edge can reflect the condition related to the transaction operation of another transaction category which is implemented immediately. The information reflects the implementation conditions of the N transaction operations in the whole situation, so that the detection accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to an abnormal transaction detection method and related devices. Background Art

[0002] With the rapid development of Internet technology, online transactions have become a common transaction method. Among them, online transactions mainly refer to transactions based on the Internet, where users can perform transactions to transfer money from their corresponding accounts to other users' corresponding accounts.

[0003] However, online transactions also face many transaction risks. For example, illegal users induce others to transfer money. These transaction risks will affect the property safety of users and the transaction security of trading platforms. In this regard, abnormal transaction detection can be performed on accounts to determine whether there are abnormal transactions in the account (such as inducing others to transfer money or being induced to transfer money, etc.). When abnormal transactions are detected, relevant measures can be taken in time to control them.

[0004] In the related art, the features of abnormal transactions are mined by analyzing abnormal transaction cases, thereby defining abnormal transaction rules. Based on this, when abnormal transaction detection is performed on the user's transaction operation, if the transaction operation hits the abnormal transaction rule, it can be considered that there is an abnormal transaction, otherwise it is a normal transaction. However, the abnormal transaction rules are relatively simple, resulting in low detection accuracy, especially in complex transaction situations, it is difficult to detect abnormal transactions. Summary of the invention

[0005] In order to solve the above technical problems, the present application provides an abnormal transaction detection method and related devices, which are conducive to improving detection accuracy.

[0006] The embodiments of the present application disclose the following technical solutions:

[0007] On the one hand, an embodiment of the present application provides a method for detecting abnormal transactions, the method comprising:

[0008] Obtain N transaction operations corresponding to the account to be tested during the testing period;

[0009] According to the transaction categories respectively corresponding to the N transaction operations and the implementation order of the N transaction operations in the detection period, a transaction network directed graph including M nodes is generated, where different nodes are used to represent different transaction categories. Under the implementation order, for a transaction operation pair consisting of an i-th transaction operation and an (i+1)-th transaction operation, when the i-th transaction operation is of a first transaction category and the (i+1)-th transaction operation is of a second transaction category, the transaction network directed graph has a target edge pointing from a first node to a second node, the first node is used to represent the first transaction category, the second node is used to represent the second transaction category, and the weight of the target edge is used to represent an implementation parameter of the transaction operation pair;

[0010] According to the directed graph of the transaction network and the transaction category features corresponding to the M nodes respectively, abnormal transaction detection is performed on the account to be detected through a target graph neural network to obtain a detection result indicating whether the account to be detected has abnormal transactions during the detection period.

[0011] On the other hand, an embodiment of the present application provides an abnormal transaction detection device, the device comprising an acquisition unit, a generation unit and a detection unit:

[0012] The acquisition unit is used to acquire N transaction operations corresponding to the account to be detected within the detection period;

[0013] The generating unit is configured to generate a directed trading network graph including M nodes according to the trading categories respectively corresponding to the N trading operations and the implementation order of the N trading operations in the detection period, wherein different nodes are used to represent different trading categories, and under the implementation order, for a trading operation pair consisting of an i-th trading operation and an (i+1)-th trading operation, when the i-th trading operation is of a first trading category and the (i+1)-th trading operation is of a second trading category, the directed trading network graph has a target edge pointing from a first node to a second node, the first node is used to represent the first trading category, the second node is used to represent the second trading category, and the weight of the target edge is used to represent an implementation parameter of the trading operation pair;

[0014] The detection unit is used to perform abnormal transaction detection on the account to be detected through a target graph neural network according to the transaction network directed graph and the transaction category features corresponding to the M nodes, and obtain a detection result indicating whether the account to be detected has abnormal transactions during the detection period.

[0015] On the other hand, an embodiment of the present application provides a computer device, the computer device comprising a processor and a memory:

[0016] The memory is used to store a computer program and transmit the computer program to the processor;

[0017] The processor is configured to execute the method described in any one of the preceding aspects according to instructions in the computer program.

[0018] On the other hand, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program. When the computer program is executed by a computer device, the computer device executes the method described in any of the above aspects.

[0019] On the other hand, an embodiment of the present application provides a computer program product, including a computer program, which, when executed on a computer device, enables the computer device to execute the method described in any one of the aforementioned aspects.

[0020] It can be seen from the above technical solution that for the N transaction operations corresponding to the account to be detected during the detection period, according to the transaction categories corresponding to the N transaction operations and the implementation order of the N transaction operations, a transaction network directed graph including M nodes is generated with the transaction categories as nodes. Under the implementation order, for the transaction operation pair consisting of the i-th transaction operation and the i+1-th transaction operation, when the i-th transaction operation is the first transaction category and the i+1-th transaction operation is the second transaction category, the transaction network directed graph has a target edge pointing from the first node to the second node, the first node is used to represent the first transaction category, the second node is used to represent the second transaction category, and the weight of the target edge is used to represent the implementation parameters of the transaction operation pair. Therefore, the direction based on the edge can reflect which transaction operations of a certain transaction category will be implemented immediately after the implementation of the transaction operation of a certain transaction category, and which transaction operations of a certain transaction category will not be implemented immediately, and the weight based on the edge can reflect the implementation of the transaction operation of another transaction category immediately after the implementation of the transaction operation of a certain transaction category. This information reflects the global implementation of N transaction operations. Compared with a single abnormal transaction rule, this application performs abnormal transaction detection based on the global implementation of N transaction operations, and is no longer limited by abnormal transaction rules, which is conducive to improving detection accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technical members in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0022] Figure 1A schematic diagram of an application scenario of an abnormal transaction detection method provided in an embodiment of the present application;

[0023] Figure 2 A flowchart of an abnormal transaction detection method provided in an embodiment of the present application;

[0024] Figure 3 A schematic diagram of a transaction network directed graph provided in an embodiment of the present application;

[0025] Figure 4 A schematic diagram of an adjacency matrix provided in an embodiment of the present application;

[0026] Figure 5 A schematic diagram of an abnormal transaction detection process provided in an embodiment of the present application;

[0027] Figure 6 Schematic diagram of the model structure of a word vector model;

[0028] Figure 7 A schematic diagram of a framework for abnormal transaction detection provided in an embodiment of the present application;

[0029] Figure 8 A schematic diagram of an abnormal transaction detection process provided in an embodiment of the present application;

[0030] Fig. 9 A structural diagram of an abnormal transaction detection device provided in an embodiment of the present application;

[0031] Fig.10 A structural diagram of a terminal provided in an embodiment of the present application;

[0032] Fig.11 A structural diagram of a server provided in an embodiment of the present application. DETAILED DESCRIPTION

[0033] The embodiments of the present application are described below in conjunction with the accompanying drawings.

[0034] Online transactions, as a common transaction method, have brought great convenience to people's daily lives. However, they also face many transaction risks. For this reason, users' accounts are usually tested for abnormal transactions in order to promptly detect abnormal transactions (such as inducing others to transfer money or being induced to transfer money, etc.), so that relevant measures can be taken in a timely manner for control.

[0035] In the related art, a method for detecting abnormal transactions based on abnormal transaction rules is provided. Specifically, by analyzing real cases of abnormal transactions, the characteristics of abnormal transactions are summarized, and abnormal transaction rules are defined based on them. Correspondingly, during detection, if the transaction operation implemented by the user hits the abnormal transaction rule, it can be considered that there is an abnormal transaction, otherwise it is a normal transaction. However, the abnormal transaction rules are relatively simple and can be easily bypassed by illegal users. In addition, the actual abnormal transactions are quite diverse, so the detection accuracy of this method is low.

[0036] In addition, the related art also provides an abnormal transaction detection method based on a scoring card model of logistic regression (LR). Specifically, according to the user's characteristics (such as the user's transaction situation, etc.), the prediction score corresponding to the user is determined by the scoring card model. The higher the prediction score, the higher the risk of abnormal transactions by the user. However, the scoring card model relies on logical responses to determine the prediction score, and the logical response is essentially a simple linear model. Because it is a linear model, it can only capture linear information in a sequence composed of N transaction operations, and the information that can be transmitted is relatively limited, which limits the accuracy of the prediction score, especially the limited fitting ability for complex transaction situations, resulting in low detection accuracy.

[0037] To this end, the embodiment of the present application provides an abnormal transaction detection method and related devices, for N transaction operations implemented by a user within a period of time, according to the transaction categories and implementation order of the N transaction operations, a transaction network directed graph including M nodes is generated. Among them, different nodes are used to represent different transaction categories. In the transaction network directed graph, the edges between nodes have directions, and the directions of the edges can reflect which transaction operations of a certain transaction category will be implemented immediately after the implementation of the transaction operation of a certain transaction category, and which transaction operations of a certain transaction category will not be implemented immediately, and the weight of the edge can be reflected in the implementation of the transaction operation of another transaction category. This information reflects the implementation of N transaction operations in the global context, so it is helpful to improve the detection accuracy based on this.

[0038] Compared with the detection method based on a single abnormal transaction rule, this application performs abnormal transaction detection based on the overall implementation of N transaction operations, so it is no longer limited by abnormal transaction rules, which is conducive to improving detection accuracy. For example, for different N transaction operations, abnormal transaction detection is performed based on their respective overall implementation, and is no longer limited to matching with a single abnormal transaction rule. This can avoid the problem of failure to detect due to illegal users deliberately circumventing abnormal transaction rules, so it is conducive to improving detection accuracy.

[0039] Compared with the scoring card model based on logistic regression, since the abnormal transaction detection in this application is based on the directed graph of the transaction network, the directed graph of the transaction network can convey richer global information, which is conducive to improving the detection accuracy.

[0040] The abnormal transaction detection method provided in the embodiment of the present application can be implemented by a computer device, which can be a terminal or a server, wherein the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. Terminals include but are not limited to smart phones, computers, intelligent voice interaction devices, smart home appliances, vehicle-mounted terminals, etc. The terminal and the server can be directly or indirectly connected via wired or wireless communication, and this application does not limit this. The embodiments of the present application can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, smart transportation, audio and video, assisted driving, etc.

[0041] The embodiments of the present application can be specifically applied to various detection scenarios related to transaction operations, for example, abnormal transaction detection in different payment scenarios. Specifically, for example, abnormal transaction detection is performed on transaction operations in social payment scenarios.

[0042] The abnormal transaction detection method provided in the embodiment of the present application may involve artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology and application system of using digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. Among them, artificial intelligence technology is a comprehensive discipline, involving a wide range of fields, including both hardware-level technology and software-level technology. Basic artificial intelligence technology generally includes technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing (Natural Language Processing, NLP) technology, as well as machine learning / deep learning, autonomous driving, smart transportation and other major directions.

[0043] For example, in an embodiment of the present application, natural language processing and machine learning can be used to train the initial graph neural network model to obtain a target graph neural network, so as to facilitate the use of the target graph neural network to detect abnormal transactions of the account to be detected and obtain corresponding detection results.

[0044] It should be noted that in the specific implementation of the present application, user information and other related data may be involved in the detection process. When the above embodiments of the present application are applied to specific products or technologies, the user's separate consent or separate permission is required, and the collection, use and processing of relevant data need to comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0045] Figure 1 The application scenario of the abnormal transaction detection method provided by the embodiment of the present application is shown. Figure 1 In the illustrated scenario, the server 100 is used as an example of the aforementioned computer device for illustration:

[0046] For the account to be tested that needs to be tested, first, the server 100 can obtain N transaction operations corresponding to the account to be tested during the test period, where N is a positive integer. The implementation order of the N transaction operations during the test period is used to indicate the implementation order of the N transaction operations. According to the implementation order, the N transaction operations can be arranged as the 1st transaction operation, ..., the i-th transaction operation, the i+1-th transaction operation, ..., the N-th transaction operation, where i is an integer greater than or equal to 1 and less than N. And, the transaction category of the transaction operation can indicate the type of transaction operation. Through the transaction category, the N transaction operations can be better analyzed. For example, in Figure 1 In the example, the i-th transaction operation is the first transaction category, and the i+1-th transaction operation is the second transaction category. Other transaction operation pairs are xx transaction categories, depending on the actual situation. This is only an example and does not impose any limitation.

[0047] Next, the server 100 can generate a directed graph of a transaction network including M nodes according to the transaction categories corresponding to the N transaction operations, in accordance with the implementation order, where M is a positive integer and different nodes are used to represent different transaction categories. In specific implementation, in the implementation order, for a transaction operation pair consisting of the i-th transaction operation and the i+1-th transaction operation, when the i-th transaction operation is the first transaction category and the i+1-th transaction operation is the second transaction category, the directed graph of the transaction network has a target edge from the first node to the second node. The first node is used to represent the first transaction category, and the second node is used to represent the second transaction category. In addition, the weight of the target edge is used to represent the implementation parameters of the transaction operation pair, and the implementation parameters can represent the implementation status of the transaction operation pair. Figure 1 In the example, a bold arrow is used to indicate a target edge for easy distinction. It should be noted that this is only an example and does not constitute any limitation.

[0048] It can be seen that for N trading operations, according to the implementation order, for the two trading operations that are implemented immediately, there is a directed edge between the trading categories to which the two trading operations belong in the directed graph of the trading network. Based on the direction of the edge, it can not only reflect the implementation order of the two trading operations, but also reflect which trading operations of a certain trading category will be implemented immediately after the implementation of a trading operation of a certain trading category, and which trading operations of a certain trading category will not be implemented immediately. In addition, based on the weight of the edge, it can reflect the implementation of the trading operation of another trading category immediately after the implementation of a trading operation of a certain trading category.

[0049] Finally, the server 100 can input the transaction network directed graph and the transaction category features corresponding to the M nodes into the target graph neural network, and perform abnormal transaction detection on the account to be detected through the target graph neural network to obtain the detection result, which can be used to indicate whether there is an abnormal transaction in the account to be detected during the detection period. Among them, the transaction category feature is used to describe the transaction category represented by the node, which is conducive to the target graph neural network to better understand the information in the transaction network directed graph, for example, to better understand that the meaning of the target edge from the first node to the second node means that the transaction operation of the first transaction category is followed by the transaction operation of the second transaction category.

[0050] Since the above information that can be reflected by the directed graph of the transaction network reflects the global implementation status of N transaction operations, compared with the detection method based on a single abnormal transaction rule, the present application detects different N transaction operations based on their respective global implementation status, and is no longer limited by abnormal transaction rules, which is conducive to improving detection accuracy.

[0051] Moreover, compared with the transaction operation sequence formed by arranging N transaction operations in the order of implementation, since the transaction operation sequence is a linear structure of data, the information that can be reflected is limited, and it is difficult to directly reflect the aforementioned global information, and these global information can more accurately reflect the overall transaction situation of the account to be detected, and is closely related to whether there are abnormal transactions. Therefore, the present application first determines the directed graph of the transaction network, and then performs abnormal transaction detection based on the directed graph of the transaction network, which is conducive to improving the detection accuracy.

[0052] Figure 2 A flowchart of an abnormal transaction detection method provided in an embodiment of the present application is provided, and a server is used as an example of the aforementioned computer device for illustration. The method includes S201-S203:

[0053] S201: Obtain N transaction operations corresponding to the account to be detected during the detection period.

[0054] The account to be detected may refer to an account that needs to be detected for abnormal transactions. Also, the detection period may be used to indicate the time window for abnormal transaction detection, which may be flexibly set according to actual detection requirements. For example, a week or a month may be used as a time window. The transaction operations of the account to be detected during the detection period can reflect the transaction status of the account to be detected during this period, and thus can be used to detect whether there are abnormal transactions.

[0055] In specific implementation, the server may first obtain N transaction operations corresponding to the account to be tested during the detection period, where N is a positive integer. Among them, the transaction operation is used to represent the transaction behavior implemented by the user to achieve a certain purpose. This application does not make any restrictions on transaction operations. For example, a transaction operation may refer to a payment behavior implemented to purchase an item, a payment behavior implemented when sending red envelopes to other users, a collection behavior implemented when receiving red envelopes sent by other users, and so on.

[0056] S202: Generate a transaction network directed graph including M nodes according to the transaction categories corresponding to the N transaction operations and the execution order of the N transaction operations within the detection period.

[0057] Among them, the implementation order can be used to represent the implementation order of N transaction operations. According to the implementation order, the N transaction operations can be arranged in sequence as the 1st transaction operation, ..., the i-th transaction operation, the i+1-th transaction operation, ..., the N-th transaction operation, where i is an integer greater than or equal to 1 and less than N. In the directed graph of the transaction network, different nodes are used to represent different transaction categories, and M is a positive integer, that is, M can represent the total number of transaction categories corresponding to the N transaction operations. Since N transaction operations are used to represent N different transactions, but different transactions may belong to the same transaction category, M is less than or equal to N. In actual applications, after the N transaction operations are arranged in the implementation order, the corresponding behavior sequence can be obtained, which is used to represent the payment behavior related to the transaction implemented during the detection period.

[0058] In specific implementation, in the implementation order, for a trading operation pair consisting of the ith trading operation and the i+1th trading operation, that is, the trading operation pair refers to two trading operations implemented in succession. When the ith trading operation is of the first trading category and the i+1th trading operation is of the second trading category, the trading network directed graph has a target edge pointing from the first node to the second node. The first node is used to represent the first trading category, the second node is used to represent the second trading category, and the weight of the target edge is used to represent the implementation parameters of the trading operation pair.

[0059] It can be seen that, according to the implementation order, for two trading operations that are implemented one after another, there is a directed edge between the trading categories to which the two trading operations belong in the trading network directed graph, and the direction of the edge can reflect the implementation order of the two trading operations. At the same time, based on the direction of the edge between the M nodes in the trading network directed graph, it can be reflected which trading operations of a certain trading category will be implemented immediately after the implementation of the trading operation of a certain trading category, and which trading operations of a certain trading category will not be implemented immediately, and based on the weight of the edge, it can be reflected. The implementation status of the trading operation of another trading category that is implemented immediately after.

[0060] It should be noted that this application does not impose any limitation on how to generate a directed graph of a transaction network. For ease of understanding, the following examples are provided in this application embodiment:

[0061] Since the nodes in the directed graph of the transaction network are used to represent transaction categories rather than the transaction operations themselves, in a possible implementation, N transaction operations can be arranged according to their corresponding transaction categories in the order of implementation, thereby obtaining a sequence of N transaction categories arranged in the order of implementation. Based on this, M nodes can be determined first, and then the edges between the nodes can be determined in sequence starting from i=1. It can be understood that the total number of transaction categories corresponding to the N transaction categories is M.

[0062] For example, take N=10 as an example, that is, the N transaction operations are [1st transaction operation, ..., ith transaction operation, i+1th transaction operation, ..., 10th transaction operation], and correspondingly [A, B, A, C, B, D, A, B, C, D] can be obtained, where A, B, C, and D are different transaction categories. In this example, M=4, and the determined transaction network directed graph can be seen in Figure 3 Example. Figure 3 In the example, the four nodes are Node 1, Node 2, Node 3 and Node 4, which are used to represent the four transaction categories A, B, C and D mentioned above respectively.

[0063] It should also be noted that this application does not impose any limitation on the implementation parameters. For ease of understanding, the embodiments of this application provide the following methods as examples:

[0064] On the one hand, the transaction operation pair is composed of the ith transaction operation and the i+1th transaction operation. In the directed graph of the transaction network, the edge is from the node of the transaction category to which the ith transaction operation belongs to the node of the transaction category to which the i+1th transaction operation belongs. In practical applications, the number of transactions and the resource value involved in the transaction are extremely important for the judgment of abnormal transactions. On the other hand, the directed graph of the transaction network pays more attention to global information such as the implementation of transaction operations of other transaction categories after the transaction operations of each transaction category. Therefore, in a possible implementation method, the implementation parameter can be the cumulative number of implementations corresponding to the transaction operation pair, or, due to the directionality of the edge, the implementation parameter can also be the cumulative transaction resource value corresponding to the transaction operation of the second transaction category implemented by the transaction operation pair. Of course, in another possible implementation method, the aforementioned cumulative number of implementations and cumulative transaction resource value can also be used as implementation parameters.

[0065] Correspondingly, in a specific implementation, the aforementioned implementation parameters can be determined by at least one of the following methods:

[0066] According to N transaction operations and the implementation sequence, the cumulative number of implementations of the transaction operation pair is counted as the implementation parameter; according to the N transaction operations and the implementation sequence, the cumulative transaction resource value corresponding to the transaction operation of the second transaction category implemented by the transaction operation pair is counted as the implementation parameter.

[0067] The cumulative number of implementations may refer to the number of times a transaction operation pair appears in a transaction sequence formed by arranging N transaction operations in the order of implementation, that is, it reflects the number of times a transaction operation of the second transaction category is implemented immediately after a transaction operation of the first transaction category is implemented. It can be seen that the cumulative number of implementations can reflect the number of times a transaction operation of the second transaction category is implemented immediately after a transaction operation of the first transaction category is implemented in the global context.

[0068] Generally, the process of implementing a transaction operation involves the transfer of resources, and the transaction resource value corresponding to the transaction operation can be used to represent the resources transferred in the process of implementing the transaction operation. The cumulative transaction resource value can reflect the transaction operation of the second transaction category, which is the cumulative resource transfer generated when it is implemented immediately after the transaction operation of the first transaction category. It can be seen that the cumulative transaction resource value focuses on the resource transfer of the transaction operation of the second transaction category when it is implemented after a specific transaction operation (i.e., the transaction operation of the first transaction category) in the global context.

[0069] Based on this, using the cumulative number of implementations and cumulative transaction resource values ​​that can globally reflect the transaction situation as implementation parameters is conducive to improving the accuracy of abnormal transaction detection.

[0070] exist Figure 3In the example, the implementation parameter is the aforementioned cumulative number of implementations. For example, for the edge from node 1 to node 2, the weight of the edge is 2, which is used to indicate that the transaction operation of transaction category B was implemented immediately after the transaction operation of transaction category A, and this situation occurred 2 times in total. For another example, for the edge from node 3 to node 4, the weight of the edge is 1, which is used to indicate that the transaction operation of transaction category C was implemented immediately after the transaction operation of transaction category C, and this situation occurred 1 time in total.

[0071] S203: According to the transaction network directed graph and the transaction category features corresponding to the M nodes, abnormal transaction detection is performed on the account to be detected through the target graph neural network to obtain a detection result indicating whether the account to be detected has abnormal transactions during the detection period.

[0072] When performing abnormal transaction detection, the server can perform abnormal transaction detection on the account to be detected through the target graph neural network according to the transaction network directed graph and the transaction category features corresponding to the M nodes, and obtain the detection result, which can be used to indicate whether the account to be detected has abnormal transactions during the detection period. Among them, the transaction category feature corresponding to the node can be used to describe the transaction category represented by the node. Based on this, when the target graph neural network understands the transaction network directed graph, for the edge pointing from the first node to the second node, it can more accurately understand that the transaction operation of the second transaction category is implemented immediately after the transaction operation of the first transaction category. In this way, the target graph neural network can more accurately understand the transaction network directed graph, which is conducive to improving the detection accuracy.

[0073] It should be noted that this application does not make any limitation on how to detect abnormal transactions based on the directed graph of the transaction network and the transaction category characteristics. For ease of understanding, this application provides the following methods as examples:

[0074] In order to facilitate calculation, in a possible implementation, the server can first determine the adjacency matrix corresponding to the transaction network, and then, based on the transaction category features corresponding to the adjacency matrix and the M nodes, perform abnormal transaction detection on the account to be detected through the target graph neural network. Among them, the matrix size of the adjacency matrix is ​​M*M, j and k are used to represent different nodes, j, k∈M. And, in the adjacency matrix, the matrix elements in the jth column and the kth row are used to represent the weight of the edge from the node represented by j to the node represented by k. Based on this, the directed graph of the transaction network is represented by the adjacency matrix, so that the information in the directed graph of the transaction network is transmitted in a more intuitive and simple form, which is conducive to simplifying calculations and improving detection efficiency.

[0075] That is, for a directed graph of a transaction network containing M nodes, the corresponding adjacency matrix is ​​an M-order matrix Y, which can be written as:

[0076] Y=[yjk ] M*M

[0077] In the above formula, Y is used to represent the adjacency matrix, M is used to represent the order of the adjacency matrix, and y jk Used to represent the matrix element at the jth column and the kth row.

[0078] For ease of understanding, Figure 3 The transaction network directed graph shown in the embodiment of the present application also provides Figure 4 A schematic diagram of an adjacency matrix is ​​shown in . Figure 4 In this example, the adjacency matrix is ​​a 4*4 fourth-order matrix. Taking j=2 and k=3 as an example, the corresponding matrix elements can be recorded as y 23 , which is used to represent the weight of the edge from node 2 to node 3. Specifically, it can be used to represent that the cumulative number of implementations of the transaction operation pair of transaction category C immediately after the transaction operation of transaction category B is 1.

[0079] The present application does not make any limitation on how to detect abnormal transactions based on the adjacency matrix and transaction category features. For ease of understanding, the present application provides the following methods as examples:

[0080] For the embodiment of representing the directed graph of the transaction network with an adjacency matrix, in order to improve the detection efficiency, in a possible implementation, the transaction category features corresponding to the M nodes can also be represented in the form of a matrix. In this way, for different data, they are all input into the target graph neural network in the form of a matrix, which is conducive to the target graph neural network to better understand the information expressed by each data, thereby improving the detection efficiency.

[0081] In specific implementation, the server can first determine the node matrix according to the transaction category features corresponding to the M nodes, and then perform abnormal transaction detection on the account to be detected through the target graph neural network based on the adjacency matrix and the node matrix. Among them, the node matrix can include M column elements, r∈M, r is used to represent the node, and the rth column element is used to represent the transaction category feature corresponding to the node represented by r. Based on this, for the target graph neural network, the form of the input data is unified, which is conducive to the target graph neural network to better understand the information expressed by each data, thereby improving the detection efficiency.

[0082] It should also be noted that this application does not impose any restrictions on the number of rows of the node matrix including M columns of elements. In one possible implementation, the number of rows of the node matrix can be determined according to the dimension of the transaction category feature. In practical applications, in order to more comprehensively describe the transaction category, a transaction category is usually described from multiple dimensions, and the corresponding transaction category features may include features of multiple dimensions. Therefore, when determining the number of rows of the node matrix according to the dimension of the transaction category feature, the rth column element as a whole can more comprehensively describe the transaction category feature corresponding to the node represented by r, thereby helping to improve the detection accuracy. For example, if the dimension of the transaction category feature is W, and W is a positive integer, the matrix size of the node matrix can be W*M. Taking W=30 and M=4 as an example, the matrix size of the node matrix is ​​30*4.

[0083] It is understandable that the node matrix may also include M rows of elements, r∈M, r is used to represent a node, and the rth row element is used to represent the transaction category feature corresponding to the node represented by r. Similarly, in this example, the number of columns of the node matrix may be determined according to the dimension of the transaction category feature. For example, if the dimension of the transaction category feature is W, where W is a positive integer, the matrix size of the node matrix may be M*W. Taking W=30 and M=4 as an example, the matrix size of the node matrix is ​​4*30.

[0084] It can be seen from the above technical solution that for the N transaction operations corresponding to the account to be detected during the detection period, according to the transaction categories corresponding to the N transaction operations and the implementation order of the N transaction operations, a transaction network directed graph including M nodes is generated with the transaction categories as nodes. Under the implementation order, for the transaction operation pair consisting of the i-th transaction operation and the i+1-th transaction operation, when the i-th transaction operation is the first transaction category and the i+1-th transaction operation is the second transaction category, the transaction network directed graph has a target edge pointing from the first node to the second node, the first node is used to represent the first transaction category, the second node is used to represent the second transaction category, and the weight of the target edge is used to represent the implementation parameters of the transaction operation pair. Therefore, the direction based on the edge can reflect which transaction operations of a certain transaction category will be implemented immediately after the implementation of the transaction operation of a certain transaction category, and which transaction operations of a certain transaction category will not be implemented immediately, and the weight based on the edge can reflect the implementation of the transaction operation of another transaction category immediately after the implementation of the transaction operation of a certain transaction category. This information reflects the global implementation of N transaction operations. Compared with a single abnormal transaction detection rule, this application performs abnormal transaction detection based on the global implementation of N transaction operations, and is no longer limited by abnormal transaction detection rules, which is conducive to improving detection accuracy.

[0085] Through the above embodiments, the abnormal transaction detection method provided by the present application is described in detail. By generating a directed graph of the transaction network, richer global information is captured to improve the detection accuracy. In this regard, it should also be noted that this application does not make any restrictions on how to determine the target graph neural network, how to determine the transaction category of the transaction operation, how to determine the transaction category characteristics corresponding to the node, and the subsequent processing method after obtaining the detection result. In order to better understand the technical solution of the present application, this will be explained one by one through the subsequent embodiments.

[0086] (I) This application does not make any limitation on how to determine the target graph neural network. For ease of understanding, this application embodiment provides the following method as an example:

[0087] In this application, abnormal transaction detection is performed based on the directed graph of the transaction network. In order to ensure the detection effect, a graph neural network (Graph Neural Network, GNN) with good processing effect on graph structured data is selected. Based on this, the global information in the directed graph of the transaction network can be captured more accurately, which is conducive to improving the detection accuracy. In practical applications, the commonly used graph neural network can be a graph convolution neural network (Graph Convolution Neural Networks, GCN). GCN is a neural network framework for processing graph structured data. It generalizes the convolution operation from the processing of traditional data (images or grids) to the processing of graph structured data. Therefore, in one possible implementation method, the existing graph neural network can be reused to construct a target graph neural network. For example, the target graph neural network is constructed based on GCN to improve the determination efficiency of the target graph neural network.

[0088] In order to improve the detection accuracy of the target graph neural network for abnormal transactions, in another possible implementation method, training samples can also be constructed to perform model training on the initial graph neural network, so that the target graph neural network can better process the directed graph of the transaction network related to the transaction, thereby improving the detection accuracy of the target graph neural network in detecting abnormal transactions.

[0089] In specific implementation, the server can first obtain training samples with sample labels. Among them, the sample label can be used to indicate whether the sample account has abnormal transactions during the sample period, and the training sample can be used to indicate the sample transaction network directed graph corresponding to the sample account during the sample period and the transaction category characteristics of the nodes included in the sample transaction network directed graph. Then, the server can determine the prediction result for indicating whether the sample account has abnormal transactions during the sample period through the initial graph neural network based on the training sample, and the prediction result can be used to indicate the prediction value of whether the sample account has abnormal transactions during the sample period determined by the initial graph neural network. Finally, the server can perform model training on the initial graph neural network based on the difference between the prediction result and the sample label to obtain the target graph neural network.

[0090] Based on this, on the one hand, model training is carried out using training samples suitable for abnormal transaction detection to improve the target graph neural network's ability to understand the directed graph of the transaction network and transaction category characteristics, so that when using the target graph neural network for abnormal transaction detection, it can better capture the relevant information in the directed graph of the transaction network and transaction category characteristics, thereby improving the detection accuracy of the target graph neural network in abnormal transaction detection.

[0091] On the other hand, the training samples constructed in this application are also graph-structured data. Therefore, during the model training process, the initial graph neural network captures the global information reflected in the directed graph of the sample transaction network and combines the transaction category characteristics to learn the relationship between this information and whether it is an abnormal transaction, so that it can learn knowledge related to abnormal transactions in a global context. In this way, after completing the model training, the target graph neural network obtained can better understand the directed graph of the transaction network based on the learned knowledge and output the corresponding detection results. Compared with the method of abnormal transaction detection based on the linear model of logistic regression in the related art, this application can learn knowledge related to abnormal transactions in a global context by capturing global information. This knowledge is deeper knowledge related to abnormal transactions than linear information. Therefore, the method of constructing training samples with the directed graph of the sample transaction network and conducting model training is more conducive to improving detection accuracy.

[0092] The present application does not limit how to train the initial graph neural network model based on the difference between the prediction results and the sample labels. For ease of understanding, the present application provides the following methods as examples:

[0093] In practical applications, the training loss can be used to represent the difference between the prediction result and the sample label, and the training loss can be used to train the initial graph neural network model. Usually, in order to improve the efficiency of model training, multiple training samples are combined into a training group (batch), and then the training loss is determined based on the prediction results of all training samples in the batch and their corresponding sample labels. Then, the network parameters of the initial graph neural network are adjusted to complete the model training. In this way, the knowledge carried by multiple training samples in the batch can be learned in one adjustment, which is conducive to improving training efficiency.

[0094] For ease of understanding, the present application embodiment also provides the following example for training loss:

[0095]

[0096] In the above formula, L is used to represent the training loss, S is used to represent the total number of training samples, S is a positive integer, i is an integer greater than or equal to 1 and less than or equal to S, and p i Used to represent the sample label of the i-th training sample, y i Used to represent the detection result of the i-th training sample.

[0097] Usually, if the sample label of the training sample indicates that there is an abnormal transaction, the sample label can be recorded as 1, that is, p i =1, for example, a training sample with a sample label of 1 can be constructed based on historical transaction operations that have been determined to have abnormal transactions (such as complaints). On the contrary, if there is no abnormal transaction, the sample label can be recorded as 0, that is, p i =0. Usually, there are a large number of normal transaction operations in the payment system, so training samples with sample labels of 0 can be selected by random sampling.

[0098] Based on this, by optimizing the objective function L (specifically, minimizing L), the prediction results output by the initial graph neural network gradually approach the sample labels to obtain the final target graph neural network. Usually, normal users and malicious users have different transaction patterns. For example, after multiple transaction operations of malicious users are arranged in the order of implementation, there are multiple consecutive similar collection actions or fast-in and fast-out situations. Therefore, after constructing a directed graph of the transaction network for model training, the target graph neural network can fully learn the characteristics of normal transactions and abnormal transactions in transaction patterns, which is conducive to improving detection accuracy.

[0099] In practical applications, after the model training is completed, we can first evaluate whether the detection effect of the entire network has met expectations. If it has, we can end the model training and obtain the target graph neural network accordingly. The target graph neural network can be deployed to perform actual detection tasks. If it has not met expectations, we need to continue model training. Commonly used indicators for evaluating detection effects include information value (IV), area under the curve (AUC), Kolmogorov-Smirnov statistic (KS), etc.

[0100] In addition, this application does not make any limitation on the network structure of the initial graph neural network or the target graph neural network. It is understandable that, generally, the process of model training is the adjustment of network parameters, so it can be considered that the network structure of the target graph neural network is the same as the network structure of the initial graph neural network. For ease of understanding, this application embodiment takes the aforementioned GCN as an example, and provides the following method as an example for the network structure of the target graph neural network:

[0101] In one possible implementation, the target graph neural network may first include an input layer to obtain the data that needs to be input into the entire network. Then, multiple layers of GCN connected in sequence may be included, and the output of the previous layer of GCN is used as the input of the next layer of GCN. In this way, through the processing of multiple layers of GCN, it is more conducive to capturing deep information, thereby facilitating improving the accuracy of the detection results. Usually, the number of GCN layers can be set to 3 to 5 layers. In addition, after the last layer of GCN, a fully connected layer (such as a fully connected neural network layer) can be set as the output layer of the entire network. Through the fully connected layer, the output of the entire network is mapped to a single value (usually mapped to between 0 and 1) to obtain the corresponding detection result.

[0102] For better understanding, the present application also provides the following examples: Figure 5 A schematic diagram of an abnormal transaction detection process is shown in FIG. Figure 5 In the example, the network structure of the target graph neural network includes an input layer, 2 layers of GCN, and a fully connected layer. The input of the target graph neural network can be the aforementioned adjacency matrix and node matrix. Through the graph convolutional neural network layer (i.e., GCN) in the target graph neural network, the input adjacency matrix and node matrix can be convolved. The output of the second graph convolutional neural network layer is used as the input of the fully connected layer. Through the mapping of the fully connected layer, the corresponding detection results are obtained. Based on this, abnormal transaction detection is completed.

[0103] In practical applications, in an embodiment where the input of the target graph neural network is an adjacency matrix and a node matrix, the output of the target graph neural network can be expressed as:

[0104] Output = f(Y, X)

[0105] In the above formula, Output is used to represent the output of the target graph neural network. Usually, it can be a value between 0 and 1, which is used to represent the probability that the account to be detected has abnormal transactions during the detection period. The larger the value, the more likely it is that there are abnormal transactions and the higher the degree of suspicion. f is used to represent the way the target graph neural network processes the input data, Y is used to represent the aforementioned adjacency matrix, and X is used to represent the aforementioned node matrix.

[0106] (II) This application does not make any limitation on how to determine the transaction category of a transaction operation. For ease of understanding, this application embodiment provides the following method as an example:

[0107] In actual applications, the order of magnitude of transaction operations is relatively large, while the order of magnitude of transaction categories is relatively small. In order to more quickly determine the transaction category of each transaction operation, possible preset transaction categories can be pre-defined, and then the transaction operation can be matched with the preset transaction category, so that the transaction category to which the transaction operation belongs can be determined more quickly.

[0108] Generally, each transaction operation can be described by certain transaction characteristics, and each preset transaction category can also be described by certain transaction category characteristics. Therefore, in a possible implementation, the transaction characteristics of the transaction operation can be matched with the transaction category characteristics of the preset transaction category to determine the transaction category to which the transaction operation belongs.

[0109] In specific implementation, the server may match the transaction features corresponding to the transaction operation with the transaction category features corresponding to the preset transaction category, and determine the transaction category corresponding to the transaction operation according to the matched preset transaction category. The transaction features corresponding to the transaction operation can be used to describe the transaction operation, for example, to describe the transaction operation as a transaction behavior implemented by the user for a certain purpose. The transaction category features corresponding to the preset transaction category can be used to describe the preset transaction category, for example, to describe a transaction category as a transaction behavior implemented for a certain purpose.

[0110] Based on this, through simple matching, it is possible to quickly determine what the transaction category of the transaction operation is. For N transaction operations, a parallel matching method is used to improve detection efficiency.

[0111] It should be noted that this application does not make any limitation on how to determine the preset transaction category, the transaction category features corresponding to the preset transaction category, the transaction features corresponding to the transaction operation, and how to match. For ease of understanding, this application will be explained one by one through the following embodiments.

[0112] (1) This application does not make any limitation on how to determine the preset transaction category. For ease of understanding, this application embodiment provides the following method as an example:

[0113] It is understandable that the process of implementing transaction operations can be considered as the process of executing payment functions. Generally, different payment functions may support different categories of transaction operations that users can implement, and the payment functions provided in different payment scenarios may be different. Therefore, in a possible implementation, the preset transaction category can be determined in combination with the specific circumstances of the payment scenario. So that the preset transaction category is adapted to the payment scenario, in this way, for the N transaction operations corresponding to the account to be detected, it is conducive to determining a more accurate transaction category, thereby facilitating the generation of a more accurate transaction network directed graph and improving the detection accuracy.

[0114] For ease of understanding, taking the payment scenario to which the account to be detected belongs as the target payment scenario as an example, an example of determining the preset transaction category is given as follows:

[0115] In specific implementation, the server can first obtain K transaction attributes involved in implementing transaction operations in the target payment scenario. The transaction attributes include at least one attribute subclass. The transaction operation is implemented by the account to be detected in the target payment scenario. Among them, K is a positive integer. The transaction attribute is used to describe concepts related to the transaction (such as related concepts that may be involved in the implementation of the transaction operation). The attribute subclass included in the transaction attribute refers to a more specific and detailed subclassification under the transaction attribute, which can be used to describe the transaction attribute, such as describing possible situations of the transaction attribute. Then, the server can combine the attribute subclasses corresponding to the K transaction attributes to obtain a preset transaction category.

[0116] Based on this, by using multiple transaction attributes involved in implementing transaction operations in the target payment scenario and the attribute subclasses included in each transaction attribute, a limited combination based on classes (different transaction attributes can also be considered as different classes, and transaction attributes and attribute subclasses belong to classes of different granularity) is provided through combination to determine the preset transaction category that is compatible with the target payment scenario. In this way, for the transaction operations generated in the target payment scenario, when the aforementioned matching with the preset transaction category is used to determine the transaction category to which the transaction operation belongs, it is conducive to determining a more accurate transaction category, thereby facilitating the generation of a more accurate directed graph of the transaction network and improving the detection accuracy.

[0117] It should be noted that this application does not make any limitation on how to determine the K transaction attributes corresponding to the target payment scenario and the attribute subclasses included in the transaction attributes. For ease of understanding, this application embodiment provides the following method as an example:

[0118] In a possible implementation, the aforementioned K transaction attributes may be selected based on the business conditions (such as business logic, etc.) of the payment function provided in the target payment scenario. The K transaction attributes may be different for the business conditions of the payment function provided in different payment scenarios, and the attribute subclasses included in the same transaction attribute may also be different.

[0119] For ease of understanding, the present application embodiment takes the target payment scenario as a social payment scenario as an example, and provides the following example description for transaction attributes and attribute subclasses:

[0120] Among them, the social payment scenario can refer to the scenario in which users can make payments on social platforms (such as instant messaging applications), which provides users with social functions and payment functions. For example, in the social payment scenario, social payments such as friend transfers, code scanning transfers, and sending and receiving red envelopes can be implemented.

[0121] In social payment scenarios, in order to avoid non-friend fraud, etc., the business level supports transfers between friends, but may not support transfers between non-friends, and illegal users may bypass the non-friend transfers and induce users to add friends before transferring money, etc. Therefore, in a possible implementation, if the target payment scenario is a social payment scenario, social relationships can also be considered to improve detection accuracy.

[0122] In specific implementation, if the target payment scenario is a social payment scenario, the transaction attributes may include social relationship attributes, which are used to describe the social situation related to the transaction. Specifically, for transaction operations, the attribute subclass corresponding to the transaction operation under the social relationship attribute can be used to represent the social information of the transaction account associated with the transaction operation in the social payment scenario, and the social information can be used to represent the time when the transaction parties associated with the transaction operation become friends, etc. For preset transaction categories, the attribute subclass corresponding to the preset transaction category under the social relationship attribute can be used to represent the social information of the transaction account associated with the transaction operation belonging to the preset transaction category in the social payment scenario.

[0123] Based on this, according to the characteristics of social payment scenarios, comprehensive consideration of social relationship attributes will help improve detection accuracy and reduce transaction risks such as social payment fraud.

[0124] In another possible implementation, K transaction attributes can also be determined based on historical transaction operations implemented in the target payment scenario. Among them, historical transaction operations can refer to transaction operations that have been completed and implemented in the target payment scenario before the detection period. Since historical transaction operations are real transaction operations that can reflect the transaction characteristics in the target payment scenario, the transaction attributes are determined based on historical transaction operations so that the transaction attributes themselves are related to the real transaction operations. In this way, after determining the preset transaction category based on the attribute subclass combination of the transaction attributes, it is beneficial for the preset transaction category to better describe the transaction operations that need to be detected, thereby improving the detection accuracy.

[0125] In actual applications, historical transaction operations may include normal transaction operations and abnormal transaction operations that have been confirmed to be abnormal (e.g., complaints and verifications confirming abnormalities). Generally, the abnormal transaction operations can reflect the transaction characteristics related to the abnormality, which are those related to the abnormal transaction operations that users do not want to be detected or discovered.

[0126] In this regard, after adopting the implementation method of determining transaction attributes based on abnormal transaction operations in historical transaction operations, or determining attribute subclasses in transaction attributes, it is more conducive to mapping specific transaction attributes or attribute subclasses according to transaction characteristics related to abnormalities. Later, through combination, etc., some specific preset transaction categories may be determined, which is conducive to improving the richness of preset transaction categories. Correspondingly, during detection, once a certain transaction operation can be matched with these preset transaction categories, the transaction category to which the transaction operation belongs can be determined as these preset transaction categories, and then subsequent detection is carried out, which is more conducive to detecting existing abnormal transaction operations and improving detection accuracy.

[0127] For example, after combining the transaction attributes determined based on the business, four preset transaction categories, ABCD, can be obtained. Based on the abnormal transaction operations in the historical transaction operations, new transaction attributes are added, and after combination, the preset transaction category E is obtained.

[0128] In order to better understand transaction attributes and their attribute subclasses, the present application embodiment also provides the following example description:

[0129] Usually, transactions involve the transfer of resource values, which is also important information for judging abnormal transactions. Therefore, in a possible implementation, the aforementioned transaction attributes may include a transaction amount attribute, which can be used to describe the resource value information involved in the transaction. Specifically, for transaction operations, the resource value involved in each transaction operation is a clear numerical value. Therefore, the attribute subclass corresponding to the transaction operation under the transaction amount attribute can be used to represent the transaction resource value corresponding to the transaction operation, which can be the resource value involved in the transfer of this transaction operation.

[0130] Since the transaction resource value itself can take any real number, usually, different transaction resource values ​​that fall within a certain range can provide similar effective information for the judgment of abnormal transaction detection. In this application, for N transaction operations, when performing abnormal transaction detection, what is used is actually the transaction category corresponding to each transaction operation. Therefore, in this application, the attribute subclass corresponding to the preset transaction category under the transaction amount attribute can be used to represent the transaction resource value range corresponding to the preset transaction category, and the transaction resource value range can identify the interval of the transaction resource value designed for the transaction operation belonging to the preset transaction category. Accordingly, the transaction resource value corresponding to the transaction operation falls within the transaction resource value range corresponding to the transaction category to which the transaction operation belongs.

[0131] It can be seen that the transaction operation corresponds to the specific value involved, while the transaction category corresponds to a range. Based on this, a large number of different transaction resource values ​​can be described with a relatively small number of transaction resource value ranges, which is conducive to reducing the amount of calculation in the subsequent detection process.

[0132] Through the above examples, the transaction attributes, attribute subclasses and preset transaction categories are illustrated. For a further understanding, the present application embodiment takes the aforementioned social payment scenario as an example, and also provides the following examples for supplementary explanation:

[0133] Exemplarily, the K transaction attributes and attribute subclasses involved in implementing a transaction operation in a social payment scenario may include the following:

[0134] ① Transaction direction: used to indicate the resource transfer involved in the transaction operation. For example, it can include attribute subcategories such as outgoing payment, incoming payment, and cash withdrawal.

[0135] ②Transaction type: used to indicate the type of transfer involved in the transaction operation. For example, it can include attribute subcategories such as ordinary transfer, face-to-face transfer, red envelope, and commercial payment.

[0136] ③ Payment method: used to indicate the source of resource transfer involved in the transaction operation. For example, it can include balance, change, bound card, etc.

[0137] ④ Social relationship attributes: used to represent the social information of the two parties involved in the transaction operation. For example, it can include the time of the two parties' friends.

[0138] ⑤ Trading time: used to indicate the trading time involved in the trading operation. For example, it can be recorded in hours, such as 12 o'clock.

[0139] ⑥Transaction amount attribute: used to indicate the range of transaction resource values ​​involved in the transaction operation, which can be grouped according to certain rules, for example, [0,500], [501-2000], etc.

[0140] For example, the aforementioned A transaction category can be used to represent “receipt-normal transfer-balance-friend xx-12 points-[0-500]”. Accordingly, the transaction category feature of the A transaction category can be determined based on “receipt-normal transfer-balance-friend xx-12 points-[0-500]”.

[0141] (2) With respect to the transaction category features corresponding to the preset transaction categories and the transaction features corresponding to the transaction operations, the present application provides the following examples:

[0142] Corresponding to the embodiment of determining the preset transaction category shown in (1), the transaction category feature corresponding to the preset transaction category can be determined based on the attribute subclass of the preset transaction category obtained by combination. For example, an attribute subclass is extracted from each transaction attribute, and a preset transaction category is determined based on the obtained K attribute subclasses. Accordingly, the transaction category feature of the preset transaction category can include the aforementioned K attribute subclasses.

[0143] Furthermore, for the transaction operation implemented in the target payment scenario, it can also be described from K transaction attributes, that is, the transaction operation situation can be disassembled into K transaction attributes to determine what attribute subclasses the transaction operation corresponds to under the K transaction attributes. Accordingly, the transaction characteristics of the transaction operation can be determined based on the attribute subclasses that the transaction operation corresponds to under the K transaction attributes.

[0144] Based on this, using unified K transaction attributes to describe each transaction operation and each preset transaction category is conducive to matching the transaction characteristics of the transaction operation with the transaction category characteristics of the preset transaction category, so as to determine more accurately the transaction category to which the transaction operation belongs.

[0145] (3) Regarding how to perform matching, the present application embodiment provides the following method as an example:

[0146] Taking the transaction features and transaction category features shown in (2) as an example, when matching, the attribute subclasses under the same transaction attribute can be matched, and the preset transaction category that matches the attribute subclasses of K transaction attributes is the matched preset transaction category. Since different preset transaction categories have different attribute subclasses under at least one transaction attribute, the number of preset transaction categories matched based on this is 1. Therefore, the matched preset transaction category can be directly used as the transaction category to which the transaction operation belongs.

[0147] (III) This application does not impose any limitation on the subsequent processing methods after obtaining the test results. For ease of understanding, this application embodiment provides the following methods as examples:

[0148] In practical applications, the purpose of abnormal transaction detection is to promptly discover abnormal transactions to avoid more transaction risks. Therefore, in a possible implementation, after obtaining the detection results, transaction warnings can be issued for abnormal transactions. In specific implementation, if the detection results indicate that the account to be detected has abnormal transactions during the detection period, the server can further determine the target transaction operation corresponding to the abnormal transaction. The target transaction operation refers to the transaction operation related to the existing abnormal transaction, for example, it can be part of the N transaction operations, and of course, it can also be all of the N transaction operations. Finally, the server can issue a transaction warning for the transaction account associated with the target transaction operation.

[0149] Based on this, in the case of abnormal transactions, by locating the target transaction operation corresponding to the abnormal transaction and issuing transaction warnings to the associated transaction accounts, corresponding measures can be taken in a timely manner for the accounts related to the abnormal transactions. For example, the transaction warning can be to restrict the subsequent transaction permissions of the transaction accounts associated with the target transaction operation, so as to prevent these transaction accounts from continuing to implement abnormal transactions in subsequent transactions and generating transaction risks, so as to avoid unnecessary transaction losses for users of the transaction accounts associated with the target transaction operation and the payment platform.

[0150] Taking the prediction result as the aforementioned value between 0 and 1 as an example, if the value of the account to be detected is greater than a certain threshold (such as 0.8), it indicates that the account to be detected has a higher transaction risk during the detection period. Therefore, it can be determined that the account to be detected has abnormal transactions during the detection period.

[0151] (IV) This application does not make any limitation on how to determine the transaction category characteristics corresponding to the node. For ease of understanding, this application embodiment provides the following methods as examples:

[0152] In order to facilitate the target graph neural network to better understand the transaction category features as input data, in a possible implementation, the transaction category features can be in the form of vectors, for example, embedded vectors, which can also be denoted as embeddings. Accordingly, the aforementioned node matrix can be composed of the transaction category feature embeddings of the transaction categories represented by each node. In the node matrix, the matrix elements in the rth column can be used to represent the embedding corresponding to the node represented by r.

[0153] The present application does not make any limitation on how to determine the embedding method. For ease of understanding, the present application provides the following examples:

[0154] It is understandable that the total number of attribute subclasses included in the K transaction attributes can be recorded as T, where T is an integer greater than or equal to K. Therefore, in one possible implementation, each transaction category can be represented by a T-dimensional one-hot encoding (One-hot Vector). In a One-hot Vector, except for the corresponding index index, which takes 1, all other positions take values ​​0. For example, under a certain transaction attribute, there are 3 attribute subclasses, and a certain transaction category corresponds to one of the 3 attribute subclasses under this transaction attribute. Correspondingly, in the One-hot Vector, only the index corresponding to this attribute subclass is 1, and the indexes of the other two attribute subclasses are both 0.

[0155] Since the order of magnitude of T is usually large, in a One-hot Vector, except for the corresponding index index, which takes 1, all other positions take the value of 0. Therefore, in the One-hot Vector approach, on the one hand, the number of dimensions is too large, and on the other hand, there are many 0 values, which consumes more computing resources. In order to reduce the computing resource overhead, in another possible approach, a dimensionality reduction algorithm can be used to process the One-hot Vector to obtain the final embedding.

[0156] In practical applications, a word vector model can be used to reduce the dimension of the One-hot Vector. For example, the word vector model can be a word2vec model. For details, see Figure 6 A schematic diagram of the model structure of a word vector model is shown.

[0157] exist Figure 6 In the example, the model structure of the word2vec model may include an input layer, a hidden layer, and an output layer. The input layer is used to obtain the aforementioned One-hotVector, and the hidden layer performs encoding and other processing based on the weight matrix. The dimension N of the hidden layer can be much smaller than the dimension V of the input layer. The matrix size of the weight matrix can be V*N, and each row of its N-dimensional vector is a reduced-dimensional representation of the corresponding One-hot Vector. Based on this, the One-hot Vector is reduced to a vector in the form of word2vec. Finally, the aforementioned embedding can be determined based on the output of the word2vec model.

[0158] In addition, another benefit of the word2vec model is that due to the data characteristics of the vector in the vector space, that is, the distance between similar vectors in the vector space should also be close, it is helpful to ensure that the vector in the word2vec form after dimensionality reduction and the one-hot vector before dimensionality reduction can accurately represent the transaction category characteristics.

[0159] Through the above embodiments, the abnormal transaction detection method provided by the present application is described in detail. In order to better understand the technical solution of the present application as a whole, the present application embodiment also provides the following Figure 7 A schematic diagram of a framework for abnormal transaction detection is shown in FIG. Figure 8 A schematic diagram of an abnormal transaction detection process is shown.

[0160] based on Figure 7 For example, the framework of abnormal transaction detection provided by this application may include three parts, as follows:

[0161] The first part is the construction of training samples, including: determining the preset transaction category (see S701), obtaining the transaction operation sequence of the sample account within the sample period (see S702), constructing a sample transaction network directed graph and determining the transaction category characteristics based on the word vector model (see S703), and constructing the adjacency matrix and node matrix corresponding to the sample account (see S704).

[0162] Specifically, for each transaction operation in the transaction operation sequence of the sample account within the sample period, the transaction characteristics of the transaction operation are matched with the transaction characteristics of the preset transaction category, so as to determine the transaction category corresponding to each transaction operation. Then, the transaction category can be used as a node, and for the transaction operation pair consisting of the i-th transaction operation and the i+1-th transaction operation arranged in the transaction category sequence in the implementation order, when the i-th transaction operation is the first transaction category and the i+1-th transaction operation is the second transaction category, in the sample transaction network directed graph, there is a sample edge pointing from the first node for representing the first transaction category to the second node for representing the second transaction category, and the weight of the sample edge is used to represent the sample implementation parameters of the transaction operation pair, such as the weight can be the number of occurrences of this transaction operation pair in the transaction operation sequence. In addition, the transaction category features corresponding to each transaction category can be determined using a word vector model.

[0163] Next, the adjacency matrix corresponding to the sample account can be constructed based on the sample transaction network directed graph. For example, if there are M nodes in the sample transaction network directed graph, the matrix size of this adjacency matrix is ​​M*M, where the matrix elements in the jth column and the kth row are used to represent the weight of the edge from the node represented by j to the node represented by k, where j and k are used to represent different nodes among the M nodes. And, based on the transaction category features corresponding to these three nodes, a node matrix containing M columns of elements is constructed, where the rth element is used to represent the transaction category features corresponding to the node represented by r, and r is used to represent the node.

[0164] The second part is model training, including: constructing an initial graph neural network based on the graph convolutional neural network (see S705), using the adjacency matrix and node matrix corresponding to the sample account constructed in the first part to train the model of the initial graph neural network (see S706), and evaluating the model training effect (see S707). If it does not meet the expected effect, continue model training, that is, repeat S706. If it meets the expected effect, the target graph neural network can be obtained (see S708).

[0165] Specifically, the adjacency matrix and node matrix corresponding to the sample account constructed in the first part can be used as the input of the initial graph neural network, and the initial graph neural network outputs the corresponding prediction results, which can be used to indicate whether the sample account has abnormal transactions during the sample period. Since the sample labels of the training samples are used to indicate whether the sample account has abnormal transactions during the sample period, the difference between the prediction results and the sample labels can reflect the prediction effect of the initial graph neural network. Therefore, the initial graph neural network model can be trained based on the difference between the prediction results and the sample labels to improve the prediction accuracy of the initial graph neural network.

[0166] Usually, the prediction accuracy of the initial graph neural network can be evaluated by evaluating the model training effect, such as the aforementioned information value, area under the curve and other indicators. When it meets the expected effect, it can be considered that the graph neural network at this time has good prediction accuracy, and the model training can be ended accordingly, that is, the target graph neural network is obtained. On the contrary, if it does not meet the expected effect, it means that the prediction accuracy of the graph neural network at this time cannot meet the detection requirements, so the model training can continue, and the prediction accuracy of the graph neural network can be improved through more training until it meets the expected effect.

[0167] The third part is the model application, including: constructing the adjacency matrix and node matrix corresponding to the account to be detected (see S709), using the target graph neural network obtained in S708 to detect abnormal transactions, and outputting the detection results (see S710).

[0168] Specifically, for the account to be detected, according to the N transaction operations corresponding to the account to be detected during the detection period, according to the transaction categories corresponding to the N transaction operations and the implementation order of the N transaction operations, a transaction network directed graph including M nodes can be generated with the transaction categories as nodes. Then, the corresponding M*M adjacency matrix and the node matrix containing M columns of elements are constructed. Then, this adjacency matrix and node matrix can be used as the input of the target graph neural network obtained in the second part above, and the detection result is output through the target graph neural network. The detection result is used to indicate whether there are abnormal transactions in the account to be detected during the detection period.

[0169] Accordingly, after obtaining the test results, it can also be determined whether other steps need to be implemented in the future based on the test results. For example, if the test results indicate that the account to be tested has abnormal transactions during the test period, in order to avoid more transaction risks in the future, the target transaction operations corresponding to the abnormal transactions can be determined. The target transaction operations can refer to those transaction operations with abnormal transactions. In addition, transaction warnings can be issued for the transaction accounts associated with the target transaction operations. For example, the authority of these transaction accounts to implement transaction operations within a certain period of time can be restricted to avoid more transaction risks in the future.

[0170] It should be noted that Figure 7 The specific implementation of each step in the example can refer to the detailed description in the above-mentioned related embodiments, which will not be repeated here. In addition, the numbering is only an example, and the implementation order of each step can be determined according to the actual situation. For example, S701 and S702 can be performed at the same time. S705 and S701 to S704 can all be performed at the same time, etc.

[0171] In order to further understand the application process of the target graph neural network, that is, Figure 7 The third part of the example can be found in Figure 8 The abnormal transaction detection process diagram shown is as follows:

[0172] exist Figure 8 In the example, a full amount of accounts to be tested that need to be tested can be obtained from the payment system (see S801), where the payment system can refer to the platform used to provide payment functions in the aforementioned target payment scenario. For example, there can be 100 accounts to be tested. Then, the transaction operation sequence corresponding to each account to be tested can be determined (see S802), and a directed graph of the transaction network corresponding to each account to be tested can be constructed, and transaction category features can be determined based on node mapping (see S803). Next, the adjacency matrix and node matrix corresponding to each account to be tested can be constructed (parameter S804).

[0173] Specifically, for a certain account to be detected, the transaction operation sequence of the account to be detected during the detection period includes a total of N transaction operations. In terms of implementation order, the N transaction operations can be arranged as the 1st transaction operation, ..., the i-th transaction operation, the i+1-th transaction operation, ..., the N-th transaction operation, where i is an integer greater than or equal to 1 and less than N. The implementation order of the N transaction operations during the detection period is used to indicate the implementation order of the N transaction operations.

[0174] To this end, the transaction categories corresponding to the N transaction operations can be determined first. Then, in the implementation order, for the transaction operation pair consisting of the i-th transaction operation and the i+1-th transaction operation, when the i-th transaction operation is the first transaction category and the i+1-th transaction operation is the second transaction category, the transaction network directed graph has a target edge from the first node to the second node, the first node is used to represent the first transaction category, and the second node is used to represent the second transaction category. And, the weight of the target edge is used to represent the implementation parameters of the transaction operation pair, and the implementation parameters can represent the implementation status of the transaction operation pair.

[0175] Based on this, until i=N-1, the situation of each transaction operation pair can be determined, so as to determine the corresponding edge and edge weight in the transaction network directed graph, and after completion, the transaction network directed graph corresponding to the account to be detected can be obtained. For example, if the number of transaction categories corresponding to N transaction operations is M, then the transaction network directed graph includes M nodes in total, and different nodes are used to represent different transaction categories.

[0176] Next, we can construct an adjacency matrix corresponding to the account to be detected based on the directed graph of the transaction network including M nodes. The matrix size of the adjacency matrix is ​​M*M, j and k are used to represent different nodes, j, k∈M, and in the adjacency matrix, the matrix element in the jth column and the kth row is used to represent the weight of the edge from the node represented by j to the node represented by k. For example, we can refer to Figure 4 For example, the adjacency matrix shown is a 4*4 fourth-order matrix. Taking j=2 and k=3 as an example, the corresponding matrix elements can be recorded as y 23 , which is used to represent the weight of the edge from node 2 to node 3. Specifically, it can be used to represent that the cumulative number of implementations of the transaction operation pair of transaction category C immediately after the transaction operation of transaction category B is 1.

[0177] And, for each of the M nodes, a column of matrix elements can be constructed according to the transaction category feature corresponding to the node, and M columns of matrix elements can be obtained accordingly, and these M columns of matrix elements can constitute the node matrix corresponding to the account to be detected. The transaction category feature corresponding to the node is used to describe the transaction category represented by the node.

[0178] Next, the adjacency matrix and the node matrix may be input into the target graph neural network (see S805 ). The target graph neural network outputs the detection results corresponding to each account to be detected (see S806 ).

[0179] Specifically, the adjacency matrix and node matrix corresponding to the above-mentioned account to be detected can be used as the input of the target graph neural network, and the detection result is output by the target graph neural network. The detection result is used to indicate whether the account to be detected has abnormal transactions during the detection period.

[0180] For all accounts to be tested, such as the aforementioned 100 accounts to be tested, the above process is repeated, and finally the test results corresponding to the 100 accounts to be tested can be obtained. Based on this, abnormal transaction detection of all accounts to be tested that need to be tested is completed.

[0181] In actual applications, the process of abnormal transaction detection can be implemented offline, and the payment system is usually run online in real time. Therefore, after obtaining the detection results, the detection results can be uploaded to the payment system (see S807). Specifically, after obtaining the detection results corresponding to all the accounts to be tested that need to be tested, the full amount of detection results can be uploaded to the payment system as a whole. In this way, it only needs to be uploaded once, which is conducive to saving computing resources.

[0182] After that, the detection results can be used to carry out transaction warnings for transaction accounts related to abnormal transactions (see S808), and timely avoid possible transaction risks of the payment system. Specifically, for each account to be detected, it is determined whether a transaction warning needs to be implemented according to the corresponding detection results. For example, for a certain account to be detected, if the detection result of the account to be detected indicates that there is an abnormal transaction, the target transaction operation corresponding to the abnormal transaction can be determined, and the target transaction operation can refer to those transaction operations in which the account to be detected has abnormal transactions. Then, a transaction warning can be carried out for the transaction accounts associated with the target transaction operation. For example, the authority of these transaction accounts to implement transaction operations within a certain period of time can be restricted to avoid more transaction risks in the future.

[0183] It should be noted that Figure 8 The specific implementation of each step in the example can be found in the detailed description in the aforementioned related embodiments, which will not be repeated here.

[0184] It should also be noted that, based on the implementation methods provided in the above aspects, this application can also be further combined to provide more implementation methods.

[0185] based on Figure 2Corresponding to the abnormal transaction detection method provided in the embodiment, the embodiment of the present application further provides an abnormal transaction detection device 900, the abnormal transaction detection device 900 includes an acquisition unit 901, a generation unit 902 and a detection unit 903:

[0186] The acquisition unit 901 is used to acquire N transaction operations corresponding to the account to be detected within the detection period;

[0187] The generating unit 902 is configured to generate a directed trading network graph including M nodes according to the trading categories respectively corresponding to the N trading operations and the implementation order of the N trading operations in the detection period, wherein different nodes are used to represent different trading categories, and under the implementation order, for a trading operation pair consisting of an i-th trading operation and an (i+1)-th trading operation, when the i-th trading operation is of the first trading category and the (i+1)-th trading operation is of the second trading category, the directed trading network graph has a target edge pointing from the first node to the second node, the first node is used to represent the first trading category, the second node is used to represent the second trading category, and the weight of the target edge is used to represent the implementation parameter of the trading operation pair;

[0188] The detection unit 903 is used to perform abnormal transaction detection on the account to be detected through a target graph neural network according to the transaction network directed graph and the transaction category features corresponding to the M nodes, and obtain a detection result indicating whether the account to be detected has abnormal transactions during the detection period.

[0189] In a possible implementation, the detection unit is further used for:

[0190] Determine an adjacency matrix corresponding to the directed graph of the transaction network, wherein the matrix size of the adjacency matrix is ​​M*M, j and k are used to represent different nodes, j, k∈M, and in the adjacency matrix, the matrix element in the jth column and the kth row is used to represent the weight of the edge from the node represented by j to the node represented by k;

[0191] According to the adjacency matrix and the transaction category features respectively corresponding to the M nodes, abnormal transaction detection is performed on the account to be detected through the target graph neural network.

[0192] In a possible implementation, the detection unit is further used for:

[0193] According to the transaction category features corresponding to the M nodes respectively, a node matrix is ​​determined, wherein the node matrix includes M column elements, r∈M, r is used to represent a node, and the rth column element is used to represent the transaction category feature corresponding to the node represented by r;

[0194] According to the adjacency matrix and the node matrix, abnormal transaction detection is performed on the account to be detected through the target graph neural network.

[0195] In a possible implementation manner, the acquiring unit is further configured to:

[0196] According to the N transaction operations and the implementation sequence, counting the cumulative number of implementations of the transaction operation pair as the implementation parameter;

[0197] According to the N transaction operations and the implementation sequence, the accumulated transaction resource value corresponding to the transaction operation implementing the second transaction category by the transaction operation is counted as the implementation parameter.

[0198] In a possible implementation manner, the acquiring unit is further configured to:

[0199] Matching the transaction feature corresponding to the transaction operation with the transaction category feature corresponding to the preset transaction category, wherein the transaction feature corresponding to the transaction operation is used to describe the transaction operation, and the transaction category feature corresponding to the preset transaction category is used to describe the preset transaction category;

[0200] The transaction category corresponding to the transaction operation is determined according to the matched preset transaction category.

[0201] In a possible implementation manner, the acquiring unit is further configured to:

[0202] Acquire K transaction attributes involved in a transaction operation implemented in a target payment scenario, wherein the transaction attribute includes at least one attribute subclass, and the transaction operation is implemented by the account to be detected in the target payment scenario;

[0203] The attribute subclasses corresponding to the K transaction attributes are combined to obtain the preset transaction category.

[0204] In a possible implementation manner, the acquiring unit is further configured to:

[0205] According to the historical transaction operations implemented in the target payment scenario, K transaction attributes are determined.

[0206] In one possible implementation, the transaction attributes include a transaction amount attribute, the attribute subclass corresponding to the transaction operation under the transaction amount attribute is used to represent the transaction resource value corresponding to the transaction operation, the attribute subclass corresponding to the preset transaction category under the transaction amount attribute is used to represent the transaction resource value range corresponding to the preset transaction category, and the transaction resource value corresponding to the transaction operation falls within the transaction resource value range corresponding to the transaction category to which the transaction operation belongs.

[0207] In one possible implementation, if the target payment scenario is a social payment scenario, the transaction attributes include social relationship attributes, the attribute subclass corresponding to the transaction operation under the social relationship attribute is used to represent the social information of the transaction account associated with the transaction operation in the social payment scenario, and the attribute subclass corresponding to the preset transaction category under the social relationship attribute is used to represent the social information of the transaction account associated with the transaction operation belonging to the preset transaction category in the social payment scenario.

[0208] In a possible implementation manner, the acquiring unit is further configured to:

[0209] Acquire a training sample with a sample label, wherein the sample label is used to indicate whether the sample account has abnormal transactions during a sample period, and the training sample is used to indicate a sample transaction network directed graph corresponding to the sample account during the sample period and transaction category features of nodes included in the sample transaction network directed graph;

[0210] Determining, based on the training sample, a prediction result indicating whether the sample account has abnormal transactions during the sample period by using an initial graph neural network;

[0211] According to the difference between the prediction result and the sample label, the initial graph neural network is trained to obtain the target graph neural network.

[0212] In a possible implementation manner, the generating unit is further configured to:

[0213] If the detection result indicates that the account to be detected has abnormal transactions within the detection period, determining a target transaction operation corresponding to the abnormal transaction;

[0214] A transaction warning is issued for the transaction account associated with the target transaction operation.

[0215] It can be seen from the above technical solution that for the N transaction operations corresponding to the account to be detected during the detection period, according to the transaction categories corresponding to the N transaction operations and the implementation order of the N transaction operations, a transaction network directed graph including M nodes is generated with the transaction categories as nodes. Under the implementation order, for the transaction operation pair consisting of the i-th transaction operation and the i+1-th transaction operation, when the i-th transaction operation is the first transaction category and the i+1-th transaction operation is the second transaction category, the transaction network directed graph has a target edge pointing from the first node to the second node, the first node is used to represent the first transaction category, the second node is used to represent the second transaction category, and the weight of the target edge is used to represent the implementation parameters of the transaction operation pair. Therefore, the direction based on the edge can reflect which transaction operations of a certain transaction category will be implemented immediately after the implementation of the transaction operation of a certain transaction category, and which transaction operations of a certain transaction category will not be implemented immediately, and the weight based on the edge can reflect the implementation of the transaction operation of another transaction category immediately after the implementation of the transaction operation of a certain transaction category. This information reflects the global implementation of N transaction operations. Compared with a single abnormal transaction rule, this application performs abnormal transaction detection based on the global implementation of N transaction operations, and is no longer limited by abnormal transaction rules, which is conducive to improving detection accuracy.

[0216] The embodiment of the present application further provides a computer device, which may be a terminal. For example, the terminal is a smart phone:

[0217] Fig.10 The block diagram shows a partial structure of a smart phone provided in an embodiment of the present application. Fig.10 The smartphone includes: a radio frequency (RF) circuit 1110, a memory 1120, an input unit 1130, a display unit 1140, a sensor 1150, an audio circuit 1160, a wireless fidelity (WiFi) module 1170, a processor 1180, and a power supply 1190. The input unit 1130 may include a touch panel 1131 and other input devices 1132, the display unit 1140 may include a display panel 1141, and the audio circuit 1160 may include a speaker 1161 and a microphone 1162. Those skilled in the art will appreciate that Fig.10 The structure of the smartphone shown in the figure does not constitute a limitation of the smartphone, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0218] The memory 1120 can be used to store software programs and modules. The processor 1180 executes various functional applications and data processing of the smartphone by running the software programs and modules stored in the memory 1120. The memory 1120 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the smartphone (such as audio data, a phone book, etc.), etc. In addition, the memory 1120 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0219] The processor 1180 is the control center of the smartphone, which uses various interfaces and lines to connect various parts of the entire smartphone, and executes various functions of the smartphone and processes data by running or executing software programs and / or modules stored in the memory 1120, and calling data stored in the memory 1120. Optionally, the processor 1180 may include one or more processing units; preferably, the processor 1180 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 1180.

[0220] In this embodiment, the steps performed by the processor 1180 in the smartphone may be based on Fig.10 The structure shown is implemented.

[0221] The computer device provided in the embodiment of the present application may also be a server. Fig.11 As shown, Fig.11 The structural diagram of the server 1200 provided in the embodiment of the present application, the server 1200 may have relatively large differences due to different configurations or performances, and may include one or more processors, such as a central processing unit (CPU) 1222, and a memory 1232, one or more storage media 1230 (such as one or more mass storage devices) storing application programs 1242 or data 1244. Among them, the memory 1232 and the storage medium 1230 can be short-term storage or permanent storage. The program stored in the storage medium 1230 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Furthermore, the central processing unit 1222 can be configured to communicate with the storage medium 1230 and execute a series of instruction operations in the storage medium 1230 on the server 1200.

[0222] The server 1200 may also include one or more power supplies 1226, one or more wired or wireless network interfaces 1250, one or more input and output interfaces 1258, and / or one or more operating systems 1241, such as Windows Server 2000. TM , Mac OS X TM , Unix TM ,Linux TM , FreeBSD TM etc.

[0223] In this embodiment, the central processor 1222 in the server 1200 may perform the following steps:

[0224] Obtain N transaction operations corresponding to the account to be tested during the testing period;

[0225] According to the transaction categories respectively corresponding to the N transaction operations and the implementation order of the N transaction operations in the detection period, a transaction network directed graph including M nodes is generated, where different nodes are used to represent different transaction categories. Under the implementation order, for a transaction operation pair consisting of an i-th transaction operation and an (i+1)-th transaction operation, when the i-th transaction operation is of a first transaction category and the (i+1)-th transaction operation is of a second transaction category, the transaction network directed graph has a target edge pointing from a first node to a second node, the first node is used to represent the first transaction category, the second node is used to represent the second transaction category, and the weight of the target edge is used to represent an implementation parameter of the transaction operation pair;

[0226] According to the directed graph of the transaction network and the transaction category features corresponding to the M nodes respectively, abnormal transaction detection is performed on the account to be detected through a target graph neural network to obtain a detection result indicating whether the account to be detected has abnormal transactions during the detection period.

[0227] According to one aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium is used to store a computer program. When the computer program is executed by a computer device, the computer device executes the abnormal transaction detection method described in the aforementioned embodiments.

[0228] According to one aspect of the present application, a computer program product is provided, the computer program product comprising a computer program, the computer program being stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the method provided in various optional implementations of the above-mentioned embodiments.

[0229] The descriptions of the processes or structures corresponding to the above-mentioned figures have different emphases. For parts that are not described in detail in a certain process or structure, please refer to the relevant descriptions of other processes or structures.

[0230] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein, for example. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0231] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as 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 mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0232] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0233] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0234] 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 application is essentially or the part that contributes to the relevant technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store program codes.

[0235] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.

[0236] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, ordinary technical members in the art should understand that they can still modify the technical solutions recorded in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for detecting abnormal transactions, characterized in that: The method comprises: Obtain N transaction operations corresponding to the account to be tested during the testing period; According to the transaction categories respectively corresponding to the N transaction operations and the implementation order of the N transaction operations in the detection period, a transaction network directed graph including M nodes is generated, where different nodes are used to represent different transaction categories. Under the implementation order, for a transaction operation pair consisting of an i-th transaction operation and an (i+1)-th transaction operation, when the i-th transaction operation is of a first transaction category and the (i+1)-th transaction operation is of a second transaction category, the transaction network directed graph has a target edge pointing from a first node to a second node, the first node is used to represent the first transaction category, the second node is used to represent the second transaction category, and the weight of the target edge is used to represent an implementation parameter of the transaction operation pair; According to the directed graph of the transaction network and the transaction category features corresponding to the M nodes respectively, abnormal transaction detection is performed on the account to be detected through a target graph neural network to obtain a detection result indicating whether the account to be detected has abnormal transactions during the detection period.

2. The method according to claim 1, characterized in that: The method of performing abnormal transaction detection on the account to be detected by using a target graph neural network according to the transaction network directed graph and the transaction category features corresponding to the M nodes respectively includes: Determine an adjacency matrix corresponding to the directed graph of the transaction network, wherein the matrix size of the adjacency matrix is ​​M*M, j and k are used to represent different nodes, j, k∈M, and in the adjacency matrix, the matrix element in the jth column and the kth row is used to represent the weight of the edge from the node represented by j to the node represented by k; According to the adjacency matrix and the transaction category features respectively corresponding to the M nodes, abnormal transaction detection is performed on the account to be detected through the target graph neural network.

3. The method according to claim 2, characterized in that The method of performing abnormal transaction detection on the account to be detected by using the target graph neural network according to the adjacency matrix and the transaction category features respectively corresponding to the M nodes includes: According to the transaction category features corresponding to the M nodes respectively, a node matrix is ​​determined, wherein the node matrix includes M column elements, r∈M, r is used to represent a node, and the rth column element is used to represent the transaction category feature corresponding to the node represented by r; According to the adjacency matrix and the node matrix, abnormal transaction detection is performed on the account to be detected through the target graph neural network.

4. The method according to claim 1, characterized in that: The implementation parameters are determined by at least one of the following methods: According to the N transaction operations and the implementation sequence, counting the cumulative number of implementations of the transaction operation pair as the implementation parameter; According to the N transaction operations and the implementation order, the accumulated transaction resource value corresponding to the transaction operation implementing the second transaction category by the transaction operation is counted as the implementation parameter.

5. The method according to claim 1, characterized in that The method further comprises: Matching the transaction feature corresponding to the transaction operation with the transaction category feature corresponding to the preset transaction category, wherein the transaction feature corresponding to the transaction operation is used to describe the transaction operation, and the transaction category feature corresponding to the preset transaction category is used to describe the preset transaction category; The transaction category corresponding to the transaction operation is determined according to the matched preset transaction category.

6. The method according to claim 5, characterized in that The preset transaction category is determined in the following manner: Acquire K transaction attributes involved in a transaction operation implemented in a target payment scenario, wherein the transaction attribute includes at least one attribute subclass, and the transaction operation is implemented by the account to be detected in the target payment scenario; The attribute subclasses corresponding to the K transaction attributes are combined to obtain the preset transaction category.

7. The method according to claim 6, characterized in that The step of obtaining K transaction attributes involved in implementing the transaction operation in the target payment scenario includes: According to the historical transaction operations implemented in the target payment scenario, K transaction attributes are determined.

8. The method according to claim 6, characterized in that The transaction attributes include a transaction amount attribute, the attribute subclass corresponding to the transaction operation under the transaction amount attribute is used to represent the transaction resource value corresponding to the transaction operation, the attribute subclass corresponding to the preset transaction category under the transaction amount attribute is used to represent the transaction resource value range corresponding to the preset transaction category, and the transaction resource value corresponding to the transaction operation falls within the transaction resource value range corresponding to the transaction category to which the transaction operation belongs.

9. The method according to claim 6, characterized in that If the target payment scenario is a social payment scenario, the transaction attributes include social relationship attributes, and the attribute subclass corresponding to the transaction operation under the social relationship attribute is used to represent the social information of the transaction account associated with the transaction operation in the social payment scenario, and the attribute subclass corresponding to the preset transaction category under the social relationship attribute is used to represent the social information of the transaction account associated with the transaction operation belonging to the preset transaction category in the social payment scenario.

10. The method according to claim 1, characterized in that The target graph neural network is determined in the following way: Acquire a training sample with a sample label, wherein the sample label is used to indicate whether the sample account has abnormal transactions during a sample period, and the training sample is used to indicate a sample transaction network directed graph corresponding to the sample account during the sample period and transaction category features of nodes included in the sample transaction network directed graph; Determining, based on the training sample, a prediction result indicating whether the sample account has abnormal transactions during the sample period by using an initial graph neural network; According to the difference between the prediction result and the sample label, the initial graph neural network is trained to obtain the target graph neural network.

11. The method according to any one of claims 1 to 10, characterized in that The method further comprises: If the detection result indicates that the account to be detected has abnormal transactions within the detection period, determining a target transaction operation corresponding to the abnormal transaction; A transaction warning is issued for the transaction account associated with the target transaction operation.

12. An abnormal transaction detection device, characterized in that: The device comprises an acquisition unit, a generation unit and a detection unit: The acquisition unit is used to acquire N transaction operations corresponding to the account to be detected within the detection period; The generating unit is configured to generate a directed trading network graph including M nodes according to the trading categories respectively corresponding to the N trading operations and the implementation order of the N trading operations in the detection period, wherein different nodes are used to represent different trading categories, and under the implementation order, for a trading operation pair consisting of an i-th trading operation and an (i+1)-th trading operation, when the i-th trading operation is of a first trading category and the (i+1)-th trading operation is of a second trading category, the directed trading network graph has a target edge pointing from a first node to a second node, the first node is used to represent the first trading category, the second node is used to represent the second trading category, and the weight of the target edge is used to represent an implementation parameter of the trading operation pair; The detection unit is used to perform abnormal transaction detection on the account to be detected through a target graph neural network according to the transaction network directed graph and the transaction category features corresponding to the M nodes, and obtain a detection result indicating whether the account to be detected has abnormal transactions during the detection period.

13. A computer device, characterized in that: The computer device comprises a processor and a memory: The memory is used to store a computer program and transmit the computer program to the processor; The processor is configured to execute the method according to any one of claims 1 to 11 according to the instructions in the computer program.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store a computer program, and when the computer program is executed by a computer device, the computer device executes the method according to any one of claims 1 to 11.

15. A computer program product comprising a computer program, characterized in that When the method is executed on a computer device, the computer device is enabled to execute the method according to any one of claims 1 to 11.