A test device and method for parallel playback
Through the testing method of parallel playback, the trading system is detected using the test data management and sorting module, which solves the problem of insufficient testing of the trading system in the existing technology, and realizes comprehensive and accurate detection of the trading system.
Patent Information
- Application Number
- CN202411893030.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2044-12-20
AI Technical Summary
The existing trading system testing device cannot effectively take into account the inspection of each gateway situation and the service processing module, resulting in insufficient testing of the trading system.
The test method of parallel playback is adopted, and the test data is sorted and distributed through the test data management module and the test data sorting module to ensure that the data is sent to the business processing module in a preset order, and the business processing result acquisition module and the test result analysis module are compared to the comprehensive inspection of the trading system.
It ensures the accuracy and comprehensiveness of the trading system inspection, avoids the influence of external factors, ensures that the test results are easy to verify, have strong adaptability, and are suitable for comprehensive testing of the trading system.
Smart Images

Figure CN120029832B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of big data technology, and particularly to the field of transaction core system technology. Specifically, it refers to a test device and method for parallel playback. Background Art
[0002] With the continuous progress and development of technology and business, various trading systems will also be continuously updated to meet more trading management requirements. Whether the trading system can operate stably and reliably is the key to ensuring the orderly progress of transactions. Therefore, before the updated trading system is put into formal operation, it usually needs to be tested by a trading system test device. After its trial operation is problem-free, it can be put into formal operation. Based on the development of Internet technology and intelligent device technology, many traditional transactions that need to be carried out 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 trading system test devices in the prior art cannot well take into account the effective detection of each gateway situation and the business processing module.
[0004] Due to the above-mentioned existing technical problems, the trading system test devices in the prior art cannot meet the 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 applied to a trading system, which can playback data in parallel, while ensuring that the data after playback is in the same order as the original data, so as to realize more accurate detection of the trading system and more comprehensive detection of the trading system.
[0006] To achieve the above object, the test device and method for parallel playback of the present invention are as follows:
[0007] In a first aspect, an embodiment of the present invention proposes a test device for parallel playback, which is applied to a trading system to be tested. The trading system includes a business processing module and several gateway modules. The test device for parallel playback 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, where the test data set includes several test data, and each test data includes 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; the test data management module is further used to send the data sequence information of all the test data to the test data sorting module, and send each test data to the corresponding gateway module or the test data sorting module according to the data transmission channel information of each test data;
[0009] The test data sorting module is used to receive the test data output from each gateway module, and the test data sorting module is further used to sort the test data received from each gateway module and the test data received from the test data management module according to the data sequence information of each test data to generate a sorted test data set, and the test data sorting module is further used to sequentially send the test data in the sorted test data set to the service processing module, so that the service processing module generates a processing result data set according to the sorted test data set;
[0010] The service processing result acquisition module is used to acquire the processing result data set output from the service processing module;
[0011] Among them, the processing result data set includes several test result data, and each test result data includes the data content information of the test result data, the data sequence information of the test result data, and the data transmission channel information of the test result data.
[0012] In some embodiments, the test data management module is further used to acquire the test result data that should be output by the gateway module after each 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;
[0013] Among them, each gateway module determines whether each test result data should be output by the gateway module according to the data transmission channel information of each test result data.
[0014] In some embodiments, the test device for parallel playback 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 process with the target processing result data set and the target gateway transmission result data set preset by the system. If the comparison result is consistent, it is determined that the trading system can run normally, otherwise, it is determined that the trading system cannot run normally.
[0016] In some embodiments, the test data set is generated from the historical generated data of the disk drop.
[0017] In a second aspect, an embodiment of the present invention further provides a test method for parallel playback, which is applied to a transaction system to be tested. The transaction system includes a service processing module and several gateway modules. The test method for parallel playback includes:
[0018] Deliver each test data in the system-predefined test data set and the data transmission channel information of the test data to the corresponding gateway module or the test data sorting module respectively;
[0019] Sort the test data received from each gateway module and the test data received from the test data management module according to the data sequence information of each test data to generate a sorted test data set;
[0020] Deliver the test data in the sorted test data set to the service processing module in sequence, and make the service processing module generate a processing result data set according to the sorted test data set;
[0021] Obtain the processing result data set output from the service processing module;
[0022] Among them, the processing result data set includes several test result data. Each test result data includes the data content information of the test result data, the data sequence information of the test result data, and the data transmission channel information of the test result data.
[0023] In some embodiments, the test method for parallel playback further includes:
[0024] 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 gateway modules;
[0025] Among them, each gateway module determines whether each test result data should be output by the gateway module according to the data transmission channel information of each test result data.
[0026] In some embodiments, the test method for parallel playback further includes:
[0027] Compare the processing result data set and the gateway transmission result data set obtained during the test with the system-predefined target processing result data set and the target gateway transmission result data set. If the comparison result is consistent, it is determined that the transaction system can run normally; otherwise, it is determined that the transaction system cannot run normally.
[0028] In some embodiments, the test data set is generated from the historical generated data of the disk drop.
[0029] In a third aspect, an embodiment of the present invention further provides a test device for parallel playback, including: 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, cause the method described in any one of the above second aspects to be implemented.
[0030] In a fourth aspect, an embodiment of the present invention further provides a chip for executing the method in the above second aspect. Specifically, the chip includes: a processor for calling and running a computer program from a memory, so that a device installed with the chip is used to execute the method in the above 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, and when the computer program is executed by a processor, the method described in any one of the above second aspects is implemented.
[0032] Compared with the prior art, the present invention has the following beneficial effects:
[0033] In the present invention, the test data obtained from the gateway module that originally needs to be transported to the service processing module in parallel through the gateway module and the test data that does not need to pass through the gateway module are sorted in the order of a preset data sequence to generate a sorted test data set, and the test data in the sorted test data set is sequentially transported to the service processing module, so that the service 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 service processing module. So that it can be judged whether each gateway module can output the externally received data according to the processing result data set generated based on the test data set, and it can be judged whether the service processing module can execute corresponding processing according to the received data, thereby realizing the detection of the trading system.
[0034] During the test process, the data received by the gateway module is not directly transported to the service processing module, but is sorted by the test data sorting module in a preset order and then transported to the service processing module. Therefore, it can be ensured that the order of the data received by the service processing module will not change due to external factors, such as network speed changes, thus avoiding the influence of external factors on the judgment of the detection result, and the collected detection result is easier to verify. At the same time, the test data that originally needed 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 state of the gateway module, and the entire detection process is more comprehensive.
[0035] The test device and method for parallel playback of the present invention have the characteristics of convenient operation, easier verification of detection results, the ability to comprehensively and accurately obtain detection results, 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 drawings to fully understand the purpose, features and effects of the present invention.
[0037] Figure 1 It is a schematic diagram of the logical relationship for data transmission between the client and the trading system.
[0038] Figure 2 It is a schematic diagram of the logical relationship for data transmission between the test device for parallel playback and the trading system in an embodiment. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0039] To make the objectives, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions 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 some but not all of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0040] It should be noted that in this article, relational terms such as "first" and "second" are only 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 major functional modules - a gateway module and a business processing module. Among them, a general trading system usually includes several gateway modules, and each gateway module is respectively used to connect multiple external clients and the business processing module. Here, the connection does not necessarily refer to a physical connection, but refers to completing the communication connection between multiple external clients and the business processing module. Among them,
[0042] Gateway module: Equivalent to the city gate of the entire trading system, it is the bridgehead for data communication between external clients and the trading system. It collects the upstream 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 (downstream data) to external clients. There are many gateway modules, and they can be scaled out in parallel according to the business volume, providing convenience for the communication between external clients and the trading system.
[0043] Business processing module: Collect data from different gateway modules. The data processed by the business processing module forms a definite data sequence after sorting. The business processing module can perform business processing on the sequentially arranged data and finally feedback the processing result to the gateway module. For a transaction system that is officially put into application, the order of the data received by the business processing module is determined by the actual received order of the business processing module. Subsequently, the transaction system will execute the data processing in sequence according to this order. Once this order is determined, regardless of any abnormal situation that occurs in the subsequent business processing module, the transaction system needs to process the data according to this order.
[0044] For a transaction system, it can have multiple business processing modules. Once one of the business processing modules fails, other business processing modules can continue to process the data according to the determined order of receiving data. That is, in the transaction system, one business processing module can form the main working node, and the others are standby working nodes. When the business processing module that forms the main working node fails, other business processing modules will continue to process the data according to the already determined order of receiving data, thus ensuring the high reliability of the transaction system.
[0045] The data transmission relationship of the transaction system can be referred to Figure 1 as shown Figure 1 in the schematic diagram of the logical relationship of data transmission between the client and the transaction system. It should be noted that Figure 1 only shows the data transmission relationship between each module, 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, but in actual application, the number shown in the figure is not limited. Generally, each gateway module will serve multiple external clients. From Figure 1It can be seen that each external client can input transaction data into the corresponding gateway module. Then, the corresponding gateway module transmits the collected transaction data to the service processing module through the upstream data bus. (In this process, each gateway module sends the customer data received from the client to the upstream data bus, and the service processing module obtains all the data it needs from the upstream data bus.) Since there are multiple gateway modules and multiple gateway modules all send data to the upstream data bus, the timing of the data sent by different gateway modules reaching the upstream data bus is random. The service processing module processes the transaction data sequentially according to the order of the received transaction data. (That is, when the service processing module receives the transaction data, it will first determine the order of receiving the transaction data and then perform service processing.) Then, it sends the feedback transaction data information to the gateway module through the downstream data bus. Each gateway module extracts the feedback transaction data information corresponding to the transaction data sent by the gateway module to the service processing module from the data packet sent by the service processing module and feeds it back to the corresponding external client, thus completing the operation of the online transaction and the feedback of the transaction information.
[0046] For online transactions, the transaction system is an important part to ensure the reliability of transactions. Therefore, it is very necessary to detect the transaction system after each update. The present invention provides a parallel playback test device and method to comprehensively and effectively detect the transaction system. The embodiments of the present invention provide the following solutions:
[0047] As Figure 2 shown, in the first aspect, the present embodiment provides a parallel playback test device (i.e., Figure 2 the test device in
[0048] ), which is applied to the transaction system to be tested. The transaction system includes a service processing module and several gateway modules. The parallel playback test device includes a test data management module, a test data sorting module, a service processing result acquisition module, and a test result analysis module (the service processing result acquisition module and the test result analysis module are not drawn in the figure);
[0049] And the test data management module is further configured to obtain the test result data that should be output by each gateway module after receiving the processed result data set, and generate a gateway transmission result data set based on the test result data output by all the gateway modules;
[0050] Wherein, each gateway module determines whether each test result data should be output by the gateway module according to the data transmission channel information of each test result data.
[0051] The test data sorting module is configured to receive the test data output from each gateway module, and the test data sorting module is further configured to sort the test data received from each gateway module and the test data received from the test data management module according to the data sequence information of each test data to generate a sorted test data set, and the test data sorting module is further configured to sequentially convey the test data in the sorted test data set to the service processing module, so that the service processing module generates a processed result data set based on the sorted test data set (the data therein is the result data corresponding to each request data, that is Figure 2 the result data in);
[0052] The service processing result acquisition module is configured to obtain the processed result data set output from the service processing module;
[0053] Wherein, the processed result data set includes several test result data, and each test result data includes the data content information of the test result data, the data sequence information of the test result data, and the data transmission channel information of the test result data.
[0054] The test result analysis module is configured to compare the processed result data set and the gateway transmission result data set obtained during the test with the target processed result data set and the target gateway transmission result data set preset by the system. If the comparison result is consistent, it is determined that the trading system can operate normally; otherwise, it is determined that the trading system cannot operate normally.
[0055] Wherein, the test data set is composed of historical generated data stored on disk.
[0056] To imitate the real transaction scenario, when this parallel playback test device is applied, it will send data to different gateway modules in parallel. Since there is a situation of parallel data sending during the test process, the order of data transmission by different gateway modules has a certain degree of randomness. If the out-of-order relevant data is directly sent to the service processing module, there will be a problem that the test results are not easy to verify. In the parallel playback test device of this embodiment, the data that should be directly sent to the service processing module through the gateway module is sent to the test data sorting module. After the test data sorting module sorts the data passing through the gateway and the data not passing through the gateway uniformly, it is then sent to the service processing module for processing, thus avoiding the problem of unstable test results caused by external networks or other reasons, and ensuring that the data sorting received by the service processing module of the transaction system to be tested is consistent with the expected data sorting. That is, when using the historical generated data stored on disk to form the test data set, the order in which the test data is sent to the service processing module of the transaction system to be tested will be the same as the order in which the corresponding data is sent to the service processing module during disk storage, so as to facilitate directly comparing the test result data (including the processing result data set and the gateway transmission result data set obtained during the test) with the historical test result data (including the target processing result data set and the gateway transmission result data set) in the later stage to determine whether the current transaction system can operate normally.
[0057] In addition to ensuring that the order of data sent to the service processing module is not affected by changes in external network speed, this parallel playback test device also effectively verifies the functions of the gateway modules, making the test results easier to verify and ensuring a comprehensive test of the transaction system.
[0058] 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] Suppose the transaction system will transmit the same batch of data through the same several gateway modules multiple times (for the sake of illustration, here it is taken as an example of transmitting data through the same two gateway modules twice). When the test data is directly sent to the service processing module through the gateway module, the following situations may occur:
[0060] As described above, the service 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 service processing module. However, the sorting at this time cannot guarantee that the sorting result of the data by the service processing module is the same as the previous sorting result, so the processing result may also change at this time.
[0061] For example, in the original historical data, there are two pieces of data, a and b, one after the other. Among them, data a is transmitted to the service processing module through the first gateway module, while data b is transmitted to the service processing module through the second gateway module. Under the condition that the data transmission channels remain 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 in which the service processing module receives the data will be to receive data a first and then data b, and based on this order, data processing will be carried out to obtain the corresponding data processing results. When the second data transmission occurs, if the network data transmission efficiency of the first gateway module is slower than that of the second gateway module, then the order in which the service processing module receives the data will be to receive data b first and then data a, and based on this order, data processing will be carried out to obtain the corresponding data processing results. This will result in the situation that although the same data is used and the same gateway modules are used for data transmission, the order in which the service processing module receives the data may be affected by the network at different times, resulting in very large changes. Furthermore, the final obtained data processing results will also be very different, thus making it impossible to compare the obtained test processing results with the target processing results, and further leading to inaccurate detection results.
[0062] Based on the above situation, the present invention utilizes a test data sorting module to effectively sort the data transmitted to the service processing module, and then transmits it to the service processing module for processing, effectively ensuring the effective execution of the detection.
[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 reach the service processing module, and finally be fed back to the gateway module, just 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 service processing module). During the test process, the historical production data covers the complete scenario of the trading system interacting with external clients during the trading session (i.e., the trading time period), ensuring the accuracy of the test results.
[0064] At the same time, the following further explains the composition of the historical generated data that is stored on disk:
[0065] The so-called historical generated data of disk settlement is data obtained from past transaction systems that have been put into official use. It is composed of external data input from each network module to the business processing module and data generated within the transaction system, forming a data set with a determined order for transmission to the business processing module (the sorting of relevant data is formed by the order of data input to the business processing module during the actual historical operation process). It belongs to a type of historical data. At the same time, each data includes specific data content information, data sequence information (i.e., the sorting information for transmission to the business processing module), and data transmission channel information for this test data (i.e., information on which gateway it is transmitted by or information generated within the transaction system).
[0066] Among them, the external data is mainly composed of business data of the customer type. It is data reported into the transaction system by each external client through the corresponding gateway module. The data content information therein includes business request data such as login information, order information, and order cancellation information. The data generated within the transaction system is mainly composed of non-customer type business data, which mainly includes initialization information data and business time data, etc. When relevant data is input to the business processing module, its data transmission channel information will be recorded. As a result, the test data in the test data set composed of the historical generated data of disk settlement will include the data content information of this test data, the data sequence information of this test data, and the data transmission channel information of this test data.
[0067] Each test data in the test data set composed of the historical generated data of disk settlement 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 this test data. The test data to be subsequently input to the business processing module will be sorted according to this number to ensure that during the test process, the order of the test data input to the business processing module each time is consistent with the order of the original data.
[0068] Moreover, each test data in the test data set composed of the historical generated data of disk settlement has a data type information, indicating its data meaning (such as whether it is business data of the customer type or data generated within the transaction system), and it constitutes the data transmission channel information of this test data to determine whether it needs to pass through the gateway module and which gateway module it needs to pass through for transmission.
[0069] The business data of the customer class in the test data set, which is composed of the historical generated data of disk landing, is the data input by the external client to the service processing module through the gateway module, and it contains the information about which gateway module reported it. The data generated internally by the trading system in the test data set, which is composed of the historical generated data of disk landing, is the data that does not need to be input to the service processing module through the gateway module, and 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 business data of the customer class received from the gateway module and the data generated internally by the trading system together according to their corresponding data sequence information, and then send it to the service processing module for detection.
[0070] In addition to including the request data of the test data set, the historical generated data of disk landing also includes the result data corresponding to the test data set, and the corresponding result data can form the processing result data set of the system preset target 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 said test data should be sent to the corresponding said gateway module or the test data sorting module (where the data that does not need to be transmitted through the gateway module is all sent to the test data sorting module), so that the data input by the external client still reports through the corresponding gateway module in the new trading system, and ensure that the data generated internally by the trading system is still executed, and these data are reasonably integrated and processed.
[0072] Subsequently, the test data sorting module sorts the data after integration processing according to the data sequence information, ensuring that the data order input to the service processing module of the trading system to be tested is the same as the data order collected and input to the service processing module of the original trading system, avoiding the problem that the order of the service processing module receiving data from the gateway is unpredictable after the external customer data reports through different new gateways again. Ensure that the processing result data set and the gateway transmission result data set obtained during the test process can be compared with the processing result data set of the system preset target and the gateway transmission result data set of the target 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 service processing module. Based on this, the test data directly delivered to the test data sorting module and the data transmitted through the gateway module are sorted, and then delivered to the service processing module for processing the data and exporting the result data (i.e., the processed result data set), thereby ensuring the detection of the gateway module and achieving the purpose of verifying the transaction system to be tested using historical data, 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 transaction 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 is used to imitate numerous clients sending transaction instructions. That is, by sharing thread resources through multiple connections and allocating a specified number of threads, a single test data management module is used to simulate the connections of numerous clients with the network module, making the overall structure and operation process simpler and reducing the complexity of the deployment and operation of this parallel playback test device.
[0075] At the same time, this parallel playback test device can complete the detection without invading the service processing module of the transaction system, avoiding new risks caused by changing the service processing module of the transaction system and ensuring the accuracy of the detection. At the same time, this parallel playback test device can also be applied to detect subsequent different versions of the transaction system and has reusability.
[0076] The parallel playback test device and the parallel playback test method in the above embodiment can be applied to the detection of the transaction system in the futures industry.
[0077] The transaction system in the futures industry is a core system with extremely high reliability requirements in the futures industry, and its test requirements are very comprehensive. When changing the transaction system and releasing a new version, it is necessary to conduct comprehensive and effective tests to ensure that the transaction system can meet the usage requirements before putting it into formal use. Using the historical generated data of the settlement (i.e., the historical production data accumulated during the production operation of the formally put into operation transaction system in the past, which are some data facts that have actually occurred) to form a test data set to test the new transaction system can effectively cover all the characteristics of the production data, and using such historical generated data of the settlement to form test data can comprehensively verify the data processing ability of the transaction system.
[0078] When using the test device for parallel playback of this embodiment to detect the trading system in the futures industry by using the test data set composed of the historical generated data of the dropped disks, the core module of the trading system can process the test data set composed of historical data. Among them, the business processing module will perform data processing based on the test data set sorted by the test data sorting module. After processing the data with the last sorting number, a processing result data set can be generated by using all the currently exported processing results. 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 target processing result data set preset by the system. Then, the processing result data set generated by the currently tested trading system is compared with the historical processing result data set generated by the trading system that was originally put into formal operation, so as to determine 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. By comparing it with the historical gateway transmission result data set (i.e., the target gateway transmission result data set) generated by the trading system that was originally put into formal operation, it can be determined whether the data feedback of the business processing module and the data feedback function of the gateway module can be executed normally.
[0079] That is, when using this test device for parallel playback for testing, 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 version of the newly released 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 sorting result of the data by the business processing module in the trading system to be tested consistent with the target data sequence order, the test device for parallel playback of this embodiment designs a module with an agent role (i.e., the test data sorting module) on the upstream data bus of the trading system. This test data sorting module collects customer data from multiple gateway modules and also directly obtains non-customer data in the historical data through the test data management module. Then, this test data sorting module queues the data it obtains according to the sequence information in the historical data (i.e., the data sequence information of each test data), so as to ensure that the data sequence after this new queuing is consistent with the data sequence of the original historical data. Finally, this agent module replaces the gateway module and passes the sorted data to the business processing module. During the entire test process, since the business processing module only receives the data from this path of the agent role module (i.e., the test data sorting module), the order of queuing the business processing module according to the order of receiving the data later does not change the order of this data. Therefore, 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 sorts the upstream data in the same order as the original data sequence, the business processing module sends the processing results (i.e., the processing result dataset) to the downstream data bus. Since the data results contain the business request results of all customers, the gateway module needs to filter out the customer business requests reported through itself from this overall result data and feedback the request results to the corresponding requesters (wherein, during the test, the requesters are composed of the test data management module that simulates external clients), ultimately forming a complete data request - response process.
[0082] During the test process of the trading system to be tested, two main modules are designed - the test data management module and the test data sorting module - to ensure the accurate progress of the test.
[0083] Among them, the test data management module is equivalent to a playback module, which mainly plays the roles of a client and a general control, and the test data sorting module plays the role of an agent.
[0084] Test data management module: It is used to split customer data and non - customer data from the test dataset composed of historical data (i.e., the historical generated data stored on disk). Among them, customer - type data is reported through the corresponding gateway module in the historical data, and non - customer data is directly sent to the test data sorting module. At the same time, the sorting rules of the sequence information of the original data are also sent to the test data sorting module. Customer - type data contains information on which gateway it is reported through. The playback module selects the corresponding gateway to report according to this information and also receives the result information of the corresponding request from this gateway module. (That is, each piece of the test data can be delivered to the corresponding gateway module or the test data sorting module through the data transmission channel information of each piece of the test data)
[0085] In the real environment, there are thousands of external clients making business requests. For the convenience of deployment, in this embodiment, a test data management module composed of a single playback module is used to simulate the numerous external clients in the production environment. Through this playback module, the original scattered customer request - response pressure is concentrated, making the deployment more convenient. Specifically, during implementation, this playback module needs to be able to support the concentrated request - response pressure.
[0086] Test Data Sorting Module: It receives and caches non-customer data from the playback module, and also collects and caches corresponding test data from multiple gateway modules. The Test Data Sorting Module does not sort these test data in the order in which the relevant data is received. Instead, it uses the sequence information of the original data received (i.e., the data sequence information of each test data). Based on this sequence information, it then finds the corresponding data from the cached test data and queues it up. Finally, it transmits the queued data to the core of business processing in the trading system - the Business Processing Module.
[0087] Throughout the entire test process, from the perspective of the gateway modules in the trading system, the Test Data Management Module simulates multiple external clients to interact with each gateway module for information. All reporting and responses of customer data are carried out through the Test Data Management Module. From the perspective of the Business Processing Module in the trading system, the Test Data Sorting Module simulates a gateway sending data to it and also receives corresponding internal data. The Business Processing Module only receives data from the Test Data Sorting Module, which can ensure that its data sequence is consistent with the original data sequence. Thus, it guarantees the comprehensiveness and accuracy of the entire test result.
[0088] Combined Figure 2 As shown, during the process of detecting the trading system, the operation process of the parallel playback test device in this embodiment is as follows:
[0089] 1. The Test Data Management Module reads and splits the test data set composed of historical data;
[0090] 2. The Test Data Management Module sends the split test data, specifically including:
[0091] 2.a Sends customer data to the corresponding gateway module according to the data transmission channel information of each test data;
[0092] 2.b Sends non-customer data to the Test Data Sorting Module according to the data transmission channel information of each test data;
[0093] 2.c Sends 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 upstream data bus;
[0096] 5. The Business Processing Module obtains the sorted data from the upstream data bus;
[0097] 6. The Business Processing Module processes the data and sends the processing result to the downstream data bus;
[0098] 7. The gateway module obtains the result data from the downlink data bus;
[0099] 8. The gateway module filters out the customer request results processed by itself from the full set of result data, and responds the result data to the test data management module;
[0100] 9. The service processing module exports new result data (including the processing result data set input to the service processing result acquisition module, and the gateway transmission result data sets input to 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 target processing result data set and target gateway transmission result data set preset by the system).
[0101] It should be noted that there is no mandatory order among the above steps 2.a, 2.b, and 2.c. At the same time, even after the test data management module sends each test data to the test data sorting module and each gateway module respectively according to the preset order, the order in which each test data arrives at the test data sorting module is also random. Subsequently, after the sorting operation of the test data sorting module in step 4 above, each data is published to the uplink data bus.
[0102] Among them, the uplink data bus refers to the transmission line used to transport the uplink data stream (i.e., the data stream transmitted from the end user or external device towards the processor), which is used to send the data that the external client needs to send to the service processing module; while the downlink data bus refers to the transmission line used to transport the downlink data stream (i.e., the data stream transmitted from the processor to the end user or external device), which is used to send the data output by the service processing module to the external client.
[0103] Through the above processing flow, the detection of the trading system can be effectively realized.
[0104] In a second aspect, an embodiment of the present invention provides a parallel playback test method applied to a trading system to be tested. The trading system includes a service processing module and several gateway modules. The parallel playback test method includes:
[0105] Each test data in the test data set preset by the system is respectively transported to the corresponding gateway module or the test data sorting module according to the data transmission channel information of the test data;
[0106] 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 piece of the test data, so as to generate a sorted test data set;
[0107] Sequentially convey the test data in the sorted test data set to the service processing module, and cause the service processing module to generate a processing result data set according to the sorted test data set;
[0108] Obtain the processing result data set output from the service processing module;
[0109] Wherein, the processing result data set includes several test result data, and each piece of the test result data includes the data content information of the test result data, the data sequence information of the test result data, and the data transmission channel information of the test result data.
[0110] Obtain the test result data that should be output by each gateway module after each 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] Wherein, each gateway module determines whether each piece of the test result data should be output by the gateway module according to the data transmission channel information of each piece of the test result data.
[0112] Compare the processing result data set and the gateway transmission result data set obtained during the test process with the target processing result data set and the target gateway transmission result data set preset by the system. If the comparison result is 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 the historical generated data stored on disk.
[0114] The parallel playback test method in this embodiment not only ensures that the data order conveyed to the service processing module is not affected by external network speed changes, but also effectively verifies the functions of the gateway modules, making the detection results easier to verify and ensuring a comprehensive detection of the trading system.
[0115] In a third aspect, the present invention further provides a parallel playback test device, including:
[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, cause the method of the second aspect of the present invention to be implemented.
[0117] This embodiment provides a test device for parallel playback, including: at least one processor; and 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 can include random access memory, flash memory, read-only memory, programmable read-only memory, non-volatile memory, or registers, etc. The processor can be a central processing unit (CPU), etc. Or it can be a graphic processing unit (GPU). The memory can store executable instructions. The processor can execute the executable instructions stored in the memory, thereby implementing the various processes described herein.
[0119] It can be understood that the memory in this embodiment can be volatile memory or non-volatile memory, or can include both volatile and non-volatile memory. Among them, the non-volatile memory can be ROM (Read-Only Memory), PROM (Programmable ROM), EPROM (Erasable PROM), EEPROM (Electrically EPROM), or flash memory. The volatile memory can be 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 memory described herein is intended to include but not be limited to these and any other suitable types of memory.
[0120] In some embodiments, the memory stores the following elements, an upgrade package, an executable unit, or a data structure, or a subset thereof, or an extended set thereof: an operating system and an application program.
[0121] Among them, the operating system includes various system programs, such as the framework layer, the core library layer, the driver layer, etc., which are used to implement various basic services and process hardware-based tasks. The application programs include 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 programs.
[0122] In the embodiment of the present invention, the processor calls the program or instruction stored in the memory, specifically, it can be the program or instruction stored in the application program, and the processor is used to execute the method steps provided in the second aspect.
[0123] In the fourth aspect, the embodiment of the present invention further provides a chip, which is used to execute the method in the second aspect above. Specifically, the chip includes: a processor, which is used to call and run a computer program from the memory, so that the device installed with the chip is used to execute the method in the second aspect above.
[0124] In addition, in the 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 in the second aspect of the present invention are implemented.
[0125] For example, the machine-readable storage medium may include, but is not limited to, various known and unknown types of non-volatile memories.
[0126] In the sixth aspect, the embodiment of the present invention further provides a computer program product, including computer program instructions, and the computer program instructions enable a computer to execute the method in the second aspect above.
[0127] Those skilled in the art can understand that the units and algorithm steps of each example described in combination with the embodiments disclosed in this article can be implemented by electronic hardware, or a combination of software and electronic hardware. Whether these functions are implemented in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.
[0128] In the embodiment 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 may 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 each unit can be a direct coupling or an indirect coupling. In addition, in the embodiment of the present application, each functional unit can be integrated in a processing unit, or can be a separate physical existence, etc.
[0129] It should be understood that in various embodiments of the present application, the sequence numbers of the processes do not indicate the order of execution, and the execution order of the processes should be determined by their functions and internal logics, and should not constitute any limitation on the implementation processes of the embodiments of the present application.
[0130] If the above-mentioned function is implemented in the form of a software functional unit and sold or used as an independent product, it 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, and may include several instructions to enable an electronic device to execute all or part of the processes of the technical solution described in the embodiments of the present application. The above storage medium may include various media that can store program codes, such as ROM, RAM, removable disks, hard disks, magnetic disks, or optical disks.
[0131] In the present invention, the test data management module parallelly replays the test data that needs to pass through the gateway module to each gateway module, and directly replays the test data that does not need to pass through the gateway module to the test 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 directly received from the test data management module in a preset order (that is, sorts the test data in the received test data set according to the data sequence information of each test data) to generate a sorted test data set, and sequentially conveys the test data in the sorted test data set to the service processing module, so that the service 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 service processing module. So as to be able to judge whether each gateway module can output the externally received data based on the processing result data set generated based on the test data set, and can judge whether the service processing module can execute corresponding processing according to the received data, thereby realizing the detection of the trading system.
[0132] During the test process, since the data received by the gateway module is not directly conveyed to the service processing module, but is sorted in a preset order by the test data sorting module and then conveyed to the service processing module, it is possible to ensure that the order of the data received by the service processing module will not change due to external factors such as network speed changes, thus avoiding the influence of external factors on the judgment of the detection result and making the detection result easier to verify. At the same time, the test data that originally needed 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 test device and method for parallel playback of the present invention play back test data composed of historical data in a parallel manner, and at the same time ensure that the order of the test data delivered to the service processing module after playback is the same as the order of the data delivered to the service processing module historically during the test process, so as to achieve the purpose of effective testing, and have the characteristics of convenient operation, easy verification of detection results, capable of comprehensively and accurately obtaining detection results, and good adaptability.
[0134] The above content is only the specific implementation manner of the present application, and the protection scope of the present application is not limited thereto. Those skilled in the art can make changes or substitutions within the technical scope disclosed in the present application, and these changes or substitutions should be within the protection scope of the present application.
Claims
1. A test device for parallel playback, 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 several test data, and each test data includes 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; the test data management module is also used to send the data sequence information of all the test data to the test data sorting module, and send each test data to the corresponding gateway module or the test data sorting module according to the data transmission channel information of each test data; Among them, sending each test data to the corresponding gateway module or the test data sorting module according to the data transmission channel information of each test data includes: Sending customer data to the corresponding gateway module according to the data transmission channel information of each test data; Sending non-customer data to the test data sorting module according to the data transmission channel information of each test data, where the non-customer data is data generated by internal components of the transaction system; The test data sorting module is used to receive the test data output from each gateway module, and the test data sorting module is also used to sort the test data received from each gateway module and the test data received from the test data management module according to the data sequence information of each test data to generate a sorted test data set, and the test data sorting module is also used to sequentially send the test data in the sorted test data set to the business processing module through the uplink data bus, 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; Among them, the processing result data set includes several test result data, and each test result data includes the data content information of the test result data, the data sequence information of the test result data, and the data transmission channel information of the test result data; Among them, the test data management module is composed of a single playback system, and uses a single playback system to imitate many clients that issue transaction instructions, that is, by sharing thread resources through multiple connections, and allocating a specified number of threads to enable a single test data management module to simulate many clients.
2. The parallel playback test device according to claim 1, wherein The business processing module sends the processing result data set to the downlink data bus; The gateway module obtains the processing result data set from the downlink data bus; The test data management module is further configured to obtain the test result data that should be output by each gateway module after receiving the processed result data set, and generate a gateway transmission result data set based on the test result data output by all the gateway modules; Wherein, each gateway module determines whether each test result data should be output by the gateway module according to the data transmission channel information of each test result data.
3. The test apparatus for parallel playback according to claim 2, wherein, The parallel playback test device further includes a test result analysis module; The test result analysis module is configured to compare the processed result data set and the gateway transmission result data set obtained during the test with the target processed result data set and the target gateway transmission result data set preset in 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.
4. The test apparatus for parallel playback according to claim 1, wherein The test data set is generated from the historical generated data stored on disk.
5. A test method for parallel playback, characterized in that, Applied to the trading system to be tested, the trading system includes a service processing module and several gateway modules. The parallel playback test method runs on the parallel playback test device according to any one of claims 1 to 4. The parallel playback test method includes: Sending each test data in the test data set preset in the system to the corresponding gateway module or the test data sorting module according to the data transmission channel information of the test data; Sorting the test data received from each gateway module and the test data received from the test data management module according to the data sequence information of each test data to generate a sorted test data set; Sequentially sending the test data in the sorted test data set to the service processing module, and causing the service processing module to generate a processed result data set according to the sorted test data set; Obtaining the processed result data set output from the service processing module; Wherein, the processed result data set includes several test result data, and each test result data includes the data content information of the test result data, the data sequence information of the test result data, and the data transmission channel information of the test result data.
6. The test method for parallel playback according to claim 5, wherein The parallel playback test method further includes: Obtaining the test result data that should be output by each gateway module after receiving the processed result data set, and generating a gateway transmission result data set based on the test result data output by all the gateway modules; Wherein, each gateway module determines whether each test result data should be output by the gateway module according to the data transmission channel information of each test result data.
7. The test method for parallel playback according to claim 6, characterized in that The parallel playback test method further includes: Comparing the processed result data set and the gateway transmission result data set obtained during the test with the target processed result data set and the target gateway transmission result data set preset in 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 test method for parallel playback according to claim 5, wherein The test data set is generated from the historical generated data stored on 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, cause the implementation of the method according to any one of claims 5 to 8.
10. A chip, characterized in that, Comprising: a processor for calling and running a computer program from a memory, such that a device installed with the chip executes: the method according to any one of claims 5 to 8.
11. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method according to any one of the above 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