Inverter transaction identification method, device and equipment, medium and program product
By constructing a fitness function and combining it with a distributed computing cluster, and by adopting dynamic scaling and message passing interfaces, the problems of insufficient accuracy and robustness in reverse transaction identification are solved, and efficient transaction identification and resource optimization are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- INDUSTRIAL AND COMMERCIAL BANK OF CHINA
- Filing Date
- 2026-03-12
- Publication Date
- 2026-05-15
AI Technical Summary
How to intelligently identify cross-border transactions between financial institutions while ensuring accuracy? Existing technologies lack accuracy and robustness, and are prone to underreporting, especially in scenarios with large-scale transaction data.
A fitness function is constructed to calculate the product and square of transaction data through binary decision variables. Combined with a distributed computing cluster, dynamic scaling and message passing interfaces are used to achieve parallel processing of transaction data and optimize resource allocation.
It significantly improves the accuracy and robustness of reverse transaction identification, solves the single-machine bottleneck and resource waste problem in large-scale transaction data scenarios, and improves the system's throughput and stability.
Smart Images

Figure CN122048518A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of distributed technology, specifically to the application of distributed technology in the field of financial technology, and more specifically to a method, apparatus, device, medium, and program product for identifying reverse transaction data. Background Technology
[0002] Reverse volume trading primarily manifests as transactions between financial institutions involving similar prices and amounts, resulting in a market characterized by relatively small price fluctuations but high transaction volumes. How to intelligently identify reverse volume trading while ensuring accuracy has become a pressing technical problem for those skilled in the art. Summary of the Invention
[0003] In view of the above problems, this application provides a highly accurate and intelligent method, apparatus, device, medium and program product for identifying reverse transaction volume.
[0004] According to a first aspect of this application, a method for identifying reverse transaction risk is provided, comprising: acquiring a transaction sequence, the transaction sequence including m transaction data, each transaction data including at least a transaction amount and a transaction direction, wherein the transaction direction includes a first transaction direction and a second transaction direction, the transaction amount of the first direction is identified as a positive value, the transaction amount of the second direction is identified as a negative value, and m is an integer greater than or equal to 2; constructing a fitness function for identifying reverse transaction combinations based on the transaction sequence, the input of the fitness function being a binary decision variable corresponding one-to-one with each transaction data in the transaction sequence, and the output of the fitness function being the square of the sum of all transaction data multiplied by their corresponding binary decision variables; determining a position vector of m elements in an input set, wherein the m elements correspond one-to-one with the m transaction data, and the position vector of each element is composed of the binary decision variables; using the input set as the input of the fitness function, calculating the output of the fitness function; when the output of the fitness function is zero, identifying the transaction corresponding to the binary decision variable with a value of 1 in the position vector of the current input set as a transaction combination with reverse transaction risk.
[0005] According to an embodiment of this application, the method for identifying reverse trading further includes: repeatedly executing the determination of the position vectors of m elements in the input set, stopping the repeated execution when a preset number of terminations is met, and obtaining at least one set of trading combinations with reverse trading risk.
[0006] According to an embodiment of this application, the step of determining the position vectors of m elements in the input set includes: when determining the position vectors of m elements in the input set for the first time, the position vectors of the m elements in the input set are initialized position vectors; when determining the position vectors of m elements in the input set is performed for two or more times, the position vectors of the m elements in the input set are updated according to the velocity vector of each element in the input set that is preset and the position vectors of the m elements determined in the previous time, wherein the velocity vector represents the update tendency of the binary decision variable.
[0007] According to an embodiment of this application, the step of using the input set as the input of the fitness function and calculating the output of the fitness function includes: when m is greater than or equal to a set threshold, dividing the m transaction data of the transaction sequence into n segmentation results, wherein each segmentation result includes kj transaction data, kj is an integer greater than or equal to 1 and less than m, j is an integer greater than or equal to 1 and less than or equal to n, and the sum of k1-kn is m; storing the n segmentation results one-to-one on n computing nodes; allocating the elements corresponding to the kj transaction data of each segmentation result to the corresponding computing nodes, and each computing node multiplies the position vector of the allocated element with the corresponding transaction data in parallel and then sums them to obtain n intermediate results; the coordination node receives the n intermediate results and uses the square of the sum of the n intermediate results as the output of the fitness function.
[0008] According to an embodiment of this application, the step of using the input set as the input of the fitness function and calculating the output of the fitness function further includes: when m is less than a set threshold, storing the m transaction data of the transaction sequence on a coordinating node; allocating the m elements of the input set to the coordinating node; and the coordinating node multiplying the m elements with the m transaction data one by one and then summing them to obtain the output of the fitness function.
[0009] According to an embodiment of this application, the computing nodes and the coordination node are deployed in a distributed computing cluster. The coordination node communicates with each computing node through a message passing interface and supports dynamic scaling to adapt to the processing needs of transaction sequences of different sizes.
[0010] A second aspect of this application provides a reverse transaction identification device, comprising: an acquisition module, the acquisition module being used to acquire a transaction sequence, the transaction sequence including m transaction data, each transaction data including at least a transaction amount and a transaction direction, wherein the transaction direction includes a first transaction direction and a second transaction direction, the transaction amount of the first direction is identified as a positive value, the transaction amount of the second direction is identified as a negative value, and m is an integer greater than or equal to 2; and a construction module, the construction module being used to construct a fitness function for identifying reverse transaction combinations based on the transaction sequence, the input of the fitness function being a binary decision variable corresponding one-to-one with each transaction data in the transaction sequence. The fitness function output is the square of the sum of all transaction data multiplied by their corresponding binary decision variables; the determination module is used to determine the position vectors of m elements in the input set, wherein the m elements correspond one-to-one with the m transaction data, and the position vector of each element is composed of the binary decision variables; the calculation module is used to use the input set as the input of the fitness function and calculate the output of the fitness function; the identification module is used to identify the transactions corresponding to the binary decision variables with a value of 1 in the position vector of the current input set as transaction combinations with inverse transaction risk when the output of the fitness function is zero.
[0011] According to a third aspect of this application, an electronic device is provided, comprising: one or more processors; and a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the method described above.
[0012] According to a fourth aspect of this application, a computer-readable storage medium is also provided, on which a computer program or instructions are stored, wherein the computer program or instructions, when executed by a processor, implement the steps of the above-described method.
[0013] According to a fifth aspect of this application, a computer program product is also provided, including a computer program or instructions that, when executed by a processor, implement the steps of the above-described method.
[0014] According to some embodiments of this application, by constructing a fitness function whose output is the square of the sum of all transaction data multiplied by their corresponding binary decision variables, and using a zero output of the fitness function as a criterion, the system can automatically identify the subset of transactions with zero net transaction amount, thereby adapting to the essential characteristics of reverse trading. The modeling method of this application effectively solves the technical problems of high false negative rate for reverse trading and weak generalization ability of existing identification methods in practice, significantly improving the accuracy and robustness of identification. Attached Figure Description
[0015] The above-mentioned contents, other objects, features and advantages of this application will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:
[0016] Figure 1 The illustration shows an application scenario of the reverse transaction identification method, apparatus, device, medium, and program product according to embodiments of this application.
[0017] Figure 2 A flowchart illustrating a reverse transaction identification method according to an embodiment of this application is shown.
[0018] Figure 3 A schematic block diagram of a reverse transaction identification device according to an embodiment of this application is shown.
[0019] Figure 4 A block diagram schematically illustrates an electronic device suitable for implementing a reverse transaction identification method according to an embodiment of this application. Detailed Implementation
[0020] The embodiments of this application will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of this application. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of this application for ease of explanation. However, it will be apparent that one or more embodiments may be implemented without these specific details. Furthermore, descriptions of well-known structures and technologies are omitted in the following description to avoid unnecessarily obscuring the concepts of this application.
[0021] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0022] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.
[0023] Figure 1 The diagram illustrates an application scenario of the reverse transaction identification method according to an embodiment of this application. For example... Figure 1As shown, application scenario 100 according to an embodiment of this application may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 serves as a medium for providing a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired or wireless communication links or fiber optic cables. For example, a user can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 through the network 104 to receive or send information, etc.
[0024] The first terminal device 101, the second terminal device 102, and the third terminal device 103 can be electronic devices such as smartphones, wearable devices, personal computers, intelligent voice interaction devices, smart home appliances, intelligent vehicles, in-vehicle terminals, aircraft, unmanned vending terminals, and extended reality devices. Extended reality devices can include virtual reality devices, augmented reality devices, and mixed reality devices. A client application for the target application can be installed and run on the terminal devices. This target application can include, but is not limited to, financial transaction applications, payment applications, shopping applications, web browser applications, search applications, instant messaging tools, email clients, and social media platform software (these are just examples). Furthermore, this application embodiment does not limit the form of the target application, and it can include, but is not limited to, applications, mini-programs, etc., installed on the terminal devices, and can also be in the form of web pages.
[0025] Server 105 can be a server providing various services, such as a backend management server supporting websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103 (this is just an example). The backend management server can analyze and process received user requests and other data, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices. The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services such as cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks, and basic cloud computing services such as big data. The server can be the backend server of the aforementioned target application, used to provide backend services to the clients of the target application.
[0026] It should be noted that the reverse transaction identification method provided in this application embodiment can generally be executed by server 105 and / or first terminal device 101, second terminal device 102, and third terminal device 103. Accordingly, the reverse transaction identification device provided in this application embodiment can generally be set in server 105 and / or first terminal device 101, second terminal device 102, and third terminal device 103.
[0027] The reverse transaction identification method provided in this application embodiment can be jointly executed by multiple computing nodes and collaborative nodes provided by server 105 and / or first terminal device 101, second terminal device 102, and third terminal device 103. The multiple computing nodes and collaborative nodes can be virtual computing units divided by server 105 and / or first terminal device 101, second terminal device 102, and third terminal device 103.
[0028] The reverse transaction identification method provided in this application can also be jointly executed by multiple computing nodes and collaborative nodes formed by multiple physical computing units provided by at least one server 105 and / or the first terminal device 101, the second terminal device 102, and the third terminal device 103. This application does not impose too many restrictions on the specific attributes of the multiple computing nodes and collaborative nodes as virtual computing units or physical computing units, and can make adaptive selections according to actual conditions.
[0029] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0030] Figure 2 A flowchart illustrating a method for identifying reverse transaction volume according to an embodiment of this application is shown. Figure 2 As shown, the reverse transaction identification method according to the embodiments of this application may include steps S210 to S250.
[0031] In step S210, a transaction sequence is obtained. The transaction sequence includes m transaction data. Each transaction data includes at least the transaction amount and the transaction direction. The transaction direction includes a first transaction direction and a second transaction direction. The transaction amount for the first direction is marked as a positive value, and the transaction amount for the second direction is marked as a negative value. m is an integer greater than or equal to 2.
[0032] In some examples, a transaction sequence refers to a data set containing multiple transaction records arranged in chronological or logical order, used as the input basis for reversible transaction identification. The data form of a transaction sequence can be represented as [P1, P2, ..., Pi, ..., Pm], where Pi is the amount of the i-th transaction.
[0033] In some examples, transaction data refers to a single record in a transaction sequence, which includes at least two fields: transaction amount and transaction direction, and is used to characterize a specific financial or asset transfer.
[0034] In some examples, the transaction amount refers to the numerical value representing the quantity of funds or assets in the transaction data. Its size reflects the scale of the transaction and is included in the calculation in a signed form in conjunction with the transaction direction.
[0035] In some examples, the transaction direction refers to an identifier used to distinguish the attributes of transaction behavior, including a first transaction direction (such as buying, fund inflow) and a second transaction direction (such as selling, fund outflow), where the transaction amount in the first direction can be identified as a positive value and the transaction amount in the second direction can be identified as a negative value.
[0036] In step S220, a fitness function for identifying inverse trading combinations is constructed based on the trading sequence. The input of the fitness function is a binary decision variable that corresponds one-to-one with each trading data in the trading sequence, and the output of the fitness function is the square of the sum of all trading data multiplied by their corresponding binary decision variables.
[0037] In some examples, the fitness function for identifying inverse trading portfolios is a mathematical function whose input can be binary decision variables that correspond one-to-one with each trading data in the trading sequence, and whose output can be the square of the sum of the results of multiplying each trading amount by its corresponding binary decision variable. This function is used to quantify whether the selected subset of trading in the trading sequence satisfies the inverse feature of a net amount of zero.
[0038] For example, the fitness function can be expressed as follows.
[0039] f(x) = .
[0040] Where i represents the i-th transaction, Pi is the transaction amount of the i-th transaction, and Xi is an element, which can only take the value 0 or 1. The minimum value of the fitness function is 0, and when the fitness function = 0, the transaction number with Xi as 1 is the reverse transaction.
[0041] In some examples, binary decision variables are variables that take the value 0 or 1 and correspond one-to-one with each transaction in the transaction sequence. They are used to indicate whether the transaction is selected into the current transaction portfolio to be evaluated (1 indicates selection, 0 indicates non-selection).
[0042] In step S230, the position vectors of m elements in the input set are determined, wherein each of the m elements corresponds one-to-one with a transaction data point, and the position vector of each element is composed of binary decision variables.
[0043] In some examples, the input set refers to a set of m binary decision variables that serve as input to the fitness function, representing a specific subset of transactions to choose from.
[0044] In some examples, an element refers to a single binary decision variable in the input set corresponding to a particular transaction data point, with a total of m elements, each of which independently participates in the calculation of the fitness function.
[0045] In some examples, a position vector is a vector consisting of m binary decision variables arranged in the order of the transaction sequence, used to uniquely identify the state of each element in the input set, that is, the encoded representation of the transaction combination currently under consideration.
[0046] Assuming m is 9, for example, an input set might be represented as [0,0,1,0,1,0,0,1,0]. The 9 elements in the input set correspond one-to-one with 9 transaction data points, where 1 indicates that the transaction data is selected, and 0 indicates that the transaction data is not selected. The above example is merely illustrative and should not be construed as limiting this application.
[0047] In step S240, the input set is used as the input to the fitness function, and the output of the fitness function is calculated.
[0048] In step S250, when the output of the fitness function is zero, the transactions corresponding to the binary decision variables with a value of 1 in the position vector of the current input set are identified as transaction combinations with reciprocal transaction risk.
[0049] In some examples, the trading portfolio with reverse trading risk refers to the subset of trading data corresponding to the binary decision variables with a value of 1 in the position vector when the fitness function output is zero. This subset satisfies the condition that the net trading amount is zero and is therefore judged to be suspected of reverse trading.
[0050] According to the reverse transaction identification method of this application, a fitness function is constructed whose output is the square of the sum of all transaction data multiplied by their corresponding binary decision variables. The system uses a zero output of the fitness function as a criterion, enabling it to automatically identify a subset of transactions with zero net transaction amount, thus adapting to the essential characteristics of reverse transactions. The modeling approach of this application effectively solves the technical problems of high false negative rates and weak generalization ability of existing identification methods in practice, significantly improving the accuracy and robustness of identification.
[0051] According to some embodiments of this application, the reverse transaction identification method may also include repeatedly executing steps.
[0052] Repeated execution steps: Repeatedly execute the position vectors of m elements in the determined input set. When the preset number of terminations is met, stop the repeated execution and obtain at least one set of trading combinations with reversal trading risk.
[0053] In some examples, this embodiment introduces a repetitive execution mechanism, which continuously searches the solution space by generating and evaluating different position vectors (i.e., different combinations of transaction subsets) multiple times before reaching a preset termination number. Since the fitness function has multiple solutions that can result in a zero output (corresponding to different inverse combinations), a single attempt may miss valid solutions. This repetitive mechanism expands the search coverage, increases the probability of discovering potential inverse transaction combinations, and thus enhances the comprehensiveness and reliability of the identification, making it particularly suitable for complex scenarios with massive amounts of transaction data.
[0054] According to some embodiments of this application, the step of determining the position vectors of m elements in the input set may include a first determination sub-step and a second determination sub-step.
[0055] The first determination sub-step: When determining the position vectors of the m elements in the input set for the first time, the position vectors of the m elements in the input set are the initialized position vectors.
[0056] In some examples, upon initial execution, the system needs to assign initial values to m binary decision variables (such as randomly generated or set according to preset rules) to form an initial position vector, which serves as the starting point for subsequent optimization searches, ensuring that the algorithm has a clear initial state to enter the iteration process.
[0057] The second determination sub-step: When the position vectors of m elements in the input set are determined more than or equal to 2 times, the position vectors of m elements in the input set are updated according to the velocity vector of each element in the input set and the position vectors of the m elements determined in the previous step. Here, the velocity vector represents the update tendency of the binary decision variable.
[0058] In some examples, in the second and subsequent executions, the system no longer randomly generates position vectors. Instead, it updates them using an iterative mechanism based on optimization algorithms (such as binary particle swarm optimization): each element (i.e., a binary decision variable) is associated with a velocity vector, representing its probabilistic tendency to change from 0 to 1 or from 1 to 0; this velocity vector is dynamically adjusted by combining individual historical bests and group information. Subsequently, based on the current velocity vector and the previous position vector, the values of each element in the new position vector are determined through a probability mapping (such as the sigmoid function). This mechanism makes the search process directional and memory-based, avoiding blind trial and error, significantly improving convergence efficiency and solution quality, thus more efficiently approximating the inverse trade combination that makes the fitness function output zero.
[0059] For example, this embodiment introduces a position update mechanism based on velocity vectors, so that the evolution of the position vector is no longer random, but a directed search is performed based on the previous state and the velocity vector (representing the update tendency of binary variables). Since the fitness function has a complex solution space, blind sampling is inefficient; however, this mechanism draws on the idea of swarm intelligence optimization, retains historical search information and guides the variable flipping probability, thereby accelerating convergence to an effective solution that makes the fitness function output zero, significantly improving the identification efficiency and stability of reverse transaction combinations.
[0060] The above embodiments do not consider the collaborative design of the computing architecture and algorithm logic. On the one hand, the calculation of the fitness function has inherent parallelism (independent weighted summation of each transaction), but if it is forced to be executed on a single node, it not only wastes computing resources but also easily leads to CPU overload and memory overflow. On the other hand, when distributed processing is adopted, if there is a lack of fine-grained control over data sharding, task scheduling, and node communication, the benefits of parallelism may be offset by network overhead, uneven load, or failure to synchronize intermediate results. In addition, the fixed topology deployment method is difficult to adapt to the dynamic fluctuations of transaction traffic, resulting in idle resources during off-peak periods and inability to elastically expand during peak periods, which seriously affects the availability and cost-effectiveness of the system.
[0061] Therefore, how to effectively reduce the computing load and memory pressure of a single node, optimize storage and communication overhead, and support dynamic scaling and secure collaboration of computing resources while ensuring the accuracy of identification, and thus balance high throughput, low latency and system robustness, remains a technical problem that those skilled in the art urgently need to solve.
[0062] The reverse transaction identification method according to the embodiments of this application includes a step of using the input set as the input of the fitness function and calculating the output of the fitness function, which may include a segmentation step, a first storage step, a calculation step and a first output step.
[0063] Segmentation steps: When m is greater than or equal to the set threshold, the m transaction data in the transaction sequence are segmented to obtain n segmentation results. Each segmentation result includes kj transaction data, where kj is an integer greater than or equal to 1 and less than m, j is an integer greater than or equal to 1 and less than or equal to n, and the sum of k1-kn is m.
[0064] The first storage step is to store the n partitioning results one-to-one on the n computing nodes.
[0065] Calculation steps: Assign the elements corresponding to the kj transaction data of each segmentation result to the corresponding computing nodes. Each computing node multiplies the position vector of the assigned element with the corresponding transaction data in parallel and then sums them to obtain n intermediate results.
[0066] First output step: The coordinating node receives n intermediate results and uses the square of the sum of the n intermediate results as the output of the fitness function.
[0067] In some examples, this embodiment achieves the co-design of algorithm logic and distributed architecture by dividing a large-scale transaction sequence and distributing it to multiple computing nodes for parallel processing. Since the fitness function is essentially a global summation of the product of each transaction data point and its corresponding binary decision variable, this operation is highly decomposable (the sum equals the sum of the local sums of each subset). Accordingly, this embodiment divides m transaction data into n subsets, each with its own local summation performed in parallel by n computing nodes. The coordinating node only needs to aggregate n intermediate results to obtain the final output. This mechanism avoids memory overflow and CPU overload caused by a single node loading the entire dataset, significantly reducing resource pressure. Simultaneously, parallel computing drastically shortens the latency of a single fitness evaluation, providing performance guarantees for the iterative optimization in the aforementioned embodiments. The complete process defined in this embodiment—including the partitioning step, the first storage step, the computation step, and the first output step—ensures that while utilizing parallelism, it avoids uneven load distribution or synchronization failures caused by disordered partitioning or communication chaos, thus truly realizing the efficiency benefits of distributed computing. Therefore, while ensuring the accuracy of identification (the mathematical definition of the fitness function remains unchanged), this embodiment effectively solves the problems of single-machine bottleneck and performance loss caused by extensive distributed systems in large-scale scenarios, and improves the throughput and stability of the system.
[0068] According to some embodiments of this application, the step of using the input set as the input of the fitness function and calculating the output of the fitness function may further include a second storage step, an allocation step, and a second output step.
[0069] The second storage step: When m is less than the set threshold, store the m transaction data of the transaction sequence on the coordinating node.
[0070] Allocation steps: Assign the m elements of the input set to the coordinating node.
[0071] The second output step: The coordinating node multiplies the m elements with the m transaction data one by one and then sums them to obtain the output of the fitness function.
[0072] In some examples, this embodiment targets scenarios with small transaction sequence sizes (m < a set threshold), where all transaction data and decision variables are computed locally on the coordinating node, avoiding unnecessary data sharding, task distribution, and cross-node communication. Since the computational overhead for small-scale data is low, the benefits of parallelization far outweigh the network transmission and scheduling latency; forced distribution actually reduces efficiency. This solution adaptively determines the data size and intelligently selects a centralized processing path, effectively saving system resources, reducing communication overhead, and improving overall execution efficiency while ensuring the integrity of the fitness function calculation. This demonstrates the synergistic optimization of computational strategy and data scale.
[0073] According to some embodiments of this application, computing nodes and coordination nodes are deployed in a distributed computing cluster. The coordination node communicates with each computing node through a message passing interface and supports dynamic scaling to adapt to the processing needs of transaction sequences of different sizes.
[0074] In some examples, this embodiment deploys computing nodes and coordination nodes in a distributed computing cluster and communicates through a message passing interface, enabling the system to possess production-grade scalability and robustness. Since the parallel and local computing logic coordination in the above embodiments relies on multi-node collaboration, if nodes are deployed in a fixed, static manner, it is difficult to cope with fluctuations in transaction traffic: resources are idle during off-peak periods, and cannot be scaled up during peak periods. This application, however, supports dynamic scaling, allowing for elastic adjustment of computing resources based on actual load; simultaneously, the standardized message interface not only ensures efficient and reliable data exchange between nodes but also integrates encryption mechanisms to enhance the security of sensitive transaction data transmission. Thus, while maintaining high identification accuracy, it significantly enhances the system's availability, resource utilization, and secure collaboration capabilities.
[0075] Based on the above-described method for identifying reverse trading, this application also provides a device for identifying reverse trading. The following will be combined with... Figure 3 The device is described in detail.
[0076] Figure 3 A schematic block diagram of a reverse transaction identification device according to an embodiment of this application is shown.
[0077] like Figure 3 As shown, the reverse transaction identification device 10 includes an acquisition module 1, a construction module 2, a determination module 3, a calculation module 4, and an identification module 5.
[0078] The acquisition module 1 is used to acquire the transaction sequence. The transaction sequence includes m transaction data. Each transaction data includes at least the transaction amount and the transaction direction. The transaction direction includes a first transaction direction and a second transaction direction. The transaction amount for the first direction is marked as a positive value, and the transaction amount for the second direction is marked as a negative value. m is an integer greater than or equal to 2.
[0079] Module 2 is used to construct a fitness function for identifying inverse trading combinations based on the trading sequence. The input of the fitness function is a binary decision variable that corresponds one-to-one with each trading data in the trading sequence, and the output of the fitness function is the square of the sum of all trading data multiplied by their corresponding binary decision variables.
[0080] The determination module 3 is used to determine the position vectors of m elements in the input set, where each of the m elements corresponds one-to-one with a transaction data point, and the position vector of each element is composed of binary decision variables.
[0081] The computation module 4 is used to take the input set as the input of the fitness function and calculate the output of the fitness function.
[0082] The identification module 5 is used to identify the transactions corresponding to binary decision variables with a value of 1 in the current input set position vector as transaction combinations with reversal risk when the output of the fitness function is zero.
[0083] According to some embodiments of this application, the reverse transaction identification device may further include a repetitive execution module.
[0084] Repeated execution module: Repeatedly executes the position vectors of m elements in the input set. When the preset number of terminations is met, the repeated execution stops, resulting in at least one set of trading combinations with reversal trading risk.
[0085] According to some embodiments of this application, the determining module may include a first determining subunit and a second determining subunit.
[0086] First determined subunit: When determining the position vectors of m elements in the input set for the first time, the position vectors of the m elements in the input set are the initialized position vectors.
[0087] The second determining subunit: When determining the position vectors of m elements in the input set for more than or equal to 2 times, the position vectors of m elements in the input set are updated according to the velocity vector of each element in the input set and the position vectors of the m elements determined in the previous time. Here, the velocity vector represents the update tendency of the binary decision variable.
[0088] According to some embodiments of this application, the computing module may include a segmentation unit, a first storage unit, a computing unit, and a first output unit.
[0089] Segmentation Unit: When m is greater than or equal to a set threshold, the m transaction data in the transaction sequence are segmented to obtain n segmentation results. Each segmentation result includes kj transaction data, where kj is an integer greater than or equal to 1 and less than m, j is an integer greater than or equal to 1 and less than or equal to n, and the sum of k1-kn is m.
[0090] The first storage unit stores the n partitioning results one-to-one on the n computing nodes.
[0091] Calculation Unit: The elements corresponding to the kj transaction data of each segmentation result are assigned to the corresponding calculation nodes. Each calculation node multiplies the position vector of the assigned element with the corresponding transaction data in parallel and then sums them to obtain n intermediate results.
[0092] First output unit: The coordinating node receives n intermediate results and uses the square of the sum of the n intermediate results as the output of the fitness function.
[0093] According to some embodiments of this application, the computing module may further include a second storage unit, an allocation unit, and a second output unit.
[0094] Second storage unit: When m is less than the set threshold, the m transaction data of the transaction sequence are stored on the coordinating node.
[0095] Allocation Unit: Assigns the m elements of the input set to the coordinating node.
[0096] The second output unit: The coordinating node multiplies the m elements with the m transaction data one by one and then sums them to obtain the output of the fitness function.
[0097] According to the embodiments of this application, the reverse transaction identification device constructs a fitness function whose output is the square of the sum of all transaction data multiplied by their corresponding binary decision variables. The system uses a zero output of the fitness function as a criterion, enabling it to automatically identify a subset of transactions with zero net transaction amount, thus adapting to the essential characteristics of reverse transactions. The modeling method of this application effectively solves the technical problems of high false negative rates and weak generalization ability of existing identification methods in practice, significantly improving the accuracy and robustness of identification.
[0098] According to embodiments of this application, any multiple modules among the acquisition module 1, construction module 2, determination module 3, calculation module 4, and identification module 5 can be merged into one module, or any one of these modules can be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules can be combined with at least part of the functionality of other modules and implemented in one module. According to embodiments of this application, at least one of the acquisition module 1, construction module 2, determination module 3, calculation module 4, and identification module 5 can be at least partially implemented as a hardware circuit, such as a field-programmable gate array, a programmable logic array, a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit, or implemented by any other reasonable means of integrating or packaging the circuit, or implemented in software, hardware, or firmware, or by any appropriate combination of any of these three implementation methods. Alternatively, at least one of the acquisition module 1, construction module 2, determination module 3, calculation module 4, and identification module 5 can be at least partially implemented as a computer program module, which can perform corresponding functions when the computer program module is run.
[0099] Figure 4 A block diagram schematically illustrates an electronic device suitable for implementing the above-described method according to an embodiment of this application.
[0100] like Figure 4 As shown, an electronic device 900 according to an embodiment of this application includes a processor 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory 902 or a program loaded from a storage portion 908 into a random access memory 903. The processor 901 may include, for example, a general-purpose microprocessor, an instruction set processor and / or an associated chipset and / or a dedicated microprocessor. The processor 901 may also include onboard memory for caching purposes. The processor 901 may include a single processing unit or multiple processing units for executing different steps of the method flow according to an embodiment of this application.
[0101] Random access memory 903 stores various programs and data required for the operation of electronic device 900. Processor 901, read-only memory 902, and random access memory 903 are interconnected via bus 904. Processor 901 executes various steps of the method flow according to embodiments of this application by executing programs stored in read-only memory 902 and / or random access memory 903. It should be noted that the programs may also be stored in one or more memories other than read-only memory 902 and random access memory 903. Processor 901 may also execute various steps of the method flow according to embodiments of this application by executing programs stored in said one or more memories.
[0102] According to embodiments of this application, the electronic device 900 may further include an input / output interface 905, which is also connected to a bus 904. The electronic device 900 may also include one or more of the following components connected to the input / output interface 905: an input section 906 including a keyboard, mouse, etc.; an output section 907 including a cathode ray tube, liquid crystal display, etc., and a speaker, etc.; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card, such as a local area network card, modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the input / output interface 905 as needed. A removable medium 911, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 910 as needed so that computer programs read from it can be installed into the storage section 908 as needed.
[0103] Embodiments of this application also provide a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs, which, when executed, implement the method according to the embodiments of this application.
[0104] According to embodiments of this application, the computer-readable storage medium can be a non-volatile computer-readable storage medium, such as including but not limited to: portable computer disks, hard disks, random access memory, read-only memory, erasable programmable read-only memory, portable compact disk read-only memory, optical storage devices, magnetic storage devices, or any suitable combination thereof. In embodiments of this application, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of this application, the computer-readable storage medium may include the read-only memory 902 described above, and / or random access memory 903, and / or one or more memories other than read-only memory 902 and random access memory 903.
[0105] Embodiments of this application also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowchart. When the computer program product is run on a computer system, the program code is used to cause the computer system to implement the methods provided in the embodiments of this application.
[0106] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and downloaded and installed via the communication section 909, and / or installed from a removable medium 911. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.
[0107] In embodiments of this application, the computer program can be downloaded and installed from a network via communication section 909, and / or installed from removable medium 911. When the computer program is executed by processor 901, it performs the functions defined in the system of embodiments of this application. According to embodiments of this application, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0108] According to embodiments of this application, program code for executing the computer programs provided in the embodiments of this application can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. The program code can be executed entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0109] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0110] Those skilled in the art will understand that the features described in the various embodiments of this application can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in this application. In particular, the features described in the various embodiments of this application can be combined and / or combined in various ways without departing from the spirit and teachings of this application. All such combinations and / or combinations fall within the scope of this application.
Claims
1. A method for identifying reverse volume transactions, characterized in that, include: Obtain a transaction sequence, which includes m transaction data. Each transaction data includes at least a transaction amount and a transaction direction. The transaction direction includes a first transaction direction and a second transaction direction. The transaction amount for the first direction is marked as a positive value, and the transaction amount for the second direction is marked as a negative value. m is an integer greater than or equal to 2. A fitness function for identifying inverse trading combinations is constructed based on the trading sequence. The input of the fitness function is a binary decision variable that corresponds one-to-one with each trading data in the trading sequence. The output of the fitness function is the square of the sum of all trading data multiplied by their corresponding binary decision variables. Determine the position vectors of m elements in the input set, wherein the m elements correspond one-to-one with the m transaction data, and the position vector of each element is composed of the binary decision variables; Using the input set as input to the fitness function, calculate the output of the fitness function; When the output of the fitness function is zero, the transactions corresponding to the binary decision variables with a value of 1 in the position vector of the current input set are identified as transaction combinations with reversal risk.
2. The method for identifying reverse transaction volume according to claim 1, characterized in that, Also includes: Repeatedly execute the position vectors of m elements in the input set. When the preset number of terminations is met, stop the repeated execution and obtain at least one set of trading combinations with reversal risk.
3. The method for identifying reverse transaction volume according to claim 1, characterized in that, The steps to determine the position vectors of m elements in the input set include: When determining the position vectors of m elements in the input set for the first time, the position vectors of the m elements in the input set are the initialized position vectors; When the position vectors of m elements in the input set are determined more than or equal to 2 times, the position vectors of the m elements in the input set are updated according to the velocity vector of each element in the input set that is preset and the position vectors of the m elements determined in the previous time. The velocity vector represents the update tendency of the binary decision variable.
4. The method for identifying reverse transaction volume according to claim 1, characterized in that, The step of using the input set as input to the fitness function and calculating the output of the fitness function includes: When m is greater than or equal to a set threshold, the m transaction data of the transaction sequence are divided into n division results, wherein each division result includes kj transaction data, kj is an integer greater than or equal to 1 and less than m, j is an integer greater than or equal to 1 and less than or equal to n, and the sum of k1-kn is m; The n segmentation results are stored one-to-one on the n computing nodes; The elements corresponding to the kj transaction data of each segmentation result are assigned to the corresponding computing nodes. Each computing node multiplies the position vector of the assigned element with the corresponding transaction data in parallel and then sums them to obtain n intermediate results. The coordinating node receives the n intermediate results and uses the square of the sum of the n intermediate results as the output of the fitness function.
5. The method for identifying reverse volume transactions according to claim 4, characterized in that, The step of using the input set as input to the fitness function and calculating the output of the fitness function further includes: When m is less than the set threshold, the m transaction data of the transaction sequence are stored on the coordination node; Assign the m elements of the input set to the coordinating node; The coordinating node multiplies the m elements with the m transaction data in a one-to-one correspondence and then sums them to obtain the output of the fitness function.
6. The method for identifying reverse transaction volume according to claim 4 or 5, characterized in that, The computing nodes and the coordination node are deployed in a distributed computing cluster. The coordination node communicates with each computing node through a message passing interface and supports dynamic scaling to adapt to the processing needs of transaction sequences of different sizes.
7. A reverse transaction identification device, characterized in that, include: The acquisition module is used to acquire a transaction sequence, which includes m transaction data. Each transaction data includes at least a transaction amount and a transaction direction. The transaction direction includes a first transaction direction and a second transaction direction. The transaction amount for the first direction is marked as a positive value, and the transaction amount for the second direction is marked as a negative value. m is an integer greater than or equal to 2. The construction module is used to construct a fitness function for identifying inverse trading combinations based on the trading sequence. The input of the fitness function is a binary decision variable that corresponds one-to-one with each trading data in the trading sequence, and the output of the fitness function is the square of the sum of all trading data multiplied by their corresponding binary decision variables. The determining module is used to determine the position vectors of m elements in the input set, wherein the m elements correspond one-to-one with the m transaction data, and the position vector of each element is composed of the binary decision variables; A calculation module is used to take the input set as the input of the fitness function and calculate the output of the fitness function; The identification module is used to identify the transactions corresponding to binary decision variables with a value of 1 in the current input set as transaction combinations with reversible transaction risk when the output of the fitness function is zero.
8. An electronic device, comprising: One or more processors; Memory, used to store one or more computer programs. The characteristic feature is that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program or instructions stored thereon, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method according to any one of claims 1 to 6.