CN115545937B - Transaction simulation method and device, electronic equipment and readable storage medium - Google Patents
Transaction simulation method and device, electronic equipment and readable storage medium Download PDFInfo
- Publication number
- CN115545937B CN115545937B CN202211506398.7A CN202211506398A CN115545937B CN 115545937 B CN115545937 B CN 115545937B CN 202211506398 A CN202211506398 A CN 202211506398A CN 115545937 B CN115545937 B CN 115545937B
- Authority
- CN
- China
- Prior art keywords
- transaction
- virtual
- strategy
- wind control
- virtual platform
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 53
- 238000004088 simulation Methods 0.000 title claims abstract description 36
- 238000011217 control strategy Methods 0.000 claims abstract description 83
- 238000001514 detection method Methods 0.000 claims abstract description 36
- 230000008569 process Effects 0.000 claims abstract description 23
- 230000000903 blocking effect Effects 0.000 claims description 18
- 230000000977 initiatory effect Effects 0.000 claims description 15
- 238000012795 verification Methods 0.000 claims description 11
- 238000005070 sampling Methods 0.000 claims description 7
- 230000008859 change Effects 0.000 abstract description 5
- 238000011835 investigation Methods 0.000 abstract 1
- 238000010586 diagram Methods 0.000 description 10
- 230000009471 action Effects 0.000 description 7
- 238000004364 calculation method Methods 0.000 description 5
- 230000003044 adaptive effect Effects 0.000 description 4
- 125000004122 cyclic group Chemical group 0.000 description 4
- 230000002265 prevention Effects 0.000 description 3
- 230000008901 benefit Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000009191 jumping Effects 0.000 description 2
- 230000007774 longterm Effects 0.000 description 2
- 230000006399 behavior Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000004900 laundering Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000004083 survival effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q40/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/04—Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
Landscapes
- Business, Economics & Management (AREA)
- Accounting & Taxation (AREA)
- Finance (AREA)
- Engineering & Computer Science (AREA)
- Development Economics (AREA)
- Economics (AREA)
- Marketing (AREA)
- Strategic Management (AREA)
- Technology Law (AREA)
- Physics & Mathematics (AREA)
- General Business, Economics & Management (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention provides a transaction simulation method, a transaction simulation device, electronic equipment and a readable storage medium, wherein the method comprises the following steps: generating a plurality of virtual platforms and a plurality of virtual users; randomly distributing a transaction strategy for each virtual user, and randomly distributing a wind control strategy for each virtual platform; sending a first instruction to each virtual user, and instructing the virtual users to initiate simulated transaction to each virtual platform according to the pre-distributed transaction strategy; sending a second instruction to each virtual platform, and instructing the virtual platforms to process the simulated transaction according to the pre-distributed wind control strategy; detecting whether all the simulated transactions are processed and completed by each virtual platform; and if the detection result indicates that all the simulated transactions are processed and completed by each virtual platform, acquiring all transaction processing results of the simulated transactions, and determining an optimal transaction strategy and an optimal wind control strategy according to the transaction processing results. The invention avoids the huge cost required by manual transaction investigation and adapts to the rapid change of illegal transaction risks.
Description
Technical Field
The embodiment of the invention relates to the technical field of internet finance, in particular to a transaction simulation method, a transaction simulation device, electronic equipment and a readable storage medium.
Background
The internet financial platform faces various and rapidly-changing illegal transaction risks (such as money laundering, credit card embezzlement and the like), so that the internet financial platform invests huge manpower and material resources in the aspect of transaction risk prevention and control.
However, as the transaction amount of the internet financial platform continuously increases, the cost of the existing method for manually checking the transaction risk is huge, and most of the existing methods are used for prevention and control according to the transaction data of the transaction, so that the method is difficult to adapt to the rapid change of the illegal transaction risk after the later knowledge.
Disclosure of Invention
The embodiment of the invention provides a transaction simulation method, a transaction simulation device, electronic equipment and a readable storage medium, which aim to solve the problems that the existing method for manually checking transaction risks is huge in cost, mostly performs prevention and control according to transaction data of transactions which have already occurred, and is difficult to adapt to rapid change of illegal transaction risks due to the fact that the transaction data are known later.
In order to solve the technical problem, the invention is realized as follows:
in a first aspect, an embodiment of the present invention provides a transaction simulation method, including:
a generation step: generating a plurality of virtual platforms and a plurality of virtual users;
a distribution step: randomly distributing a transaction strategy for each virtual user, and randomly distributing a wind control strategy for each virtual platform; the transaction strategy is a strategy for initiating normal transactions and deceptive transactions, and the wind control strategy is a strategy for releasing or blocking simulated transactions initiated by the user;
and (3) circulating transaction steps: sending a first instruction to each virtual user, wherein the first instruction is used for instructing the virtual users to initiate simulated transaction to each virtual platform according to a pre-distributed transaction strategy; sending a second instruction to each virtual platform, wherein the second instruction is used for instructing the virtual platform to process the simulated transaction according to a pre-distributed wind control strategy;
a detection step: detecting whether all the simulated transactions are processed and completed by each virtual platform or not to obtain a detection result;
a first execution step: and if the detection result is that all the simulated transactions are processed and completed by each virtual platform, acquiring all transaction processing results of the simulated transactions, and determining the optimal transaction strategy and the optimal wind control strategy according to the transaction processing results.
Or,
determining the optimal transaction strategy and the optimal wind control strategy according to the transaction processing result, wherein the determining comprises the following steps:
grading each transaction processing result by adopting a preset transaction model to obtain a grading value;
and determining the optimal transaction strategy and the optimal wind control strategy according to the score, the transaction strategy in the transaction processing result corresponding to the score and the wind control strategy in the transaction processing result corresponding to the score.
Or,
determining the optimal transaction strategy and the optimal wind control strategy according to the transaction processing result, wherein the determining comprises the following steps:
determining a target transaction processing result in all the transaction processing results according to a preset sampling rule;
grading each target transaction processing result by adopting a preset transaction model to obtain a target grading value;
and determining the optimal transaction strategy and the optimal wind control strategy according to the target score value, the transaction strategy in the target transaction processing result corresponding to the target score value and the wind control strategy in the target transaction processing result corresponding to the target score value.
Or,
the detecting step, thereafter, comprises:
the second execution step: if the detection result indicates that the virtual platform does not process and complete all the simulated transactions, the step of executing the circular transactions is suspended, whether the virtual platform completes all the simulated transactions in the current metering section is verified, and a verification result is obtained;
the third execution step: if the verification result is that the virtual platform completes all the simulated transactions in the current metering section, acquiring a section transaction processing result of the simulated transactions in the current metering section; obtaining the selected virtual user and the selected virtual platform according to the segmented transaction processing result and a preset selection rule;
the fourth execution step: and continuously executing the circulating transaction step by using the virtual user library updated by the selected virtual user and the virtual platform library updated by the selected virtual platform until the detection result is that the virtual platform processes all the simulated transactions.
In a second aspect, an embodiment of the present invention provides a transaction simulation apparatus, including:
a generating module for generating: generating a plurality of virtual platforms and a plurality of virtual users;
an assignment module for assigning steps: randomly distributing a transaction strategy for each virtual user, and randomly distributing a wind control strategy for each virtual platform; the transaction strategy is a strategy for initiating normal transactions and deceptive transactions, and the wind control strategy is a strategy for releasing or blocking simulated transactions initiated by the user;
the circulation trading module is used for circulating trading steps: sending a first instruction to each virtual user, wherein the first instruction is used for instructing the virtual users to initiate simulated transaction to each virtual platform according to a pre-distributed transaction strategy; sending a second instruction to each virtual platform, wherein the second instruction is used for instructing the virtual platforms to process the simulated transaction according to the pre-distributed wind control strategy;
a detection module, further configured to detect: detecting whether all the simulated transactions are processed by each virtual platform or not to obtain a detection result;
a first execution module for performing the first step: and if the detection result is that all the simulated transactions are processed and completed by each virtual platform, acquiring all transaction processing results of the simulated transactions, and determining the optimal transaction strategy and the optimal wind control strategy according to the transaction processing results.
Alternatively,
the first execution module is further used for scoring each transaction processing result by adopting a preset transaction model to obtain a scoring score;
the first execution module is further configured to determine an optimal transaction strategy and an optimal wind control strategy according to the score, the transaction strategy in the transaction processing result corresponding to the score, and the wind control strategy in the transaction processing result corresponding to the score.
Or,
the first execution module is further used for determining a target transaction processing result in all the transaction processing results according to a preset sampling rule;
the first execution module is further used for scoring each target transaction processing result by adopting a preset transaction model to obtain a target scoring value;
the first execution module is further configured to determine an optimal transaction strategy and an optimal wind control strategy according to the target score value, a transaction strategy in a target transaction processing result corresponding to the target score value, and a wind control strategy in a target transaction processing result corresponding to the target score value.
Alternatively,
a second execution module for performing the second step: if the detection result indicates that the virtual platform does not process and complete all the simulated transactions, suspending the execution of the cyclic transaction step, and verifying whether the virtual platform completes all the simulated transactions in the current metering section to obtain a verification result;
a third executing module, configured to execute the third step: if the verification result is that the virtual platform completes all the simulated transactions in the current metering section, acquiring a section transaction processing result of the simulated transactions in the current metering section; obtaining the selected virtual user and the selected virtual platform according to the segmented transaction processing result and a preset selection rule;
a fourth execution module, configured to perform the fourth step: and continuously executing the circulating transaction step by using the virtual user library updated by the selected virtual user and the virtual platform library updated by the selected virtual platform until the detection result is that the virtual platform processes all the simulated transactions.
In a third aspect, an embodiment of the present invention provides an electronic device, including a processor, a memory, and a program or instructions stored on the memory and executable on the processor, where the program or instructions, when executed by the processor, implement the steps in the transaction simulation method according to any one of the first aspect.
In a fourth aspect, embodiments of the present invention provide a readable storage medium, on which a program or instructions are stored, which when executed by a processor implement the steps in the transaction simulation method according to any one of the first aspect.
In the embodiment of the invention, a plurality of virtual platforms and a plurality of virtual users are generated through the generation step; distributing transaction strategies for each virtual user randomly through a distribution step, and distributing wind control strategies for each virtual platform randomly; further, by circulating the transaction step, the detection step and the first execution step, the simulation of the transaction is realized, and the huge cost required by manually checking the transaction is avoided; even if the transaction does not really occur, the method can also prevent and control through the simulation of the transaction, and can adapt to the rapid change of illegal transaction risks.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 is a schematic flow chart of a transaction simulation method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a transaction model;
FIG. 3 is a graph illustrating target score scores;
FIG. 4 is a schematic flow chart illustrating a transaction simulation method according to an embodiment of the present invention;
FIG. 5 is a schematic flow chart of a 1 round transaction;
FIG. 6 is a flow chart illustrating adaptive calculation of a transaction policy;
FIG. 7 is a schematic diagram of an adaptive calculation flow of a wind control strategy;
FIG. 8 is a functional block diagram of a transaction simulation device according to an embodiment of the present invention;
fig. 9 is a functional block diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
An embodiment of the present invention provides a transaction simulation method, and as shown in fig. 1, fig. 1 is a schematic flow diagram of the transaction simulation method according to the embodiment of the present invention, including:
a generation step 11: generating a plurality of virtual platforms and a plurality of virtual users;
an allocation step 12: randomly distributing a transaction strategy for each virtual user, and randomly distributing a wind control strategy for each virtual platform; the transaction strategy is a strategy for initiating normal transactions and deceptive transactions, and the wind control strategy is a strategy for releasing or blocking simulated transactions initiated by a user;
a circular transaction step 13: sending a first instruction to each virtual user, wherein the first instruction is used for instructing the virtual user to initiate a simulated transaction to each virtual platform according to a pre-distributed transaction strategy; sending a second instruction to each virtual platform, wherein the second instruction is used for instructing the virtual platforms to process simulated transactions according to the pre-distributed wind control strategy;
a detection step 14: detecting whether all the simulated transactions are processed and completed by each virtual platform or not to obtain a detection result;
first execution step 15: and if the detection result is that all the simulated transactions are processed and completed by each virtual platform, acquiring all transaction processing results of the simulated transactions, and determining an optimal transaction strategy and an optimal wind control strategy according to the transaction processing results.
In some embodiments of the invention, optionally, the transaction policy comprises at least one of the following policies: a random transaction policy, a best person transaction policy, a worst transaction policy, a first and last alternative transaction policy, a first and last careless transaction policy, and a first and last careless transaction policy.
Wherein,
and (3) random trading strategy: the virtual user randomly initiates normal transactions and fraudulent transactions regardless of what action (blocking or clearing) the virtual platform takes.
Preferably the human trading strategy: the virtual user only initiates normal transactions no matter what action (blocking or clearing) the virtual platform takes.
The most victims trading strategy: the virtual user only initiates a spoofed transaction, no matter what action (blocking or clearing) the virtual platform takes.
Head and worship alternate transaction strategy: initiating a fraud transaction with a first transaction of the virtual platform; the second transaction with the virtual platform, and the normal transaction is initiated; and carrying out transaction with the virtual platform for the third time, initiating deception transaction, and so on.
The first-place alternate transaction strategy is as follows: initiating a normal transaction with a first transaction of the virtual platform; transacting with the virtual platform for the second time, and initiating deception transaction; the third time, the transaction with the virtual platform is carried out, and the normal transaction is initiated, and so on;
first-hearted trading strategy: initiating a fraud transaction with a first transaction of the virtual platform; if the last transaction is a deceptive transaction and is blocked by the virtual platform, a normal transaction is initiated when the transaction is conducted with the virtual platform; if the transaction is released by the virtual platform, the deception transaction is still initiated; if the last transaction is a normal transaction and is blocked by the virtual platform, initiating a normal transaction when the transaction is carried out with the virtual platform; and if the transaction is released by the virtual platform, the deception transaction is initiated.
The first good careless trading strategy is as follows: initiating a normal transaction with a first transaction of the virtual platform; if the last transaction is a deceptive transaction and is blocked by the virtual platform, a normal transaction is initiated when the transaction is conducted with the virtual platform; if the transaction is released by the virtual platform, the deception transaction is still initiated; if the last transaction is a normal transaction and is blocked by the virtual platform, initiating a normal transaction when the transaction is carried out with the virtual platform; and if the transaction is released by the virtual platform, the deception transaction is initiated.
First care trading strategy: initiating a fraud transaction with a first transaction of the virtual platform; if the last transaction is a deceptive transaction and is blocked by the virtual platform, a normal transaction is initiated when the transaction is conducted with the virtual platform; if the transaction is released by the virtual platform, the deception transaction is still initiated; if the last transaction is a normal transaction, the normal transaction is initiated.
In some embodiments of the invention, optionally, the wind control policy comprises at least one of the following policies: a random wind control strategy, a loosest wind control strategy, a tightest wind control strategy, a gate clearance wind control strategy, a wide-tolerance gate clearance transaction strategy, a wide-tolerance gate-to-wind control strategy, a gate clearance wind control strategy, a graph-interest wind control strategy, and a deterrent wind control strategy.
Wherein,
a random wind control strategy: the virtual platform randomly passes and blocks transactions no matter what transaction the virtual user initiates.
The loosest wind control strategy is as follows: the virtual platform only passes no matter what transaction the virtual user initiates.
The most strict wind control strategy is as follows: the virtual platform only blocks whatever transaction the virtual user initiates.
And (3) a customs control strategy: if the transaction is normal, releasing; and blocking if the transaction is deceived.
Tolerance-gate transaction policy: if the transaction is normal, releasing; if the transaction is deceived, the transaction is released if the transaction is the first deceived transaction of the virtual user, and if the transaction is not the first deceived transaction, the transaction is blocked.
Tolerance is for a wind control strategy: a first transaction with the virtual user is released; starting from the second transaction, if the virtual user initiates the deceptive transaction last time, blocking the transaction this time; and if the virtual user initiates the normal transaction last time, releasing.
The customs control aims at the wind control strategy: blocking the first transaction with the virtual user if the first transaction is a deceptive transaction, and releasing the first transaction if the first transaction is a normal transaction; starting from the second transaction, if the virtual user initiates the deceptive transaction last time, blocking the transaction this time; and if the virtual user initiates the normal transaction last time, releasing.
And (3) a graph and interest wind control strategy: all normal transactions are released; the fraudulent transaction is randomly blocked and cleared.
Deterrence wind control strategy: blocking the first three transactions with the virtual user; starting from the fourth transaction, if the virtual user initiates a normal transaction, releasing; and if the virtual user initiates a deception transaction, blocking, and blocking two subsequent transactions with the virtual user.
In the embodiment of the invention, a plurality of virtual platforms and a plurality of virtual users are generated through the generation step; distributing transaction strategies for each virtual user randomly through a distribution step, and distributing wind control strategies for each virtual platform randomly; further, by circulating the transaction step, the detection step and the first execution step, the simulation of the transaction is realized, and the huge cost required by manually checking the transaction is avoided; even if the transaction does not really occur, the method can also prevent and control through the simulation of the transaction, and can adapt to the rapid change of illegal transaction risks.
In some embodiments of the present invention, optionally, determining the optimal trading strategy and the optimal wind control strategy according to the trading processing result includes:
a, step a: grading each transaction processing result by adopting a preset transaction model to obtain a grading value;
step b: and determining an optimal transaction strategy and an optimal wind control strategy according to the score, the transaction strategy in the transaction processing result corresponding to the score and the wind control strategy in the transaction processing result corresponding to the score.
In some embodiments of the present invention, optionally, determining the optimal trading strategy and the optimal wind control strategy according to the trading processing result includes:
step c: determining a target transaction processing result in all transaction processing results according to a preset sampling rule;
step d: grading each target transaction processing result by adopting a preset transaction model to obtain a target grading value;
step e: and determining an optimal transaction strategy and an optimal wind control strategy according to the target score value, the transaction strategy in the target transaction processing result corresponding to the target score value and the wind control strategy in the target transaction processing result corresponding to the target score value.
For example, referring to fig. 2, fig. 2 is a schematic diagram of a transaction model, which defines an interaction process between a (virtual) user and a (virtual) platform as a transaction between the (virtual) user and the (virtual) platform.
The (virtual) user may initiate both normal and fraudulent transactions.
For a (virtual) platform, a transaction may take both pass and block actions.
Depending on the (virtual) user initiated transaction and the actions taken by the (virtual) platform, there are 4 combinations: normal transaction-clear, fraudulent transaction-clear, normal transaction-block, and fraudulent transaction-block.
Referring to FIG. 3, FIG. 3 is a graph illustrating target score scores; a certain score can be achieved for the (virtual) user and the (virtual) platform each time a transaction is made. These four transaction behaviors set the score obtainable by the (virtual) user and the (virtual) platform, i.e. the target score. One score setting is as follows:
if the (virtual) user initiates normal transaction, if the (virtual) platform takes a release action, the (virtual) platform and the (virtual) user can obtain 3 points; if the (virtual) platform takes blocking action, the platform gets a score of-3, and the (virtual) user gets a score of 3.
If the (virtual) user initiates a deception transaction, if the (virtual) platform takes a release action, the (virtual) platform is scored 5, and the (virtual) user is scored 5; if the (virtual) platform takes blocking action, the (virtual) platform gets a score of 3, and the (virtual) user gets a score of-3.
In some embodiments of the present invention, optionally, the detecting step 14 is followed by:
the second execution step: if the detection result is that the virtual platform does not process and complete all the simulated transactions, suspending the execution of the cyclic transaction step, and checking whether the virtual platform completes all the simulated transactions in the current metering segment to obtain a checking result;
the third execution step: if the verification result is that the virtual platform completes all simulated transactions in the current metering section, acquiring a sectional transaction processing result of the simulated transactions in the current metering section; according to the segmented transaction processing result and a preset selection rule, a selected virtual user and a selected virtual platform are obtained;
the fourth execution step: and continuously executing the circulating transaction step by using the virtual user library updated by the selected virtual user and the virtual platform library updated by the selected virtual platform until the detection result is that the virtual platform processes all the simulated transactions.
Exemplarily, referring to fig. 4, fig. 4 is a schematic flow chart of a transaction simulation method applying an embodiment of the present invention, wherein:
initializing a platform: generating a certain number of (virtual) platforms, for example, 100, and randomly allocating a wind control policy to the (virtual) platforms (which is equivalent to generating a plurality of virtual platforms in the generating step 11 and randomly allocating a wind control policy to each virtual platform in the allocating step 12 in the embodiment of the present invention);
initializing a user: generating a certain number of (virtual) users, for example, 1 million users, and randomly allocating a trading strategy to the (virtual) users (which is equivalent to generating a plurality of virtual users in the generating step 11 and randomly allocating a trading strategy to each virtual user in the allocating step 12 in the embodiment of the present invention);
1 round of transaction: all (virtual) platforms and all (virtual) users respectively carry out one transaction;
referring to fig. 5, fig. 5 is a schematic flow chart of 1 round of transaction, where the (virtual) platform has long-term cooperation with the (virtual) user, that is, the cooperation time is x years, y rounds of transaction are performed every year, and x y rounds of transaction are accumulated, for example, x =30, y =240, and x y =7200 rounds of transaction;
the following operations are performed every time a one-year transaction is completed (one-year transaction, which corresponds to the metering section in the embodiment of the present invention):
transaction supervision: randomly checking all transactions in the past year according to the proportion of one in ten million, in the random check, if the checked result is that the released transaction is a deceptive transaction, setting the transaction as an invalid transaction, and if the checked result is that the released transaction is a normal transaction, setting the transaction as an effective transaction (which is equivalent to determining a target transaction processing result in all transaction processing results according to a preset sampling rule in the embodiment of the invention);
and (3) statistical scoring: counting the effective transaction scores of all (virtual) users, and sorting the scores from high to low; accumulating the scores of all platform-effective transactions and ranking the scores from high to low
And (3) clearing the user: setting all the (virtual) users with the last z% score as invalid (virtual) users, and not participating in the later transaction any more;
and (3) new users: newly generating z% users, and randomly distributing transaction strategies to the newly generated users according to the transaction strategies of the users with the scores of the (virtual) users close to the first z% users;
a clear platform: setting all platforms with the scores of m% later as invalid (virtual) platforms, and not participating in later transactions any more;
a newborn platform: newly generating m% platforms, and randomly distributing wind control strategies to the newly generated platforms according to the wind control strategies of the platforms which score close to the previous m% platforms;
(the transaction supervision, the statistical score, the clearing user, the new user, the clearing platform and the new platform are equivalent to the embodiment of the invention in which the selected virtual user and the selected virtual platform are obtained according to the segmented transaction processing result and the preset selection rule)
And (3) strategy adaptability calculation: identifying a transaction policy that is most helpful to a (virtual) user to obtain a high score and is used by the most (virtual) users; the method can help the platform to obtain the transaction strategies which are high in score and used by the most platforms (the method is equivalent to a virtual user base updated by the selected virtual user and a virtual platform base updated by the selected virtual platform in the embodiment of the invention, the cyclic transaction steps are continuously executed until the detection result is the virtual platform to process and finish all simulated transactions, if the detection result is that all simulated transactions are processed and finished by each virtual platform, all transaction processing results of the simulated transactions are obtained, and the optimal transaction strategy and the optimal wind control strategy are determined according to the transaction processing results).
For example, referring to fig. 6, fig. 6 is a schematic diagram of an adaptive calculation flow of a transaction policy, where:
the adaptability of the strategy, namely the survival of the fittest, is mainly considered from the following two aspects after a long-term game:
(1) Which policies can help users and platforms get high scores;
(2) Which policies are most widely used by users and platforms.
Specifically, the range of the user high score is defined to mean users with the front score of 10%, and the specific implementation steps are as follows (a-1 to a-8):
step a-1: and initializing an h counter, namely using h1, h2, h3, h4, h5, h6, h7, h8 and h9 as counters, wherein h1 represents the number of users using the first transaction strategy in high-ranking users, and the like. Initializing a w counter, namely w1, w2, w3, w4, w5, w6, w7, w8 and w9 are used as counters, wherein w1 represents the number of users using the first transaction strategy;
step a-2: sorting all users from high to low according to scores;
step a-3: traversing the users, judging whether all the users are traversed or not, and if not, performing the fourth step; if yes, stopping;
step a-4: acquiring a transaction strategy used by a user at the moment;
step a-5: judging whether the number of the traversed users reaches 10% of the total number of the users, and if not, performing the step a-6; if the result is reached, skipping the step a-6 and directly performing the step a-7;
step a-6: b, accumulating the h counter corresponding to the current user transaction strategy obtained in the step a-4 by 1;
step a-7: a, accumulating the w counter corresponding to the current user transaction strategy obtained in the step a-4 by 1;
step a-8: and (e) jumping to the step c, wherein h1, h2, h3, h4, h5, h6, h7, h8 and h9 are high-score user numbers of each transaction strategy, and w1, w2, w3, w4, w5, w6, w7, w8 and w9 are user numbers of each transaction strategy.
For example, referring to fig. 7, fig. 7 is a schematic diagram of an adaptive calculation flow of a wind control strategy, where:
defining the range of plateau high score refers to the plateau with the previous score of 10%, the implementation steps are as follows (a to I):
step A: and initializing an H counter, namely using H1, H2, H3, H4, H5, H6, H7, H8 and H9 as counters, wherein H1 represents the number of platforms using the first trading strategy in the high-ranking platforms, and the like. Initializing a W counter, namely using W1, W2, W3, W4, W5, W6, W7, W8 and W9 as the counter, wherein W1 represents the number of platforms using the first transaction strategy;
and B: sorting all platforms from high to low according to scores;
step C: traversing the platforms, judging whether all the platforms are traversed currently or not, and if not, performing the fourth step; if yes, stopping;
step D: acquiring a wind control strategy used by a current platform;
step E: judging whether the number of the traversed platforms reaches 10% of the total number of the platforms or not, and if not, performing the step F; if yes, skipping step F and directly performing step G;
step F: d, accumulating 1 for the H counter corresponding to the current platform wind control strategy obtained in the step D;
step G: d, accumulating the W counter corresponding to the current platform wind control strategy obtained in the step D by 1;
step I: c, jumping to a step C, wherein H1, H2, H3, H4, H5, H6, H7, H8 and H9 are the number of high-grade platforms of each wind control strategy; w1, W2, W3, W4, W5, W6, W7, W8 and W9 are the platform number of each wind control strategy.
An embodiment of the present invention provides a transaction simulation apparatus, as shown in fig. 8, fig. 8 is a schematic block diagram of the transaction simulation apparatus according to the embodiment of the present invention, and the transaction simulation apparatus 80 includes:
a generating module 81 for generating: generating a plurality of virtual platforms and a plurality of virtual users;
an assignment module 82 for assigning the steps of: randomly distributing a transaction strategy for each virtual user, and randomly distributing a wind control strategy for each virtual platform; the transaction strategy is a strategy for initiating normal transactions and deceptive transactions, and the wind control strategy is a strategy for releasing or blocking simulated transactions initiated by a user;
a circular transaction module 83 for circular transaction steps: sending a first instruction to each virtual user, wherein the first instruction is used for instructing the virtual user to initiate a simulated transaction to each virtual platform according to a pre-distributed transaction strategy; sending a second instruction to each virtual platform, wherein the second instruction is used for instructing the virtual platforms to process the simulated transaction according to the pre-distributed wind control strategy;
the detection module 84 is further configured to perform the detection step: detecting whether all the simulated transactions are processed by each virtual platform or not to obtain a detection result;
a first executing module 85, configured to perform the first step of: and if the detection result is that all the simulated transactions are processed and completed by each virtual platform, acquiring all transaction processing results of the simulated transactions, and determining an optimal transaction strategy and an optimal wind control strategy according to the transaction processing results.
In some embodiments of the present invention, the first and second electrodes are, optionally,
the first execution module 85 is further configured to score each transaction processing result by using a preset transaction model to obtain a score value;
the first executing module 85 is further configured to determine an optimal transaction policy and an optimal wind control policy according to the score, the transaction policy in the transaction processing result corresponding to the score, and the wind control policy in the transaction processing result corresponding to the score.
In some embodiments of the present invention, the first and second electrodes are, optionally,
the first execution module 85 is further configured to determine a target transaction processing result in all transaction processing results according to a preset sampling rule;
the first execution module 85 is further configured to score each target transaction processing result by using a preset transaction model to obtain a target score;
the first executing module 85 is further configured to determine an optimal trading strategy and an optimal wind control strategy according to the target score value, the trading strategy in the target trading processing result corresponding to the target score value, and the wind control strategy in the target trading processing result corresponding to the target score value.
In some embodiments of the present invention, optionally, further comprising:
a second execution module, configured to perform the second step: if the detection result is that the virtual platform does not process and complete all the simulated transactions, suspending the execution of the cyclic transaction step, and verifying whether the virtual platform completes all the simulated transactions in the current metering section to obtain a verification result;
a third executing module, configured to execute the third step: if the verification result is that the virtual platform completes all simulated transactions in the current metering section, acquiring a sectional transaction processing result of the simulated transactions in the current metering section; obtaining a selected virtual user and a selected virtual platform according to the segmented transaction processing result and a preset selection rule;
a fourth execution module, configured to perform the fourth step: and continuously executing the circulating transaction step by using the virtual user library updated by the selected virtual user and the virtual platform library updated by the selected virtual platform until the detection result is that the virtual platform processes all the simulated transactions.
The transaction simulation device provided in the embodiment of the present application can implement each process implemented by the method embodiments of fig. 1 to fig. 7, and achieve the same technical effect, and is not described herein again to avoid repetition.
Referring to fig. 9, fig. 9 is a schematic block diagram of an electronic device 90 according to an embodiment of the present invention, and includes a processor 91, a memory 92, and a program or instructions stored in the memory 92 and executable on the processor 91, where the program or instructions implement steps in any transaction simulation method according to the present invention when executed by the processor.
The embodiment of the present invention provides a readable storage medium, where a program or an instruction is stored, and when the program or the instruction is executed by a processor, the program or the instruction implements each process of any one of the embodiments of the transaction simulation method described above, and can achieve the same technical effect, and in order to avoid repetition, details are not described here again.
The readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.
Claims (8)
1. A transaction simulation method, comprising:
a generation step: generating a plurality of virtual platforms and a plurality of virtual users;
a distribution step: randomly distributing a transaction strategy for each virtual user, and randomly distributing a wind control strategy for each virtual platform; the transaction strategy is a strategy for initiating normal transaction and deception transaction, and the wind control strategy is a strategy for releasing or blocking simulated transaction initiated by the user;
and (3) circulating transaction steps: sending a first instruction to each virtual user, wherein the first instruction is used for instructing the virtual users to initiate simulated transaction to each virtual platform according to a pre-distributed transaction strategy; sending a second instruction to each virtual platform, wherein the second instruction is used for instructing the virtual platform to process the simulated transaction according to a pre-distributed wind control strategy;
a detection step: detecting whether all the simulated transactions are processed and completed by each virtual platform or not to obtain a detection result;
a first execution step: if the detection result is that all the simulated transactions are processed and completed by each virtual platform, all transaction processing results of the simulated transactions are obtained, and the optimal transaction strategy and the optimal wind control strategy are determined according to the transaction processing results;
the detecting step, thereafter, comprises:
the second execution step: if the detection result indicates that the virtual platform does not process and complete all the simulated transactions, the step of executing the circular transactions is suspended, whether the virtual platform completes all the simulated transactions in the current metering section is verified, and a verification result is obtained;
the third execution step: if the verification result is that the virtual platform completes all the simulated transactions in the current metering section, acquiring a section transaction processing result of the simulated transactions in the current metering section; according to the segmented transaction processing result and a preset selection rule, the selected virtual user and the selected virtual platform are obtained;
the fourth execution step: and continuously executing the circulating transaction step by using the virtual user library updated by the selected virtual user and the virtual platform library updated by the selected virtual platform until the detection result is that the virtual platform processes all the simulated transactions.
2. The transaction simulation method according to claim 1, wherein:
determining the optimal trading strategy and the optimal wind control strategy according to the trading processing result, wherein the steps of:
grading each transaction processing result by adopting a preset transaction model to obtain a grading value;
and determining the optimal transaction strategy and the optimal wind control strategy according to the score, the transaction strategy in the transaction processing result corresponding to the score and the wind control strategy in the transaction processing result corresponding to the score.
3. The transaction simulation method according to claim 1, wherein:
determining the optimal trading strategy and the optimal wind control strategy according to the trading processing result, wherein the steps of:
determining a target transaction processing result in all the transaction processing results according to a preset sampling rule;
grading each target transaction processing result by adopting a preset transaction model to obtain a target grading value;
and determining the optimal transaction strategy and the optimal wind control strategy according to the target score value, the transaction strategy in the target transaction processing result corresponding to the target score value and the wind control strategy in the target transaction processing result corresponding to the target score value.
4. A transaction simulation device, comprising:
a generating module for generating: generating a plurality of virtual platforms and a plurality of virtual users;
an allocation module for allocating steps: randomly distributing a transaction strategy for each virtual user, and randomly distributing a wind control strategy for each virtual platform; the transaction strategy is a strategy for initiating normal transactions and deceptive transactions, and the wind control strategy is a strategy for releasing or blocking simulated transactions initiated by the user;
the circulation trading module is used for circulating trading steps: sending a first instruction to each virtual user, wherein the first instruction is used for instructing the virtual users to initiate simulated transaction to each virtual platform according to a pre-distributed transaction strategy; sending a second instruction to each virtual platform, wherein the second instruction is used for instructing the virtual platform to process the simulated transaction according to a pre-distributed wind control strategy;
the detection module is also used for detecting the steps: detecting whether all the simulated transactions are processed and completed by each virtual platform or not to obtain a detection result;
a first execution module for performing the first step: if the detection result indicates that all the simulated transactions are processed and completed by each virtual platform, acquiring all transaction processing results of the simulated transactions, and determining the optimal transaction strategy and the optimal wind control strategy according to the transaction processing results;
a second execution module, configured to perform the second step: if the detection result indicates that the virtual platform does not process and complete all the simulated transactions, the step of executing the circular transactions is suspended, whether the virtual platform completes all the simulated transactions in the current metering section is verified, and a verification result is obtained;
a third executing module, configured to execute the third step: if the verification result is that the virtual platform completes all the simulated transactions in the current metering section, acquiring a section transaction processing result of the simulated transactions in the current metering section; obtaining the selected virtual user and the selected virtual platform according to the segmented transaction processing result and a preset selection rule;
a fourth execution module, configured to perform the fourth execution step: and continuously executing the circulating transaction step by using the virtual user library updated by the selected virtual user and the virtual platform library updated by the selected virtual platform until the detection result is that the virtual platform processes all the simulated transactions.
5. The transaction simulation device of claim 4, wherein:
the first execution module is further used for scoring each transaction processing result by adopting a preset transaction model to obtain a scoring score;
the first execution module is further configured to determine an optimal transaction strategy and an optimal wind control strategy according to the score, the transaction strategy in the transaction processing result corresponding to the score, and the wind control strategy in the transaction processing result corresponding to the score.
6. The transaction simulation device of claim 4, wherein:
the first execution module is further used for determining a target transaction processing result in all the transaction processing results according to a preset sampling rule;
the first execution module is further used for scoring each target transaction processing result by adopting a preset transaction model to obtain a target scoring value;
the first execution module is further configured to determine an optimal transaction strategy and an optimal wind control strategy according to the target score value, a transaction strategy in a target transaction processing result corresponding to the target score value, and a wind control strategy in a target transaction processing result corresponding to the target score value.
7. An electronic device, characterized in that: comprising a processor, a memory and a program or instructions stored on said memory and executable on said processor, said program or instructions when executed by said processor implementing the steps in the transaction simulation method according to any of claims 1 to 3.
8. A readable storage medium, characterized by: the readable storage medium has stored thereon a program or instructions which, when executed by a processor, implement the steps in the transaction simulation method of any of claims 1 to 3.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211506398.7A CN115545937B (en) | 2022-11-29 | 2022-11-29 | Transaction simulation method and device, electronic equipment and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211506398.7A CN115545937B (en) | 2022-11-29 | 2022-11-29 | Transaction simulation method and device, electronic equipment and readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115545937A CN115545937A (en) | 2022-12-30 |
CN115545937B true CN115545937B (en) | 2023-02-24 |
Family
ID=84722077
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211506398.7A Active CN115545937B (en) | 2022-11-29 | 2022-11-29 | Transaction simulation method and device, electronic equipment and readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115545937B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107798609A (en) * | 2017-11-08 | 2018-03-13 | 上海宽全智能科技有限公司 | Quantify trading strategies generation method and device, equipment and storage medium |
CN109002949A (en) * | 2017-06-06 | 2018-12-14 | 阿里巴巴集团控股有限公司 | A kind of method and device of air control strategy configuration and business air control |
CN109934708A (en) * | 2017-12-15 | 2019-06-25 | 武汉楚鼎信息技术有限公司 | A kind of more policy-simulative method of commerce in local and system and device |
CN110503557A (en) * | 2019-08-28 | 2019-11-26 | 中国银行股份有限公司 | The monitoring method and device of policy information |
CN112017059A (en) * | 2020-07-14 | 2020-12-01 | 北京淇瑀信息科技有限公司 | Hierarchical optimization risk control method and device and electronic equipment |
CN114912925A (en) * | 2021-01-28 | 2022-08-16 | 腾讯科技(深圳)有限公司 | Fraud detection method, device, electronic equipment and computer readable medium |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114004699A (en) * | 2021-10-22 | 2022-02-01 | 平安科技(深圳)有限公司 | Artificial intelligence based risk management and control method, device, equipment and storage medium |
CN114612220A (en) * | 2022-03-14 | 2022-06-10 | 平安普惠企业管理有限公司 | Wind control strategy adjusting method and device, electronic equipment and storage medium |
-
2022
- 2022-11-29 CN CN202211506398.7A patent/CN115545937B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109002949A (en) * | 2017-06-06 | 2018-12-14 | 阿里巴巴集团控股有限公司 | A kind of method and device of air control strategy configuration and business air control |
CN107798609A (en) * | 2017-11-08 | 2018-03-13 | 上海宽全智能科技有限公司 | Quantify trading strategies generation method and device, equipment and storage medium |
CN109934708A (en) * | 2017-12-15 | 2019-06-25 | 武汉楚鼎信息技术有限公司 | A kind of more policy-simulative method of commerce in local and system and device |
CN110503557A (en) * | 2019-08-28 | 2019-11-26 | 中国银行股份有限公司 | The monitoring method and device of policy information |
CN112017059A (en) * | 2020-07-14 | 2020-12-01 | 北京淇瑀信息科技有限公司 | Hierarchical optimization risk control method and device and electronic equipment |
CN114912925A (en) * | 2021-01-28 | 2022-08-16 | 腾讯科技(深圳)有限公司 | Fraud detection method, device, electronic equipment and computer readable medium |
Also Published As
Publication number | Publication date |
---|---|
CN115545937A (en) | 2022-12-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Yang et al. | Improving resource allocation strategy against human adversaries in security games | |
CN112669138B (en) | Data processing method and related equipment | |
CN109146662A (en) | A kind of risk control method and device | |
CN111629010B (en) | Malicious user identification method and device | |
US20200389482A1 (en) | Software application for continually assessing, processing, and remediating cyber-risk in real time | |
CN109977680A (en) | A kind of business datum security risk recognition methods and system | |
CN107909225A (en) | A kind of loan in house prosperity transaction is made loans duration prediction method | |
CN113822582A (en) | Attack and defense drilling system of network shooting range | |
CN112365341A (en) | Credit agency anti-fraud method, apparatus, device and storage medium | |
CN115545937B (en) | Transaction simulation method and device, electronic equipment and readable storage medium | |
CN111431910A (en) | Network attack scoring computing system and method | |
Chacoma et al. | Simple mechanism rules the dynamics of volleyball | |
CN111881147B (en) | Processing method and device of computing task, storage medium and processor | |
CN110363531A (en) | The method and apparatus for handling fraud | |
McKay | DeFi-ing cyber attacks | |
CN110245985A (en) | A kind of information processing method and device | |
CN107943754A (en) | A kind of isomery redundant system optimization method based on genetic algorithm | |
Tran et al. | An approach to select cost-effective risk countermeasures | |
Li et al. | Holistic security requirements analysis: An attacker's perspective | |
Xu et al. | Did alibaba fake the tmall “double eleven” data? evidence from benford’s law | |
Brîındușescu et al. | Simulation of trust propagation in community validated gamification | |
Van der Veeken et al. | Applying Bayesian game theory to analyse cyber risks of bank transaction systems | |
Zhao et al. | A Deep Dive Into CATS Evaluator Algorithm: Quantification Of The Probability in Serious Game Cloud Security Defense Scenarios | |
Pouraimis et al. | Long lasting effects of awareness training methods on reducing overall cyber security risk | |
Ebadati et al. | Human Resource Allocation to the Credit Requirement Process, A Process Mining Approach |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |