Security transaction business rapid playback test method, device, equipment and medium

CN122963914APending Publication Date: 2026-10-23CHANGJIANG SECURITIES
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611457929.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-18
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

(1)测试数据真实性不足,传统测试多依赖人工构造测试数据,与生产环境真实交易数据的差异较大,难以精准模拟实际业务场景,易遗漏偶发缺陷;

Benefits of technology

[0016]第四方面,本申请实施例提供一种计算机可读存储介质,所述计算机可读存储介质上存储有证券交易业务快速回放测试程序,其中所述证券交易业务快速回放测试程序被处理器执行时,实现上述所述的证券交易业务快速回放测试方法的步骤。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122963914A_ABST
    Figure CN122963914A_ABST
Patent Text Reader

Abstract

The application discloses a security transaction business rapid playback test method, device, equipment and medium, relates to the security transaction test technical field, and the method comprises the following steps: obtaining production data in a security transaction system, and performing distillation and concentration processing on the obtained production data; obtaining sample data and analyzing and inducing to generate a test case; selecting the test case based on a playback test screening condition to perform playback test, and performing self-adaptive dynamic adjustment on parameters of the test case by a preset parameter factor association algorithm in the playback test process. The application can effectively realize security transaction business playback test and guarantee safe and stable operation of the security transaction system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of securities trading testing technology, specifically to a method, apparatus, equipment, and medium for rapid replay testing of securities trading operations. Background Technology

[0002] With the continuous emergence of innovative businesses in the securities industry, various business scenarios such as ordinary stock trading, margin trading, Hong Kong Stock Connect, and options trading are becoming increasingly diverse. The frequency of trading system version updates is constantly increasing, necessitating efficient and comprehensive testing methods to ensure the quality of system deployment. Relevant institutions are increasingly stringent in their management of the stability, data security, and business compliance of securities trading systems, requiring testing to comprehensively cover all types of trading scenarios, accurately verify system functions, and prevent risks such as trading anomalies and data errors after deployment.

[0003] Currently, the main problems in securities trading business testing are as follows: (1) The authenticity of test data is insufficient. Traditional testing relies on manually constructed test data, which differs greatly from real transaction data in the production environment. It is difficult to accurately simulate actual business scenarios and is easy to miss occasional defects. (2) The data security risk is high. If the raw production data is used directly for testing, sensitive data such as customer privacy and account information will be leaked, which will violate data compliance requirements. (3) The testing efficiency is low. Manually searching for test accounts, resetting passwords, adjusting entrustment parameters, blue supplement funds, blue supplement securities and other operations are cumbersome. Moreover, there are many transaction business subjects, which can be subdivided into more than a thousand types according to market, product and entrustment type. Manually completing the testing of all subjects is time-consuming and laborious, and cannot adapt to the needs of rapid version iteration. (4) Poor test consistency. Manual operation is prone to problems such as incorrect parameter settings and missing procedures, resulting in unreliable test results and affecting test quality.

[0004] Currently, although replay testing technology has been applied in securities trading business testing, there are still obvious limitations: 1. Trading orders are closely related to market conditions, and most existing replay testing technologies cannot automatically adjust data such as order price, order quantity, customer available funds, and customer holdings, resulting in a high order failure rate; 2. It is difficult to cover batch testing of more than a thousand types of trading business subjects, and the testing coverage is limited.

[0005] Therefore, how to provide a method that can achieve data anonymization and reuse, has full-process automated adaptation capabilities, and can complete batch playback tests of multiple scenarios and subjects with one click has become an urgent problem to be solved in the current securities industry testing field. Summary of the Invention

[0006] This application provides a method, apparatus, equipment, and medium for rapid playback testing of securities trading operations, which can effectively realize playback testing of securities trading operations and ensure the safe and stable operation of the securities trading system.

