CN-121120121-B - Transaction data processing method and device, electronic equipment and storage medium
Abstract
The disclosure provides a transaction data processing method and device, electronic equipment and storage media, wherein the method comprises the steps of obtaining quotations of an electric power spot market in a current period, reporting strategies of a plurality of users and executing returns in the previous period, sorting the users in priority based on the strategies and the quotations to obtain a sorted user sequence, obtaining target orders of the users based on reference prices determined by the quotations and the strategies, price changing step sizes and transaction electric quantity in the strategies and the user sequence, comparing the target orders with the suspended orders for executing returns to obtain comparison results, and generating order executing operations in the current period based on the comparison results, the target orders and the suspended orders. The method can realize the aggregation and account-level concurrency control in a period, so that stable throughput and low jitter can be kept under multiple parallel users, and the high concurrency stability in the transaction data processing process is improved.
Inventors
- JI YOU
- ZHANG ZIHANG
- CHEN SHUXIN
Assignees
- 上海路明星光智能科技有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20251114
Claims (5)
- 1. A transaction data processing method, applied to a rolling transaction front-end and back-end system, comprising: acquiring quotations of the electric power spot market in the current period, reporting strategies of a plurality of users and executing return in the previous period; The users are subjected to priority ranking based on the strategy and the quotation so as to obtain a ranked user sequence; Acquiring a target order of the user based on the reference price determined by the quotation and the strategy, the price changing step length and the transaction electric quantity in the strategy and the user sequence; comparing the target order with the hung order subjected to execution return to obtain a comparison result; Generating order execution operation in the current period based on the comparison result, the target order and the hung order; The method for realizing the ordered user sequence by carrying out priority ordering on the users based on the strategy and the quotation comprises the steps of carrying out priority ordering on the users based on the average transaction amount of the users in the last 30 days, the transaction amount of the users in the quotation in the current day and the total transaction amount expected by the users in the strategy so as to obtain the ordered user sequence; The realization method for acquiring the target order of the user based on the reference price, the price changing step length and the transaction electric quantity in the strategy, which are determined by the quotation and the strategy, and the user sequence comprises the steps of acquiring the price in the target order based on the reference price, the price changing step length and the user sequence; When the target order belongs to a target order of a buyer, the price of the target order = the reference price + N x the price change step; when the target order belongs to the target order of the seller, the price of the target order = the reference price-N x the price change step length, wherein N is a positive integer, and N represents the order of the user corresponding to the target order in the user sequence; The rolling transaction front-end and back-end system comprises a transaction front end and a transaction back end, wherein the realization method for acquiring quotation of an electric power spot market in a current period, reporting strategies of a plurality of users and executing rewards of the previous period comprises the steps that the transaction back end starts a time controller and periodically broadcasts server time, the transaction front end subscribes to broadcast and corrects local offset based on the broadcast server time, the transaction back end acquires a trigger second point, the transaction back end opens a receiving window based on the trigger second point, the transaction front end packages and reports the quotation, the strategies and the executing rewards at the time after alignment based on the receiving window, and the transaction back end acquires the quotation, the strategies and the executing rewards; The implementation method for generating the order execution operation in the current period based on the comparison result, the target order and the hung order comprises the following steps of S1, updating user declaration data, S2, generating a withdrawal execution operation based on the target order and the hung order when an order which is compared with the missing order in the target order exists in the hung order; and step S3, when the new order which is compared with the new order in the hung order exists in the target order, generating a hung order execution operation based on the target order and the hung order, and recording an audit log in step S4.
- 2. The transaction data processing method according to claim 1, characterized in that the transaction data processing method further comprises: performing de-duplication processing on repeated strategies reported by the same user in the strategies so as to reserve the strategy reported by the user last time in the repeated strategies; Parameter verification is carried out on the quotation and the strategy to obtain a verification result, wherein the verification result is that the parameter verification is passed or the parameter verification is not passed; Intercepting quotations and strategies which do not pass the verification; the user is marked with a skip based on the user status.
- 3. A transaction data processing device for use in a rolling transaction front-end and back-end system, said transaction data processing device comprising: The quotation acquisition module is used for acquiring quotations of the electric power spot market in the current period, reporting strategies of a plurality of users and executing return in the previous period; The user ordering module is used for ordering the priority of the users based on the strategy and the quotation so as to obtain an ordered user sequence; The order acquisition module is used for acquiring a target order of the user based on the reference price determined by the quotation and the strategy, the price changing step length and the transaction electric quantity in the strategy and the user sequence; The order comparison module is used for comparing the target order with the hung order subjected to execution return so as to obtain a comparison result; the operation generation module is used for generating order execution operation in the current period based on the comparison result, the target order and the hung order; The method for realizing the ordered user sequence by carrying out priority ordering on the users based on the strategy and the quotation comprises the steps of carrying out priority ordering on the users based on the average transaction amount of the users in the last 30 days, the transaction amount of the users in the quotation in the current day and the total transaction amount expected by the users in the strategy so as to obtain the ordered user sequence; The realization method for acquiring the target order of the user based on the reference price, the price changing step length and the transaction electric quantity in the strategy, which are determined by the quotation and the strategy, and the user sequence comprises the steps of acquiring the price in the target order based on the reference price, the price changing step length and the user sequence; When the target order belongs to a target order of a buyer, the price of the target order = the reference price + N x the price change step; when the target order belongs to the target order of the seller, the price of the target order = the reference price-N x the price change step length, wherein N is a positive integer, and N represents the order of the user corresponding to the target order in the user sequence; The rolling transaction front-end and back-end system comprises a transaction front end and a transaction back end, wherein the realization method for acquiring quotation of an electric power spot market in a current period, reporting strategies of a plurality of users and executing rewards of the previous period comprises the steps that the transaction back end starts a time controller and periodically broadcasts server time, the transaction front end subscribes to broadcast and corrects local offset based on the broadcast server time, the transaction back end acquires a trigger second point, the transaction back end opens a receiving window based on the trigger second point, the transaction front end packages and reports the quotation, the strategies and the executing rewards at the time after alignment based on the receiving window, and the transaction back end acquires the quotation, the strategies and the executing rewards; The implementation method for generating the order execution operation in the current period based on the comparison result, the target order and the hung order comprises the steps of S1, updating user declaration data, S2, generating an order removal execution operation based on the target order and the hung order when an order which is compared with a missing order in the target order exists in the hung order, S3, generating a hung order execution operation based on the target order and the hung order when an order which is compared with a newly added order in the hung order exists in the target order, and S4, recording an audit log.
- 4. A computer-readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the transaction data processing method according to any one of claims 1 to 2.
- 5. An electronic device, comprising: a memory configured to store a computer program; A processor electrically coupled to the memory and configured to perform the transaction data processing method according to any one of claims 1 to 2.
Description
Transaction data processing method and device, electronic equipment and storage medium Technical Field The disclosure belongs to the field of electric power spot market trading, and in particular relates to a trading data processing method and device, electronic equipment and a storage medium. Background In order to improve the yield and reduce the risk, the participants in the electric power spot market tend to use an automatic transaction system of a third party to conduct transactions, sense the market in near real time through the front end, intensively evaluate the strategies through the rear end and transmit back the execution instructions. In the electric power spot market transaction, multiuser parallelism is normal, transaction strategies of all participants are mutually independent, and internal multiuser competition exists, and share the same market target and time sequence window. The problem of low concurrency stability exists in the current transaction data processing process. Disclosure of Invention The disclosure provides a transaction data processing method and device, electronic equipment and a storage medium, which are used for solving the problem of low high concurrency stability in the current transaction data processing process in the prior art. The transaction data processing method comprises the steps of obtaining quotations of an electric power spot market in a current period, reporting strategies of a plurality of users and executing returns in the previous period, sequencing the users in priority based on the strategies and the quotations to obtain a sequenced user sequence, obtaining target orders of the users based on reference prices determined by the quotations and the strategies, price changing step sizes and transaction electric quantity in the strategies and the user sequence, comparing the target orders with the suspended orders executing returns to obtain comparison results, and generating order executing operations in the current period based on the comparison results, the target orders and the suspended orders. And aggregating the quotation, the strategy and the execution return of the last period in the current period, comparing the user orders in the period, generating corresponding order execution operation and the like to realize the aggregation in the period and account-level concurrency control, so that stable throughput and low jitter can be kept under multiple parallel users, and the high concurrency stability in the transaction data processing process is improved. In an embodiment of the disclosure, the rolling transaction front-end and back-end system comprises a transaction front-end and a transaction back-end, wherein the implementation method for acquiring quotations, reporting strategies and execution rewards related to a power spot market, reported by a plurality of users in a current period, comprises the steps that the transaction back-end starts a time controller and periodically broadcasts server time, the transaction front-end subscribes to broadcast and corrects local offset based on the broadcasting server time, the transaction back-end acquires a trigger second point, the transaction back-end opens a receiving window based on the trigger second point, the transaction front-end packages and reports the quotations, the strategies and the execution rewards at aligned moments based on the receiving window, and the transaction back-end acquires the quotations, the strategies and the execution rewards. In an embodiment of the disclosure, the transaction data processing method further includes performing deduplication processing on repeated policies reported by the same user in the policies to reserve the policies reported by the user last time in the repeated policies, performing parameter verification on the quotations and the policies to obtain verification results, wherein the verification results are that the parameter verification is passed or the parameter verification is not passed, intercepting the quotations and the policies that the verification is not passed, and skipping processing on user marks based on user states. In an embodiment of the disclosure, the implementation method for prioritizing the users based on the policy and the quotation to obtain the ordered user sequence includes obtaining a priority score based on the policy and the quotation, prioritizing the users based on the priority score to obtain the user sequence, and expressing the priority score as: Wherein, the The priority score is represented as a function of the priority score,A default value representing the score of the user,A first weight is indicated and a second weight is indicated,Representing the average amount of power delivered by the user over the last 30 days,A second weight is indicated as being indicative of a second weight,Indicating the current amount of power the user has done on the same day in the quotation,Representing the aggregate delivered-charge d