Transaction processing method and device, equipment and medium
By obtaining and analyzing resource transfer transactions in the financial trading market from the blockchain, the problem of manual supervision in the existing technology is solved, and more efficient and accurate identification of illegal transactions is achieved.
Patent Information
- Application Number
- CN202311555038.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-20
- Publication Date
- 2025-05-20
AI Technical Summary
When regulating the financial trading market, it is difficult to efficiently detect and identify illegal trading behaviors through manual supervision, especially when the number of transactions is large, resulting in a decrease in detection efficiency and accuracy.
By obtaining the first resource transfer transaction and the second resource transfer transaction associated with the business transaction object from the blockchain, the data accumulation processing and difference analysis are carried out to determine whether the resource cumulative measurement difference reaches the threshold, thereby determining whether the transaction is an illegal resource transfer transaction.
It improves the detection efficiency and accuracy of illegal transactions, reduces the missed and mis-checked situations of manual supervision, and can quickly identify and locate illegal transactions.
Smart Images

Figure CN120020855A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of blockchain technology, and in particular, to a transaction processing method, apparatus, device, and medium. Background Art
[0002] Currently, for financial traders, there may be illegal trading behaviors of profiting by selling on one side while smashing the market based on the trading price difference of financial resources (such as stock A) inside and outside the market (such as buying a large amount of financial resources inside the market while selling a large amount of financial resources outside the market). Herein, the inside market may refer to some internal trading markets determined by decentralized trading institutions, and the outside market may refer to the external trading markets on third-party business platforms other than decentralized trading institutions. However, currently, when regulatory agencies conduct abnormal supervision on illegal trading in the entire financial trading market composed of the inside and outside markets, they need the regulatory objects to manually supervise the trading behaviors of financial transactions obtained within a certain period of time, so as to screen out the illegal transactions corresponding to the illegal trading behaviors existing during this period through manual supervision.
[0003] However, the inventors have found in practice that when conducting abnormal supervision on illegal trading in the entire financial trading market through manual supervision, once the number of illegal transactions in this financial trading market is large, it will consume a long time for manual screening to determine whether there are illegal trading behaviors, thus reducing the detection efficiency of illegal trading. In addition, since the manual supervision method is also prone to missed inspections and misjudgments, the detection accuracy of illegal trading will be reduced. Summary of the Invention
[0004] Embodiments of this application provide a transaction processing method, apparatus, device, and medium, which can improve the detection accuracy of illegal trading.
[0005] On the one hand, embodiments of this application provide a transaction processing method, the method including:
[0006] Receiving a first transaction query request sent by a business processing object for a business transaction object, and obtaining a first resource transfer transaction and a second resource transfer transaction associated with the business transaction object from the blockchain based on the first transaction query request; the first resource transfer transaction is a transaction of the business transaction object on a first resource processing platform in a first transaction direction; the first transaction direction is the transaction direction when the business transaction object buys a trading business resource; the second resource transfer transaction is a transaction of the business transaction object on a second resource processing platform in a second transaction direction; the second transaction direction is the transaction direction when the business transaction object sells a trading business resource; the second transaction direction is different from the first transaction direction, and the second resource processing platform is different from the first resource processing platform;
[0007] Determine the transaction resource quantity obtained from the first resource transfer transaction as the first transaction resource quantity, perform data accumulation processing on the first transaction resource quantity, and obtain the first resource accumulation quantity corresponding to the first transaction resource quantity;
[0008] Determine the transaction resource quantity obtained from the second resource transfer transaction as the second transaction resource quantity, perform data accumulation processing on the second transaction resource quantity, and obtain the second resource accumulation quantity corresponding to the second transaction resource quantity;
[0009] Determine the resource accumulation quantity difference between the first resource accumulation quantity and the second resource accumulation quantity. When the resource accumulation quantity difference reaches the resource accumulation difference threshold indicated by the first transaction query request, determine the first resource transfer transaction and the second resource transfer transaction as illegal resource transfer transactions, and determine the business transaction object as the illegal transaction object corresponding to the illegal resource transfer transaction;
[0010] Based on the illegal transaction object and the illegal resource transfer transaction, determine the first query response information corresponding to the first transaction query request, and return the first query response information to the business processing object.
[0011] On the one hand, an embodiment of the present application provides a transaction processing device, which includes:
[0012] A transaction acquisition module, configured to receive a first transaction query request sent by a business processing object for a business transaction object, and obtain a first resource transfer transaction and a second resource transfer transaction associated with the business transaction object from the blockchain based on the first transaction query request; the first resource transfer transaction is a transaction of the business transaction object on the first resource processing platform in the first transaction direction; the first transaction direction is the transaction direction when the business transaction object buys transaction business resources; the second resource transfer transaction is a transaction of the business transaction object on the second resource processing platform in the second transaction direction; the second transaction direction is the transaction direction when the business transaction object sells transaction business resources; the second transaction direction is different from the first transaction direction, and the second resource processing platform is different from the first resource processing platform;
[0013] An accumulation quantity determination module, configured to determine the transaction resource quantity obtained from the first resource transfer transaction as the first transaction resource quantity, perform data accumulation processing on the first transaction resource quantity, and obtain the first resource accumulation quantity corresponding to the first transaction resource quantity;
[0014] The accumulation quantity determination module is further configured to determine the transaction resource quantity obtained from the second resource transfer transaction as the second transaction resource quantity, perform data accumulation processing on the second transaction resource quantity, and obtain the second resource accumulation quantity corresponding to the second transaction resource quantity;
[0015] An illegal transaction determination module, configured to determine the difference in the cumulative amount of resources between the cumulative amount of the first resource and the cumulative amount of the second resource. When the difference in the cumulative amount of resources reaches the threshold of the cumulative resource difference indicated by the first transaction query request, determine the first resource transfer transaction and the second resource transfer transaction as illegal resource transfer transactions, and determine the business transaction object as the illegal transaction object corresponding to the illegal resource transfer transaction;
[0016] An illegal transaction processing module, configured to determine the first query response information corresponding to the first transaction query request based on the illegal transaction object and the illegal resource transfer transaction, and return the first query response information to the business processing object.
[0017] On the one hand, an embodiment of the present application provides a computer device, including a memory and a processor. The memory is connected to the processor. The memory is used to store a computer program, and the processor is used to call the computer program so that the computer device executes the method provided in the above aspect of the embodiment of the present application.
[0018] On the one hand, an embodiment of the present application provides a computer-readable storage medium. A computer program is stored in the computer-readable storage medium. The computer program is suitable for being loaded and executed by a processor so that a computer device with a processor executes the method provided in the above aspect of the embodiment of the present application.
[0019] According to one aspect of the present application, there is provided a computer program product or a computer program. The computer program product or the computer program includes computer instructions. The computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions so that the computer device executes the method provided in the above aspect.
[0020] In the embodiments of the present application, when receiving a first transaction query request from a business processing object for a business transaction object, the first resource transfer transaction and the second resource transfer transaction associated with the business transaction object can be obtained from the blockchain. The first resource transfer transaction and the second resource transfer transaction are transactions in different resource processing platforms (it can be understood that the first resource processing platform and the second resource processing platform can refer to the on-exchange trading platform and the over-the-counter trading platform) for different transaction directions (the first resource transfer transaction refers to a transaction for buying business resources, and the second resource transfer transaction refers to a transaction for selling business resources), that is, the transaction directions of the first resource transfer transaction and the second resource transfer transaction are opposite transaction directions. That is to say, the first resource transfer transaction and the second resource transfer transaction may be transactions that cause illegal trading behaviors. Therefore, it is possible to determine whether the business transaction object has illegal trading behaviors by determining whether the first resource transfer transaction and the second resource transfer transaction may belong to illegal resource transfer transactions. Specifically, it can be to determine the first resource cumulative amount corresponding to the transaction resource amount in the first resource transfer transaction and the second resource cumulative amount corresponding to the transaction resource amount in the second resource transfer transaction, and determine the resource cumulative amount difference between the first resource cumulative amount and the second resource cumulative amount. When the resource cumulative amount difference reaches the resource cumulative difference threshold indicated by the first transaction query request, it means that there is a large gap in the resource cumulative amounts on both sides of the first resource transfer transaction and the second resource transfer transaction, that is, there is a large difference in transaction resources on different trading platforms. That is, at this time, it is determined that the first resource transfer transaction and the second resource transfer transaction are illegal resource transfer transactions, and it is determined that the business transaction object is an illegal transaction object. Therefore, it is possible to perform a linkage comparison analysis on the resource transfer transactions corresponding to the opposite transaction directions of the business transaction object under different trading platforms, so as to quickly determine whether the business transaction object is an illegal transaction object with illegal trading behaviors, and can accurately locate the specific illegal resource transfer transactions corresponding to the business transaction object, thereby improving the detection efficiency and accuracy of illegal transactions. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0022] Figure 1 is a schematic diagram of a network architecture provided by an embodiment of the present application;
[0023] Figure 2 is a schematic diagram of the process of illegal transaction identification provided by an embodiment of the present application;
[0024] Figure 3It is a schematic flowchart of a transaction processing method provided by an embodiment of the present application Figure 1 ;
[0025] Figure 4 It is a schematic diagram of the process of obtaining a resource transfer transaction provided by an embodiment of the present application;
[0026] Figure 5 It is a schematic diagram of the process of obtaining the transaction resource quantity provided by an embodiment of the present application;
[0027] Figure 6 It is a schematic diagram of the process of determining an illegal transaction provided by an embodiment of the present application;
[0028] Figure 7 It is a schematic flowchart of a transaction processing method provided by an embodiment of the present application Figure 2 ;
[0029] Figure 8 It is a schematic diagram of the process of identifying illegal transaction behaviors provided by an embodiment of the present application;
[0030] Figure 9 It is a schematic diagram of the process of transaction processing provided by an embodiment of the present application Figure 1 ;
[0031] Figure 10 It is a schematic diagram of the process of transaction processing provided by an embodiment of the present application Figure 2 ;
[0032] Figure 11 It is a schematic diagram of the process of transaction processing provided by an embodiment of the present application Figure 3 ;
[0033] Figure 12 It is a schematic interaction flowchart of a transaction processing method provided by an embodiment of the present application;
[0034] Figure 13 It is a schematic structural diagram of a transaction processing device provided by an embodiment of the present application;
[0035] Figure 14 It is a schematic structural diagram of a computer device provided by an embodiment of the present application. Specific embodiments
[0036] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0037] Please refer toFigure 1 , Figure 1 is a schematic diagram of a network architecture provided by an embodiment of the present application. As Figure 1 shown, the network architecture may include multiple terminal devices (such as Figure 1 terminal device 100a, terminal device 100b, etc. in , and the number of terminal devices is not limited here), and a blockchain network 200, which includes multiple blockchain nodes. There may be a communication connection between terminal device 100a and terminal device 100b, so that terminal device 100a can perform data interaction with terminal device 100b through this communication connection. And terminal device 100a or terminal device 100b may have a communication connection with any blockchain node, so that terminal device 100a or terminal device 100b can perform data interaction with the blockchain node through this communication connection. Among them, the above communication connection does not limit the connection method, and can be directly or indirectly connected through a wired communication method, or can be directly or indirectly connected through a wireless communication method, or can also be connected through other methods, and the present application does not make any restrictions here.
[0038] Among them, as Figure 1 shown, terminal device 100a and terminal device 100b may include: smart phones, tablet computers, laptop computers, desktop computers, wearable devices (such as smart watches, smart bracelets), smart homes, head-mounted devices, intelligent vehicles, and other intelligent terminals. It should be understood that the terminal device 100a (or terminal device 100b) may be installed with a transaction client.
[0039] Optionally, it can be understood that the transaction client can be configured in any terminal device. For example, terminal device 100a (or terminal device 100b) may be configured with a transaction client to be used for interacting with the blockchain node. The transaction client can be used to initiate a resource transfer transaction by a business transaction object and upload relevant data of the resource transfer transaction, or initiate a transaction query request by a business processing object.
[0040] Among them, as Figure 1 shown, terminal device 100a (or terminal device 100b) may be associated with a server having a communication connection relationship. The server may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.
[0041] It is understandable that blockchain is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithms. It is mainly used to sort data in chronological order, encrypt it into a ledger to make it tamper-proof and forgery-proof, and at the same time, data verification, storage, and update can be carried out. Essentially, blockchain is a decentralized database, and each node in this database stores an identical blockchain.
[0042] Among them, as Figure 1 shown, the blockchain network 200 can be applied to a blockchain system. A blockchain system refers to a system used for data sharing between blockchain nodes. The blockchain network 200 can be deployed with multiple blockchain nodes (which can be abbreviated as nodes). Here, the number of blockchain nodes deployed in the blockchain network 200 will not be restricted. For example, as Figure 1 shown, the blockchain network 200 can specifically include node 200a, node 200b, node 200c, node 200d,..., node 200n. It is understandable that a blockchain node can be a server connected to the blockchain network or a terminal connected to the blockchain network. Here, the specific form of the blockchain node is not limited. Each blockchain node can include a hardware layer, an intermediate layer, an operating system layer, and an application layer.
[0043] Among them, blockchain is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithms. Blockchain, essentially a decentralized database, is a series of data blocks generated by using cryptographic methods. Each data block contains information about a batch of network transactions, which is used to verify the validity of the information (anti-counterfeiting) and generate the next block. Blockchain can include a blockchain underlying platform, a platform product service layer, and an application service layer.
[0044] The underlying blockchain platform may include processing modules such as object management, basic services, smart contracts, and operation management. Among them, the object management module is responsible for the identity information management of all blockchain participants, including maintaining the generation of public and private keys (account management), key management, and the maintenance of the correspondence between the real identity of users and blockchain addresses (permission management). And under authorization, it supervises and audits the transaction situations of certain real identities, and provides the rule configuration for risk control (risk control and audit); the basic service module is deployed on all blockchain node devices, used to verify the validity of business requests, and record them on the storage after consensus on valid requests. For a new business request, the basic service first performs interface adaptation parsing and authentication processing (interface adaptation), then encrypts the business information through a consensus algorithm (consensus management), transmits it to the shared ledger intact and consistently after encryption (network communication), and performs record storage; the smart contract module is responsible for the registration and issuance of contracts, contract triggering, and contract execution. Developers can define contract logic through a certain programming language, publish it to the blockchain (contract registration), trigger the execution by calling keys or other events according to the logic of the contract terms, complete the contract logic, and also provide functions for contract upgrade and cancellation; the operation management module is mainly responsible for the deployment, configuration modification, contract setting, cloud adaptation during the product release process, and the visual output of the real-time status during product operation, such as: alarm, management of network conditions, management of the health status of node devices, etc.
[0045] The platform product service layer provides the basic capabilities and implementation frameworks of typical applications. Developers can build on these basic capabilities and overlay the characteristics of the business to complete the blockchain implementation of the business logic. The application service layer provides application services based on the blockchain solution for business participants to use.
[0046] It should be noted that the blockchain network in the embodiments of this application can be a hierarchical structure or a single-layer structure, and the specific structure of the blockchain network is not limited here.
[0047] It is understandable that a blockchain network differentiates nodes into core nodes and lightweight nodes. Among them, core nodes can be responsible for the consensus of the entire blockchain network. That is to say, the core nodes here can be consensus nodes in the blockchain network. It should be understood that when any node in the blockchain network (for example, a lightweight node) receives transaction data (which can also be simply referred to as business transactions) sent by a client, it can transfer the business transactions among the lightweight nodes in the blockchain network in a relay manner until the consensus node for block packaging in the blockchain network (i.e., the main core node in the blockchain network) receives the business transactions. Then, it can further add the business transactions to the transaction pool of the main core node, so that subsequently the consensus node for block packaging (i.e., the main core node) can package the business transactions in the transaction pool into a block together, and then broadcast the obtained block (i.e., the target block) to other consensus nodes in the blockchain network (i.e., the main core nodes in the blockchain network), so that other consensus nodes can perform block consensus on the broadcast target block. Thus, when consensus is reached among these consensus nodes, the target block carrying the business transactions can be written into the local ledger (for example, written into the transaction cache in the node memory), so that subsequently the target block carrying the business transactions can be written into the blockchain database corresponding to the blockchain in the blockchain network (which can also be simply referred to as the database). Among them, the blockchain here can be understood as the longest chain constructed by these consensus nodes according to the consensus mechanism.
[0048] Among them, it is understandable that a smart contract can be included in the blockchain system. The smart contract in the blockchain system can be understood as a piece of code that can be understood and executed among various nodes of the blockchain (including consensus nodes), and can execute any logic and obtain results. Users can initiate a transaction addition request for a certain transaction to any node in the blockchain network through a transaction client. Subsequently, the node in the blockchain network (for example, the above-mentioned secondary core node or lightweight node) can send the business transaction carried in the transaction addition request to the above-mentioned main core node, so that before the main core node calls the smart contract running in the node to execute the business transaction requested by the user, it receives this business transaction in the transaction addition request and adds it to the transaction pool.
[0049] It should be understood that a peer-to-peer network can be formed between any two blockchain nodes in the blockchain network (for example, the blockchain network 200). The peer-to-peer network can adopt the peer-to-peer protocol. Among them, the peer-to-peer protocol is an application layer protocol running on top of the Transmission Control Protocol (TCP). In a distributed system, any device such as a server, a terminal, etc. can join and become a blockchain node. Among them, each blockchain node can include a hardware layer, an intermediate layer, an operating system layer, and an application layer.
[0050] It can be understood that the embodiment of the present application can configure a blockchain node for any business object (for example, any individual user, any enterprise, any institution, etc.) that is connected to the blockchain network. Therefore, there can be a one-to-one correspondence between any business node in the business network and the corresponding business object that needs to be connected to the blockchain network.
[0051] It can be understood that, since each entity object can correspond to a blockchain node, the embodiment of the present application can take the entity object as the above-mentioned enterprise (i.e. the aforementioned enterprise) as an example. At this time, the blockchain node associated with each enterprise can be the same blockchain node.
[0052] To facilitate subsequent understanding and explanation, in the embodiments of the present application, entity objects (e.g., individual users, corporate users, organizations, etc.) with private key information may be referred to as business objects. Business objects may initiate business transactions through transaction clients, and blockchain nodes may upload business transactions to the blockchain after verifying the transaction weight.
[0053] Specifically, in an embodiment of the present application, when a light node receives a transaction addition request sent by a requesting user corresponding to a transaction client, the transaction addition request initiated by the requesting user can be forwarded to the above-mentioned main core node, so that the main core node can verify the legitimacy of the transaction addition request initiated by the user. In this way, the main core node can add the transaction requested by the requesting user (i.e., a transaction with legitimacy) to the transaction pool, so that the transaction data associated with the transaction can be packaged into blocks later, so that consensus can be reached with other consensus nodes (i.e., the above-mentioned slave core nodes) later, so that after the consensus is passed, the block carrying the transaction data of the transaction can be temporarily stored in the above-mentioned local account book, so that the block carrying the transaction data can be written to the above-mentioned blockchain database (also referred to as the database) later.
[0054] It can be understood that the resource transfer transaction initiated by the business transaction object in the technical solution of this application can be stored on the blockchain, and the business processing object can obtain the first resource transfer transaction and the second resource transfer transaction associated with the business transaction object from the resource transfer transaction stored in the blockchain to determine whether the business transaction object may have illegal transactions. The resource transfer transactions for different transaction directions on different resource processing platforms can be linked and compared to analyze to determine whether the business transaction object is an illegal transaction object, and the transaction data on different resource processing platforms can be interconnected, thereby realizing the identification of illegal transactions across resource processing platforms. At the same time, specific illegal resource transfer transactions can be quickly located to improve the efficiency and accuracy of illegal transaction detection.
[0055] It can be understood that the computer device involved in the embodiments of the present application can be a server or a terminal device. Among them, the server can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. The terminal can include, but is not limited to, mobile phones, computers, intelligent voice interaction devices, smart home appliances, vehicle-mounted terminals, aircraft, etc. The embodiments of the present application can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, intelligent transportation, assisted driving, etc.
[0056] It can be understood that Figure 1 it only exemplarily represents the possible network architectures of the technical solutions of the present application and does not limit the specific architecture of the technical solutions of the present application, that is, the technical solutions of the present application can also provide other forms of network architectures.
[0057] For ease of understanding, further, please refer to Figure 2 , Figure 2It is a schematic diagram of the process of identifying illegal transactions provided by an embodiment of the present application. In this scenario, an illegal transaction identification mechanism is proposed, and through this mechanism, illegal transactions can be quickly identified. Among them, the process of the illegal transaction identification mechanism can be as follows: Among them, the business transaction object a1 sends a resource transfer transaction associated with the business transaction object to the blockchain node 21 through the terminal device 20a, and the blockchain node 21 can upload the resource transfer transaction associated with the business transaction object to the blockchain; the business processing object a2 sends (S21) a first transaction query request for the business transaction object to the blockchain node through the terminal device 20b, and the blockchain node can obtain (S22) the first resource transfer transaction (TX1) and the second resource transfer transaction (TX2) associated with the business transaction object from the resource transfer transactions associated with the business transaction object stored on the blockchain. The first resource transfer transaction is the transaction when the business transaction object buys business resources on the first resource processing platform, and the second resource transfer transaction is the transaction when the business transaction object sells business resources on the second resource processing platform; the blockchain node can respectively obtain the transaction resource amount from each first resource transfer transaction (for example, TX1 specifically includes TX1a, TX1b,..., TX1n) as the first transaction resource amount, and perform data accumulation processing on the first transaction resource amount to obtain the first resource accumulation amount, and respectively obtain the transaction resource amount from each second resource transfer transaction (for example, TX2 specifically includes TX2a, TX2b,..., TX2m) as the second transaction resource amount, and perform data accumulation processing on the second transaction resource amount to obtain the second resource accumulation amount; it is possible to determine the resource accumulation difference between the first resource accumulation amount and the second resource accumulation amount, and determine whether the resource accumulation difference reaches the resource accumulation difference threshold indicated by the first transaction query request. When the resource accumulation difference reaches the resource accumulation difference threshold indicated by the first transaction query request, the first resource transfer transaction and the second resource transfer transaction are determined as illegal resource transfer transactions, and the business transaction object is determined as the illegal transaction object corresponding to the illegal resource transfer transaction. At this time, based on the illegal transaction object and the illegal resource transfer transaction, the first query response information corresponding to the first transaction query request can be determined, and the first query response information is returned (S23) to the business processing object.
[0058] Correspondingly, when the resource accumulation difference does not reach the resource accumulation difference threshold indicated by the first transaction query request, a corresponding second query response information is generated and returned to the business processing object. The second query response information is used to indicate that the business transaction object is not an illegal transaction object, and the first resource transfer transaction and the second resource transfer transaction are not illegal resource transfer transactions.
[0059] Among them, it can be understood that the resource transfer transaction here can be an on-chain financial transaction, and when the blockchain node executes the on-chain financial transaction, it writes the on-chain financial transaction into the blockchain. It can also be an off-chain financial transaction. When the business transaction object initiates an off-chain financial transaction off-chain, it will be synchronously uploaded to the blockchain node, and the blockchain node will write the off-chain financial transaction into the blockchain. For example, when the business transaction object starts daily transactions, it will automatically upload the relevant data of the initiated off-chain financial transaction to the blockchain node. Or, synchronize the relevant data of the initiated off-chain financial transaction to the data linkage node (which can be understood as the background server), and the data linkage node will synchronize the statistically relevant data of the off-chain financial transaction to the blockchain node.
[0060] Among them, it can be understood that the resource transfer transaction is a buy or sell transaction for a certain transaction business resource. For example, a buy transaction for a transaction business resource (i.e., a transfer-in transaction) or a sell transaction for a transaction business resource (i.e., a transfer-out transaction). For example, the transaction business resource can be a financial product (i.e., financial resource), such as stocks, funds, etc. And, the trading venue of the resource transfer transaction (i.e., the resource processing platform) can be an on-exchange trading venue (such as an exchange, abbreviated as on-exchange) or an over-the-counter trading venue (such as a certain securities company, abbreviated as off-exchange). In addition, insider trading refers to a large number of resource transfer transactions in opposite trading directions in different trading venues. For example, a large number of resource transfer transactions for buying transaction business resources are carried out in the on-exchange trading venue, and a large number of resource transfer transactions for selling transaction business resources are carried out in the over-the-counter trading venue to make a profit. Therefore, through the linkage and comparative analysis of resource processing transactions on different resource processing platforms (i.e., on- and off-exchange trading venues), the technical solution of this application can determine whether the business transaction object is an illegal transaction object and can locate the specific illegal resource transfer transaction.
[0061] Among them, the business processing object can be a regulatory agency, or a third-party regulatory platform, or a business transaction object (for example, business transaction object A can supervise whether business transaction object B is an illegal transaction object). There is no limitation on the business processing object here.
[0062] Among them, the business trading object can be the direct trading party initiating the resource transfer transaction or the third trading party serving as an intermediate medium. For example, an investor (direct trading party) can initiate a resource transfer transaction (i.e., an on-exchange transaction) in an on-exchange trading venue and initiate a resource transfer transaction (i.e., an over-the-counter transaction) in an over-the-counter trading venue. That is to say, as a direct trading party, the investor can initiate an on-exchange transaction in an on-exchange trading venue (such as an exchange) and initiate an over-the-counter transaction in an over-the-counter trading venue (such as the securities company where the account is registered). Or, when the investor initiates a resource transfer transaction, it needs to go through a certain securities company. For example, when initiating a resource transfer transaction in an on-exchange trading venue, it needs to open an account with the securities company and initiate the resource transfer transaction through the account of the securities company. Or, when initiating a resource transfer transaction in an over-the-counter trading venue, it can initiate the resource transfer transaction with the securities company based on the resource transfer quote provided by the securities company (resource transfer information, i.e., the trading price of the trading business resources). That is to say, as a third trading party, the securities company can initiate an on-exchange transaction in an on-exchange trading venue (such as an exchange) and initiate an over-the-counter transaction in an over-the-counter trading venue (i.e., the securities company where it is located). Here, no restrictions are imposed on the business trading object. That is to say, the above-mentioned first resource processing platform and second resource processing platform can refer to an on-exchange trading venue (on-exchange trading platform) and an over-the-counter trading venue (over-the-counter trading platform).
[0063] It can be understood that the same trading business resources can be bought and sold both on-exchange and over-the-counter. Therefore, the business trading object can conduct illegal trading activities for profit based on the information difference between the resource conversion information of the trading business resources on-exchange and the resource conversion information of the trading business resources over-the-counter. For example, if the buying price of the trading business resources on-exchange (i.e., the resource conversion information) is relatively low, the business trading object may buy a large amount of trading business resources on-exchange. When the selling price of the trading business resources (i.e., the resource conversion information) increases, that is, when the selling price of the trading business resources over-the-counter increases, at this time, the business trading object sells a large amount of the purchased trading business resources over-the-counter, and makes a profit based on the information difference. Such a trading behavior is an illegal trading activity. Therefore, the technical solution of this application can obtain the on-exchange and over-the-counter transactions (collectively referred to as resource transfer transactions) of the business trading object for a certain trading business resource, and determine whether there is any illegal trading activity when the business trading object conducts trading behavior for this trading business resource based on the on-exchange and over-the-counter transactions, improving the timeliness and accuracy of supervision.
[0064] In addition, the present application may relate to the field of artificial intelligence, specifically, it may relate to the field of machine learning (ML) in the field of artificial intelligence. Machine learning is an interdisciplinary subject that involves multiple disciplines such as probability theory, statistics, approximation theory, convex analysis, and algorithm complexity theory. It specifically studies how computers simulate or implement human learning behaviors to acquire new knowledge or skills and reorganize the existing knowledge structure to continuously improve their own performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent, and its applications cover all fields of artificial intelligence. Machine learning and deep learning usually include technologies such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and rote learning. Pre-trained models are the latest development results of deep learning, integrating the above technologies.
[0065] In the technical solution of the present application, determining whether the first resource transfer transaction and the second resource transfer transaction are illegal resource transfer transactions can be achieved through a model, and this model can be obtained by the above-mentioned machine learning technology. For example, a transaction processing model can be deployed on a blockchain node, and data such as the first resource cumulative amount, the second resource cumulative amount, and the resource cumulative amount difference can be input into the transaction processing model to obtain the transaction legal parameters corresponding to the first resource transfer transaction and the second resource transfer transaction. These transaction legal parameters can be used to determine whether the first resource transfer transaction and the second resource transfer transaction are illegal resource transfer transactions or legal resource transfer transactions.
[0066] It should be noted that when the blockchain node in the embodiment of the present application obtains the transaction data and identity information of the business transaction object, a prompt interface or a pop-up window can be displayed on the corresponding transaction client. This prompt interface or pop-up window is used to prompt the business transaction object that transaction data, identity information, and other data are currently being collected. Only after obtaining the confirmation operation of the business transaction object on this prompt interface or pop-up window (such as the business transaction object confirming authorization through the transaction client), the relevant steps of data acquisition are started, otherwise it ends.
[0067] In addition, it can be understood that in the specific implementation manner of the present application, transaction data, identity information, and other data related to business objects such as users, enterprises, and institutions may be involved. When the above embodiments of the present application are applied to specific products or technologies, the permission or consent of business objects such as users, enterprises, and institutions needs to be obtained, and the collection, use, and processing of relevant data need to comply with the relevant laws, regulations, and standards of the relevant regions.
[0068] It can be understood that the above scenarios are only examples and do not constitute a limitation on the application scenarios of the technical solutions provided by the embodiments of this application. The technical solutions of this application can also be applied to other scenarios. For example, as is known to those of ordinary skill in the art, with the evolution of the system architecture and the emergence of new business scenarios, the technical solutions provided by the embodiments of this application are equally applicable to similar technical problems.
[0069] Further, please refer to Figure 3 , Figure 3 which is a schematic flowchart of a transaction processing method provided by an embodiment of this application. Figure 1 As shown in Figure 3 , the method can be executed by the computer device mentioned above. The computer device can be a blockchain node. For example, the blockchain node can be any one of the blockchain nodes in the blockchain network 200 shown above. Figure 1 The method can specifically include the following steps S101 - step S105:
[0070] S101. Receive a first transaction query request sent by a service processing object for a service transaction object, and obtain a first resource transfer transaction and a second resource transfer transaction associated with the service transaction object from the blockchain based on the first transaction query request.
[0071] Among them, resource transfer transactions associated with the service transaction object are stored on the blockchain. The resource transfer transaction can be a transaction in which the service transaction object buys service transaction resources, or it can also be a transaction in which the service transaction object sells service transaction resources. For example, a transaction to buy stock A, or a transaction to sell stock A. It can be understood that a transaction to buy service transaction resources means that the service transaction object uses its own object service resources (i.e., the object assets of the service transaction object) to buy a certain amount of service transaction resources (i.e., exchanges the object service resources for a certain amount of service transaction resources, that is, converts a certain quantity of one type of resource A into a certain quantity of another type of resource B, such as using its own object service resources to buy 100 shares of stock A). Selling service transaction resources means that the service transaction object sells a certain amount of service transaction resources to exchange for the corresponding object service resources (i.e., converts a certain quantity of one type of resource B into a certain quantity of another type of resource A, such as selling 100 shares of stock A to exchange for the corresponding object service resources).
[0072] It can be understood that trading business resources refer to the business resources (such as stocks) for buying and selling indicated by the business trading object, and object business resources are the object assets of the business trading object (i.e., investment funds). The object business resources can be spent to buy trading business resources (i.e., obtain trading business resources by transferring object business objects), and trading business resources can be sold to exchange for object business resources (i.e., transfer object business objects by selling trading business resources). It can be understood that the trading resource volume in the resource transfer transaction described in the technical solution of this application refers to the resource volume of the object business resources transferred by the business trading object. For example, the trading resource volume in the first resource transfer transaction refers to the resource volume of the object business resources spent by the business trading object when buying trading business resources. The trading resource volume in the second resource transfer transaction refers to the resource volume of the object business resources exchanged by the business trading object when selling trading business resources.
[0073] It can be understood that for illegal trading behaviors, that is, profiting from object business resources based on the price difference between buying trading business resources and selling trading business resources. For example, a certain amount of object business resources (the above-mentioned resource A, such as called consumption object business resources) are used to buy trading business resources at a low price on one trading platform, and then the trading business resources are sold at a high price on another trading platform to exchange for corresponding object business resources (the above-mentioned resource A, such as called conversion object business resources). The resource difference between the consumption object business resources and the conversion object business resources is what the business trading object obtains through illegal trading behaviors.
[0074] That is to say, the resource transfer transaction includes transactions in two trading directions. Such as including the first resource transfer transaction and the second resource transfer transaction. The first resource transfer transaction is the transaction of the business trading object on the first resource processing platform for the first trading direction. The first trading direction is the trading direction when the business trading object buys trading business resources. The second resource transfer transaction is the transaction of the business trading object on the second resource processing platform for the second trading direction. The second trading direction is the trading direction when the business trading object sells trading business resources. The second trading direction is different from the first trading direction, and the second resource processing platform is different from the first resource processing platform.
[0075] It can be understood that the first resource transfer transaction refers to the transaction of buying trading business resources, that is, the first trading direction refers to the direction of exchanging trading business resources with the object business resources of the business trading object itself. The second resource transfer transaction refers to the transaction of selling trading business resources, that is, the second trading direction refers to the direction of exchanging the object business resources of the business trading object itself with trading business resources.
[0076] Among them, the business processing object can be the supervised object of the business transaction object, and regularly obtain the first resource transfer transaction and the second resource transfer transaction of the business transaction object for the transaction business resources within a period of time. For example, a transaction query request is sent every 60 trading days to determine whether there is any illegal transaction behavior of the business transaction object for the transaction business resources. For example, the business transaction object can obtain the first resource transfer transaction and the second resource transfer transaction of the business transaction object for the transaction business resources during the time period between the last transaction query request sent by the business processing object and the current transaction query request sent by the business processing object.
[0077] For example, the request timestamp of the first transaction query request is the first timestamp, and the request timestamp of the second transaction query request associated with the first transaction query request is the second timestamp, and the second timestamp is earlier than the first timestamp. That is to say, the second transaction query request is the transaction query request sent by the business processing object the last time before sending the first transaction query request.
[0078] Therefore, obtaining the first resource transfer transaction and the second resource transfer transaction associated with the business transaction object from the blockchain based on the first transaction query request can be: using the time period composed of the second timestamp and the first timestamp as the first query time period; based on the transaction business resources indicated by the first transaction query request, obtaining the resource transfer transactions of the business transaction object for the transaction business resources within the first query time period from the blockchain, and using the obtained resource transfer transactions as the reference resource transfer transactions; obtaining the first resource transfer transaction and the second resource transfer transaction from the reference resource transfer transactions.
[0079] It can be understood that the first transaction query request indicates the transaction business resources to be detected, and the blockchain node can obtain the resource transfer transactions for buying or selling the transaction business resources within the first query time period from the blockchain as the reference resource transfer transactions. It can be understood that the reference resource transfer transactions may include the resource transfer transactions on various resource processing platforms (such as may include on-site transactions and / or off-site transactions on resource processing platform A, on-site transactions and / or off-site transactions on resource processing platform B).
[0080] Among them, it can be understood that the transaction service resources indicated by different transaction query requests can be different, and a transaction query request can indicate one or more transaction service resources. For example, specifically, it can indicate the resource identifier (i.e., the resource subject matter) of the transaction service resource, and the resource transfer transaction for the transaction service resource can be obtained from the blockchain through the resource identifier recorded in the resource transfer transaction. For example, obtain the first resource transfer transaction and the second resource transfer transaction of the business transaction object for the transaction service resource A to determine whether the transaction behavior of the business transaction object for the transaction service resource A is legal; obtain the first resource transfer transaction and the second resource transfer transaction of the business transaction object for the transaction service resource B to determine whether the transaction behavior of the business transaction object for the transaction service resource B is legal.
[0081] For example, the resource identifier of the traded transaction service resource is recorded in the resource transfer transaction, and the resource transfer transaction with the resource identifier indicated by the first transaction query request is obtained from the resource transfer transaction. The process of detecting illegal transaction behaviors for each transaction service resource is the same and independent. Therefore, this solution is described by taking the detection of illegal transaction behaviors for one transaction service resource as an example. Similarly, the transaction query request can be used to indicate the identification of illegal transaction behaviors for one or more transaction business objects, and the process of identifying illegal transaction behaviors for each transaction business object is the same. Here, the process of identifying illegal transaction behaviors for one transaction business object is taken as an example for illustration.
[0082] Among them, the reference resource transfer transaction includes a first type of transfer transaction and a second type of transfer transaction; the first type of transfer transaction is the transaction of the business transaction object in the first transaction direction; the second type of transfer transaction is the transaction of the business transaction object in the second transaction direction. That is to say, the first resource transfer transaction belongs to the first type of transfer transaction. The second resource transfer transaction belongs to the second type of transfer transaction.
[0083] Among them, obtaining the first resource transfer transaction and the second resource transfer transaction from the reference resource transfer transaction can be to obtain the first type of transfer transaction associated with the first resource processing platform from the first type of transfer transaction, and determine the first resource transfer transaction based on the first type of transfer transaction associated with the first resource processing platform; obtain the second type of transfer transaction associated with the second resource processing platform from the second type of transfer transaction, and determine the second resource transfer transaction based on the second type of transfer transaction associated with the second resource processing platform.
[0084] Among them, in the first type of transfer transaction, all the first type of transfer transactions on the first resource processing platform can be regarded as the first resource transfer transaction; or the large-amount first type of transfer transactions on the first resource processing platform in the first type of transfer transaction can be regarded as the first resource transfer transaction. That is to say, determining the first resource transfer transaction based on the first type of transfer transaction associated with the first resource processing platform can be that the first type of transfer transaction associated with the first resource processing platform is regarded as the first transfer transaction to be processed. When the transaction resource volume in the first transfer transaction to be processed is greater than the first resource volume threshold indicated by the first transaction query request, the first transfer transaction to be processed is regarded as the first resource transfer transaction.
[0085] Similarly, in the second type of transfer transaction, all the second type of transfer transactions on the second resource processing platform can be regarded as the second resource transfer transaction; or the large-amount second type of transfer transactions on the second resource processing platform in the second type of transfer transaction can be regarded as the second resource transfer transaction. That is to say, determining the second resource transfer transaction based on the second type of transfer transaction associated with the second resource processing platform can be that the second type of transfer transaction associated with the second resource processing platform is regarded as the second transfer transaction to be processed. When the transaction resource volume in the second transfer transaction to be processed is greater than the second resource volume threshold indicated by the first transaction query request, the second transfer transaction to be processed is regarded as the second resource transfer transaction.
[0086] Among them, it can be understood that the first resource processing platform refers to the resource processing platform for the transaction that obtains the buy transaction business resources. The second resource processing platform refers to the resource processing platform for the transaction that obtains the sell transaction business resources. Therefore, it is necessary to determine the first resource processing platform and the second resource processing platform.
[0087] It can be understood that the resource processing platforms associated with the business transaction object include the first type of processing platform and the second type of processing platform. For example, the first type of processing platform can be an on-exchange trading platform (on-exchange resource processing platform), and the second type of processing platform can be an over-the-counter trading platform (over-the-counter resource processing platform). Or, the second type of processing platform can be an on-exchange trading platform (on-exchange resource processing platform), and the first type of processing platform can be an over-the-counter trading platform (over-the-counter resource processing platform).
[0088] Among them, it can be understood that illegal trading behavior generally refers to buying trading business resources at a low price and selling trading business resources at a high price. Therefore, it is possible to determine which is the on-exchange trading platform and which is the over-the-counter trading platform according to the buy and sell information of the trading business resources by the first type of processing platform and the second type of processing platform.
[0089] Specifically, it can be to obtain the first-type transfer transaction associated with the first-type processing platform from the first-type transfer transactions; when the cumulative amount of target resources in the first-type transfer transaction associated with the first-type processing platform reaches the resource cumulative amount threshold indicated by the first transaction query request, determine the first-type processing platform as the first resource processing platform; and determine the second-type processing platform as the second resource processing platform. That is to say, if it is determined that there is a behavior of a business transaction object purchasing a large amount of business transaction resources on the first-type processing platform, then it is determined that the business transaction object may have illegal transaction behavior. Therefore, the first-type processing platform is determined as the first resource processing platform, and the second-type processing platform is determined as the second resource processing platform to conduct a linkage comparison analysis of the resource transfer transactions of the business transaction object on the two resource processing platforms.
[0090] For example, if the first-type transfer transactions associated with the first-type processing platform include Transaction 1, Transaction 2, and Transaction 3, and the transaction resource amounts in Transaction 1, Transaction 2, and Transaction 3 are 100, 200, and 300 respectively, then the cumulative amount of target resources in the first-type transfer transactions associated with the first-type processing platform is 100 + 200 + 300 = 600. If the resource cumulative amount threshold indicated by the first transaction query request is 500, then the cumulative amount of target resources in the first-type transfer transactions associated with the first-type processing platform reaches the resource cumulative amount threshold indicated by the first transaction query request, and the first-type processing platform can be determined as the first resource processing platform, and the second-type processing platform is determined as the second resource processing platform.
[0091] Similarly, it can be to obtain the first-type transfer transaction associated with the second-type processing platform from the first-type transfer transactions; when the cumulative amount of target resources in the first-type transfer transaction associated with the second-type processing platform reaches the resource cumulative amount threshold indicated by the first transaction query request, determine the second-type processing platform as the first resource processing platform; and determine the first-type processing platform as the second resource processing platform.
[0092] Similarly, it can be to obtain the second-type transfer transaction associated with the first-type processing platform from the second-type transfer transactions; when the cumulative amount of target resources in the second-type transfer transaction associated with the first-type processing platform reaches the resource cumulative amount threshold indicated by the first transaction query request, determine the first-type processing platform as the second resource processing platform; and determine the second-type processing platform as the first resource processing platform.
[0093] Similarly, the second type of transfer transactions associated with the second type of processing platform can be obtained from the second type of transfer transactions; when the cumulative amount of target resources in the second type of transfer transactions associated with the second type of processing platform reaches the resource cumulative amount threshold indicated by the first transaction query request, the second type of processing platform is determined as the second resource processing platform; and the first type of processing platform is determined as the first resource processing platform.
[0094] Among them, the resource cumulative amount threshold can be a specific value indicated by the first transaction query request or determined by the proportion of the target resource cumulative amount indicated by the first transaction query request. For example, the blockchain node can obtain all resource transfer transactions of the business transaction object in the first query time period, and obtain the buy resource transfer transactions of the business transaction object from all resource transfer transactions, determine the cumulative amount of target resources of the buy resource transfer transactions, and use the product of the proportion of the target resource cumulative amount and the cumulative amount of target resources of the buy resource transfer transactions as the resource cumulative amount threshold for judging the cumulative amount of target resources of the first type of transfer transactions. This indicates that the cumulative amount of target resources involved in the business transaction object's purchase of the specified transaction business resources is relatively high in the cumulative amount of target resources of all the business transaction object's buy resource transfer transactions, that is, the business transaction object has a large number of behaviors of purchasing transaction business resources.
[0095] For example, all the buy resource transfer transactions of the business transaction object in the first query time period include Transaction 1-4, the transaction resource amount in Transaction 1 is 100, the transaction resource amount in Transaction 2 is 200, the transaction resource amount in Transaction 3 is 300, and the transaction resource amount in Transaction 4 is 100. Then, the cumulative amount of target resources of the buy resource transfer transactions is 100 + 200 + 300 + 100 = 700. If the proportion of the target resource cumulative amount is 4 / 5, the resource cumulative amount threshold for judging the cumulative amount of target resources of the first type of transfer transactions = 700*(4 / 5) = 560.
[0096] It can be understood that the method for determining the resource accumulation threshold for judging the target resource accumulation of the second type of transfer transaction is the same as that for determining the resource accumulation threshold for judging the target resource accumulation of the first type of transfer transaction. For example, the blockchain node can obtain all resource transfer transactions of the business transaction object in the first query time period, and obtain the sell resource transfer transactions of the business transaction object from all resource transfer transactions, determine the target resource accumulation of the sell resource transfer transactions, and use the product of the target resource accumulation ratio and the target resource accumulation of the sell resource transfer transactions as the resource accumulation threshold for judging the target resource accumulation of the second type of transfer transaction. This indicates that the target resource accumulation involved in selling the specified transaction business resources by the business transaction object is relatively high among the target resource accumulations of all sell resource transfer transactions of the business transaction object, that is, the business transaction object has a large number of behaviors of selling transaction business resources.
[0097] That is to say, when it is determined that the business transaction object has a large number of behaviors of buying transaction business resources on a resource processing platform, this resource processing platform can be used as the first resource processing platform. Or, when it is determined that the business transaction object has a large number of behaviors of selling transaction business resources on a resource processing platform, this resource processing platform can be used as the second resource processing platform. It can be understood that when it is determined that the business transaction object does not have a large number of behaviors of buying transaction business resources on a resource processing platform and does not have a large number of behaviors of selling transaction business resources on a resource processing platform, a second query response message for indicating that the business transaction object does not have illegal transaction behaviors for transaction business resources can be generated and returned to the business processing object.
[0098] For example, as Figure 4 shown, Figure 4It is a schematic diagram of a process for obtaining a resource transfer transaction provided by an embodiment of the present application; among them, the business processing object a2 sends a transaction query request 1 for the business transaction object (the request timestamp is T1) to the blockchain node 21 through the terminal device 20b at time T1. After a certain period of time, at time T2, it sends a transaction query request 2 for the business transaction object to the blockchain node (the request timestamp is T2); the blockchain node uses the time period composed of timestamp T1 and timestamp T2 as the query time period (at this time, the transaction query request 1 is the previous transaction query request sent before the transaction query request 2, that is, the historical transaction query request), and obtains the resource transfer transaction for the transaction business resources of the business transaction object within the first query time period from the blockchain, and uses the obtained resource transfer transaction as the reference resource transfer transaction (such as including TXa, TXb,..., TXn). The reference resource transfer transaction includes transactions in the first transaction direction, that is, the first type of transfer transaction (such as TXa, TXb,..., TXh) and transactions in the second transaction direction, that is, the second type of transfer transaction (such as TXi, TXj,..., TXn). Obtain the first type of transfer transaction associated with the first resource processing platform (platform 1) from the first type of transfer transaction as the first resource transfer transaction (such as TXb, TXc,..., TXh), and obtain the second type of transfer transaction associated with the second resource processing platform (platform 2) from the second type of transfer transaction as the second resource transfer transaction (such as TXi, TXj,...TXm). When the blockchain node determines the first query response information 2 corresponding to the transaction query request 2 based on the first resource transfer transaction and the second resource transfer transaction, it returns the first query response information 2 to the business processing object. It can be understood that when the blockchain node determines the first query response information 1 corresponding to the transaction query request 1, it will return the first query response information 1 to the business processing object.
[0099] S102. Determine the transaction resource amount obtained from the first resource transfer transaction as the first transaction resource amount, and perform data accumulation processing on the first transaction resource amount to obtain the first resource accumulation amount corresponding to the first transaction resource amount.
[0100] Among them, the transaction resource amount in the first resource transfer transaction may refer to the resource amount of the object business resource spent by the business transaction object when buying the business transaction resource.
[0101] It can be understood that the resource purchase information (i.e., the purchase price) of the business transaction resources can be recorded in the first resource transfer transaction, that is, the object business resources required to purchase a business transaction resource, and the resource transaction quantity of the business transaction resources, that is, the purchase quantity. For example, 100 shares of stock A are purchased. Therefore, the transaction resource quantity in the first resource transfer transaction can be determined according to the resource purchase information and the purchase quantity. For example, the resource purchase information of the business transaction resources in the first resource transfer transaction indicates that x needs to be paid for purchasing 1 share. When the purchase quantity is 3, it means that the transaction resource quantity in this first resource transfer transaction is 3x.
[0102] It can be understood that it can also be that the transaction resource quantity consumed for purchasing the transaction business resources is directly recorded in the first resource transfer transaction.
[0103] Therefore, the first transaction resource quantity of each first resource transfer transaction can be determined, and the sum of the first transaction resource quantities of the first resource transfer transactions is used as the first resource cumulative quantity corresponding to the first transaction resource quantity.
[0104] It can be understood that the resource transfer information of the transaction business resources is different at different times, which is used to indicate the object business resources required to purchase the transaction business resources at the current time and the object business resources obtained by purchasing the transaction business resources. It can be understood that in the transaction of purchasing transaction business resources, the resource transfer information is the purchase price of the transaction business resources. In the transaction of selling transaction business resources, the resource transfer information is the selling price of the transaction business resources.
[0105] For example, as Figure 5 shown, Figure 5 is a schematic diagram of a process for obtaining the transaction resource quantity provided by an embodiment of the present application; among them, the resource purchase information when the business transaction object purchases the transaction business resource A is A1, that is, the object business resources required to purchase one unit of the transaction business resource A (such as A1), which is also the transaction unit price of the transaction business resources, and the purchase quantity when the business transaction object purchases the transaction business resource A (such as A2), which is also the transaction quantity. Therefore, the transaction resource quantity x = A1 * A2 is determined through the resource purchase information and the purchase quantity. At this time, the first resource transfer transaction TX1 can be determined based on the resource purchase information, the purchase quantity, and the transaction resource quantity. For example, the first resource transfer transaction TX1 records the resource purchase information and the purchase quantity of the business transaction resources; or, the first resource transfer transaction TX1 records the resource purchase information, the purchase quantity, and the transaction resource quantity of the business transaction resources.
[0106] S103. Determine the transaction resource quantity obtained from the second resource transfer transaction as the second transaction resource quantity, and perform data accumulation processing on the second transaction resource quantity to obtain the second resource cumulative quantity corresponding to the second transaction resource quantity.
[0107] Among them, the transaction resource quantity in the second resource transfer transaction may refer to the resource quantity of the object service resource obtained by the service transaction object when selling the service transaction resource.
[0108] It can be understood that the resource selling information (i.e., resource transfer information) of the service transaction resource can be recorded in the second resource transfer transaction, that is, the object service resource obtained by selling a service transaction resource, and the resource transaction quantity of the service transaction resource, that is, the selling quantity. For example, selling 100 shares of stock A. Therefore, the transaction resource quantity in the second resource transfer transaction can be determined according to the resource selling information and the selling quantity. For example, the resource selling information of the service transaction resource in the second resource transfer transaction indicates that selling 1 share gets y, and when the selling quantity is 3, it means that the transaction resource quantity in this second resource transfer transaction is 3y.
[0109] It can be understood that it can also be that the transaction resource quantity converted from selling the transaction service resource is directly recorded in the second resource transfer transaction.
[0110] Therefore, the second transaction resource quantity of each second resource transfer transaction can be determined, and the sum of the second transaction resource quantities of the second resource transfer transactions is used as the second resource cumulative quantity corresponding to the second transaction resource quantity.
[0111] For example, the resource selling information when the service transaction object sells the transaction service resource A is A3, that is, the object service resource obtained by selling one unit of the transaction service resource A (such as A3), which is also the transaction unit price of the transaction service resource, and the selling quantity when the service transaction object sells the transaction service resource A (such as A4), which is also the transaction quantity. Therefore, the transaction resource quantity x = A3 * A4 is determined through the resource selling information and the selling quantity. At this time, the second resource transfer transaction TX2 can be determined based on the resource selling information, the selling quantity, and the transaction resource quantity. For example, the second resource transfer transaction TX2 records the resource selling information and the selling quantity of the service transaction resource; or, the second resource transfer transaction TX2 records the resource selling information, the selling quantity, and the transaction resource quantity of the service transaction resource.
[0112] S104. Determine the resource cumulative quantity difference between the first resource cumulative quantity and the second resource cumulative quantity. When the resource cumulative quantity difference reaches the resource cumulative difference threshold indicated by the first transaction query request, determine the first resource transfer transaction and the second resource transfer transaction as illegal resource transfer transactions, and determine the service transaction object as the illegal transaction object corresponding to the illegal resource transfer transaction.
[0113] Therefore, the resource accumulation difference between the first resource accumulation and the second resource accumulation can be determined. When the resource accumulation difference reaches the resource accumulation difference threshold indicated by the first transaction query request, it indicates that the business transaction object conducts cash-out through the buy-sell difference of transaction business resources on different resource processing platforms, that is, there is an illegal transaction behavior. Therefore, the first resource transfer transaction and the second resource transfer transaction are determined as illegal resource transfer transactions, and the first resource transfer transaction and the second resource transfer transaction can be marked as illegal resource transfer transactions on the blockchain (it can be understood that transactions not marked as illegal resource transfer transactions can be regarded as legal resource transfer transactions). At the same time, the business transaction object can be determined as an illegal transaction object, and the business transaction object can be marked as an illegal transaction object on the blockchain (it can be understood that objects not marked as illegal transaction objects can be regarded as legal transaction objects).
[0114] S105. Based on the illegal transaction object and the illegal resource transfer transaction, determine the first query response information corresponding to the first transaction query request, and return the first query response information to the business processing object.
[0115] Among them, the first query response information used to indicate that the business processing object has an illegal transaction behavior can be generated and returned to the business processing object as an illegal transaction object. It can be understood that the first query response information can include the illegal transaction object, the illegal resource transfer transaction, and information such as the first resource accumulation and the second resource accumulation.
[0116] It can be understood that when the resource accumulation difference between the first resource accumulation and the second resource accumulation does not reach the resource accumulation difference threshold indicated by the first transaction query request, or the first resource transfer transaction and the second resource transfer transaction are not obtained, or the second resource processing platform and the first resource processing platform are not determined, the second query response information used to indicate that the business processing object does not have an illegal transaction behavior can be generated and returned to the business processing object as a legal transaction object.
[0117] For example, as Figure 6 shown, Figure 6It is a schematic diagram of a process for determining an illegal transaction provided by an embodiment of the present application; among them, the first resource transfer transaction TX1 includes TX1a, TX1b,..., TX1n, and the second resource transfer transaction TX2 includes TX2a, TX2b,..., TX2m. The transaction resource amounts (transaction resource amount 1a, transaction resource amount 1b,..., transaction resource amount 1n) are obtained from each first resource transfer transaction respectively, and data accumulation processing is performed to obtain the first resource accumulation amount. The transaction resource amounts (transaction resource amount 2a, transaction resource amount 2b,..., transaction resource amount 2m) are obtained from each second resource transfer transaction respectively, and data accumulation processing is performed to obtain the second resource accumulation amount. The resource accumulation difference between the first resource accumulation amount and the second resource accumulation amount is determined; it is judged whether the resource accumulation difference reaches the resource accumulation difference threshold indicated by the first transaction query request. When the resource accumulation difference reaches the resource accumulation difference threshold indicated by the first transaction query request, the first resource transfer transaction and the second resource transfer transaction are determined as illegal resource transfer transactions, and the business transaction object is determined as the illegal transaction object corresponding to the illegal resource transfer transaction, and a first query response message for indicating that there is an illegal transaction behavior of the business transaction object is generated, and the first query response message is returned to the business processing object; when the resource accumulation difference does not reach the resource accumulation difference threshold indicated by the first transaction query request, a second query response message for indicating that there is no illegal transaction behavior of the business transaction object is generated, and the second query response message is returned to the business processing object.
[0118] In an embodiment of the present application, when a first transaction query request for a business transaction object is received from a business processing object, a first resource transfer transaction and a second resource transfer transaction associated with the business transaction object can be obtained from the blockchain. The first resource transfer transaction and the second resource transfer transaction are transactions in different resource processing platforms (it can be understood that the first resource processing platform and the second resource processing platform can refer to an on-exchange trading platform and an over-the-counter trading platform) for different transaction directions (the first resource transfer transaction refers to a transaction for buying business resources, and the second resource transfer transaction refers to a transaction for selling business resources), that is, the transaction directions of the first resource transfer transaction and the second resource transfer transaction are opposite transaction directions. Also, the first resource transfer transaction and the second resource transfer transaction may be transactions that cause illegal trading behaviors. Therefore, it is possible to determine whether the business transaction object has an illegal trading behavior by determining whether the first resource transfer transaction and the second resource transfer transaction may belong to illegal resource transfer transactions. Specifically, it can be to determine the first resource cumulative amount corresponding to the transaction resource amount in the first resource transfer transaction and the second resource cumulative amount corresponding to the transaction resource amount in the second resource transfer transaction, and determine the resource cumulative amount difference between the first resource cumulative amount and the second resource cumulative amount. When the resource cumulative amount difference reaches the resource cumulative difference threshold indicated by the first transaction query request, it means that there is a large gap in the resource cumulative amounts on both sides of the first resource transfer transaction and the second resource transfer transaction, that is, there is a large difference in transaction resources on different trading platforms. At this time, it is determined that the first resource transfer transaction and the second resource transfer transaction are illegal resource transfer transactions, and the business transaction object is determined to be an illegal transaction object. Therefore, it is possible to perform a linkage comparison analysis on the resource transfer transactions corresponding to the opposite transaction directions of the business transaction object on different trading platforms to quickly determine whether the business transaction object is an illegal transaction object with an illegal trading behavior, and can accurately locate the specific illegal resource transfer transaction corresponding to the business transaction object, thereby improving the detection efficiency and accuracy of illegal transactions.
[0119] Further, please refer to Figure 7 , Figure 7 which is a schematic flowchart of a transaction processing method provided by an embodiment of the present application Figure 2 As Figure 7 shown, the method can be executed by the computer device mentioned above. The computer device can be a blockchain node. For example, the blockchain node can be any one of the blockchain nodes in the blockchain network 200 shown in Figure 1 above. The method can specifically include the following steps S201 - step S207:
[0120] S201. Receive a first transaction query request sent by a service processing object for a service transaction object, and obtain a first resource transfer transaction and a second resource transfer transaction associated with the service transaction object from the blockchain based on the first transaction query request.
[0121] Among them, when receiving the first transaction query request sent by the service processing object for the service transaction object, the blockchain node can obtain the first resource transfer transaction and the second resource transfer transaction to determine illegal transaction behaviors. Among them, the method of obtaining the first resource transfer transaction and the second resource transfer transaction through the first transaction query request can refer to the relevant descriptions in the above embodiments.
[0122] Optionally, it can also be that the blockchain node automatically executes the judgment of illegal transaction behaviors of the service processing object through a smart contract.
[0123] Among them, for example, it can be that at the first target timestamp, obtain the resource transfer transactions of the service transaction object within the second query time period associated with the first target timestamp through the transaction processing contract; the end timestamp of the second query time period is the first target timestamp; the start timestamp of the second query time period is the second target timestamp corresponding to the first target timestamp; the duration of the second query time period is the target duration; the second target timestamp is earlier than the first target timestamp; obtain the first resource transfer transaction and the second resource transfer transaction from the resource transfer transactions within the second query time period.
[0124] Among them, that is to say, when detecting that the first target timestamp is reached, the blockchain node can call the transaction processing contract to obtain the resource transfer transactions of the service transaction object within a query time period. That is, obtain the resource transfer transactions of the service transaction object within a query time period every specified time. The second query time period is the time period between the currently detected target timestamp (the first target timestamp) and the previously detected target timestamp (the second target timestamp).
[0125] It can be understood that the method of obtaining the first resource transfer transaction and the second resource transfer transaction from the resource transfer transactions of the transaction service resources within the second query time period is the same as the method of obtaining the first resource transfer transaction and the second resource transfer transaction from the resource transfer transactions of the transaction service resources within the first query time period. Specifically, it can refer to the relevant descriptions in the above embodiments. The first query time period refers to the time period between the request timestamp of the first transaction query request and the request timestamp of the second transaction query request (i.e., the previously sent transaction query request).
[0126] In this way, it is possible to determine whether the first resource transfer transaction and the second resource transfer transaction are illegal resource transfer transactions through the transaction processing contract to generate the first query response information, and the first query response information can be chained to the blockchain to realize the judgment of illegal transaction behavior through the smart contract automatically. When the blockchain node can query the first query response information for the business transaction object on the blockchain, it can be sent to the business processing object. It is also possible for the business processing object to query from the blockchain whether the business transaction object is an illegal transaction object and the first query response information for the business transaction object.
[0127] Among them, through the relevant descriptions of the above embodiments, it can be known that the resource processing platform associated with the business transaction object includes a first type of processing platform and a second type of processing platform. It can be understood that it is necessary to determine the first resource processing platform and the second resource processing platform before obtaining the first resource transfer transaction and the second resource transfer transaction.
[0128] Among them, taking the resource transfer transaction for the transaction business resources within the first query time period as an example, the determination methods of the first resource processing platform and the second resource processing platform are described.
[0129] It can be understood that the first type of transfer transaction may include a first transfer sub-transaction on the first type of processing platform (i.e., the first type of transfer transaction associated with the first type of processing platform), a second transfer sub-transaction on the second type of processing platform (i.e., the second type of transfer transaction associated with the second type of processing platform), and a third transfer sub-transaction on the second type of processing platform (i.e., the first type of transfer transaction associated with the second type of processing platform); the second type of transfer transaction may include a fourth transfer sub-transaction on the first type of processing platform (i.e., the second type of transfer transaction associated with the first type of processing platform), and a fourth transfer sub-transaction on the second type of processing platform (i.e., the second type of transfer transaction associated with the second type of processing platform).
[0130] Among them, determining the first resource processing platform and the second resource processing platform can be Method 1.1: determining the first target resource purchase information for the transaction business resources based on the resource purchase information obtained from the first transfer sub-transaction, and determining the second target resource purchase information for the transaction business resources based on the resource purchase information obtained from the third transfer sub-transaction; determining the first target resource sale information for the transaction business resources based on the resource sale information obtained from the second transfer sub-transaction, and determining the second target resource sale information for the transaction business resources based on the resource sale information obtained from the fourth transfer sub-transaction; if the first target resource purchase information is lower than the second target resource purchase information, and the first target resource sale information is higher than the second target resource sale information, then determining the first type of processing platform as the first resource processing platform and the second type of processing platform as the second resource processing platform. Among them, the specific descriptions of the resource purchase information and the resource sale information can refer to the relevant descriptions in the above embodiments.
[0131] Among them, the first target resource purchase information can be the average resource purchase information of the resource purchase information obtained from the first transfer sub-transaction, that is, the average purchase price at which the business transaction object purchases the transaction business resources on the first type of processing platform.
[0132] Similarly, the second target resource purchase information can be the average resource purchase information of the resource purchase information obtained from the third transfer sub-transaction, that is, the average purchase price at which the business transaction object purchases the transaction business resources on the second type of processing platform.
[0133] Similarly, the first target resource sale information can be the average resource sale information of the resource sale information obtained from the second transfer sub-transaction, that is, the average sale price at which the business transaction object purchases the transaction business resources on the second type of processing platform.
[0134] Similarly, the second target resource sale information can be the average resource sale information of the resource sale information obtained from the fourth transfer sub-transaction, that is, the average sale price at which the business transaction object purchases the transaction business resources on the first type of processing platform.
[0135] It can be understood that when the first target resource purchase information is lower than the second target resource purchase information, and the first target resource sale information is higher than the second target resource sale information, it means that the business transaction object has the behavior of purchasing the transaction business resources at a low price on the first type of processing platform and selling them at a high price on the second type of processing platform. Therefore, the first type of processing platform is used as the first resource processing platform, and the second type of processing platform is used as the second resource processing platform.
[0136] Optionally, determining the first resource processing platform and the second resource processing platform can also be Method 1.2: determining the first target resource purchase information for the transaction business resources based on the resource purchase information obtained from the first transfer sub-transaction; determining the first target resource sale information for the transaction business resources based on the resource sale information obtained from the second transfer sub-transaction; if the first target resource purchase information is lower than the purchase information threshold indicated by the first transaction query request, and the first target resource sale information is higher than the sale information threshold indicated by the first transaction query request, then determining the first type of processing platform as the first resource processing platform and the second type of processing platform as the second resource processing platform.
[0137] That is to say, it is possible to obtain the resource purchase transactions on the first type of processing platform and the resource sale transactions on the second type of processing platform. When it is determined that the first target resource purchase information is lower than the purchase information threshold indicated by the first transaction query request, and the first target resource sale information is higher than the sale information threshold indicated by the first transaction query request, it indicates that it is determined that the business transaction object has the behavior of purchasing transaction business resources at a low price and selling transaction business resources at a high price on the first type of processing platform. Therefore, the first type of processing platform is used as the first resource processing platform, and the second type of processing platform is used as the second resource processing platform.
[0138] Similarly, it is also possible to obtain the resource purchase transactions on the second type of processing platform and the resource sale transactions on the first type of processing platform. When it is determined that the second target resource purchase information is lower than the purchase information threshold indicated by the first transaction query request, and the second target resource sale information is higher than the sale information threshold indicated by the first transaction query request, it indicates that it is determined that the business transaction object has the behavior of purchasing transaction business resources at a low price on the second type of processing platform and selling transaction business resources at a high price on the first type of processing platform. Therefore, the second type of processing platform is used as the first resource processing platform, and the first type of processing platform is used as the second resource processing platform.
[0139] Among them, when determining the first type of processing platform as the first resource processing platform and the second type of processing platform as the second resource processing platform according to the above Method 1.1 (or Method 1.2), and determining (Method 2) the first type of processing platform as the first resource processing platform and the second type of processing platform as the second resource processing platform according to the cumulative amount of target resources of the first transfer sub-transaction (or the cumulative amount of target resources of the second transfer sub-transaction), the first type of processing platform is used as the first resource processing platform, and the second type of processing platform is used as the second resource processing platform. Among them, the method of determining the first resource processing platform and the second type of processing platform according to the cumulative amount of target resources can refer to the relevant descriptions in the above embodiments.
[0140] It can be understood that, that is, when the results of the first resource processing platform and the second resource processing platform determined according to the resource purchase information of the first transfer sub-transaction and / or the resource sale information obtained in the second transfer sub-transaction and / or the resource purchase information obtained in the third transfer sub-transaction and / or the resource sale information obtained in the fourth transfer sub-transaction are the same as the results of the first resource processing platform and the second resource processing platform determined according to the cumulative target resource volume of the first transfer sub-transaction and / or the cumulative target resource volume obtained in the second transfer sub-transaction and / or the cumulative target resource volume obtained in the third transfer sub-transaction and / or the cumulative target resource volume obtained in the fourth transfer sub-transaction, it indicates that the first resource processing platform and the second resource processing platform are determined. That is, it is necessary that the results of the resource processing platforms determined according to Method 1.1 (or Method 1.2) and Method 2 are the same.
[0141] For example, if the first transfer sub-transaction includes Transaction 1, Transaction 2, and Transaction 3, the transaction resource volume in Transaction 1 is 100, the transaction resource volume in Transaction 2 is 200, and the transaction resource volume in Transaction 3 is 300, then the cumulative target resource volume of the first transfer sub-transaction is 100 + 200 + 300 = 600; if the cumulative resource volume threshold indicated by the first transaction query request is 500, then the cumulative target resource volume of the first transfer sub-transaction reaches the cumulative resource volume threshold indicated by the first transaction query request; at the same time, the resource purchase information in Transaction 1 is 10, the resource purchase information in Transaction 2 is 20, and the resource purchase information in Transaction 3 is 30, then the first target resource purchase information determined through the first transfer sub-transaction is (10 + 20 + 30) / 3 = 20; if the first target resource purchase information determined through the first transfer sub-transaction is lower than the purchase information threshold indicated by the first transaction query request, and the first target resource sale information determined through the second transfer sub-transaction is higher than the sale information threshold indicated by the first transaction query request, then the first type of processing platform is determined as the first resource processing platform, and the second type of processing platform is determined as the second resource processing platform.
[0142] Optionally, it can also be (Method 3) that when it is determined that there is a large transaction in the first transfer sub-transaction (i.e., there is a first transfer sub-transaction with a transaction resource volume greater than a certain threshold), the first type of processing platform is determined as the first resource processing platform, and the second type of processing platform is determined as the second resource processing platform. Or, when it is determined that there is a large transaction in the second transfer sub-transaction (i.e., there is a second transfer sub-transaction with a transaction resource volume greater than a certain threshold), the first type of processing platform is determined as the first resource processing platform, and the second type of processing platform is determined as the second resource processing platform. Or, when it is determined that there is a large transaction in the third transfer sub-transaction (i.e., there is a third transfer sub-transaction with a transaction resource volume greater than a certain threshold), the second type of processing platform is determined as the first resource processing platform, and the first type of processing platform is determined as the second resource processing platform. Or, when it is determined that there is a large transaction in the fourth transfer sub-transaction (i.e., there is a fourth transfer sub-transaction with a transaction resource volume greater than a certain threshold), the second type of processing platform is determined as the first resource processing platform, and the first type of processing platform is determined as the second resource processing platform.
[0143] Optionally, it can also be (Method 4) that when it is determined that there are a large number of first transfer sub-transactions (i.e., the number of first transfer sub-transactions is greater than a certain threshold), the first type of processing platform is determined as the first resource processing platform, and the second type of processing platform is determined as the second resource processing platform. Or, when it is determined that there are a large number of second transfer sub-transactions (i.e., the number of second transfer sub-transactions is greater than a certain threshold), the first type of processing platform is determined as the first resource processing platform, and the second type of processing platform is determined as the second resource processing platform. Or, when it is determined that there are a large number of third transfer sub-transactions (i.e., the number of third transfer sub-transactions is greater than a certain threshold), the second type of processing platform is determined as the first resource processing platform, and the first type of processing platform is determined as the second resource processing platform. Or, when it is determined that there are a large number of fourth transfer sub-transactions (i.e., the number of fourth transfer sub-transactions is greater than a certain threshold), the second type of processing platform is determined as the first resource processing platform, and the first type of processing platform is determined as the second resource processing platform.
[0144] It can be understood that the method for determining the first resource processing platform and the second resource processing platform can be any one or a combination of multiple methods among the above Method 1.1 (Method 1.2) - Method 4. When the results of the first resource processing platform and the second resource processing platform determined by multiple methods are the same, it means that the first resource processing platform and the second resource processing platform are successfully determined at this time.
[0145] Among them, a third resource transfer transaction associated with the business transaction object can be obtained; the third resource transfer transaction is a transaction of the business transaction object on the first resource processing platform in the second transaction direction (i.e., the above-mentioned third transfer sub-transaction). The blockchain node can determine the first transaction cumulative quantity of the first resource transfer transaction and the second transaction cumulative quantity of the second resource transfer transaction; determine the second transaction cumulative quantity difference between the first transaction cumulative quantity and the second transaction cumulative quantity; when the second transaction cumulative quantity difference reaches the second quantity cumulative difference threshold indicated by the first transaction query request, execute the step of determining the transaction resource quantity obtained from the first resource transfer transaction as the first transaction resource quantity. It can be understood that this indicates that the business transaction object executes a large number of first resource transfer transactions on the first resource processing platform and executes fewer third resource transfer transactions, indicating that there may be illegal transaction behaviors. Therefore, step S202 can be executed. Or, it can also be when it is determined that there is a large transaction in the first resource transfer transaction (such as there is a second resource transfer transaction with a transaction resource quantity greater than a certain threshold), execute the step of determining the transaction resource quantity obtained from the first resource transfer transaction as the first transaction resource quantity.
[0146] Similarly, a fourth resource transfer transaction associated with the business transaction object can be obtained; the fourth resource transfer transaction is a transaction of the business transaction object on the second resource processing platform in the first transaction direction (i.e., the above-mentioned fourth transfer sub-transaction). The blockchain node can determine the third transaction cumulative quantity of the second resource transfer transaction and the fourth transaction cumulative quantity of the fourth resource transfer transaction; determine the third first transaction cumulative quantity difference between the third transaction cumulative quantity and the fourth transaction cumulative quantity; when the third first transaction cumulative quantity difference reaches the second quantity cumulative difference threshold indicated by the first transaction query request, execute the step of determining the transaction resource quantity obtained from the first resource transfer transaction as the first transaction resource quantity. It can be understood that this indicates that the business transaction object executes a large number of second resource transfer transactions on the second resource processing platform and executes fewer fourth resource transfer transactions, indicating that there may be illegal transaction behaviors. Therefore, step S202 can be executed. Or, it can also be when it is determined that there is a large transaction in the second resource transfer transaction (such as there is a second resource transfer transaction with a transaction resource quantity greater than a certain threshold), execute the step of determining the transaction resource quantity obtained from the first resource transfer transaction as the first transaction resource quantity.
[0147] S202. Determine the transaction resource quantity obtained from the first resource transfer transaction as the first transaction resource quantity, perform data accumulation processing on the first transaction resource quantity, and obtain the first resource cumulative quantity corresponding to the first transaction resource quantity.
[0148] S203. Determine the transaction resource quantity obtained from the second resource transfer transaction as the second transaction resource quantity, and perform data accumulation processing on the second transaction resource quantity to obtain the second resource accumulation quantity corresponding to the second transaction resource quantity. For the specific implementation manners of steps S202 - S203, reference may be made to the relevant descriptions in the above embodiments, which will not be elaborated herein.
[0149] S204. Determine the resource accumulation quantity difference between the first resource accumulation quantity and the second resource accumulation quantity. When the resource accumulation quantity difference reaches the resource accumulation difference threshold indicated by the first transaction query request, determine the first resource transfer transaction and the second resource transfer transaction as illegal resource transfer transactions, and determine the business transaction object as the illegal transaction object corresponding to the illegal resource transfer transaction.
[0150] Among them, determining illegal resource transfer transactions can be done not only by the resource accumulation quantity but also further by the transaction accumulation quantity. For example, determine the first transaction accumulation quantity (i.e., the transaction quantity of the first resource transfer transaction) of the first resource transfer transaction and the second transaction accumulation quantity (i.e., the transaction quantity of the second resource transfer transaction) of the second resource transfer transaction; determine the first transaction accumulation quantity difference between the first transaction accumulation quantity and the second transaction accumulation quantity; when the resource accumulation quantity difference reaches the resource accumulation difference threshold indicated by the first transaction query request and the first transaction accumulation quantity difference reaches the first quantity accumulation difference threshold indicated by the first transaction query request, determine the first resource transfer transaction and the second resource transfer transaction as illegal resource transfer transactions.
[0151] Among them, according to the above description, determining illegal resource transfer transactions can be done not only by the resource accumulation quantity but also further by the ratio between the resource accumulation quantity and the total transaction volume of the business transaction object. For example, the first resource transfer transaction belongs to a resource transfer - in transaction associated with the business transaction object; the second resource transfer transaction belongs to a resource transfer - out transaction associated with the business transaction object. A resource transfer - in transaction associated with the business transaction object refers to a transaction of all the purchased transaction resources of the business transaction object within the first query time period (or the second query time period). A resource transfer - out transaction associated with the business transaction object refers to a transaction of all the sold transaction resources of the business transaction object within the first query time period (or the second query time period).
[0152] Therefore, the amount of transaction resources obtained from the first type of transfer transaction is determined as the first type of transaction resource amount, and data accumulation processing is performed on the first type of transaction resource amount to obtain the first type of resource accumulation amount corresponding to the first type of transaction resource amount; the amount of transaction resources obtained from the second type of transfer transaction is determined as the second type of transaction resource amount, and data accumulation processing is performed on the second type of transaction resource amount to obtain the second type of resource accumulation amount corresponding to the second type of transaction resource amount; the first accumulation amount ratio between the first resource accumulation amount and the first type of resource accumulation amount is determined, and the second accumulation amount ratio between the second resource accumulation amount and the second type of resource accumulation amount is determined; when the resource accumulation amount difference reaches the resource accumulation difference threshold indicated by the first transaction query request, the first accumulation amount ratio reaches the buy accumulation amount ratio threshold indicated by the first transaction query request, and the second accumulation amount ratio reaches the sell accumulation amount ratio threshold indicated by the second transaction query request (or when the resource accumulation amount difference reaches the resource accumulation difference threshold indicated by the first transaction query request, and the first accumulation amount ratio reaches the buy accumulation amount ratio threshold indicated by the first transaction query request (or the second accumulation amount ratio reaches the sell accumulation amount ratio threshold indicated by the second transaction query request)), the first resource transfer transaction and the second resource transfer transaction are determined as illegal resource transfer transactions.
[0153] That is to say, when the first accumulation amount ratio between the first resource accumulation amount of the first resource transfer transaction and the target transfer transaction resource amount of the resource transfer-in transaction is greater than the transfer-in accumulation amount ratio threshold, it means that the object business resources consumed by the buy transaction service resources account for too large a proportion of the object business resources consumed by all buy transactions. Therefore, the first resource transfer transaction may also be an illegal resource transfer transaction (it can be understood that at this time, the first resource transfer transaction may not be an illegal resource transfer transaction either).
[0154] It can be understood that the technical solution of this application can determine whether the transactions inside and outside the market are illegal resource transfer transactions through the linkage analysis of the transaction data inside and outside the market, and can also determine whether the unilateral transaction is an illegal resource transfer transaction by only analyzing the unilateral transaction data, and then can generate the corresponding first query response information and return it to the service processing object.
[0155] Among them, it can be understood that the sum of the transaction resource amounts of all resource transfer-in transactions is the target transfer-in transaction resource amount, that is, the object business resources consumed by all buy transactions. The sum of the transaction resource amounts of all resource transfer-out transactions is the target transfer-out transaction resource amount, that is, the object business resources obtained by all sell transactions.
[0156] It is understandable that the first resource transfer transaction and the second resource transfer transaction can be analyzed jointly to determine an illegal resource transfer transaction. The joint analysis of the first resource transfer transaction and the second resource transfer transaction can be determined by the comparison result between the relevant parameters of the first resource transfer transaction and the relevant parameters of the second resource transfer transaction. At the same time, it can also be comprehensively analyzed by combining the relevant parameters of the first resource transfer transaction itself and the relevant parameters of the second resource transfer transaction itself to determine whether the first resource transfer transaction and the second resource transfer transaction may be illegal resource transfer transactions. The rules for this comparison parameter and comprehensive analysis can be configured by relevant personnel. For example, when the comparison result between the relevant parameters of the first resource transfer transaction and the relevant parameters of the second resource transfer transaction reaches a relevant threshold, and the relevant parameters of the first resource transfer transaction itself reach a relevant threshold and the relevant parameters of the second resource transfer transaction itself reach a relevant threshold, it is determined that there is an illegal transaction behavior; it can also be that when the comparison result between the relevant parameters of the first resource transfer transaction and the relevant parameters of the second resource transfer transaction reaches a relevant threshold, and the relevant parameters of the first resource transfer transaction itself reach a relevant threshold or the relevant parameters of the second resource transfer transaction itself reach a relevant threshold, it is determined that there is an illegal transaction behavior. No limitation is made here.
[0157] For example, when the difference in the cumulative amount of resources reaches the threshold of the cumulative resource difference indicated by the first transaction query request, and the difference in the cumulative quantity of the first transaction reaches the threshold of the first cumulative quantity difference indicated by the first transaction query request, the first resource transfer transaction and the second resource transfer transaction are determined to be illegal resource transfer transactions. Or, when the difference in the cumulative amount of resources reaches the threshold of the cumulative resource difference indicated by the first transaction query request, and the difference in the cumulative quantity of the first transaction reaches the threshold of the first cumulative quantity difference indicated by the first transaction query request, and the first cumulative quantity ratio reaches the threshold of the transferred cumulative quantity ratio indicated by the first transaction query request or the second cumulative quantity ratio reaches the threshold of the transferred cumulative quantity ratio indicated by the first transaction query request, the first resource transfer transaction and the second resource transfer transaction are determined to be illegal resource transfer transactions.
[0158] For example, as Figure 8 shown, Figure 8It is a schematic diagram of a process for identifying illegal transaction behaviors provided by an embodiment of the present application. Among them, when the first resource transfer transaction and the second resource transfer transaction are obtained, the first resource transfer transaction and the second resource transfer transaction can be analyzed by linkage comparison to obtain a comparison analysis result (such as the result of whether the cumulative resource difference reaches the resource cumulative difference threshold indicated by the first transaction query request, the result of whether the first cumulative quantity ratio reaches the transferred cumulative quantity ratio threshold indicated by the first transaction query request, and the result of whether the second cumulative quantity ratio reaches the transferred-out cumulative quantity ratio threshold indicated by the first transaction query request); perform a unilateral analysis on the first resource transfer transaction to obtain a first analysis result of the first resource transfer transaction (such as the result of whether the first cumulative quantity ratio reaches the transferred cumulative quantity ratio threshold indicated by the first transaction query request), perform a unilateral analysis on the second resource transfer transaction to obtain a second analysis result of the second resource transfer transaction (such as the result of whether the second cumulative quantity ratio reaches the transferred-out cumulative quantity ratio threshold indicated by the first transaction query request), and the illegal transaction analysis result of the first resource transfer transaction and the second resource transfer transaction (that is, the result of whether the first resource transfer transaction and the second resource transfer transaction are illegal resource transfer transactions) can be determined through the comparison analysis result, the first analysis result, and the second analysis result.
[0159] S205. Based on the illegal transaction object and the illegal resource transfer transaction, determine the first query response information corresponding to the first transaction query request, and return the first query response information to the service processing object. The specific implementation manner of step S205 can refer to the relevant description in the above embodiment and will not be elaborated here.
[0160] S206. When receiving the illegal transaction description information generated by the illegal transaction object for the illegal resource transfer transaction, upload the illegal transaction description information to the blockchain and send the illegal transaction description information to the service processing object.
[0161] Among them, the service transaction object as the illegal transaction object is used to generate the illegal transaction description information for the illegal resource transfer transaction.
[0162] Among them, when the service processing object receives the first query response information, it can send an illegal transaction description notification information for the illegal resource transfer transaction in the first query response information to the service transaction object, so that the service transaction object can explain the illegal resource transfer transaction to obtain the illegal transaction description information generated for the illegal resource transfer transaction. It can be understood that the service transaction object can send the illegal transaction description information to the blockchain node, and the blockchain node can upload the illegal transaction description information to the blockchain and send the illegal transaction description information to the service processing object, or the service processing object can query it.
[0163] S207. When receiving the illegal transaction cancellation information generated after the business processing object approves the illegal resource transfer transaction based on the illegal transaction description information, update the business transaction object as the illegal transaction object to a legal transaction object on the blockchain, and update the illegal resource transfer transaction to the legal resource transfer transaction corresponding to the legal transaction object.
[0164] Among them, the business processing object is used to approve the illegal resource transfer transaction based on the illegal transaction description information, and generate the illegal transaction cancellation information for the illegal resource transfer transaction after the information approval passes.
[0165] Among them, the business processing object can approve the illegal resource transfer transaction based on the illegal transaction description information, and generate the illegal transaction cancellation information when it is determined that the business transaction object has no illegal transaction behavior. It can be understood that the business processing object can send the illegal transaction cancellation information to the blockchain node, and the blockchain node can upload the illegal transaction cancellation information to the blockchain, and based on the illegal transaction cancellation information, update the business transaction object as the illegal transaction object to a legal transaction object on the blockchain, and update the illegal resource transfer transaction to the legal resource transfer transaction corresponding to the legal transaction object, that is, the transaction risk of the business transaction object is lifted. It can be understood that the blockchain node can mark whether the business transaction object is an illegal transaction object or a legal transaction object on the blockchain, as well as the legal resource transfer transaction and the illegal resource transfer transaction of the business transaction object, thereby realizing the supervision of illegal transaction behaviors through the blockchain.
[0166] For example, as Figures 9 - 11 shown, Figures 9 - 11 is a schematic diagram of a transaction processing process provided by an embodiment of the present application; among them, the business transaction object a1 sends a resource transfer transaction associated with the business transaction object to the blockchain node 21 through the terminal device 20a, and the blockchain node 21 can upload the resource transfer transaction associated with the business transaction object to the blockchain; as Figure 9, the business processing object a2 sends (S91) a first transaction query request for the business transaction object to the blockchain node through the terminal device 20b. The blockchain node can obtain (S92) the first resource transfer transaction (TX1) and the second resource transfer transaction (TX2) associated with the business transaction object from the blockchain based on the first transaction query request. When it is determined that the first resource transfer transaction and the second resource transfer transaction are illegal resource transfer transactions, the business transaction object is determined as the illegal transaction object corresponding to the illegal resource transfer transaction. At this time, based on the illegal transaction object and the illegal resource transfer transaction, the first query response information corresponding to the first transaction query request can be determined, and the first query response information is returned (S93) to the business processing object, and the illegal transaction object and the illegal resource transfer transaction (i.e., the illegal transaction mark) are recorded on the blockchain (at this time, the block corresponding to the maximum block height on the blockchain is block a); such as Figure 10 , the business processing object can send (S94) an illegal transaction description notice information for the illegal resource transfer transaction in the first query response information to the business transaction object through the second object terminal; the business transaction object generates an illegal transaction description information for the illegal resource transfer transaction based on the illegal transaction description notice information through the first object terminal, and sends (S95) the illegal transaction description information to the blockchain node; when the blockchain node receives the illegal transaction description information generated by the illegal transaction object for the illegal resource transfer transaction, the illegal transaction description information is chained (S96) to the blockchain (at this time, the block corresponding to the maximum block height on the blockchain is block b); the blockchain node sends (S97) the illegal transaction description information to the business processing object; such as Figure 11 , the business processing object approves the information of the illegal resource transfer transaction based on the illegal transaction description information through the second object terminal to obtain illegal transaction cancellation information; the business processing object sends (S98) the illegal transaction cancellation information to the blockchain node through the second object terminal; the blockchain node updates and records the illegal transaction object as a legal transaction object on the blockchain (at this time, the block corresponding to the maximum block height on the blockchain is block c), and updates and records the illegal resource transfer transaction as a legal resource transfer transaction, that is, the legal transaction mark (S99).
[0167] Therefore, the technical solution of the present application can detect and locate illegal resource transfer transactions through the linkage analysis of on-site and off-site transaction data based on blockchain. In addition, the identification trigger condition of illegal transactions can be through a transaction query request (for example, sending a transaction query request every specified time), or through the automatic execution of a smart contract (for example, calling a transaction processing contract every specified time, and for example, when a preset number of large transactions for transaction business resources (such as resource transfer transactions between resource transfer transactions generated after the last illegal transaction identification and the latest resource transfer transaction) are detected on the blockchain, if at least 3 large transactions for transaction business resources are detected, the resource transfer transactions for transaction business resources within this period (from the last illegal transaction identification to the current moment) are obtained from the blockchain to obtain the first resource transfer transaction and the second resource transfer transaction, thereby improving the flexibility of illegal transaction identification. The transaction business resources to be detected, the relevant detection thresholds, etc. can be defined in the transaction query request (or smart contract). In addition, all data involved in the illegal transaction identification process can be uploaded to the blockchain for evidence storage, and the data is open, transparent and tamper-proof. The blockchain node can pass the relevant data to the business processing object to realize the data transmission function of the blockchain and improve the supervision efficiency, accuracy, timeliness, effectiveness, reliability and fairness of illegal transaction behaviors.
[0168] That is, the business transaction object can upload the resource transfer transaction to the blockchain node for chaining, and the blockchain node will identify and warn the illegal transaction. The illegal transaction identification results can be chained to the blockchain and sent to the business processing object for review. The description documents provided by the business transaction object for illegal resource transfer transactions can also be uploaded to the blockchain node for chaining, and sent by the blockchain node to the business processing object for approval. The approval results of the business processing object can be uploaded to the blockchain node for chaining, and the blockchain node can determine whether to remove the risk of the business transaction object on the blockchain based on the approval results, so as to realize the supervision of the transaction behavior of the business transaction object.
[0169] For example, if Figure 12 As shown, Figure 12 It is a schematic diagram of the interaction process of a transaction processing method provided by an embodiment of this application. Among them, S31: The business transaction object uploads a resource transfer transaction associated with the business transaction object to the blockchain node through the first object terminal; S32: The blockchain node uploads the resource transfer transaction associated with the business transaction object to the blockchain; S33: The business processing object sends a first transaction query request for the business transaction object through the second object terminal; S34: The blockchain node determines the first query time period indicated by the first transaction query request; S35: Based on the transaction business resources indicated by the first transaction query request, the blockchain node obtains the resource transfer transaction of the business transaction object for the transaction business resources within the first query time period from the blockchain as the reference resource transfer transaction; S36: The blockchain node obtains the first resource transfer transaction and the second resource transfer transaction from the reference resource transfer transaction; S37: The blockchain node determines the first resource cumulative amount based on the transaction resource amount obtained in the first resource transfer transaction, that is, determines the transaction resource amount obtained from the first resource transfer transaction as the first transaction resource amount, and performs data accumulation processing on the first transaction resource amount to obtain the first resource cumulative amount corresponding to the first transaction resource amount; S38: The blockchain node determines the first resource cumulative amount based on the transaction resource amount obtained in the first resource transfer transaction, that is, determines the transaction resource amount obtained from the second resource transfer transaction as the second transaction resource amount, and performs data accumulation processing on the second transaction resource amount to obtain the second resource cumulative amount corresponding to the second transaction resource amount; S39: The blockchain node determines the resource cumulative amount difference between the first resource cumulative amount and the second resource cumulative amount. When the resource cumulative amount difference reaches the resource cumulative difference threshold indicated by the first transaction query request, it determines the first resource transfer transaction and the second resource transfer transaction as illegal resource transfer transactions, determines the business transaction object as the illegal transaction object corresponding to the illegal resource transfer transaction, and performs illegal transaction marking on the illegal transaction object and the illegal resource transfer transaction on the blockchain; S310: The blockchain node determines the first query response information corresponding to the first transaction query request based on the illegal transaction object and the illegal resource transfer transaction; S311: The blockchain node returns the first query response information to the business processing object; S312: The business processing object can send an illegal transaction description notification information for the illegal resource transfer transaction in the first query response information to the business transaction object through the second object terminal; S313: The business transaction object generates an illegal transaction description information for the illegal resource transfer transaction based on the illegal transaction description notification information through the first object terminal and sends the illegal transaction description information to the blockchain node; S314: When the blockchain node receives the illegal transaction description information generated by the illegal transaction object for the illegal resource transfer transaction, it uploads the illegal transaction description information to the blockchain; S315: The blockchain node sends the illegal transaction description information to the business processing object;S316. The business processing object performs information approval on the illegal resource transfer transaction based on the illegal transaction description information through the second object terminal, and obtains the illegal transaction cancellation information; S317. The business processing object sends the illegal transaction cancellation information to the blockchain node through the second object terminal; S318. The blockchain node updates the business transaction object that is the illegal transaction object to a legal transaction object on the blockchain, and updates the illegal resource transfer transaction to the legal resource transfer transaction corresponding to the legal transaction object, that is, the legal transaction mark.
[0170] In an embodiment of the present application, when a first transaction query request for a business transaction object is received from a business processing object, a first resource transfer transaction and a second resource transfer transaction associated with the business transaction object can be obtained from the blockchain. The first resource transfer transaction and the second resource transfer transaction are transactions for different transaction directions on different resource processing platforms (it can be understood that the first resource processing platform and the second resource processing platform can refer to an on-site trading platform and an over-the-counter trading platform) (the first resource transfer transaction refers to a transaction for buying transaction business resources, and the second resource transfer transaction refers to a transaction for selling transaction business resources), that is, the transaction directions of the first resource transfer transaction and the second resource transfer transaction are relative transaction directions, that is, the first resource transfer transaction and the second resource transfer transaction may be transactions that cause illegal transactions. Therefore, it is possible to determine whether the business transaction object has illegal transactions by determining whether the first resource transfer transaction and the second resource transfer transaction may belong to illegal resource transfer transactions; specifically, it can be determined that the first resource cumulative amount corresponding to the transaction resource amount in the first resource transfer transaction and the transaction resource in the second resource transfer transaction The second resource cumulative amount corresponding to the amount is determined, and the resource cumulative amount difference between the first resource cumulative amount and the second resource cumulative amount is determined. When the resource cumulative amount difference reaches the resource cumulative amount difference threshold indicated by the first transaction query request, it indicates that there is a large gap between the resource cumulative amounts on both sides of the first resource transfer transaction and the second resource transfer transaction, that is, there is a large difference in transaction resources on different trading platforms, that is, at this time, the first resource transfer transaction and the second resource transfer transaction are determined to be illegal resource transfer transactions, and the business transaction object is determined to be an illegal transaction object, and a corresponding first query response information is generated and returned to the business processing object. At this time, the business processing object can notify the business transaction object to explain the illegal resource transfer transaction of the business transaction object. At this time, the illegal transaction description information can be uploaded to the chain, and the blockchain node sends the illegal transaction description information to the business processing object. The business processing object can review the information on the illegal resource transfer transaction to determine whether the blockchain node needs to remove the illegal mark of the business transaction object, that is, update the business transaction object from an illegal transaction object to a legal transaction object to achieve transaction behavior supervision of the transaction processing object. Therefore, the resource transfer transactions corresponding to the relative transaction directions of the business transaction objects under different transaction platforms can be linked and compared to analyze, so as to quickly determine whether the business transaction object is an illegal transaction object with illegal transaction behavior, and accurately locate the specific illegal resource transfer transactions corresponding to the business transaction object, thereby improving the detection efficiency and accuracy of illegal transactions.
[0171] For further information, see Figure 13 , Figure 13 is a schematic diagram of the structure of a transaction processing device provided in an embodiment of the present application. Figure 13 As shown, the transaction processing device 1 can be applied to a computer device. It should be understood that the transaction processing device 1 can be a computer program (including program code) running on the computer device. For example, the transaction processing device 1 can be an application software. It can be understood that the transaction processing device 1 can be used to execute the corresponding steps in the method provided in the embodiments of the present application. As Figure 13 As shown, the transaction processing device 1 may include: a transaction acquisition module 11, an accumulation amount determination module 12, an illegal transaction determination module 13, and an illegal transaction processing module 14; where:
[0172] The transaction acquisition module 11 is configured to receive a first transaction query request sent by a service processing object for a service transaction object, and obtain a first resource transfer transaction and a second resource transfer transaction associated with the service transaction object from the blockchain based on the first transaction query request; the first resource transfer transaction is a transaction of the service transaction object on the first resource processing platform in the first transaction direction; the first transaction direction is the transaction direction when the service transaction object buys transaction service resources; the second resource transfer transaction is a transaction of the service transaction object on the second resource processing platform in the second transaction direction; the second transaction direction is the transaction direction when the service transaction object sells transaction service resources; the second transaction direction is different from the first transaction direction, and the second resource processing platform is different from the first resource processing platform;
[0173] The accumulation amount determination module 12 is configured to determine the transaction resource amount obtained from the first resource transfer transaction as the first transaction resource amount, perform data accumulation processing on the first transaction resource amount, and obtain a first resource accumulation amount corresponding to the first transaction resource amount;
[0174] The accumulation amount determination module 12 is further configured to determine the transaction resource amount obtained from the second resource transfer transaction as the second transaction resource amount, perform data accumulation processing on the second transaction resource amount, and obtain a second resource accumulation amount corresponding to the second transaction resource amount;
[0175] The illegal transaction determination module 13 is configured to determine the resource accumulation amount difference between the first resource accumulation amount and the second resource accumulation amount. When the resource accumulation amount difference reaches the resource accumulation difference threshold indicated by the first transaction query request, determine the first resource transfer transaction and the second resource transfer transaction as illegal resource transfer transactions, and determine the service transaction object as the illegal transaction object corresponding to the illegal resource transfer transaction;
[0176] The illegal transaction processing module 14 is configured to determine a first query response message corresponding to the first transaction query request based on the illegal transaction object and the illegal resource transfer transaction, and return the first query response message to the service processing object.
[0177] Among them, the request timestamp of the first transaction query request is the first timestamp, and the request timestamp of the second transaction query request associated with the first transaction query request is the second timestamp, and the second timestamp is earlier than the first timestamp;
[0178] The transaction acquisition module 11 includes:
[0179] The time period determination unit 111 is configured to use the time period formed by the second timestamp and the first timestamp as the first query time period;
[0180] The first transaction acquisition unit 112 is configured to, based on the transaction service resource indicated by the first transaction query request, obtain, from the blockchain, the resource transfer transactions of the business transaction object for the transaction service resource within the first query time period, and use the obtained resource transfer transactions as reference resource transfer transactions;
[0181] The first transaction acquisition unit 112 is further configured to obtain a first resource transfer transaction and a second resource transfer transaction from the reference resource transfer transactions.
[0182] Among them, the reference resource transfer transactions include a first type of transfer transaction and a second type of transfer transaction; the first type of transfer transaction is a transaction of the business transaction object in the first transaction direction; the second type of transfer transaction is a transaction of the business transaction object in the second transaction direction;
[0183] The first transaction acquisition unit 112 includes:
[0184] The first transaction acquisition subunit 1121 is configured to obtain the first type of transfer transaction associated with the first resource processing platform from the first type of transfer transactions, and determine the first resource transfer transaction based on the first type of transfer transaction associated with the first resource processing platform;
[0185] The second transaction acquisition subunit 1122 is configured to obtain the second type of transfer transaction associated with the second resource processing platform from the second type of transfer transactions, and determine the second resource transfer transaction based on the second type of transfer transaction associated with the second resource processing platform.
[0186] Among them, the first transaction acquisition subunit 1121 is specifically configured to:
[0187] Use the first type of transfer transaction associated with the first resource processing platform as the first transfer transaction to be processed;
[0188] When the transaction resource amount in the first transfer transaction to be processed is greater than the first resource amount threshold indicated by the first transaction query request, use the first transfer transaction to be processed as the first resource transfer transaction.
[0189] Among them, the resource processing platform associated with the business transaction object includes a first type of processing platform and a second type of processing platform;
[0190] The transaction acquisition module 11 further includes:
[0191] The processing platform determination unit 113 is configured to obtain a first type of transfer transaction associated with the first type of processing platform from the first type of transfer transactions;
[0192] The processing platform determination unit 113 is further configured to, when the cumulative amount of the target resources of the first type of transfer transaction associated with the first type of processing platform reaches the resource cumulative amount threshold indicated by the first transaction query request, determine the first type of processing platform as the first resource processing platform;
[0193] The processing platform determination unit 113 is further configured to determine the second type of processing platform as the second resource processing platform.
[0194] Among them, the resource processing platform associated with the business transaction object includes a first type of processing platform and a second type of processing platform; the first type of transfer transaction includes a first transfer sub-transaction on the first type of processing platform; the second type of transfer transaction includes a second transfer sub-transaction on the second type of processing platform;
[0195] The transaction acquisition module 11 further includes:
[0196] The processing platform determination unit 113 is configured to determine first target resource purchase information for the transaction business resources based on the resource purchase information obtained from the first transfer sub-transaction;
[0197] The processing platform determination unit 113 is further configured to determine first target resource sale information for the transaction business resources based on the resource sale information obtained from the second transfer sub-transaction;
[0198] The processing platform determination unit 113 is further configured to, if the first target resource purchase information is lower than the purchase information threshold indicated by the first transaction query request and the first target resource sale information is higher than the sale information threshold indicated by the first transaction query request, determine the first type of processing platform as the first resource processing platform and determine the second type of processing platform as the second resource processing platform.
[0199] Among them, the illegal transaction determination module 13 includes:
[0200] The cumulative quantity determination unit 131 is configured to determine a first transaction cumulative quantity of the first resource transfer transaction and a second transaction cumulative quantity of the second resource transfer transaction;
[0201] The cumulative quantity determination unit 131 is further configured to determine a first transaction cumulative quantity difference between the first transaction cumulative quantity and the second transaction cumulative quantity;
[0202] The illegal transaction determination unit 132 is configured to determine the first resource transfer transaction and the second resource transfer transaction as illegal resource transfer transactions when the resource cumulative quantity difference reaches the resource cumulative difference threshold indicated by the first transaction query request and the first transaction cumulative quantity difference reaches the first quantity cumulative difference threshold indicated by the first transaction query request.
[0203] Wherein, the first resource transfer transaction belongs to a resource transfer-in transaction associated with the business transaction object; the second resource transfer transaction belongs to a resource transfer-out transaction associated with the business transaction object;
[0204] The illegal transaction determination module 13 includes:
[0205] The data accumulation unit 133 is configured to determine the transaction resource quantity obtained from the resource transfer-in transaction as the transfer-in transaction resource quantity, perform data accumulation processing on the transfer-in transaction resource quantity, and obtain the target transfer-in transaction resource quantity corresponding to the transfer-in transaction resource quantity;
[0206] The data accumulation unit 133 is further configured to determine the transaction resource quantity obtained from the resource transfer-out transaction as the transfer-out transaction resource quantity, perform data accumulation processing on the transfer-out transaction resource quantity, and obtain the target transfer-out transaction resource quantity corresponding to the transfer-out transaction resource quantity;
[0207] The illegal transaction determination unit 132 is configured to determine a first cumulative quantity ratio between the first resource cumulative quantity and the target transfer-in transaction resource quantity, and determine a second cumulative quantity ratio between the second resource cumulative quantity and the target transfer-out transaction resource quantity;
[0208] The illegal transaction determination unit 132 is further configured to determine the first resource transfer transaction and the second resource transfer transaction as illegal resource transfer transactions when the resource cumulative quantity difference reaches the resource cumulative difference threshold indicated by the first transaction query request, the first cumulative quantity ratio reaches the transfer-in cumulative quantity ratio threshold indicated by the first transaction query request, and the second cumulative quantity ratio reaches the transfer-out cumulative quantity ratio threshold indicated by the first transaction query request.
[0209] Wherein, the transaction acquisition module 11 further includes:
[0210] The contract processing unit 114 is used to obtain the resource transfer transaction of the business transaction object for the transaction business resource in the second query time period associated with the first target timestamp from the blockchain through the transaction processing contract when the first target timestamp is reached; the end timestamp of the second query time period is the first target timestamp; the start timestamp of the second query time period is the second target timestamp corresponding to the first target timestamp; the duration of the second query time period is the target duration; the second target timestamp is earlier than the first target timestamp;
[0211] The second transaction acquisition unit 115 is used to acquire the first resource transfer transaction and the second resource transfer transaction from the resource transfer transactions for the transaction business resources within the second query time period.
[0212] Wherein, the business transaction object as the illegal transaction object is used to generate illegal transaction description information generated for illegal resource transfer transactions;
[0213] The illegal transaction processing module 14 also includes:
[0214] The information uplink unit 141 is used to link the illegal transaction description information to the blockchain and send the illegal transaction description information to the business processing object when receiving the illegal transaction description information sent by the business transaction object as the illegal transaction object.
[0215] Among them, the business processing object is used to review and approve the illegal resource transfer transaction based on the illegal transaction description information, and to generate illegal transaction release information for the illegal resource transfer transaction after the information is reviewed and approved;
[0216] The illegal transaction processing module 14 also includes:
[0217] The information updating unit 142 is used to update the business transaction object that is an illegal transaction object from an illegal transaction object to a legal transaction object on the blockchain when receiving the illegal transaction release information sent by the business processing object, and update the illegal resource transfer transaction to a legal resource transfer transaction corresponding to the legal transaction object.
[0218] Wherein, the transaction acquisition module 11 also includes:
[0219] Transaction processing unit 116, used to obtain a third resource transfer transaction associated with the business transaction object; the third resource transfer transaction is a transaction of the business transaction object on the first resource processing platform in the second transaction direction;
[0220] The transaction processing unit 116 is further used to determine a first transaction cumulative quantity of the first resource transfer transaction and a third transaction cumulative quantity of the third resource transfer transaction;
[0221] The transaction processing unit 116 is further configured to determine a second transaction cumulative quantity difference between the first transaction cumulative quantity and the third transaction cumulative quantity;
[0222] The transaction processing unit 116 is further configured to, when the second transaction cumulative quantity difference reaches a second quantity cumulative difference threshold indicated by the first transaction query request, notify the cumulative quantity determination module 12 to execute the step of determining the transaction resource quantity obtained from the first resource transfer transaction as the first transaction resource quantity.
[0223] For the specific implementation manners of the transaction acquisition module 11, the cumulative quantity determination module 12, the illegal transaction determination module 13, and the illegal transaction processing module 14, reference may be made to the relevant descriptions in the foregoing embodiments, and details will not be elaborated herein. It should be understood that the beneficial effects obtained by using the same method will not be elaborated either.
[0224] In the embodiments of the present application, the term "module" or "unit" refers to a computer program with a predetermined function or a part of a computer program, which works together with other related parts to achieve a predetermined goal, and can be fully or partially implemented by using software, hardware (such as a processing circuit or a memory), or a combination thereof. Similarly, one 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 a part of the overall module or unit including the function of the module or unit.
[0225] Further, please refer to Figure 14 , Figure 14 which is a schematic structural diagram of a computer device provided by an embodiment of the present application. As Figure 14 shown, the computer device 1200 may be a service terminal or a server, which will not be limited herein. For ease of understanding, the present application takes the computer device as a server as an example. The computer device 1200 may include: a processor 1201, a network interface 1204, and a memory 1205. In addition, the computer device 1200 may further include: a user interface 1203 and at least one communication bus 1202. Among them, the communication bus 1202 is used to implement connection communication between these components. Among them, the user interface 1203 may further include a standard wired interface and a wireless interface. The network interface 1204 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1205 may be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory. The memory 1205 may optionally be at least one storage device located far from the foregoing processor 1201. As Figure 14As shown, the memory 1205 as a computer-readable storage medium may include an operating system, a network communication module, a user interface module, and a device control application.
[0226] Wherein, the network interface 1204 in the computer device 1200 can also provide a network data interaction function. Figure 14 In the computer device 1200 shown in the figure, the network interface 1204 can provide a network data interaction function; the user interface 1203 is mainly used to provide an input interface for the user; and the processor 1201 can be used to call the device control application stored in the memory 1205 to execute the above-mentioned Figure 3 and Figure 7 The description of the transaction processing method in the corresponding embodiment can also be executed in the previous Figure 13 The description of the transaction processing device 1 in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated here.
[0227] In addition, it should be pointed out here that: the embodiment of the present application also provides a computer-readable storage medium, and the computer-readable storage medium stores a computer program executed by the transaction processing device 1 mentioned above, and the computer program includes computer instructions. When the processor executes the computer instructions, it can execute the above Figure 3 and Figure 7 The description of the transaction processing method in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated. For technical details not disclosed in the computer-readable storage medium embodiment involved in this application, please refer to the description of the method embodiment of this application. As an example, computer instructions can be deployed on a computing device for execution, or on multiple computing devices located in one location, or on multiple computing devices distributed in multiple locations and interconnected by a communication network. Multiple computing devices distributed in multiple locations and interconnected by a communication network can constitute a blockchain system.
[0228] In addition, it should be noted that: the embodiment of the present application also provides a computer program product or a computer program, which may include computer instructions, and the computer instructions may be stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor may execute the computer instructions, so that the computer device executes the above Figure 3 and Figure 7 The description of the transaction processing method in the corresponding embodiments will not be repeated here. In addition, the description of the beneficial effects of using the same method will not be repeated. For the technical details not disclosed in the computer program product or computer program embodiments involved in this application, please refer to the description of the method embodiments of this application.
[0229] It should be noted that for the foregoing method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations. However, those skilled in the art should know that this application is not limited by the described action sequence, because according to this application, some steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0230] The steps in the method embodiments of this application can be adjusted, combined, and deleted according to actual needs.
[0231] The modules in the device embodiments of this application can be combined, divided, and deleted according to actual needs.
[0232] Those of ordinary skill in the art can understand that all or part of the processes in the above method embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above method embodiments. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM), etc.
[0233] The foregoing disclosure is only for the preferred embodiments of this application, and of course cannot be used to limit the scope of rights of this application. Therefore, equivalent changes made according to the claims of this application still fall within the scope covered by this application.
Claims
1. A transaction processing method, characterized in that: The method comprises: Receive a first transaction query request sent by a business processing object to a business transaction object, and obtain a first resource transfer transaction and a second resource transfer transaction associated with the business transaction object from the blockchain based on the first transaction query request; the first resource transfer transaction is a transaction of the business transaction object on the first resource processing platform in a first transaction direction; the first transaction direction is the transaction direction when the business transaction object buys a transaction business resource; the second resource transfer transaction is a transaction of the business transaction object on the second resource processing platform in a second transaction direction; the second transaction direction is the transaction direction when the business transaction object sells the transaction business resource; the second transaction direction is different from the first transaction direction, and the second resource processing platform is different from the first resource processing platform; Determining the transaction resource amount obtained from the first resource transfer transaction as a first transaction resource amount, and performing data accumulation processing on the first transaction resource amount to obtain a first resource accumulation amount corresponding to the first transaction resource amount; Determining the transaction resource amount obtained from the second resource transfer transaction as the second transaction resource amount, and performing data accumulation processing on the second transaction resource amount to obtain a second resource accumulation amount corresponding to the second transaction resource amount; Determine a resource cumulative amount difference between the first resource cumulative amount and the second resource cumulative amount, and when the resource cumulative amount difference reaches a resource cumulative difference threshold indicated by the first transaction query request, determine the first resource transfer transaction and the second resource transfer transaction as illegal resource transfer transactions, and determine the business transaction object as an illegal transaction object corresponding to the illegal resource transfer transaction; Based on the illegal transaction object and the illegal resource transfer transaction, first query response information corresponding to the first transaction query request is determined, and the first query response information is returned to the business processing object.
2. The method according to claim 1, characterized in that The request timestamp of the first transaction query request is a first timestamp, the request timestamp of the second transaction query request associated with the first transaction query request is a second timestamp, and the second timestamp is earlier than the first timestamp; The acquiring, from the blockchain, a first resource transfer transaction and a second resource transfer transaction associated with the business transaction object based on the first transaction query request includes: Using a time period formed by the second timestamp and the first timestamp as a first query time period; Based on the transaction business resource indicated by the first transaction query request, obtaining from the blockchain a resource transfer transaction of the business transaction object for the transaction business resource within the first query time period, and using the obtained resource transfer transaction as a reference resource transfer transaction; The first resource transfer transaction and the second resource transfer transaction are acquired from the reference resource transfer transaction.
3. The method according to claim 2, characterized in that The reference resource transfer transaction includes a first type transfer transaction and a second type transfer transaction; the first type transfer transaction is a transaction of the business transaction object in the first transaction direction; the second type transfer transaction is a transaction of the business transaction object in the second transaction direction; The acquiring the first resource transfer transaction and the second resource transfer transaction from the reference resource transfer transaction comprises: Acquire a first type transfer transaction associated with the first resource processing platform from the first type transfer transaction, and determine the first resource transfer transaction based on the first type transfer transaction associated with the first resource processing platform; A second type transfer transaction associated with the second resource processing platform is obtained from the second type transfer transaction, and the second resource transfer transaction is determined based on the second type transfer transaction associated with the second resource processing platform.
4. The method according to claim 3, characterized in that The determining the first resource transfer transaction based on a first type of transfer transaction associated with the first resource processing platform includes: taking a first type of transfer transaction associated with the first resource processing platform as a first transfer transaction to be processed; When the transaction resource amount in the first transfer transaction to be processed is greater than the first resource amount threshold indicated by the first transaction query request, the first transfer transaction to be processed is used as the first resource transfer transaction.
5. The method according to claim 3, characterized in that: The resource processing platform associated with the business transaction object includes a first type processing platform and a second type processing platform; The method further comprises: obtaining, from the first type of transfer transactions, a first type of transfer transaction associated with the first type of processing platform; When the target resource accumulation amount of the first type transfer transaction associated with the first type processing platform reaches the resource accumulation amount threshold indicated by the first transaction query request, determining the first type processing platform as the first resource processing platform; The second type processing platform is determined as the second resource processing platform.
6. The method according to claim 3, characterized in that The resource processing platform associated with the business transaction object includes a first type processing platform and a second type processing platform; the first type transfer transaction includes a first transfer sub-transaction on the first type processing platform; The second type transfer transaction includes a second transfer sub-transaction on the second type processing platform; The method further comprises: Determining first target resource purchase information for the transaction business resource based on the resource purchase information obtained from the first transfer sub-transaction; Determining first target resource selling information for the transaction business resource based on the resource selling information obtained from the second transfer sub-transaction; If the buying information of the first target resource is lower than the buying information threshold indicated by the first transaction query request, and the selling information of the first target resource is higher than the selling information threshold indicated by the first transaction query request, the first type of processing platform is determined as the first resource processing platform, and the second type of processing platform is determined as the second resource processing platform.
7. The method according to claim 1, characterized in that When the resource accumulation difference reaches the resource accumulation difference threshold indicated by the first transaction query request, determining the first resource transfer transaction and the second resource transfer transaction as illegal resource transfer transactions includes: Determining a first transaction cumulative quantity of the first resource transfer transaction and a second transaction cumulative quantity of the second resource transfer transaction; determining a first transaction cumulative amount difference between the first transaction cumulative amount and the second transaction cumulative amount; When the resource cumulative quantity difference reaches the resource cumulative difference threshold indicated by the first transaction query request, and the first transaction cumulative quantity difference reaches the first quantity cumulative difference threshold indicated by the first transaction query request, the first resource transfer transaction and the second resource transfer transaction are determined as the illegal resource transfer transactions.
8. The method according to claim 1, characterized in that The first resource transfer transaction is a resource transfer-in transaction associated with the business transaction object; the second resource transfer transaction is a resource transfer-out transaction associated with the business transaction object; When the resource accumulation difference reaches the resource accumulation difference threshold indicated by the first transaction query request, determining the first resource transfer transaction and the second resource transfer transaction as illegal resource transfer transactions includes: Determining the transaction resource amount obtained from the resource transfer-in transaction as the transfer-in transaction resource amount, performing data accumulation processing on the transfer-in transaction resource amount, and obtaining a target transfer-in transaction resource amount corresponding to the transfer-in transaction resource amount; Determining the transaction resource amount obtained from the resource transfer-out transaction as the transfer-out transaction resource amount, performing data accumulation processing on the transfer-out transaction resource amount, and obtaining a target transfer-out transaction resource amount corresponding to the transfer-out transaction resource amount; Determine a first cumulative amount ratio between the first resource cumulative amount and the target transfer-in transaction resource amount, and determine a second cumulative amount ratio between the second resource cumulative amount and the target transfer-out transaction resource amount; When the difference in the resource cumulative amount reaches the resource cumulative amount difference threshold indicated by the first transaction query request, the first cumulative amount ratio reaches the transfer-in cumulative amount ratio threshold indicated by the first transaction query request, and the second cumulative amount ratio reaches the transfer-out cumulative amount ratio threshold indicated by the first transaction query request, the first resource transfer transaction and the second resource transfer transaction are determined as the illegal resource transfer transactions.
9. The method according to claim 1, characterized in that: The method further comprises: When the first target timestamp is reached, the resource transfer transaction of the business transaction object for the transaction business resource within the second query time period associated with the first target timestamp is obtained from the blockchain through the transaction processing contract; the end timestamp of the second query time period is the first target timestamp; the start timestamp of the second query time period is the second target timestamp corresponding to the first target timestamp; the duration of the second query time period is the target duration; the second target timestamp is earlier than the first target timestamp; The first resource transfer transaction and the second resource transfer transaction are acquired from resource transfer transactions for the transaction service resources within the second query time period.
10. The method according to claim 1, characterized in that The business transaction object as the illegal transaction object is used to generate illegal transaction description information generated for the illegal resource transfer transaction; The method further comprises: When receiving illegal transaction description information sent by the business transaction object that is the illegal transaction object, the illegal transaction description information is uploaded to the blockchain, and the illegal transaction description information is sent to the business processing object.
11. The method according to claim 10, characterized in that The business processing object is used to review and approve the illegal resource transfer transaction based on the illegal transaction description information, and generate illegal transaction release information for the illegal resource transfer transaction after the information is reviewed and approved; The method further comprises: When the illegal transaction release information sent by the business processing object is received, the business transaction object that is the illegal transaction object is updated from the illegal transaction object to the legal transaction object on the blockchain, and the illegal resource transfer transaction is updated to the legal resource transfer transaction corresponding to the legal transaction object.
12. The method according to claim 1, characterized in that Before determining the transaction resource amount obtained from the first resource transfer transaction as the first transaction resource amount, the method further includes: Acquire a third resource transfer transaction associated with the business transaction object; the third resource transfer transaction is a transaction of the business transaction object on the first resource processing platform in the direction of the second transaction; Determining a first transaction cumulative quantity of the first resource transfer transaction and a third transaction cumulative quantity of the third resource transfer transaction; determining a second transaction cumulative quantity difference between the first transaction cumulative quantity and the third transaction cumulative quantity; When the second transaction cumulative quantity difference reaches the second quantity cumulative difference threshold indicated by the first transaction query request, the step of determining the transaction resource quantity obtained from the first resource transfer transaction as the first transaction resource quantity is notified to be executed.
13. A transaction processing device, characterized in that: The device comprises: A transaction acquisition module, used to receive a first transaction query request sent by a business processing object to a business transaction object, and acquire a first resource transfer transaction and a second resource transfer transaction associated with the business transaction object from the blockchain based on the first transaction query request; the first resource transfer transaction is a transaction of the business transaction object on the first resource processing platform in a first transaction direction; the first transaction direction is the transaction direction when the business transaction object buys a transaction business resource; the second resource transfer transaction is a transaction of the business transaction object on the second resource processing platform in a second transaction direction; the second transaction direction is the transaction direction when the business transaction object sells the transaction business resource; the second transaction direction is different from the first transaction direction, and the second resource processing platform is different from the first resource processing platform; a cumulative amount determination module, configured to determine the transaction resource amount obtained from the first resource transfer transaction as a first transaction resource amount, perform data accumulation processing on the first transaction resource amount, and obtain a first resource cumulative amount corresponding to the first transaction resource amount; The cumulative amount determination module is further configured to determine the transaction resource amount obtained from the second resource transfer transaction as the second transaction resource amount, perform data accumulation processing on the second transaction resource amount, and obtain a second resource cumulative amount corresponding to the second transaction resource amount; an illegal transaction determination module, configured to determine a resource cumulative amount difference between the first resource cumulative amount and the second resource cumulative amount, and when the resource cumulative amount difference reaches a resource cumulative difference threshold indicated by the first transaction query request, determine the first resource transfer transaction and the second resource transfer transaction as illegal resource transfer transactions, and determine the business transaction object as an illegal transaction object corresponding to the illegal resource transfer transaction; The illegal transaction processing module is used to determine the first query response information corresponding to the first transaction query request based on the illegal transaction object and the illegal resource transfer transaction, and return the first query response information to the business processing object.
14. A computer device, characterized in that: including memory and processor; The memory is connected to the processor, the memory is used to store a computer program, and the processor is used to call the computer program so that the computer device executes the method according to any one of claims 1 to 12.
15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded and executed by a processor, so that a computer device having the processor executes the method according to any one of claims 1 to 12.
16. A computer program product, characterized in that The method comprises a computer program / instruction, which implements the method according to any one of claims 1 to 12 when executed by a processor.