[0007] In a first aspect, embodiments of this application provide a method for fast replay testing of securities trading transactions, the method comprising: The process involves acquiring production data from the securities trading system, distilling and concentrating the acquired data to obtain sample data, analyzing and summarizing the data, and generating test cases. Test cases are selected based on the playback test screening criteria for playback testing, and the parameters of the test cases are adaptively and dynamically adjusted during the playback test using a preset parameter factor association algorithm.

[0008] In conjunction with the first aspect, in one embodiment, the step of acquiring production data from the securities trading system and performing distillation and concentration processing on the acquired production data specifically includes: Obtain securities trading-related data from the securities trading system and perform anonymization processing to obtain production data; Database scripts are used to remove invalid order data and redundant noise data from production data; By using a distillation algorithm and combining it with a test scenario, production data is concentrated through distillation to obtain sample data.

[0009] In conjunction with the first aspect, in one implementation method, the generation of test cases specifically includes: Based on scheduled tasks and batch processing, the obtained sample data is analyzed and summarized according to market type, security type, and buying / selling direction to generate test cases and realize the correlation between test cases and sample data.

[0010] In conjunction with the first aspect, in one implementation, the step of selecting test cases for replay testing based on replay test screening criteria specifically includes: Determine the replay test screening criteria, which include market type, security type, and buy / sell direction; Based on the defined replay test screening criteria, the required test cases are selected for replay testing, and a test report is output. The test report includes the number of executed test cases, the number of successes, the number of failures, the test input parameters, and the test output parameters.

[0011] In conjunction with the first aspect, in one implementation, the preset parameter factor association algorithm includes an order price association algorithm, an order quantity adjustment function, a customer fund blue replenishment function, and a customer holding blue replenishment function.

[0012] In conjunction with the first aspect, in one implementation method, The commission price association algorithm is used to adjust the commission price to a suitable range based on the commission price in the test case, combined with the current market conditions and testing intent of the testing environment; The order quantity adjustment function adjusts the order quantity to an appropriate value based on the order quantity in the test case, combined with the trading rules of the security and the test intent. The customer fund replenishment function replenishes funds for test accounts based on the transaction needs in the test cases. However, when the test scenario involves selling securities, no fund replenishment is performed. The client holdings replenishment function is as follows: when the trading direction of the test case is to buy, if the test account currently has no corresponding securities holdings, the corresponding number of securities holdings will be replenished. When the trading direction of the test case is to sell, the existing holdings of the test account are checked to see if they meet the selling quantity requirements. If not, they will be replenished accordingly.

[0013] In conjunction with the first aspect, in one implementation method, the order price association algorithm specifically includes: Define basic parameters, which include the latest transaction price of the target, the daily limit up price, the daily limit down price, the minimum price fluctuation unit, the order book price arrays from buy 1 to buy 5, the order book price arrays from sell 1 to sell 5, and the actively input price segment; The price fragments input by the user are obtained and cleaned, wherein the cleaning process involves filtering out illegal characters and retaining numbers according to a preset precision. Collect core prices, which include the latest transaction price of the target, the best bid / ask price, all five levels of order book prices, the price limit up / down price, and the integer price near the latest transaction price of the target. Prices that are lower than the limit down price, higher than the limit up price, do not meet the minimum price change unit, or are negative are removed from the core price list to obtain the legal candidate pool. The prices in the legal candidate pool are retained according to the type of the target, and the prices with the cleaned content as a prefix are filtered out to form a matching list. The selected prices are compared with different price types to obtain the weight score corresponding to each selected price. Based on the weight score, the selected prices are sorted in descending order. The pre-set ranking is used to determine the appropriate range of the order price and to adjust the order price accordingly.

[0014] Secondly, embodiments of this application provide a fast replay testing device for securities trading operations, the fast replay testing device for securities trading operations comprising: The acquisition module is used to acquire production data from the securities trading system and distill and concentrate the acquired production data to obtain sample data, analyze and summarize it, and generate test cases. The testing module is used to select test cases for replay testing based on replay test screening conditions, and to adaptively and dynamically adjust the parameters of the test cases through a preset parameter factor association algorithm during the replay test.

