Parallel playback testing device and method
Through the testing device and method of parallel playback, the problem that the trading system test device in the prior art cannot effectively detect gateways and business processing modules is solved, and more accurate and comprehensive detection of the trading system is achieved, ensuring the verifiability and adaptability of the detection results.
Patent Information
- Application Number
- CN202411893030.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2044-12-20
AI Technical Summary
现有技术中的交易系统测试装置无法有效检测各网关情况及业务处理模块,导致无法满足对交易系统的有效测试。
A test device and method for parallel playback is proposed, and a test data management module, a test data sorting module and a business processing result acquisition module are used to achieve more accurate and comprehensive detection of the trading system. 具体步骤包括:将测试数据按预设顺序排序后输送至业务处理模块,获取处理结果数据集,并通过比对目标结果来判断交易系统的正常运行。
It realizes more accurate detection of trading systems, ensures the verifiability and comprehensiveness of the test results, and can adapt to the needs of different trading systems.
Smart Images

Figure CN120029832A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of big data technology, in particular to the field of transaction core system technology, and specifically refers to a parallel playback testing device and method. Background Art
[0002] As technology and business continue to advance and develop, various trading systems will continue to be updated to meet more trading management needs. Whether the trading system can run smoothly and reliably is the key to ensuring that transactions can be carried out in an orderly manner. Therefore, the updated trading system usually needs to be tested using a trading system test device before it is put into formal operation. Only after the trial operation is problem-free can it be put into formal operation. Based on the development of Internet technology and smart device technology, many traditional transactions that need to be conducted face-to-face have gradually been replaced by online transactions. Transaction information will be sent to the business processing module of the trading system through different gateway modules for processing.
[0003] The transaction system testing device in the prior art cannot well take into account the effective detection of the conditions of each gateway and the business processing module.
[0004] Due to the above-mentioned technical problems, the trading system testing device in the prior art cannot meet the requirements of effective testing of the trading system. Summary of the invention
[0005] In view of the above-mentioned defects of the prior art, the present invention proposes a test device and method for parallel playback of a trading system, which can play back data in a parallel manner while ensuring that the replayed data is in the same order as the original data, thereby achieving more accurate detection of the trading system and more comprehensive detection of the trading system.
[0006] In order to achieve the above object, the parallel playback test device and method of the present invention are as follows:
[0007] In a first aspect, an embodiment of the present invention provides a parallel playback test device, which is applied to a transaction system to be tested, wherein the transaction system includes a business processing module and a plurality of gateway modules, and the parallel playback test device includes a test data management module, a test data sorting module, and a business processing result acquisition module;
[0008] The test data management module is used to store a test data set, the test data set includes a plurality of test data, each of the test data includes data content information of the test data, data sequence information of the test data and data transmission channel information of the test data; the test data management module is also used to transmit the data sequence information of all the test data to the test data sorting module, and transmit each of the test data to the corresponding gateway module or the test data sorting module according to the data transmission channel information of each of the test data;
[0009] The test data sorting module is used to receive the test data output from each of the gateway modules, and the test data sorting module is also used to sort the test data received from each of the gateway modules and the test data received from the test data management module according to the data sequence information of each of the test data, so as to generate a sorted test data set, and the test data sorting module is also used to sequentially transmit the test data in the sorted test data set to the business processing module, so that the business processing module generates a processing result data set according to the sorted test data set;
[0010] The business processing result acquisition module is used to acquire the processing result data set output from the business processing module;
[0011] The processing result data set includes a plurality of test result data, and each of the test result data includes data content information of the test result data, data sequence information of the test result data, and data transmission channel information of the test result data.
[0012] In some embodiments, the test data management module is further used to obtain the test result data that should be output by each gateway module after receiving the processing result data set, and generate a gateway transmission result data set according to the test result data output by all the gateway modules;
[0013] Each of the gateway modules determines whether each of the test result data should be output by the gateway module according to the data transmission channel information of each of the test result data.
[0014] In some embodiments, the parallel playback test device further includes a test result analysis module;
[0015] The test result analysis module is used to compare the processing result data set and the gateway transmission result data set obtained during the test with the processing result data set and the target gateway transmission result data set preset by the system. If the comparison results are consistent, it is determined that the transaction system can operate normally; otherwise, it is determined that the transaction system cannot operate normally.
[0016] In some embodiments, the test data set is generated from historical generation data of the disk.
[0017] In a second aspect, an embodiment of the present invention further provides a parallel playback test method, which is applied to a transaction system to be tested, wherein the transaction system includes a business processing module and a plurality of gateway modules, and the parallel playback test method includes:
[0018] Transmit each test data in the system preset test data set and the data transmission channel information according to the test data to the corresponding gateway module or the test data sorting module respectively;
[0019] Sorting the test data received from each of the gateway modules and the test data received from the test data management module according to the data sequence information of each of the test data to generate a sorted test data set;
[0020] The test data in the sorted test data set is sequentially transmitted to the business processing module, so that the business processing module generates a processing result data set according to the sorted test data set;
[0021] Acquire the processing result data set output from the business processing module;
[0022] The processing result data set includes a plurality of test result data, and each of the test result data includes data content information of the test result data, data sequence information of the test result data, and data transmission channel information of the test result data.
[0023] In some embodiments, the parallel playback testing method further includes:
[0024] Acquire the test result data that should be output by each gateway module after the gateway module receives the processing result data set, and generate a gateway transmission result data set according to the test result data output by all the gateway modules;
[0025] Each of the gateway modules determines whether each of the test result data should be output by the gateway module according to the data transmission channel information of each of the test result data.
[0026] In some embodiments, the parallel playback testing method further includes:
[0027] The processing result data set and the gateway transmission result data set obtained during the test are compared with the processing result data set and the gateway transmission result data set of the target preset by the system. If the comparison results are consistent, it is determined that the trading system can operate normally; otherwise, it is determined that the trading system cannot operate normally.
[0028] In some embodiments, the test data set is generated from historical generation data of the disk.
[0029] In a third aspect, an embodiment of the present invention further provides a parallel playback test device, comprising: at least one processor; a memory coupled to the at least one processor, the memory storing executable instructions, wherein the executable instructions, when executed by the at least one processor, implement the method described in any one of the second aspects above.
[0030] In a fourth aspect, an embodiment of the present invention further provides a chip for executing the method in the second aspect. Specifically, the chip includes: a processor for calling and running a computer program from a memory, so that a device equipped with the chip is used to execute the method in the second aspect.
[0031] In a fifth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method described in any one of the second aspects above is implemented.
[0032] Compared with the prior art, the present invention has the following beneficial effects:
[0033] In the present invention, the test data acquired from the gateway module that originally needs to be transmitted to the business processing module through the gateway module in parallel and the test data that does not need to pass through the gateway module are sorted in a preset data sequence order to generate a sorted test data set, and the test data in the sorted test data set are sequentially transmitted to the business processing module, so that the business processing module generates a processing result data set according to the sorted test data set, and collects the processing result data set output from the business processing module. In this way, it can be judged whether each gateway module can output the data received from the outside according to the processing result data set generated based on the test data set, and it can be judged whether the business processing module can perform corresponding processing according to the received data, thereby realizing the detection of the transaction system.
[0034] During the test, the data received by the gateway module is not directly transmitted to the business processing module, but is sorted in a preset order by the test data sorting module before being transmitted to the business processing module. Therefore, it can be ensured that the order of data received by the business processing module will not change due to external factors, such as changes in network speed, thereby avoiding the influence of external factors on the judgment of the test results, and the collected test results are easier to verify. At the same time, the test data that originally needs to be processed by the gateway will still be processed by the corresponding gateway according to the data transmission channel information of the test data. Therefore, the obtained processing result data set can be used to judge the status of the gateway module, and the entire detection process is more comprehensive.
[0035] The parallel playback test device and method of the present invention have the characteristics of easy operation, easier verification of test results, ability to obtain test results comprehensively and accurately, and good adaptability. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The concept, specific structure and technical effects of the present invention will be further described below in conjunction with the accompanying drawings to fully understand the purpose, characteristics and effects of the present invention.
[0037] Figure 1 It is a schematic diagram of the logical relationship between the client and the trading system for data transmission.
[0038] Figure 2 It is a schematic diagram of the logical relationship between the parallel playback test device and the transaction system for data transmission in one embodiment. DETAILED DESCRIPTION
[0039] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0040] It should be noted that, in this document, relational terms such as “first” and “second” are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations.
[0041] Generally speaking, a trading system mainly includes two main functional modules: a gateway module and a business processing module. Among them, a general trading system includes several gateway modules, each of which is used to connect multiple external clients and business processing modules. The connection here does not necessarily refer to a physical connection, but to the completion of the communication connection between multiple external clients and business processing modules.
[0042] Gateway module: It is equivalent to the gate of the entire trading system and is the bridgehead for data communication between external clients and the trading system. It collects uplink data from external clients, processes the data and sends it to the internal components of the trading system; at the same time, it obtains the final processing results from the internal components and feeds back the processing results (downlink data) to the external clients. There are many gateway modules, which can be expanded in parallel according to the business volume to facilitate the communication between external clients and trading systems.
[0043] Business processing module: collects data from different gateway modules. The data processed by the business processing module is sorted to form a certain data sequence. The business processing module can perform business processing on the data arranged in sequence, and finally feed back the processing results to the gateway module. For the trading system that has been officially put into use, the order of data received by the business processing module is determined by the order in which the business processing module actually receives the data. The subsequent trading system will execute the order of processing data according to this order. Once the order is determined, no matter what abnormal situation occurs in the subsequent business processing module, the trading system must process the data according to this order.
[0044] For a trading system, it may have multiple business processing modules. Once one of the business processing modules fails, the other business processing modules may continue to process the data in the determined order of receiving data. That is, one business processing module may constitute the main working node in the trading system, and the others are backup working nodes. When the business processing module constituting the main working node fails, the other business processing modules will continue to process the data according to the determined order of receiving data, thereby ensuring the high reliability of the trading system.
[0045] For data transmission relationship of trading system, please refer to Figure 1 As shown, Figure 1 This is a diagram of the logical relationship between the client and the trading system for data transmission. Figure 1 The diagram only expresses the data transmission relationship between the modules, so only two external clients (i.e., external client 1 and external client M), two gateway modules (gateway module 1 and gateway module N) and one business processing module are drawn. However, the actual application is not limited to the number of diagrams, and each gateway module generally serves multiple external clients. Figure 1It can be seen that each external client can input transaction data into the corresponding gateway module, and then the corresponding gateway module transmits the collected transaction data to the business processing module through the uplink data bus (in this process, each gateway module sends the client class data received from the client to the uplink data bus, and the business processing module obtains all the data it needs from the uplink data bus). Since there are multiple gateway modules, multiple gateway modules send data to the uplink data bus, and the timing of data sent by different gateways arriving at the uplink data bus is random. The business processing module will process the transaction data in sequence according to the order of the received transaction data (that is, when the business processing module receives the transaction data, it will first determine the order of the received transaction data, and then perform business processing), and then send the feedback transaction data information to the gateway module through the downlink data bus. Each gateway module will extract the feedback transaction data information corresponding to the transaction data sent by the grid module to the business processing module from the data packet sent by the business processing module and feed it back to the corresponding external client, thereby completing the online transaction operation and the feedback of transaction information.
[0046] For online transactions, the transaction system is an important part of ensuring transaction reliability. Therefore, it is very necessary to test the transaction system after each update. The present invention provides a parallel playback test device and method to perform comprehensive and effective testing on the transaction system. The embodiment of the present invention provides the following solutions:
[0047] like Figure 2 As shown, in the first aspect, this embodiment provides a parallel playback test device (ie Figure 2 The test device in the figure is applied to the trading system to be tested, the trading system includes a business processing module and several gateway modules, and the parallel playback test device includes a test data management module, a test data sorting module, a business processing result acquisition module and a test result analysis module (the business processing result acquisition module and the test result analysis module are not drawn in the figure);
[0048] The test data management module is used to store a test data set, wherein the test data set includes a plurality of test data (each data belongs to request data), and each of the test data includes data content information of the test data, data sequence information of the test data, and data transmission channel information of the test data; the test data management module is also used to transmit the data sequence information of all the test data to the test data sorting module, and transmit each of the test data to the corresponding gateway module or the test data sorting module according to the data transmission channel information of each of the test data;
[0049] The test data management module is also used to obtain the test result data that should be output by each gateway module after receiving the processing result data set, and generate a gateway transmission result data set according to the test result data output by all the gateway modules;
[0050] Each of the gateway modules determines whether each of the test result data should be output by the gateway module according to the data transmission channel information of each of the test result data.
[0051] The test data sorting module is used to receive the test data output from each of the gateway modules, and the test data sorting module is also used to sort the test data received from each of the gateway modules and the test data received from the test data management module according to the data sequence information of each of the test data, so as to generate a sorted test data set, and the test data sorting module is also used to sequentially transmit the test data in the sorted test data set to the business processing module, so that the business processing module generates a processing result data set according to the sorted test data set (the data in which is the result data corresponding to each request data, that is, Figure 2 Result data in );
[0052] The business processing result acquisition module is used to acquire the processing result data set output from the business processing module;
[0053] The processing result data set includes a plurality of test result data, and each of the test result data includes data content information of the test result data, data sequence information of the test result data, and data transmission channel information of the test result data.
[0054] The test result analysis module is used to compare the processing result data set and the gateway transmission result data set obtained during the test with the processing result data set and the target gateway transmission result data set preset by the system. If the comparison results are consistent, it is determined that the transaction system can operate normally; otherwise, it is determined that the transaction system cannot operate normally.
[0055] The test data set is composed of historically generated data that is stored on disk.
[0056] In order to simulate the real transaction scenario, the parallel playback test device will send data to different gateway modules in parallel when used. Since data is sent in parallel during the test, the order in which different gateway modules transmit data is somewhat random. If the disordered related data is directly sent to the business processing module, the test results will be difficult to verify. The parallel playback test device of the present embodiment transmits the data that should be directly transmitted to the business processing module through the gateway module to the test data sorting module, and uses the test data sorting module to uniformly sort the data that passes through the gateway and the data that does not pass through the gateway, and then transmits them to the business processing module for processing, thereby avoiding the problem of unstable test results caused by external networks or other reasons, and ensuring that the data sorting received by the business processing module of the trading system to be tested is consistent with the expected data sorting, that is, when the test data set is composed of the historical generated data of the disk, the order in which the test data is transmitted to the business processing module of the trading system to be tested will be consistent with the order in which the corresponding data is transmitted to the business processing module when the disk is transmitted, so that the test result data obtained in the current test process (including the processing result data set and the gateway transmission result data set obtained in the test process) can be directly compared with the historical test result data (including the target processing result data set and the gateway transmission result data set) to determine whether the current trading system can operate normally.
[0057] This parallel playback test device not only ensures that the order of data transmitted to the business processing module will not be affected by changes in external network speed, but also effectively verifies the function of the gateway module. The test results are easier to verify, ensuring comprehensive testing of the transaction system.
[0058] In order to better enable those skilled in the art to understand the importance of data sorting during the test process, a specific example is given below for illustration:
[0059] Assume that the trading system transmits the same batch of data through the same gateway modules for multiple times (for the sake of convenience, the example of transmitting data twice through the same two gateway modules is used for explanation), and when the test data is directly transmitted to the business processing module through the gateway module, the following situation will occur:
[0060] As mentioned above, the business processing module needs to collect data from each gateway module, and then sort the data according to the order in which the data enters the business processing module. However, the sorting at this time cannot guarantee that the sorting result of the data by the business processing module is consistent with the previous sorting result, so the processing result at this time may also change.
[0061] For example, there are two data a and b in the original historical data, one after the other. Data a is transmitted to the business processing module through the first gateway module, and data b is transmitted to the business processing module through the second gateway module. Under the condition that the data transmission channel remains unchanged, if the network data transmission efficiency of the first gateway module is faster than that of the second gateway module during the first data transmission, then the order of data received by the business processing module will be data a first, and then data b, and data processing will be performed based on this order to obtain the corresponding data processing result. During the second data transmission, if the network data transmission efficiency of the first gateway module is slower than that of the second gateway module, then the order of data received by the business processing module will be data b first, and then data a, and data processing will be performed based on this order to obtain the corresponding data processing result. In this way, although the same data is used and the same gateway module is used for data transmission, the order in which the business processing module receives the data may be affected by the network at different times, resulting in very large changes, and thus the final data processing results are also very different, resulting in the inability to compare the obtained test processing results with the target processing results, and thus resulting in inaccurate detection results.
[0062] Based on the above situation, the present invention utilizes the test data sorting module to effectively sort the data transmitted to the business processing module, and then transmits the data to the business processing module for processing, thereby effectively ensuring the effective execution of the test.
[0063] At the same time, the data that needs to be transmitted by the gateway module in this embodiment will still pass through the gateway module, thereby ensuring that the test data will pass through the gateway module first, then to the business processing module, and finally feedback to the gateway module like real transaction data, effectively meeting the detection and verification of the two core modules of the trading system (i.e., each gateway module and the business processing module). During the test process, the historical production data will cover the complete scenario of the interaction between the trading system and the external client during the trading session (i.e., during the trading time period), thereby ensuring the accuracy of the test results.
[0064] At the same time, the composition of historical generated data for disk placement is further explained below:
[0065] The so-called historical generated data for placement is data obtained from past trading systems that have been put into formal use. It is composed of external data input from various network modules to the business processing module and data generated inside the trading system, with a data set with a determined order of transmission to the business processing module (the order of relevant data is determined by the order in which data is input into the business processing module during the actual historical operation). It is a kind of historical data. At the same time, each data includes specific data content information, data sequence information (that is, the order information transmitted to the business processing module) and the data transmission channel information of the test data (that is, the information on which gateway the data is transmitted from, or the information generated by the trading system).
[0066] Among them, external data is mainly composed of customer-type business data, which is data reported to the trading system by each external client through the corresponding gateway module, and the data content information includes business request data such as login information, order information, and order cancellation information. The data generated inside the trading system is mainly composed of non-customer-type business data, which mainly includes initialization information data and business time data. When the relevant data is input into the business processing module, its data transmission channel information will be recorded, so that the test data in the test data set composed of the historical generated data on the disk will include the data content information of the test data, the data sequence information of the test data, and the data transmission channel information of the test data.
[0067] Each test data in the test data set composed of historical generated data on disk has a clear number. Each data has a unique number, and the numbers are incremented in order. This number is the data sequence information of the test data. The test data that needs to be input into the business processing module later will be sorted according to the number to ensure that during the test process, the order of the test data input into the business processing module each time is consistent with the order of the original data.
[0068] In addition, each test data in the test data set composed of historical generated data on disk has a data type information, indicating its data meaning (such as whether it is customer-class business data or data generated inside the transaction system), and the data transmission channel information of the test data is constituted by it to determine whether it needs to be transmitted through a gateway module and which gateway module it needs to be transmitted through.
[0069] The customer-class business data in the test data set composed of the historical data generated by the disk is the data input into the business processing module by the external client through the gateway module, which contains the information of which gateway module is used to report. The data generated inside the trading system in the test data set composed of the historical data generated by the disk is the data that does not need to be input into the business processing module through the gateway module. It is the data generated by the internal components of the trading system, that is, non-customer-class data. The test data sorting module will sort the customer-class business data received from the gateway module and the data generated inside the trading system according to their corresponding data sequence information, and then send them to the business processing module for testing.
[0070] The historical generated data stored in the disk includes not only the request data of the test data set but also the result data corresponding to the test data set. The corresponding result data can constitute the processing result data set of the target preset by the system and the gateway transmission result data set of the target.
[0071] The test data management module in the present invention can separate each test data according to its data transmission channel information, and determine whether each test data should be transmitted to the corresponding gateway module or the test data sorting module (wherein the data that does not need to be transmitted through the gateway module is transmitted to the test data sorting module), so that the data input through the external client is still reported through the corresponding gateway module in the new trading system, and it is ensured that the data generated within the trading system is still executed, and these data are reasonably integrated and processed.
[0072] The test data sorting module then sorts the integrated data according to the data sequence information to ensure that the data sequence input to the business processing module of the trading system to be tested is consistent with the data sequence collected and input to the business processing module of the original trading system, avoiding the problem that the order in which the business processing module receives data from the gateway is unpredictable after the external customer data is re-reported through different new gateways. Ensure that the processing result data set and the gateway transmission result data set obtained during the test can be compared with the system preset target processing result data set and the target gateway transmission result data set to determine whether the trading system can be officially put into operation.
[0073] The technical solution of this embodiment realizes that the test data set composed of historical data passes through the gateway module, and then determines the data sequence information of each test data based on the order of the historical data entering the business processing module, and sorts the test data directly sent to the test data sorting module and the data transmitted via the gateway module based on this, and then sends it to the business processing module for it to process the data, and derives the result data (i.e., the processing result data set), thereby ensuring the detection of the gateway module and ensuring that the purpose of using historical data to verify the trading system to be tested is achieved. That is, the new result data can be compared with the result data in the historical data to determine whether the new version of the trading system has changed the processing result of the historical data.
[0074] The test data management module can be composed of a single playback system, and a single playback system can be used to simulate multiple clients that issue trading instructions. That is, multiple connections share thread resources, and a specified number of threads are allocated to enable the single test data management module to simulate the connection between multiple clients and network modules. The overall structure and operation process are simpler, reducing the complexity of the deployment and operation of the parallel playback test device.
[0075] At the same time, the parallel playback test device can complete the detection without intruding into the business processing module of the trading system, avoiding new risks caused by changing the business processing module of the trading system and ensuring the accuracy of the detection. At the same time, the parallel playback test device can also be used to detect subsequent different versions of the trading system, and has reusability.
[0076] The parallel playback test device and the parallel playback test method in the above-mentioned embodiment can be applied to the detection of trading systems in the futures industry.
[0077] The trading system of the futures industry is a core system with extremely high reliability requirements in the futures industry, and its testing requirements are very comprehensive. When the trading system is changed and a new version is released, it needs to be tested comprehensively and effectively to ensure that the trading system can meet the usage requirements before it is put into formal use. The use of historical generated data (that is, historical production data accumulated during the production and operation of the trading system that was officially put into operation in the past, which are some data facts that actually occurred) to form a test data set to test the new trading system can effectively cover the characteristics of all production data. The test data composed of such historical generated data can comprehensively verify the data processing capabilities of the trading system.
[0078] When the parallel playback test device of this embodiment is used to detect the trading system of the futures industry using the test data set composed of the historical generated data of the disk, the core module of the trading system can process the test data set composed of the historical data, and the business processing module therein will process the data based on the test data set sorted by the test data sorting module. After processing the data of the last sorting number, all the processing results currently exported can be used to generate the processing result data set. During the test, the historical processing result data set generated by the trading system that was originally put into formal operation can be used as the processing result data set of the target preset by the system, and then the processing result data set generated by the current tested trading system can be compared with the historical processing result data set generated by the trading system that was originally put into formal operation, so as to judge whether the gateway module can complete the data upload and whether the business processing module can effectively process the uploaded data. At the same time, the test result data output by each gateway module can be obtained to generate a gateway transmission result data set, and it can be compared with the historical gateway transmission result data set generated by the trading system that was originally put into formal operation (i.e., the target gateway transmission result data set), so as to judge whether the data feedback of the business processing module and the data feedback function of the gateway module can be performed normally.
[0079] That is, when testing is performed using the parallel playback test device, the data generated by the tested trading system can be compared with the data generated by the past trading system. When the two are consistent, it can be determined that the newly released version of the trading system has no impact on the existing historical data. If there are unexpected results, it can help discover problems, thereby further ensuring the correctness of the trading system.
[0080] In order to make the data sorting result of the business processing module in the transaction system to be tested consistent with the target data sequence order, the parallel playback test device of this embodiment designs a module with an agent role (i.e., a test data sorting module) on the uplink data bus of the transaction system. The test data sorting module collects customer data from multiple gateway modules, and also directly obtains non-customer data in historical data through the test data management module. Then, the test data sorting module queues the acquired data according to the sequence information in the historical data (i.e., the data sequence information of each test data), thereby ensuring that the data sequence after the new queue is consistent with the data sequence of the original historical data. Finally, the agent module replaces the gateway module to pass the sorted data to the business processing module. During the entire test process, since the business processing module only receives the data from the agent role module (i.e., the test data sorting module), the order of the business processing module's subsequent queuing according to the order of receiving the data does not change the order of this data, so the data sequence after the business processing module finally queues is consistent with the sequence information of the original historical data.
[0081] After ensuring that the business processing module keeps the order of the upstream data consistent with the original data sequence, the business processing module will send the processing results (i.e., the processing result data set) to the downstream data bus. Since the data results include the business request results of all customers, the gateway module needs to filter out the customer business requests reported by itself from this total result data, and feed back the request results to the corresponding requester (where the requester is composed of a test data management module that simulates an external client during the test process), and finally form a complete data request-response process.
[0082] During the testing process of the trading system to be tested, two main modules, test data management module and test data sorting module, are designed to ensure the accuracy of the test.
[0083] Among them, the test data management module is equivalent to the playback module, which mainly plays the role of client and master control, and the test data sorting module plays the role of agent.
[0084] Test data management module: used to split customer data and non-customer data from the test data set composed of historical data (i.e. historically generated data that has been put on disk), wherein customer data is reported through the gateway module corresponding to the historical data, and non-customer data is directly transmitted to the test data sorting module. At the same time, the sorting rules of the sequence information of the original data are also transmitted to the test data sorting module. Customer data contains information about which gateway it is reported through. The playback module selects the corresponding gateway to report based on this information, and also receives the result information of the corresponding request from the gateway module. (That is, each test data can be transmitted to the corresponding gateway module or the test data sorting module through the data transmission channel information of each test data)
[0085] In the real environment, there are tens of thousands of external clients making business requests. For the convenience of deployment, this embodiment uses a test data management module composed of a single playback module to simulate the numerous external clients in the production environment. The playback module brings together the originally scattered client request-response pressure, making deployment more convenient. In the specific implementation, the playback module needs to be able to support the aggregated request-response pressure.
[0086] Test data sorting module: It collects and caches non-customer data from the playback module, and also collects and caches the corresponding test data from many gateway modules. The test data sorting module does not sort the test data in the order in which the relevant data is received, but rather sorts the corresponding data from the cached test data based on the sequence information of the original data received (i.e. the data sequence information of each test data), and then queues the data, and finally transmits the queued data to the core of business processing in the transaction system - the business processing module.
[0087] During the entire test process, from the perspective of the transaction system's gateway module, the test data management module simulates multiple external clients interacting with each gateway module, and all customer data submission and response are carried out through the test data management module. From the perspective of the transaction system's business processing module, the test data sorting module simulates each gateway sending data to it, and also receives the corresponding internal data. The business processing module only receives data from the test data sorting module, which ensures that its data sequence is consistent with the original data sequence. This ensures the comprehensiveness and accuracy of the entire test result.
[0088] Combination Figure 2 As shown, the parallel playback test device of this embodiment operates as follows when performing a test on a trading system:
[0089] 1. The test data management module reads and splits the test data set consisting of historical data;
[0090] 2. The test data management module sends the split test data, including:
[0091] 2.a Send the customer data to the corresponding gateway module according to the data transmission channel information of each test data;
[0092] 2.b Send the non-customer data to the test data sorting module according to the data transmission channel information of each test data;
[0093] 2.c Send the current data sequence order to the test data sorting module;
[0094] 3. Each gateway module processes the received customer data and publishes it to the test data sorting module;
[0095] 4. The test data sorting module sorts the data and publishes the ordered data to the uplink data bus;
[0096] 5. The business processing module obtains the sorted data from the uplink data bus;
[0097] 6. The business processing module processes the data and sends the processing results to the downlink data bus;
[0098] 7. The gateway module obtains the result data from the downlink data bus;
[0099] 8. The gateway module selects the customer request results processed by itself from the full amount of result data, and responds the result data to the test data management module;
[0100] 9. The business processing module exports new result data (including the processing result data set input into the business processing result acquisition module, and the gateway transmission result data set input into the test data management module through each gateway). The test result analysis module determines whether the new version of the trading system has changed the processing results of the historical data by comparing the new result data (processing result data set and gateway transmission result data set) with the input historical data (i.e., the processing result data set of the system preset target and the gateway transmission result data set of the target).
[0101] It should be noted that there is no mandatory order between the above steps 2.a, 2.b, and 2.c. At the same time, even if the test data management module sends each test data to the test data sorting module and each gateway module according to the preset order, the order in which each test data arrives at the test data sorting module will be random, and the data will be released to the uplink data bus after the sorting operation of the test data sorting module in the above step 4.
[0102] Among them, the uplink data bus refers to the transmission line used to transmit the uplink data flow (that is, the data flow transmitted from the end user or external device toward the processor) to the processor, which is used to send the data that the external client needs to send to the business processing module; and the downlink data bus refers to the transmission line used to transmit the downlink data flow (that is, the data flow transmitted from the processor to the end user or external device) to the end user or external device, which is used to send the data output by the business processing module to the external client.
[0103] The above processing flow can effectively realize the detection of the trading system.
[0104] In a second aspect, an embodiment of the present invention provides a parallel playback test method, which is applied to a transaction system to be tested, wherein the transaction system includes a business processing module and a plurality of gateway modules, and the parallel playback test method includes:
[0105] Transmit each test data in the system preset test data set and the data transmission channel information according to the test data to the corresponding gateway module or the test data sorting module respectively;
[0106] Sorting the test data received from each of the gateway modules and the test data received from the test data management module according to the data sequence information of each of the test data to generate a sorted test data set;
[0107] The test data in the sorted test data set is sequentially transmitted to the business processing module, so that the business processing module generates a processing result data set according to the sorted test data set;
[0108] Acquire the processing result data set output from the business processing module;
[0109] The processing result data set includes a plurality of test result data, and each of the test result data includes data content information of the test result data, data sequence information of the test result data, and data transmission channel information of the test result data.
[0110] Acquire the test result data that should be output by each gateway module after the gateway module receives the processing result data set, and generate a gateway transmission result data set according to the test result data output by all the gateway modules;
[0111] Each of the gateway modules determines whether each of the test result data should be output by the gateway module according to the data transmission channel information of each of the test result data.
[0112] The processing result data set and the gateway transmission result data set obtained during the test are compared with the processing result data set and the gateway transmission result data set of the target preset by the system. If the comparison results are consistent, it is determined that the trading system can operate normally; otherwise, it is determined that the trading system cannot operate normally.
[0113] In this embodiment, the test data set can also be generated from historical generation data of the disk.
[0114] The parallel playback test method in this embodiment not only ensures that the order of data transmitted to the business processing module will not be affected by changes in external network speed, but also effectively verifies the function of the gateway module, making the test results easier to verify and ensuring comprehensive testing of the transaction system.
[0115] In a third aspect, the present invention further provides a parallel playback test device, comprising:
[0116] At least one processor; a memory coupled to the at least one processor, the memory storing executable instructions, wherein the executable instructions, when executed by the at least one processor, implement the method of the second aspect of the present invention.
[0117] This embodiment provides a parallel playback test device, including: at least one processor; a memory coupled to the at least one processor. The processor and the memory can be provided separately or integrated together.
[0118] For example, the memory may include a random access memory, a flash memory, a read-only memory, a programmable read-only memory, a non-volatile memory or a register, etc. The processor may be a central processing unit (CPU), etc. or a graphic processing unit (GPU). The memory may store executable instructions. The processor may execute the executable instructions stored in the memory to implement the various processes described herein.
[0119] It can be understood that the memory in this embodiment can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a ROM (Read-Only Memory), a PROM (Programmable ROM), an EPROM (Erasable PROM), an EEPROM (Electrically EPROM), or a flash memory. The volatile memory can be a RAM (Random Access Memory), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as SRAM (Static RAM), DRAM (Dynamic RAM), SDRAM (Synchronous DRAM), DDR SDRAM (Double Data Rate SDRAM), ESDRAM (Enhanced SDRAM), SLDRAM (Synchlink DRAM), and DRRAM (Direct Rambus RAM). The memories described herein are intended to include, but are not limited to, these and any other suitable types of memories.
[0120] In some embodiments, the memory stores the following elements, upgrade packages, executable units or data structures, or a subset thereof, or an extended set thereof: an operating system and an application program.
[0121] The operating system includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic services and process hardware-based tasks. The application program includes various application programs, which are used to implement various application services. The program for implementing the method of the embodiment of the present invention can be included in the application program.
[0122] In the embodiment of the present invention, the processor calls a program or instruction stored in the memory, specifically, a program or instruction stored in an application program, and the processor is used to execute the method steps provided in the second aspect.
[0123] In a fourth aspect, an embodiment of the present invention further provides a chip for executing the method in the second aspect. Specifically, the chip includes: a processor for calling and running a computer program from a memory, so that a device equipped with the chip is used to execute the method in the second aspect.
[0124] In addition, in a fifth aspect, the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method of the second aspect of the present invention are implemented.
[0125] For example, machine-readable storage media may include, but are not limited to, various known and unknown types of non-volatile memory.
[0126] In a sixth aspect, an embodiment of the present invention further provides a computer program product, comprising computer program instructions, which enable a computer to execute the method in the second aspect.
[0127] It will be appreciated by those skilled in the art that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0128] In the embodiments of the present application, the disclosed systems, devices and methods can be implemented in other ways. For example, the division of units is only a logical function division, and there can be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system. In addition, the coupling between the various units can be direct coupling or indirect coupling. In addition, the various functional units in the embodiments of the present application can be integrated into a processing unit, or can be separate physical existences, etc.
[0129] It should be understood that in the various embodiments of the present application, the size of the serial number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0130] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a machine-readable storage medium. Therefore, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a machine-readable storage medium, which can include several instructions to enable an electronic device to perform all or part of the technical solution described in the embodiments of the present application. The above-mentioned storage medium may include various media that can store program codes, such as ROM, RAM, removable disk, hard disk, magnetic disk or optical disk.
[0131] In the present invention, the test data management module replays the test data that needs to pass through the gateway module in parallel to each gateway module, and directly replays the test data that does not need to pass through the gateway module to the data sorting module. The test data sorting module sorts the test data received from each of the gateway modules and the test data that does not pass through the gateway module and is directly received from the test data management module in a preset order (i.e., the test data in the received test data set is sorted according to the data sequence information of each of the test data) to generate a sorted test data set, and the test data in the sorted test data set is sequentially transmitted to the business processing module, so that the business processing module generates a processing result data set according to the sorted test data set, and collects the processing result data set output from the business processing module. In this way, it can be judged whether each gateway module can output the data received from the outside according to the processing result data set generated based on the test data set, and it can be judged whether the business processing module can perform corresponding processing according to the received data, thereby realizing the detection of the transaction system.
[0132] During the test, the data received by the gateway module is not directly transmitted to the business processing module, but is sorted in a preset order by the test data sorting module before being transmitted to the business processing module. Therefore, it can be ensured that the order of data received by the business processing module will not change due to external factors, such as changes in network speed, thereby avoiding the influence of external factors on the judgment of the test results, making the test results easier to verify. At the same time, the test data that originally needs to be processed by the gateway will still be processed by the corresponding gateway according to the data transmission channel information of the test data. Therefore, the obtained processing result data set can be used to judge the status of the gateway module, and the entire detection process is more comprehensive.
[0133] The parallel playback test device and method of the present invention replays test data composed of historical data in a parallel manner, and at the same time ensures that the order in which the replayed test data is transmitted to the business processing module is consistent with the order of the historical data transmitted to the business processing module during the test process, so as to achieve the purpose of effective testing. It has the characteristics of easy operation, easy verification of test results, ability to obtain test results comprehensively and accurately, and good adaptability.
[0134] The above contents are only specific implementation methods of the present application, and the protection scope of the present application is not limited thereto. Those skilled in the art may make changes or substitutions within the technical scope disclosed in the present application, and these changes or substitutions shall be within the protection scope of the present application.
Claims
1. A parallel playback test device, characterized in that: Applied to a transaction system to be tested, the transaction system includes a business processing module and several gateway modules, and the parallel playback test device includes a test data management module, a test data sorting module and a business processing result acquisition module; The test data management module is used to store a test data set, the test data set includes a plurality of test data, each of the test data includes data content information of the test data, data sequence information of the test data and data transmission channel information of the test data; the test data management module is also used to transmit the data sequence information of all the test data to the test data sorting module, and transmit each of the test data to the corresponding gateway module or the test data sorting module according to the data transmission channel information of each of the test data; The test data sorting module is used to receive the test data output from each of the gateway modules, and the test data sorting module is also used to sort the test data received from each of the gateway modules and the test data received from the test data management module according to the data sequence information of each of the test data, so as to generate a sorted test data set, and the test data sorting module is also used to sequentially transmit the test data in the sorted test data set to the business processing module, so that the business processing module generates a processing result data set according to the sorted test data set; The business processing result acquisition module is used to acquire the processing result data set output from the business processing module; The processing result data set includes a plurality of test result data, and each of the test result data includes data content information of the test result data, data sequence information of the test result data, and data transmission channel information of the test result data.
2. The parallel playback test device according to claim 1, characterized in that: The test data management module is also used to obtain the test result data that should be output by each gateway module after receiving the processing result data set, and generate a gateway transmission result data set according to the test result data output by all the gateway modules; Each of the gateway modules determines whether each of the test result data should be output by the gateway module according to the data transmission channel information of each of the test result data.
3. The parallel playback test device according to claim 2, characterized in that: The parallel playback test device also includes a test result analysis module; The test result analysis module is used to compare the processing result data set and the gateway transmission result data set obtained during the test with the processing result data set and the target gateway transmission result data set preset by the system. If the comparison results are consistent, it is determined that the transaction system can operate normally; otherwise, it is determined that the transaction system cannot operate normally.
4. The parallel playback test device according to claim 1, characterized in that: The test data set is generated from historical generated data that is dropped onto a disk.
5. A parallel playback test method, characterized in that: Applied to a transaction system to be tested, the transaction system includes a business processing module and several gateway modules, and the parallel playback test method includes: Transmit each test data in the system preset test data set and the data transmission channel information according to the test data to the corresponding gateway module or the test data sorting module respectively; Sorting the test data received from each of the gateway modules and the test data received from the test data management module according to the data sequence information of each of the test data to generate a sorted test data set; The test data in the sorted test data set is sequentially transmitted to the business processing module, so that the business processing module generates a processing result data set according to the sorted test data set; Acquire the processing result data set output from the business processing module; The processing result data set includes a plurality of test result data, and each of the test result data includes data content information of the test result data, data sequence information of the test result data, and data transmission channel information of the test result data.
6. The parallel playback test method according to claim 5, characterized in that: The parallel playback test method also includes: Acquire the test result data that should be output by each gateway module after the gateway module receives the processing result data set, and generate a gateway transmission result data set according to the test result data output by all the gateway modules; Each of the gateway modules determines whether each of the test result data should be output by the gateway module according to the data transmission channel information of each of the test result data.
7. The parallel playback test method according to claim 6, characterized in that: The parallel playback test method also includes: The processing result data set and the gateway transmission result data set obtained during the test are compared with the processing result data set and the gateway transmission result data set of the target preset by the system. If the comparison results are consistent, it is determined that the trading system can operate normally; otherwise, it is determined that the trading system cannot operate normally.
8. The parallel playback test method according to claim 5, characterized in that: The test data set is generated from historical generated data that is dropped onto a disk.
9. A parallel playback test device, comprising: at least one processor; A memory coupled to the at least one processor, the memory storing executable instructions, wherein the executable instructions, when executed by the at least one processor, enable the method according to any one of claims 5 to 8 to be implemented.
10. A chip, characterized in that: It comprises: a processor, used to call and run a computer program from a memory, so that a device equipped with the chip executes: a method as claimed in any one of claims 5 to 8.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method as described in any one of claims 5 to 8 are implemented.
Citation Information
Patent Citations
System and method for multicast of live content
CN118055276A
Methods for upgrading a trading system
EP1734473A1