Settlement system test method and device, storage medium and electronic equipment
By acquiring historical order samples and calling the settlement system under test based on the order of settlement events, test results are automatically generated, solving the problem of high workload for testers after the settlement system version upgrade and achieving an efficient testing process.
Patent Information
- Application Number
- CN202511323811.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-16
- Publication Date
- 2026-02-06
AI Technical Summary
After the settlement system was upgraded, testers needed to manually verify the settlement amount for each settlement event, resulting in high workload. How to reduce the workload of testers has become an urgent problem to be solved.
By obtaining historical order samples from the settlement system under test, the settlement system under test is called based on the historical order samples and the order of settlement events to determine the settlement result under test, and test results are generated based on the historical and settlement results under test, reducing the need for manual testing.
It reduced the workload and financial calculation requirements for testers, and improved testing efficiency and accuracy.
Smart Images

Figure CN121478631A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and more specifically, to a method, apparatus, storage medium, and electronic device for testing a settlement system. Background Technology
[0002] With the continuous development of science and technology, settlement systems, with their significant advantages such as efficiency, accuracy, and security, have become one of the standard choices for travel service providers in the order settlement process.
[0003] In related technologies, whenever a travel service provider adjusts its business operations, the settlement system also needs to be upgraded to match the new business. For example, when a travel service provider launches a promotional activity, the settlement system needs to be upgraded to add settlement rules corresponding to the promotion during the settlement process for travel orders, thereby ensuring that the promotional activity is implemented. However, after the settlement system is upgraded, testers usually need to manually test the accuracy of the settlement system before replacing the original system to reduce the possibility of missing funds. But since a travel order includes multiple settlement events, testers need to verify the accuracy of the settlement amount for each event individually when manually testing the accuracy of the settlement system, which greatly increases the workload of the testers.
[0004] Therefore, how to reduce the workload of testers during the testing of settlement systems has become an urgent problem to be solved by those skilled in the art. Summary of the Invention
[0005] To address the aforementioned technical problems, embodiments of this application provide a settlement system testing method, apparatus, computer-readable storage medium, and electronic device.
[0006] According to one aspect of the embodiments of this application, a method for testing a settlement system is provided, comprising: obtaining historical order samples corresponding to a settlement system under test; wherein the historical order samples include multiple settlement events; invoking the settlement system under test based on the historical order samples and the order of the settlement events in the historical order samples to determine the settlement result to be tested for the historical order samples; wherein the order of the settlement events represents the settlement order of each settlement event in the historical order samples; and generating a test result for the settlement system under test based on the settlement result to be tested and the historical settlement results of the historical order samples.
[0007] According to one aspect of the embodiments of this application, a settlement system testing apparatus is provided, comprising: a sample acquisition module configured to acquire historical order samples corresponding to a settlement system under test; wherein the historical order samples include multiple settlement events; a system call module configured to call the settlement system under test based on the historical order samples and the order of settlement events in the historical order samples to determine the settlement result to be tested of the historical order samples; wherein the order of settlement events represents the settlement order of each settlement event in the historical order samples; and a result generation module configured to generate a test result of the settlement system under test based on the settlement result to be tested of the historical order samples and the historical settlement results.
[0008] In some embodiments of this application, based on the foregoing scheme, the system call module is further configured to: send multiple settlement events in the historical order sample to the settlement system under test in the order of the settlement events, so that the settlement system under test processes the multiple settlement events in the order of the settlement events and returns the settlement results corresponding to each of the multiple settlement events; and determine the settlement result under test based on the settlement results of the multiple settlement events.
[0009] In some embodiments of this application, based on the foregoing scheme, the system call module is further configured to: take the settlement results of the plurality of settlement events as the settlement result to be tested; or: obtain the settlement event to be tested corresponding to the settlement system to be tested; and take the settlement result corresponding to the settlement event to be tested from the settlement results of the plurality of settlement events as the settlement result to be tested.
[0010] In some embodiments of this application, based on the foregoing scheme, the result generation module is further configured to: if the settlement result to be tested is the same as the historical settlement result, then a first preset result is used as the test result; wherein, the first preset result is used to characterize the settlement system to be tested as qualified; if the settlement result to be tested is different from the historical settlement result, then a second preset result is used as the test result, wherein, the second preset result is used to characterize the settlement system to be tested as unqualified.
[0011] In some embodiments of this application, based on the foregoing scheme, the result generation module is further configured to: after using the second preset result as the test result, update the test result according to the settlement result to be tested and the historical settlement result.
[0012] In some embodiments of this application, based on the foregoing scheme, the sample acquisition module is further configured to: obtain historical orders corresponding to a preset order type from the historical order database of the settlement system under test as the historical order sample; or; filter historical orders whose recording time does not exceed a preset time from the historical order database as the historical order sample; or; select a preset number of historical orders from the historical order database in sequence according to the recording time as the historical order sample.
[0013] In some embodiments of this application, based on the foregoing scheme, the sample acquisition module is further configured to: acquire a preset number of samples corresponding to the preset order type; and acquire historical orders corresponding to the preset order type from the historical order database according to the preset number of samples as the historical order samples.
[0014] According to one aspect of the embodiments of this application, a computer-readable storage medium is provided, on which computer-readable instructions are stored, which, when executed by a computer's processor, cause the computer to perform the settlement system testing method as described in the above embodiments.
[0015] According to one aspect of the embodiments of this application, an electronic device is provided, including: one or more processors; and a storage device for storing one or more programs, which, when executed by the one or more processors, cause the electronic device to implement the settlement system testing method as described in the above embodiments.
[0016] In the technical solution of this application embodiment, historical order samples corresponding to the settlement system under test are first obtained, then the settlement system under test is called based on the historical order samples and the settlement event sequence of the historical order samples to determine the settlement result of the historical order samples, and finally the test result of the settlement system under test is generated based on the settlement result of the historical order samples and the historical settlement result. This eliminates the need for testers to manually test the accuracy of the settlement system under test, thereby reducing the labor intensity of testers and the required financial calculation ability. Attached Figure Description
[0017] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort. In the drawings: Figure 1 This is a flowchart illustrating a settlement system testing method in an exemplary embodiment of this application; Figure 2 yes Figure 1The flowchart of step S110 in the illustrated embodiment is shown in an example embodiment; Figure 3 yes Figure 2 The flowchart of step S210 in the illustrated embodiment is shown in an example embodiment; Figure 4 This is a block diagram illustrating a settlement system testing apparatus according to an exemplary embodiment of this application; Figure 5 This is a schematic diagram of the structure of an electronic device shown in an exemplary embodiment of this application. Detailed Implementation
[0018] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided to make this application more comprehensive and complete, and to fully convey the concept of the exemplary embodiments to those skilled in the art.
[0019] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough understanding of embodiments of this application. However, those skilled in the art will recognize that the technical solutions of this application can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of this application.
[0020] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0021] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.
[0022] It should be noted that "multiple" in this article refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0023] The technical solution of this application embodiment proposes a method for testing a settlement system, which is detailed below. Figure 1 As shown. The executing entity of this method can be a computing device or computing equipment with a settlement system, such as a personal computer or computer cluster, or a terminal with computing capabilities, such as a laptop, smartphone, or tablet computer, etc., without limitation. The method includes at least steps S110 to S130, which are described in detail below: In step S110, historical order samples corresponding to the settlement system under test are obtained, wherein the historical order samples include multiple settlement events.
[0024] It should be noted that during the order settlement process, the settlement result output by the settlement system based on the order is usually affected by multiple settlement events. Settlement events include, but are not limited to, pricing and settlement of charges, settlement of discounts for charges, and adjustment of charges.
[0025] The settlement system under test is the upgraded settlement system. The historical order samples are either orders settled by the settlement system before the upgrade or orders preset by the testers according to settlement requirements, and there are no restrictions on this.
[0026] The method for obtaining historical order samples corresponding to the settlement system under test can be flexibly set as needed. In one example, historical orders can be obtained from the historical order database of the settlement system under test as historical order samples.
[0027] In some embodiments of this application, a preset order database can be used as the historical order database to construct the historical order database of the settlement system under test. The preset order database is used to record the orders settled by the settlement system and the settlement results of those orders.
[0028] In some embodiments of this application, historical orders whose recording time has not exceeded a preset time can be filtered from the preset order database first, and then the filtered historical orders can be recorded in the historical order database to ensure the timeliness of each historical order in the historical order database.
[0029] In another example, multiple historical orders can be retrieved from the historical order database as historical order samples to improve the accuracy of subsequent testing of the settlement system under test by increasing the number of historical order samples.
[0030] In step S120, the settlement system under test is invoked based on the historical order samples and the settlement event sequence of the historical order samples to determine the settlement result of the historical order samples.
[0031] Among them, the settlement event order of the historical order sample represents the settlement order of each settlement event in the historical order sample.
[0032] It should be noted that during the settlement process of an order, when the settlement system obtains the settlement result of each settlement event in the order, it needs to be processed based on the settlement result of the previous settlement event. This is to avoid order settlement errors and financial losses through the settlement continuity between multiple settlement events, so that after the settlement system settles the order, the multiple settlement events of the order have a corresponding settlement event order.
[0033] In the embodiments of this application, after obtaining the historical order sample corresponding to the settlement system under test, the settlement system under test can be called based on the historical order sample and the order of settlement events of the historical order sample to determine the settlement result of the historical order sample. This allows the settlement system under test to ensure that the settlement order of multiple settlement events in the historical order sample is consistent with the original settlement order when settling the historical order sample.
[0034] The method of calling the settlement system under test based on historical order samples and the order of settlement events of historical order samples to determine the settlement result of historical order samples can be flexibly set as needed. In one example, multiple settlement events in historical order samples can be sent to the settlement system under test in the order of settlement events, so that the settlement system under test can process multiple settlement events in the order of settlement events and return the settlement results corresponding to each of the multiple settlement events. Then, the settlement result under test is determined based on the settlement results of multiple settlement events.
[0035] For example, when the historical order sample includes a historical order, multiple settlement events in the historical order are sent to the computing system under test in the order of settlement events corresponding to the historical order. This allows the settlement system under test to process multiple settlement events in the order of settlement events and return the settlement results corresponding to each of the multiple settlement events. The settlement result under test is then determined based on the settlement results of the multiple settlement events.
[0036] When the historical order sample includes multiple historical orders, these orders are sent sequentially to the computing system under test to obtain the settlement result for each historical order. In other words, multiple historical orders are used as target historical orders, and multiple settlement events in the target historical orders are sent sequentially to the computing system under test according to the order of settlement events corresponding to the target historical orders. This allows the settlement system under test to process multiple settlement events sequentially according to the order of settlement events and return the settlement results corresponding to each of the multiple settlement events. Finally, the settlement result under test is determined based on the settlement results of multiple settlement events in each historical order.
[0037] In some embodiments of this application, in order to determine the settlement result to be tested, in addition to directly using the settlement results of multiple settlement events as the settlement result to be tested, the settlement event corresponding to the settlement system to be tested can also be obtained, and the settlement result corresponding to the settlement event to be tested among the settlement results of multiple settlement events can be used as the settlement result to be tested, so as to selectively select the settlement result of the settlement system to be tested for a specified settlement event as the settlement result to be tested.
[0038] In another example, the settlement event to be tested can be identified from multiple settlement events in the historical order sample first. Then, the auxiliary settlement events corresponding to the settlement event to be tested can be identified from the historical order sample according to the order of the settlement events. The auxiliary settlement events are those settlement events in the order of the historical order sample that need to be settled before the settlement event to be tested. Then, the settlement event to be tested and the auxiliary settlement events are sent to the settlement system to be tested in the order of the settlement events. The settlement system to be tested processes the settlement event to be tested and the auxiliary settlement events in the order of the settlement events and returns the settlement result corresponding to the settlement event to be tested. Finally, the settlement result corresponding to the settlement event to be tested is taken as the settlement result to be tested. This reduces the number of settlement events that the settlement system to be tested needs to process, while selectively choosing the settlement result of the settlement event to be tested in the settlement system to be tested.
[0039] In step S130, test results of the settlement system under test are generated based on the settlement results to be tested from the historical order samples and the historical settlement results.
[0040] In the embodiments of this application, after the settlement system under test is called to determine the settlement results of the historical order samples, the test results of the settlement system under test can be generated based on the settlement results of the historical order samples and the historical settlement results, wherein the historical settlement results are the settlement results of the historical order samples.
[0041] The method for generating test results for the settlement system under test based on the settlement results of historical order samples and historical settlement results can be flexibly configured as needed. In one example, it can be first determined whether the settlement result under test is the same as the historical settlement result, and then the test result of the settlement system under test can be generated based on the determination. Specifically, if the settlement result under test is the same as the historical settlement result, it means that the settlement result obtained by the settlement system under test from the historical order samples is correct, and the first preset result can be used as the test result, which is used to characterize the settlement system under test as qualified. Conversely, if the settlement result under test is different from the historical settlement result, it means that there is a difference between the settlement result obtained by the settlement system under test from the historical order samples and the historical order samples, and the second preset result can be used as the test result, which is used to characterize the settlement system under test as unqualified.
[0042] For example, when the settlement result to be tested includes the settlement results of multiple settlement events, in determining whether the settlement result to be tested is the same as the historical settlement result, the settlement result of each settlement event in the settlement result to be tested can be compared one by one with the settlement result of each settlement event in the historical settlement result. If the settlement result of each settlement event in the settlement result to be tested is the same as the settlement result of each settlement event in the historical settlement result, then it can be determined that the settlement result to be tested is the same as the historical settlement result. If the settlement result of any settlement event in the settlement result to be tested is different from the settlement result of that settlement event in the historical settlement result, then it can be determined that the settlement result to be tested is different from the historical settlement result.
[0043] When the settlement result to be tested only includes the settlement result of the settlement event to be tested, the settlement result of the settlement event to be tested in the settlement result to be tested can be compared with the settlement result of the settlement event to be tested in the historical settlement result. If the settlement result of the settlement event to be tested in the settlement result to be tested is the same as the settlement result of the settlement event to be tested in the historical settlement result, then it can be determined that the settlement result to be tested is different from the historical settlement result.
[0044] In another example, if the settlement result to be tested is different from the historical settlement result, the test result can be updated based on the settlement result to be tested and the historical settlement result after the second preset result is used as the test result.
[0045] In some embodiments of this application, the method of updating test results based on the settlement results to be tested and the historical settlement results can be used to add the settlement results to the test results. After updating the test results, testers can directly determine the settlement events that occurred in the process of settling historical order samples by the settlement results to be tested and the historical settlement results contained in the test results, thereby facilitating the testers to repair the settlement system to be tested.
[0046] In some embodiments of this application, abnormal settlement events can be identified first based on the settlement results to be tested and historical settlement results. Abnormal settlement events are settlement events in which the settlement results in the settlement results to be tested are different from the settlement results in the historical settlement results. Then, the abnormal settlement events are added to the test results. After updating the test results, testers can directly identify the settlement events in which the settlement system under test has discrepancies in the process of settling historical order samples through the test results, thereby improving the convenience for testers in identifying abnormal settlement events in the settlement system under test.
[0047] Through the above implementation method, historical order samples corresponding to the settlement system under test can be obtained first, and then the settlement system under test can be called based on the historical order samples and the settlement event sequence of the historical order samples to determine the settlement results of the historical order samples. Finally, the test results of the settlement system under test can be generated based on the settlement results of the historical order samples and the historical settlement results. This eliminates the need for testers to manually test the accuracy of the settlement system under test, thereby reducing the labor intensity of testers and the required financial calculation ability.
[0048] See Figure 2 , Figure 2 Is Figure 1 The flowchart of step S110 in the illustrated embodiment is shown in an exemplary embodiment. Figure 2 As shown, the process of obtaining historical order samples corresponding to the settlement system under test may include steps S210 to S230, which are described in detail below: In step S210, historical orders corresponding to preset order types are obtained from the historical order database of the settlement system under test as historical order samples.
[0049] In the embodiments of this application, in order to obtain historical order samples corresponding to the settlement system under test, historical orders corresponding to preset order types can be obtained from the historical order database of the settlement system under test as historical order samples. The order type classification method includes, but is not limited to, classification according to the number of settlement events involved in the order, classification according to the amount of settlement results involved in the order, and classification according to the level of the generator involved in the order, so as to specifically test the effectiveness of the settlement system under test when settling a specified order type.
[0050] For example, if the preset order type is the first order type, then historical orders with the first order type are retrieved from the historical order database as historical order samples.
[0051] In step S220, historical orders whose recording time has not exceeded a preset time are selected from the historical order database as historical order samples.
[0052] In the embodiments of this application, in order to obtain historical order samples corresponding to the settlement system under test, historical orders with a recording time not exceeding a preset time can also be selected from the historical order sample database as historical order samples to ensure the timeliness of the historical order samples. The preset time can be adjusted according to the testing requirements of the settlement system under test and is not limited here.
[0053] For example, if the preset time is 30 days, then historical orders with a time difference of no more than 30 days between the recorded time and the current time will be selected from the historical order database as historical order samples.
[0054] In step S230, a preset number of historical orders are selected from the historical order database according to their recording time as historical order samples.
[0055] In the embodiments of this application, in order to obtain historical order samples corresponding to the settlement system under test, a preset number of historical orders can be selected from the historical order database according to the recording time as historical order samples. This ensures the timeliness of the historical order samples while limiting the number of historical order samples through the preset quantity, thereby reducing the time spent generating test results for the settlement system under test. The preset quantity can also be adjusted according to the testing requirements of the settlement system under test, and is not limited here.
[0056] For example, if the preset quantity is 2, then the two most recent historical orders recorded in the historical order database will be selected as historical order samples in order of recording time.
[0057] Furthermore, considering that the settlement system can obtain corresponding pricing rules based on the current settlement scenario during the order settlement process, and then settle the order based on the pricing rules, the settlement system can improve its flexibility during settlement. Settlement scenarios include, but are not limited to, order channels and payment channels. Therefore, in some embodiments of this application, the process of obtaining historical order samples corresponding to the settlement system under test can also obtain historical orders corresponding to the settlement scenario under test from the historical order database, thereby further improving the flexibility when testing the settlement system under test.
[0058] See Figure 3 , Figure 3 Is Figure 2 The flowchart of step 210 in the illustrated embodiment is shown in an exemplary embodiment. Figure 3 As shown, the process of obtaining historical orders corresponding to a preset order type from the historical order database of the settlement system under test as historical order samples may include steps S310 to S320, which are described in detail below: In step S310, the preset number of samples corresponding to the preset order type is obtained.
[0059] It should be noted that different order types have different levels of importance in the settlement system. For example, when order types are categorized according to the number of settlement events involved in the order, the more settlement events a current order type involves, the higher its importance in the settlement system. Conversely, the fewer settlement events a current order type involves, the lower its importance in the settlement system.
[0060] In the embodiments of this application, in order to obtain historical orders corresponding to a preset order type from the historical order database of the settlement system under test as historical order samples, a preset number of samples corresponding to the preset order type can be obtained first.
[0061] For example, if the preset order type is the first order type, then the first sample size corresponding to the first order type can be used as the preset sample size; if the preset order type is the second order type, then the second sample size corresponding to the second order type can be used as the preset sample size. The first order type is more important than the second order type in the settlement system under test, and therefore the first sample size is greater than the second sample size.
[0062] In step S320, historical orders corresponding to a preset order type are obtained from the historical order database according to a preset sample quantity as historical order samples.
[0063] In the embodiments of this application, after obtaining the preset sample size of the preset order type, the historical orders corresponding to the preset order type can be obtained from the historical order database as historical order samples according to the preset sample size. In order to combine the importance of the order type in the settlement system under test, the number of historical order samples can be increased, thereby improving the flexibility of testing the settlement system under test and improving the test accuracy of testing different order types in the settlement system under test.
[0064] Referring to the example above, when the preset order type is the first order type, the process of obtaining historical orders corresponding to the preset order type from the historical order database as historical order samples according to the preset sample size can be carried out by obtaining historical orders corresponding to the preset order type from the historical order database as historical order samples according to the first sample size. That is, the first sample size of historical orders is obtained from the historical order database as historical order samples, and the first sample size of historical orders are all of the preset order type.
[0065] Correspondingly, when the preset order type is the second order type, the process of obtaining historical orders corresponding to the preset order type from the historical order database as historical order samples according to the preset sample size can be carried out by obtaining historical orders corresponding to the preset order type from the historical order database according to the second sample size. That is, the second sample size of historical orders is obtained from the historical order database as historical order samples, and the second sample size of historical orders are all of the preset order type.
[0066] The following describes an embodiment of the apparatus described in this application, which can be used to execute the settlement system testing method described in the above embodiments of this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the settlement system testing method described in the above embodiments of this application.
[0067] Figure 4 A block diagram of a settlement system testing apparatus 100 according to an embodiment of this application is shown.
[0068] Reference Figure 4 As shown, a settlement system testing apparatus 100 according to an embodiment of this application includes: a sample acquisition module 110 configured to acquire historical order samples corresponding to the settlement system under test; wherein the historical order samples include multiple settlement events; a system call module 120 configured to call the settlement system under test based on the historical order samples and the order of settlement events in the historical order samples to determine the settlement result under test of the historical order samples; wherein the order of settlement events represents the settlement order of each settlement event in the historical order samples; and a result generation module 130 configured to generate test results of the settlement system under test based on the settlement result under test of the historical order samples and the historical settlement results.
[0069] In some embodiments of this application, based on the foregoing scheme, the system call module 120 is further configured to: send multiple settlement events in the historical order sample to the settlement system under test in the order of settlement events, so that the settlement system under test processes the multiple settlement events in the order of settlement events and returns the settlement results corresponding to each of the multiple settlement events; and determine the settlement result under test based on the settlement results of the multiple settlement events.
[0070] In some embodiments of this application, based on the foregoing scheme, the system call module 120 is further configured to: take the settlement results of multiple settlement events as the settlement result to be tested; or: obtain the settlement event to be tested corresponding to the settlement system to be tested; and take the settlement result corresponding to the settlement event to be tested from the settlement results of multiple settlement events as the settlement result to be tested.
[0071] In some embodiments of this application, based on the foregoing scheme, the result generation module 130 is further configured to: if the settlement result to be tested is the same as the historical settlement result, then the first preset result is used as the test result; wherein the first preset result is used to characterize the settlement system to be tested as qualified; if the settlement result to be tested is different from the historical settlement result, then the second preset result is used as the test result, wherein the second preset result is used to characterize the settlement system to be tested as unqualified.
[0072] In some embodiments of this application, based on the foregoing scheme, the result generation module 130 is further configured to: after using the second preset result as the test result, update the test result according to the settlement result to be tested and the historical settlement result.
[0073] In some embodiments of this application, based on the foregoing scheme, the sample acquisition module 110 is further configured to: acquire historical orders corresponding to a preset order type from the historical order database of the settlement system under test as historical order samples; or; filter historical orders whose recording time does not exceed a preset time from the historical order database as historical order samples; or; select a preset number of historical orders from the historical order database in sequence according to the recording time as historical order samples.
[0074] In some embodiments of this application, based on the foregoing scheme, the sample acquisition module 110 is further configured to: acquire a preset number of samples corresponding to a preset order type; and acquire historical orders corresponding to the preset order type from the historical order database as historical order samples according to the preset number of samples.
[0075] It should be noted that the settlement system testing device 100 provided in the above embodiments and the settlement system testing method provided in the above embodiments belong to the same concept. The specific way in which each module and unit performs operations has been described in detail in the method embodiments, and will not be repeated here.
[0076] Embodiments of this application also provide an electronic device, including a processor and a memory, wherein the memory stores computer-readable instructions that, when executed by the processor, implement the settlement system testing method as described above.
[0077] Figure 5 A schematic diagram of the structure of a computer system suitable for implementing the electronic device of the present application is shown.
[0078] It should be noted that, Figure 5 The computer system 200 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0079] like Figure 5 As shown, the computer system 200 includes a Central Processing Unit (CPU) 201, which can perform various appropriate actions and processes based on programs stored in Read-Only Memory (ROM) 202 or programs loaded from storage portion 208 into Random Access Memory (RAM) 203, such as performing the methods described in the above embodiments. The RAM 203 also stores various programs and data required for system operation. The CPU 201, ROM 202, and RAM 203 are interconnected via a bus 204. An Input / Output (I / O) interface 205 is also connected to the bus 204.
[0080] The following components are connected to I / O interface 205: an input section 206 including a keyboard, mouse, etc.; an output section 207 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 208 including a hard disk, etc.; and a communication section 209 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 209 performs communication processing via a network such as the Internet. A drive 210 is also connected to I / O interface 205 as needed. Removable media 211, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 210 as needed so that computer programs read from them can be installed into storage section 208 as needed.
[0081] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program including a computer program for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 209, and / or installed from removable medium 211. When the computer program is executed by central processing unit (CPU) 201, it performs various functions defined in the system of this application.
[0082] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium, a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying a computer-readable computer program. The transmitted data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.
[0083] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. Each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0084] The units described in the embodiments of this application can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself.
[0085] In another aspect, this application also provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiments; or it may exist independently and not assembled into the electronic device. The computer-readable storage medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the methods described in the above embodiments.
[0086] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of this application, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0087] Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, touch terminal, or network device, etc.) to execute the methods according to the embodiments of this application.
[0088] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein.
[0089] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A method for testing a settlement system, characterized in that, The method includes: Obtain historical order samples corresponding to the settlement system under test; wherein, the historical order samples include multiple settlement events; Based on the historical order samples and the settlement event sequence of the historical order samples, the settlement system under test is invoked to determine the settlement result of the historical order samples; wherein, the settlement event sequence represents the settlement order of each settlement event in the historical order samples; The test results of the settlement system under test are generated based on the settlement results to be tested and the historical settlement results of the historical order samples.
2. The method according to claim 1, characterized in that, The step of calling the settlement system under test based on the historical order samples and the settlement event sequence of the historical order samples to determine the settlement result of the historical order samples includes: Multiple settlement events in the historical order sample are sent sequentially to the settlement system under test in the order of the settlement events, so that the settlement system under test processes the multiple settlement events sequentially in the order of the settlement events and returns the settlement results corresponding to each of the multiple settlement events; The settlement result to be tested is determined based on the settlement results of the multiple settlement events.
3. The method according to claim 2, characterized in that, Determining the settlement result to be tested based on the settlement results of the multiple settlement events includes: The settlement results of the multiple settlement events are used as the settlement result to be tested; or; Obtain the settlement event to be tested corresponding to the settlement system to be tested; The settlement result corresponding to the settlement event to be tested among the settlement results of the multiple settlement events is taken as the settlement result to be tested.
4. The method according to claim 1, characterized in that, The step of generating test results for the settlement system under test based on the settlement results to be tested and the historical settlement results of the target historical order sample includes: If the settlement result to be tested is the same as the historical settlement result, then the first preset result is taken as the test result; wherein, the first preset result is used to characterize the settlement system to be tested as qualified; If the settlement result to be tested is different from the historical settlement result, then the second preset result is used as the test result, wherein the second preset result is used to characterize the settlement system to be tested as unqualified.
5. The method according to claim 4, characterized in that, The method further includes: After using the second preset result as the test result, the test result is updated based on the settlement result to be tested and the historical settlement result.
6. The method according to claim 1, characterized in that, The acquisition of historical order samples corresponding to the settlement system under test includes: The historical orders corresponding to the preset order types are obtained from the historical order database of the settlement system under test as the historical order samples. or; The historical order sample is selected from the historical order database based on historical orders whose record time does not exceed a preset time. or; A preset number of historical orders are selected from the historical order database according to the recorded time as the historical order sample.
7. The method according to claim 6, characterized in that, The step of retrieving historical orders corresponding to a preset order type from the historical order database of the settlement system under test as the historical order sample includes: Obtain the preset number of samples corresponding to the preset order type; Based on the preset sample size, retrieve the historical orders corresponding to the preset order type from the historical order database as the historical order samples.
8. A settlement system testing device, characterized in that, include: The sample acquisition module is configured to acquire historical order samples corresponding to the settlement system under test; wherein, the historical order samples include multiple settlement events; The system call module is configured to call the settlement system under test based on the historical order sample and the settlement event order of the historical order sample to determine the settlement result of the historical order sample; wherein, the settlement event order represents the settlement order of each settlement event in the historical order sample; The result generation module is configured to generate test results for the settlement system under test based on the settlement results to be tested and the historical settlement results of the historical order samples.
9. A computer-readable storage medium, characterized in that, It stores computer-readable instructions that, when executed by the computer's processor, cause the computer to perform the settlement system testing method according to any one of claims 1 to 7.
10. An electronic device, characterized in that, include: One or more processors; A storage device for storing one or more programs, which, when executed by one or more processors, cause the electronic device to implement the settlement system testing method as described in any one of claims 1 to 7.