[0015] Thirdly, embodiments of this application provide a securities trading business fast replay test device, the securities trading business fast replay test device includes a processor, a memory, and a securities trading business fast replay test program stored in the memory and executable by the processor, wherein when the securities trading business fast replay test program is executed by the processor, it implements the steps of the securities trading business fast replay test method as described in any one of claims 1 to 7.

[0016] Fourthly, embodiments of this application provide a computer-readable storage medium storing a securities trading business fast replay test program, wherein when the securities trading business fast replay test program is executed by a processor, it implements the steps of the securities trading business fast replay test method described above.

[0017] The beneficial effects of the technical solutions provided in this application include: (1) Balancing data authenticity and compliance: Based on real production and transaction data, through multi-dimensional desensitization and cleaning, the real business characteristics of the production data are preserved, and the actual transaction scenarios can be accurately simulated to improve the authenticity of the test and the defect detection rate. At the same time, the risk of privacy leakage is avoided, which meets the data compliance regulatory requirements. (2) Significantly improve testing efficiency and reduce labor costs: The parameter association algorithm and automation function completely solve the problem of cumbersome pre-test operations. There is no need to manually search for test accounts, reset passwords, adjust order parameters, or replenish funds. It can quickly complete the replay test of various transaction business subjects, shorten the test cycle, significantly reduce manual workload, and reduce test labor costs. (3) Wide test coverage and strong scenario adaptability: It covers all scenarios such as ordinary trading, margin trading, Hong Kong stocks, options, and comprehensive business. It can be subdivided into various test subjects according to market, product, and order type, which can fully cover all types of trading business in the securities industry, adapt to the personalized test needs of different securities companies, and effectively avoid test omissions. (4) High test consistency and more reliable results: The fully automated operation avoids problems such as parameter setting errors and process omissions caused by manual operation, ensuring that each test subject is executed according to a unified standard, and the test results have high consistency and repeatability, improving test quality and providing reliable guarantee for system version launch; (5) Easy to operate and low learning threshold: It supports visual operation. Test scenario configuration, subject selection and batch playback can all be completed with one click, which reduces the testing threshold and makes it easier for quality control personnel, business personnel and operation and maintenance personnel to quickly carry out testing work. (6) Adapt to rapid iteration requirements and improve system stability: It can quickly respond to the version iteration requirements of the trading system, realize rapid regression testing, discover potential problems before the system goes online, reduce the operational risks after the system goes online, ensure the safe and stable operation of securities trading business, and meet the compliance requirements of regulatory agencies. Attached Figure Description

[0018] Figure 1 This is a flowchart illustrating the rapid replay testing method for securities trading business in this application; Figure 2 A diagram illustrating the selection of test cases; Figure 3 This is a schematic diagram of the playback test; Figure 4 A schematic diagram illustrating the configuration of the preset parameter factor association algorithm; Figure 5 This is a schematic diagram of the functional modules of the securities trading business fast playback test device of this application; Figure 6 This is a schematic diagram of the hardware structure of the securities trading business fast playback test equipment in this application. Detailed Implementation

[0019] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.

[0020] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0021] Firstly, this application provides a method for rapid replay testing of securities trading operations. Specifically, it provides a method for rapid replay testing of securities trading operations based on production sample data. This method is applicable to functional verification, regression testing, version upgrade verification, and anomaly investigation of various trading operations in the securities industry, covering multiple scenarios such as ordinary trading, margin trading, Hong Kong stocks, options, and comprehensive businesses. Through the distillation and concentration of production sample data and the dynamic adjustment function of parameter factor association algorithms, it enables batch rapid replay testing of multiple markets, multiple varieties, and multiple order types, ensuring the safe and stable operation of the securities trading system. In other words, based on real production data, it forms safe and usable test sample data through de-identification distillation and concentration processing. Combined with multi-dimensional association algorithms, it enables batch replay testing of over a thousand trading business subjects, balancing data authenticity, compliance, and testing efficiency, thus solving many pain points of traditional testing.

[0022] In one embodiment, reference is made to Figure 1 , Figure 1 This is a flowchart illustrating the rapid replay testing method for securities trading operations in this application. Figure 1 As shown, the fast replay test method for securities trading business includes: S1: Obtain production data from the securities trading system and distill and concentrate the obtained production data to obtain sample data, analyze and summarize it, and generate test cases; S2: Select test cases based on the replay test screening criteria for replay testing, and dynamically adjust the parameters of the test cases adaptively through a preset parameter factor association algorithm during the replay test.

[0023] Furthermore, in one embodiment, acquiring production data from a securities trading system and performing distillation and concentration processing on the acquired production data specifically includes: S101: Obtain securities trading-related data from the securities trading system and perform anonymization processing to obtain production data; securities trading-related data includes basic customer information, order records, transaction records, fund information, and position information; anonymization processing includes hiding customer ID numbers, mobile phone numbers, address information, customer assets, etc., to ensure compliance with data security and compliance requirements; S102: Use database scripts to remove invalid order data and redundant noise data from production data; S103: By using a distillation algorithm and combining it with the test scenario, the production data is distilled and concentrated to obtain sample data.

[0024] The process begins with data distillation and concentration to remove redundant noise and extract core information (including transaction timing, order price, order quantity, stock code, etc.). For the millions of daily order records in the securities trading system, this application achieves sample lightweighting by eliminating invalid orders and redundant data. Then, combined with targeted concentration based on the test scenario, approximately 10,000 representative sample data are formed, reducing data storage and computing costs and improving testing efficiency and scenario coverage.

[0025] Specifically, the production environment of a securities trading system generates millions of order records daily, i.e., securities trading-related data. Directly using production data for testing would consume significant storage and computing resources, and the success rate would be low. This application uses database scripts to remove a large number of invalid orders and redundant noise data, achieving sample lightweighting. Then, through a distillation algorithm combined with the testing scenario, the production data is distilled and concentrated, ultimately forming approximately 10,000 representative sample data entries.

[0026] Furthermore, in one embodiment, the generation of test cases specifically includes: Based on scheduled tasks and batch processing, the obtained sample data is analyzed and summarized according to market type, security type, and buying / selling direction to generate test cases and realize the correlation between test cases and sample data.

[0027] Specifically, traditional trading business testing tools generally rely on manual configuration of test cases. To achieve over 90% scenario coverage, more than a thousand test cases need to be manually configured and maintained. Furthermore, manual adjustments to the test data are required later, resulting in a massive overall workload. This application, relying on scheduled tasks and batch processing, can automatically analyze approximately 10,000 sample data points. It summarizes and categorizes data based on market type (e.g., Shanghai, Shenzhen, Beijing Stock Exchange, Hong Kong Stock Exchange), order type, security type (stocks, funds, bonds), and buy / sell direction (buy, sell), automatically generating test cases and automatically associating sample data with test cases. This eliminates the need for manual maintenance, significantly saving labor and time costs.

[0028] Furthermore, in one embodiment, selecting test cases for replay testing based on replay test screening criteria specifically includes: S201: Determine the replay test screening criteria, which include market type, security type, and buy / sell direction; S202: Based on the determined replay test screening conditions, select the required test cases for replay testing, and output a test report. The test report includes the number of executed test cases, the number of successes, the number of failures, the test input parameters, and the test output parameters.

[0029] For details, see Figure 2As shown, test cases are selected based on market type, security type, and trading direction, and then replay tests are performed. Figure 3 As shown, the test progress is displayed in real time during the test, such as the number of test cases executed, the number of successes, and the number of failures. After the test is completed, a test report is automatically generated, summarizing the test results to facilitate analysis and review by testers.

[0030] Furthermore, since trading orders are highly correlated with market data, which is real-time dynamic data and cannot be predicted in advance, using only preset fixed parameters (such as stock code, order price, and order quantity) for testing can easily lead to order failures. To solve this problem, this application designs a preset parameter factor association algorithm in the replay test, such as... Figure 4 As shown, this is to ensure the success rate of the commissioned playback test.

[0031] The preset parameter factor association algorithm includes order price association algorithm, order quantity adjustment function, client fund blue replenishment function, and client holding blue replenishment function.

[0032] The order price association algorithm is used to adjust the order price to a suitable range based on the order price in the test case, combined with the current market conditions and the test intent. Specifically, based on the order price in the test case, combined with the current market conditions and the user's test intent (successful matching, failed matching, successful cancellation, failed cancellation, etc.), the order price is automatically adjusted to a compliant range (such as complying with price limits and minimum price change units) to ensure that the order can be submitted normally.

[0033] The order quantity adjustment function adjusts the order quantity to an appropriate value based on the order quantity in the test case, the trading rules of the security, and the test intent. Specifically, it automatically adjusts the order quantity to an appropriate value based on the order quantity in the test case, the trading rules of the security (such as minimum order unit, maximum order quantity limit), and the user's test intent (successful matching, failed matching, successful cancellation, failed cancellation, etc.) to avoid order failure due to invalid quantity, which would affect the test results.

[0034] The client fund replenishment function replenishes funds for test accounts based on the transaction requirements in the test cases. However, no replenishment is performed when the test scenario involves selling securities. Specifically, based on the transaction requirements in the test case (such as the funds required to buy securities), the test account is automatically replenished with virtual funds (not involving real fund transfers) to ensure that the test account has sufficient funds to meet the order requirements. If the test scenario involves selling securities, no additional replenishment is required; only the normal flow of existing funds is verified.

[0035] The client holdings replenishment function works as follows: When the test case's trading direction is buy, if the test account currently has no corresponding securities holdings, it will replenish the corresponding number of securities holdings. When the test case's trading direction is sell, it checks whether the test account's existing holdings meet the selling quantity requirements; if not, it replenishes them accordingly. Specifically, for buy-type test cases, if the test account currently has no corresponding securities holdings, it automatically replenishes the corresponding number of securities holdings (virtual holdings, consistent with the holding information in the sample data) to ensure that the test scenario conforms to real trading logic; for sell-type test cases, it checks whether the existing holdings meet the selling quantity requirements, and automatically replenishes them if insufficient.

[0036] Furthermore, in one embodiment, the order price association algorithm specifically includes: S31: Define basic parameters, including the latest transaction price of the target (i.e., the current price, represented by last_price), the daily limit up price (represented by up_limit), the daily limit down price (represented by down_limit), the minimum price change unit (0.01 for stocks, 0.001 for funds, represented by tick), the order book price array from bid 1 to bid 5 (represented by bid5), the order book price array from ask 1 to ask 5 (represented by ask5), and the actively input price segment (i.e., the price segment input by the user, such as 5.2, 10, etc., represented by input_str). S32: Obtain the actively input price segment and perform cleaning processing, wherein the cleaning processing is to filter illegal characters and retain numbers according to a preset precision; Specifically, it filters out illegal characters (letters, symbols, spaces, etc.) from user input, retaining only numbers and one decimal point, and handles scenarios with multiple decimal points (retaining only the first one); if the input is empty, it proceeds directly to the next step; for example: inputting "12.a3" will result in "12.3" after cleaning; inputting "5..6" will result in "5.6" after cleaning; inputting "abc" will result in an empty value after cleaning. S33: Collect core prices, which include the latest transaction price of the target, the best bid / ask price, all five levels of order book prices, the price limit up / down, and the integer price near the latest transaction price of the target (i.e., the integer price near the current price, including the current price integer part and the integer part ±1). S34: Remove prices from the core price list that are lower than the limit down price, higher than the limit up price, do not meet the minimum change unit, and are negative, to obtain the legal candidate pool; S35: Retain the corresponding precision for prices in the valid candidate pool according to the type of the target (2 decimal places for stocks, 3 decimal places for funds), filter out prices with the cleaned content as a prefix, and form a matching list; if the input is empty, the entire valid candidate pool will be used directly; Example: stock target (tick=0.01), current price 10.23, input "10.2", the matching results are prices starting with "10.2", such as 10.20, 10.23, 10.22, 10.24, etc. S36: Compare the selected prices with different price types to obtain the weight score corresponding to each selected price. Sort the selected prices in descending order based on the weight score, and pre-set the ranking before filtering to determine the appropriate range of order prices and adjust the order prices accordingly. For example, if the price is almost equal to the current price, its weight score is 100; if the price is almost equal to the best bid or ask, its weight score is 90.

[0037] Specifically, the weight score of each filtered price is obtained. The higher the weight score, the higher the ranking. For prices with the same weight, they are sorted in ascending order by the difference from the current price. Finally, the top 10 prices are truncated and output (customizable). The weight score allocation rules are shown in Table 1 below.

[0038] Table 1 Weighting Score Allocation Rules

[0039] The implementation code for the commission price association algorithm in this application is shown below.

[0040] def price_associate(last_price, up_limit, down_limit, tick, bid5,ask5, input_str, show_cnt=10): # Phase 1: Cleaning Treatment def clean_prefix(s): res = "" dot_cnt = 0 for c in s: if c.isdigit(): res += c if c == "." and dot_cnt == 0: res += c dot_cnt += 1 return res match_prefix = clean_prefix(input_str) # Phase 2: Generate and filter the valid candidate pool price_pool = set() # Collect core prices price_pool.add(last_price) price_pool.add(bid5[0]) price_pool.add(ask5[0]) price_pool.update(bid5) price_pool.update(ask5) price_pool.add(up_limit) price_pool.add(down_limit) # Price near the current price (round number) int_p = int(last_price) price_pool.add(float(int_p)) price_pool.add(float(int_p + 1)) price_pool.add(float(int_p - 1)) # Filter Price valid_pool = [] for p in price_pool: if down_limit<= p<= up_limit and abs((p - down_limit) % tick)<1e-6and p>= 0: valid_pool.append(round(p, 3)) # Phase 3: Prefix Matching match_list = [] precision = 3 if tick == 0.001 else 2 for p in valid_pool: p_str = f"{p:.{precision}f}" if match_prefix == "" or p_str.startswith(match_prefix): match_list.append(p) # Phase 4: Weighted Ranking def get_score(p): if abs(p - last_price) < 1e-6: return 100 if abs(p - bid5[0])<1e-6 or abs(p - ask5[0])<1e-6: return 90 If p in bid5 or p in ask5: return 80 if abs(p - round(p)) < 1e-6: return 70 if abs(p - up_limit) < 1e-6: return 60 if abs(p - down_limit) < 1e-6: return 50 return 40 # Sort by weight in descending order, then by difference from current price in ascending order match_list.sort(key=lambda x: (-get_score(x), abs(x - last_price))) return match_list[:show_cnt] # Test Example (A-shares) if __name__ == "__main__": result = price_associate( last_price=10.23, up_limit=11.25, down_limit=9.21, tick=0.01, bid5=[10.22,10.21,10.20,10.19,10.18], ask5=[10.24,10.25,10.26,10.27,10.28], input_str="10.2" ) print("Lenovo price list:", result).

[0041] The securities trading business rapid replay testing method proposed in this application is based on real production data. It forms safe and usable sample data through desensitization, distillation and concentration. Combined with multi-dimensional association algorithms, it can realize one-click batch replay testing of more than a thousand types of trading business subjects, taking into account data authenticity, compliance and testing efficiency.

[0042] Secondly, embodiments of this application also provide a fast replay testing device for securities trading business.

[0043] In one embodiment, reference is made to Figure 5 , Figure 5 This is a schematic diagram of the functional modules of the securities trading business fast playback test device of this application. Figure 5 As shown, the securities trading business fast replay test device includes: an acquisition module and a test module.

[0044] The acquisition module is used to acquire production data from the securities trading system and to distill and concentrate the acquired production data to obtain sample data, analyze and summarize it, and generate test cases. The testing module is used to select test cases based on the playback test screening conditions for playback testing, and to adaptively and dynamically adjust the parameters of the test cases through a preset parameter factor association algorithm during the playback test.

[0045] Thirdly, this application provides a fast replay testing device for securities trading business. The fast replay testing device for securities trading business can be a personal computer (PC), a laptop, a server, or other device with data processing capabilities.

[0046] Reference Figure 6 , Figure 6 This is a schematic diagram of the hardware structure of the securities trading business fast replay test equipment involved in the embodiments of this application. In this embodiment, the securities trading business fast replay test equipment may include a processor, a memory, a communication interface, and a communication bus.

[0047] The communication bus can be of any type and is used to interconnect the processor, memory, and communication interface.

[0048] The communication interface includes input / output (I / O) interfaces, physical interfaces, and logical interfaces used for interconnecting internal components of the securities trading business fast playback test equipment, as well as interfaces used for interconnecting the securities trading business fast playback test equipment with other devices (such as other computing devices or user equipment). Physical interfaces can be Ethernet interfaces, fiber optic interfaces, ATM interfaces, etc.; user equipment can be displays, keyboards, etc.

[0049] Memory can be various types of storage media, such as random access memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM), flash memory, optical storage, hard disk, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), etc.

[0050] The processor can be a general-purpose processor, which can call the securities trading business fast replay test program stored in the memory and execute the securities trading business fast replay test method provided in the embodiments of this application. For example, the general-purpose processor can be a central processing unit (CPU). The method executed when the securities trading business fast replay test program is called can refer to the various embodiments of the securities trading business fast replay test method of this application, and will not be repeated here.

[0051] Those skilled in the art will understand that Figure 6 The hardware structure shown does not constitute a limitation of this application and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0052] The terms "comprising" and "having," and any variations thereof, in the specification, claims, and accompanying drawings of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to such process, method, product, or apparatus. The terms "first," "second," and "third," etc., are used to distinguish different objects, etc., and do not indicate a sequence, nor do they limit "first," "second," and "third" to different types.

[0053] In the description of the embodiments of this application, terms such as "exemplary," "for example," or "for instance" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplary," "for example," or "for instance" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of terms such as "exemplary," "for example," or "for instance" is intended to present the relevant concepts in a concrete manner.

[0054] In the description of the embodiments of this application, unless otherwise stated, " / " means "or". For example, A / B can mean A or B. The "and / or" in the text is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of this application, "multiple" means two or more.

[0055] In some processes described in the embodiments of this application, multiple operations or steps are included in a specific order. However, it should be understood that these operations or steps may not be executed in the order they appear in the embodiments of this application, or they may be executed in parallel. The sequence number of the operation is only used to distinguish different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or fewer operations, and these operations or steps may be executed sequentially or in parallel, and these operations or steps may be combined.

[0056] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device to execute the methods described in the various embodiments of this application.

[0057] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A method for rapid replay testing of securities trading transactions, characterized in that, The fast replay testing method for securities trading operations includes: The process involves acquiring production data from the securities trading system, distilling and concentrating the acquired data to obtain sample data, analyzing and summarizing the data, and generating test cases. Test cases are selected based on the playback test screening criteria for playback testing, and the parameters of the test cases are adaptively and dynamically adjusted during the playback test using a preset parameter factor association algorithm.

2. The method for rapid replay testing of securities trading operations as described in claim 1, characterized in that, The process of acquiring production data from the securities trading system and performing distillation and concentration on the acquired production data specifically includes: Obtain securities trading-related data from the securities trading system and perform anonymization processing to obtain production data; Database scripts are used to remove invalid order data and redundant noise data from production data; By using a distillation algorithm and combining it with a test scenario, production data is concentrated through distillation to obtain sample data.

3. The method for rapid replay testing of securities trading operations as described in claim 1, characterized in that, The generation of test cases specifically includes: Based on scheduled tasks and batch processing, the obtained sample data is analyzed and summarized according to market type, security type, and buying / selling direction to generate test cases and realize the correlation between test cases and sample data.

4. The method for fast replay testing of securities trading operations as described in claim 1, characterized in that, The selection of test cases for replay testing based on replay test filtering criteria specifically includes: Determine the replay test screening criteria, which include market type, security type, and buy / sell direction; Based on the defined replay test screening criteria, the required test cases are selected for replay testing, and a test report is output. The test report includes the number of executed test cases, the number of successes, the number of failures, the test input parameters, and the test output parameters.

5. The method for rapid replay testing of securities trading operations as described in claim 1, characterized in that, The preset parameter factor association algorithm includes an order price association algorithm, an order quantity adjustment function, a customer fund blue replenishment function, and a customer holding blue replenishment function.

6. The method for fast replay testing of securities trading operations as described in claim 5, characterized in that: The commission price association algorithm is used to adjust the commission price to a suitable range based on the commission price in the test case, combined with the current market conditions and testing intent of the testing environment; The order quantity adjustment function adjusts the order quantity to an appropriate value based on the order quantity in the test case, combined with the trading rules of the security and the test intent. The customer fund replenishment function replenishes funds for test accounts based on the transaction needs in the test cases. However, when the test scenario involves selling securities, no fund replenishment is performed. The client holdings replenishment function is as follows: when the trading direction of the test case is to buy, if the test account currently has no corresponding securities holdings, the corresponding number of securities holdings will be replenished. When the trading direction of the test case is to sell, the existing holdings of the test account are checked to see if they meet the selling quantity requirements. If not, they will be replenished accordingly.

7. The method for fast replay testing of securities trading operations as described in claim 6, characterized in that, The specific components of the order price association algorithm include: Define basic parameters, which include the latest transaction price of the target, the daily limit up price, the daily limit down price, the minimum price fluctuation unit, the order book price arrays from buy 1 to buy 5, the order book price arrays from sell 1 to sell 5, and the actively input price segment; The price fragments input by the user are obtained and cleaned, wherein the cleaning process involves filtering out illegal characters and retaining numbers according to a preset precision. Collect core prices, which include the latest transaction price of the target, the best bid / ask price, all five levels of order book prices, the price limit up / down price, and the integer price near the latest transaction price of the target. Prices that are lower than the limit down price, higher than the limit up price, do not meet the minimum price change unit, or are negative are removed from the core price list to obtain the legal candidate pool. The prices in the legal candidate pool are retained according to the type of the target, and the prices with the cleaned content as a prefix are filtered out to form a matching list. The selected prices are compared with different price types to obtain the weight score corresponding to each selected price. Based on the weight score, the selected prices are sorted in descending order. The pre-set ranking is used to determine the appropriate range of the order price and to adjust the order price accordingly.

8. A fast playback testing device for securities trading operations, characterized in that, The securities trading business fast replay testing device includes: The acquisition module is used to acquire production data from the securities trading system and distill and concentrate the acquired production data to obtain sample data, analyze and summarize it, and generate test cases. The testing module is used to select test cases for replay testing based on replay test screening conditions, and to adaptively and dynamically adjust the parameters of the test cases through a preset parameter factor association algorithm during the replay test.

9. A fast playback testing device for securities trading operations, characterized in that, The securities trading business fast replay test device includes a processor, a memory, and a securities trading business fast replay test program stored in the memory and executable by the processor, wherein when the securities trading business fast replay test program is executed by the processor, it implements the steps of the securities trading business fast replay test method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a securities trading business fast replay test program, wherein when the securities trading business fast replay test program is executed by a processor, it implements the steps of the securities trading business fast replay test method as described in any one of claims 1 to 7.