A simulation playback test method and device based on multi-layer processing rules, equipment and storage medium

By using multi-layered processing rules to transform transaction data into interfaces, fields, and field values, the problem of low efficiency in simulation playback testing of old and new business systems was solved, achieving efficient data adaptation and reliable verification results.

CN123138115APending Publication Date: 2026-11-20HUA XIA BANK
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611285816.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-24
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

Existing technologies are inefficient in simulation playback tests of new and old business systems, making it difficult to efficiently handle system differences, resulting in inconsistent playback data and verification failures.

Method used

The transaction data is transformed at the interface level, field level, and field value level using multi-layer processing rules to generate data that is compatible with the new business system, and then replayed and verified using simulation tools.

Benefits of technology

It improves the reusability and maintenance convenience of simulation replay testing rules, reduces the probability of failure caused by interface inconsistencies and field value inconsistencies, and improves the efficiency and success rate of simulation replay testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123138115A_ABST
    Figure CN123138115A_ABST
Patent Text Reader

Abstract

The application discloses a simulation playback test method and device based on multi-layer processing rules, equipment and a storage medium. The method comprises the following steps: obtaining first transaction request data of a first business system and first transaction response data corresponding to the first transaction request data; processing the first transaction request data based on multi-layer processing rules to generate second transaction request data suitable for a second business system; sending the second transaction request data to the second business system through a simulation tool to carry out simulation playback verification, and obtaining second transaction response data corresponding to the second transaction request data; processing the first transaction response data based on the multi-layer processing rules to generate third transaction response data suitable for the second business system; and comparing the second transaction response data and the third transaction response data to finally obtain a simulation playback verification comparison result. In this way, the rule reusability and maintenance convenience of the simulation playback test can be improved, and the simulation playback test efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a simulation playback test method, apparatus, device and storage medium based on multi-layer processing rules. Background Technology

[0002] Financial business systems can handle a large number of business transactions, including account management, payments, clearing, and channel access. During system upgrades, reconstructions, or the parallel development of new and old business systems, it is usually necessary to simulate and replay historical or production transactions from the old business system in the new business system to verify whether the new business system can correctly handle the transaction processing capabilities of the old business system.

[0003] In this situation, since the old and new business systems often differ in various aspects, existing solutions can first adapt the old and new business systems by manually writing code, and then perform simulation playback to verify the adaptation. However, this approach still struggles to efficiently handle the various differences between the old and new business systems, resulting in low efficiency in simulation playback testing. Summary of the Invention

[0004] This application provides a simulation playback test method, apparatus, device, and storage medium based on multi-layer processing rules to improve the efficiency of simulation playback testing.

[0005] In a first aspect, embodiments of this application provide a simulation playback testing method based on multi-layer processing rules, including: Obtain the first transaction request data and the first transaction response data corresponding to the first transaction request data from the first business system; The first transaction request data is processed based on multi-layer processing rules to generate second transaction request data adapted to the second business system. The multi-layer processing rules are used to convert the transaction request data of the first business system into transaction request data adapted to the second business system from the interface level, field level and field value level. The second transaction request data is sent to the second business system through a simulation tool to conduct simulation playback verification, and the second transaction response data corresponding to the second transaction request data is obtained. The first transaction response data is processed based on the multi-layer processing rules to generate third transaction response data that is compatible with the second business system. The second transaction response data and the third transaction response data are compared to obtain the simulation playback verification comparison results.

[0006] Optionally, the multi-layer processing rules include mapping rules at the interface level, mapping rules at the field level, and conversion rules at the field value level. The step of processing the first transaction request data based on multi-layer processing rules to generate second transaction request data adapted to the second business system includes: Based on the interface-level mapping rules, the first interface corresponding to the first transaction request data is mapped to the second interface corresponding to the second business system; Based on the mapping rules at the field level, the first field in the first transaction request is mapped to the second field in the second interface; Based on the conversion rules at the field value level, the field value of the first field is converted to obtain the field value of the second field, and the second transaction request data includes the field value of the second field.

[0007] Optionally, the interface-level mapping rules include at least one of the following: a first interface mapping rule, a second interface mapping rule, and a third interface mapping rule; The first interface mapping rule is used to map the first interface and the second interface according to a preset mapping relationship between the first interface and the second interface; The second interface mapping rule includes a preset logical expression. The second interface mapping rule is used to validate the preset logical expression, and if the validation passes, to map the first interface and the second interface based on the preset logical expression. The third interface mapping rule is used to call the first custom business logic to map the first interface to the second interface.

[0008] Optionally, the field-level mapping rules include at least one of the following: a first field mapping rule, a second field mapping rule, a third field mapping rule, a fourth field mapping rule, and a fifth field conversion rule; The first interface mapping rule is used to map the first field to the second field through a preset mapping relationship between the first field and the second field; The second interface mapping rule is used to add a preset field to the second business system based on the first field to obtain the second field; The third field mapping rule is used to merge multiple first subfields into a second field, wherein the first field includes the multiple first subfields; The fourth interface mapping rule is used to split the first field into multiple second sub-fields, and the second field includes the multiple second sub-fields; The fifth field mapping rule is used to call the second custom business logic to map the first field and the second field.

[0009] Optionally, the conversion rules at the field value level include at least one of the following: a first field value mapping rule, a second field value mapping rule, a third field value mapping rule, a fourth field value mapping rule, a fifth field value conversion rule, a sixth field value conversion rule, and a seventh field value conversion rule; The field values ​​of the first field include monetary value field values. The mapping rule for the field values ​​of the first field is used to perform format conversion on the monetary value field values ​​to obtain the field values ​​of the second field. The field value of the first field includes a first placeholder character, and the field value mapping rule of the second field is used to delete the first placeholder character to obtain the field value of the second field; The third field value mapping rule is used to fill the field value of the first field with a second placeholder character to obtain the field value of the second field; The field values ​​of the first field include date-type field values, and the field value mapping rule of the fourth field is used to perform format conversion on the date-type field values ​​to obtain the field values ​​of the second field; The field value of the first field includes a database enumeration value, and the field value mapping rule of the fifth field is used to perform format conversion on the system enumeration value to obtain the field value of the second field; The sixth field value mapping rule is used to obtain the field value of the second field by setting the field value of the first field to a preset field value. The seventh field value mapping rule is used to call the third custom business logic to convert the field value of the first field into the field value of the second field.

[0010] Optionally, the step of sending the second transaction request data to the second business system through a simulation tool to conduct simulation playback verification and obtain the second transaction response data corresponding to the second transaction request data includes: Based on the data format requirements and character set encoding requirements of the second business system, the second transaction request data is processed to obtain the third transaction request data. Based on the transaction routing mapping rules, the third transaction request data is sent to the second business system through a simulation tool to conduct simulation playback verification, thereby obtaining the second transaction response data.

[0011] Optionally, comparing the second transaction response data and the third transaction response data to obtain the simulation playback verification comparison result includes: Based on the target comparison period, the second transaction response data and the third transaction response data are scanned to obtain the fields to be verified; Based on the target comparison rules, the domain values ​​of the fields to be verified in the second and third transaction response data are compared for consistency to obtain the simulation playback verification comparison results.

[0012] Secondly, embodiments of this application provide a simulation playback testing device based on multi-layer processing rules, comprising: The data acquisition module is used to acquire the first transaction request data of the first business system and the first transaction response data corresponding to the first transaction request data; The first data processing module is used to process the first transaction request data based on multi-layer processing rules to generate second transaction request data adapted to the second business system. The multi-layer processing rules are used to convert the transaction request data of the first business system into transaction request data adapted to the second business system from the interface level, field level and field value level. The data playback module is used to send the second transaction request data to the second business system through a simulation tool to carry out simulation playback verification and obtain the second transaction response data corresponding to the second transaction request data. The second data processing module is used to process the first transaction response data based on the multi-layer processing rules to generate third transaction response data that is compatible with the second business system. The data comparison module is used to compare the second transaction response data and the third transaction response data to obtain the simulation playback verification comparison results.

[0013] Thirdly, embodiments of this application provide an electronic device, the device including: a processor, a memory, and a system bus; The processor and the memory are connected via the system bus; The memory is used to store a program, which includes instructions that, when executed by the processor, cause the processor to perform any of the implementation steps of the simulation playback test method based on multi-layer processing rules described above.

[0014] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements any of the implementation steps of the simulation playback test method based on multi-layer processing rules described above.

[0015] As can be seen from the above technical solutions, the embodiments of this application have the following advantages: In this embodiment, firstly, a first transaction request data and a corresponding first transaction response data from a first business system are obtained. Next, the first transaction request data is processed based on multi-layer processing rules to generate second transaction request data adapted to the second business system. These multi-layer processing rules can be used to convert the transaction request data from the first business system into transaction request data adapted to the second business system at the interface, field, and field value levels. Then, the second transaction request data is sent to the second business system using a simulation tool to conduct simulation playback verification, obtaining the corresponding second transaction response data. The first transaction response data is further processed based on the multi-layer processing rules to generate third transaction response data adapted to the second business system. Finally, the second and third transaction response data are compared to obtain the simulation playback verification comparison result.

[0016] As can be seen, since the multi-layered processing rules operate simultaneously at the interface, field, and field value levels, when the new business system (i.e., the second business system) and the old business system (i.e., the first business system) differ in interface definitions, field structures, and field value retrieval methods, the first transaction request data can be converted into second transaction request data that the second business system can recognize and process. This ensures that the second business system does not receive data that is incompatible with its own interface specifications. Furthermore, the first transaction response data can also be processed into third transaction response data adapted to the second business system, instead of mechanically comparing the original transaction response data of the first business system with that of the second business system. In this way, when the differences between the first and second business systems change, adaptation can be achieved by adjusting the multi-layered processing rules, without having to rewrite a large amount of dedicated code for each type of difference. This improves the rule reusability and maintenance convenience of simulation playback testing, and enhances the efficiency of simulation playback testing in scenarios involving system upgrades, refactoring, or continuous interface iteration. Furthermore, it can reduce the probability of simulation playback failure and comparison misjudgment caused by inconsistent interfaces, inconsistent fields, or inconsistent business semantic expressions of field values, thereby improving the success rate of the simulation playback process and the reliability of the simulation playback verification comparison results. Attached Figure Description

[0017] Figure 1 A flowchart illustrating a simulation playback test method based on multi-layer processing rules, provided for an embodiment of this application; Figure 2 A flowchart illustrating the execution process of a multi-layered processing rule, provided as an embodiment of this application; Figure 3 A schematic diagram illustrating the application of a field-level mapping relationship provided in an embodiment of this application; Figure 4a A schematic diagram illustrating the application of a field value-level conversion relationship provided in an embodiment of this application; Figure 4b A schematic diagram illustrating another application of field value-level conversion relationships provided in an embodiment of this application; Figure 5 A schematic diagram of the architecture of an application scenario for a simulation playback test method based on multi-layer processing rules provided in this application embodiment; Figure 6 This is a schematic diagram of a simulation playback test device based on multi-layer processing rules, provided as an embodiment of this application. Detailed Implementation

[0018] As mentioned earlier, during system upgrades, refactoring, or the parallel construction of old and new business systems, it is necessary to replay transaction data from the old business system (i.e., the first business system mentioned below) into the new business system (i.e., the second business system mentioned below) to determine whether the second business system can process the same or corresponding business transactions as expected. However, since the first and second business systems may adopt different system architectures, different transaction routing methods, different data exchange formats, different character set encodings, different interface definitions, different field definitions, and different field value definitions, if the transaction request data from the first business system is directly sent to the second business system, the second business system may not be able to recognize the transaction request data, or, although it can process it, the transaction response data cannot be effectively compared with the transaction response data from the first business system.

[0019] For example, the first business system can be the original business system in the existing production environment, and the second business system can be the target verification system used for testing. A transaction in the first business system may be split into multiple transactions in the second business system and sent to different target verification systems respectively; a field in the first business system may correspond to multiple fields in the second business system; multiple fields in the first business system may also be merged into one field in the second business system; amounts, dates, enumeration values, or strings with placeholders represented in a specific format in the first business system may need to be represented in a different format in the second business system. As a result, if manual coding is still used, not only is the development cost high, but maintenance is also difficult as the interface of the second business system continues to iterate. It is still difficult to efficiently handle the differences between the old and new business systems, resulting in inconsistencies between the replay data and the simulation replay verification comparison results, and the efficiency of simulation replay testing is low.

[0020] To address the aforementioned issues, this application provides a simulation replay testing method based on multi-layer processing rules, comprising: first, acquiring first transaction request data and corresponding first transaction response data from a first business system; next, processing the first transaction request data based on multi-layer processing rules to generate second transaction request data adapted to a second business system, wherein the multi-layer processing rules can be used to convert the transaction request data of the first business system into transaction request data adapted to the second business system from the interface level, field level, and field value level; then, sending the second transaction request data to the second business system through a simulation tool to conduct simulation replay verification, obtaining second transaction response data corresponding to the second transaction request data, and further processing the first transaction response data based on multi-layer processing rules to generate third transaction response data adapted to the second business system; finally, comparing the second and third transaction response data to obtain the simulation replay verification comparison result.

[0021] As can be seen, since the multi-layered processing rules operate simultaneously at the interface, field, and field value levels, when the new business system (i.e., the second business system) and the old business system (i.e., the first business system) differ in interface definitions, field structures, and field value retrieval methods, the first transaction request data can be converted into second transaction request data that the second business system can recognize and process. This ensures that the second business system does not receive data that is incompatible with its own interface specifications. Furthermore, the first transaction response data can also be processed into third transaction response data adapted to the second business system, instead of mechanically comparing the original transaction response data of the first business system with that of the second business system. In this way, when the differences between the first and second business systems change, adaptation can be achieved by adjusting the multi-layered processing rules, without having to rewrite a large amount of dedicated code for each type of difference. This improves the rule reusability and maintenance convenience of simulation playback testing, and enhances the efficiency of simulation playback testing in scenarios involving system upgrades, refactoring, or continuous interface iteration. Furthermore, it can reduce the probability of simulation playback failure and comparison misjudgment caused by inconsistent interfaces, inconsistent fields, or inconsistent field value expressions, thereby improving the success rate of the simulation playback process and the reliability of the simulation playback verification comparison results.

[0022] It should be noted that the embodiments of this application do not limit the executing entity of the simulation playback test method based on multi-layer processing rules. For example, the simulation playback test method based on multi-layer processing rules in the embodiments of this application can be applied to devices such as terminal devices or servers. The terminal device can be an electronic device such as a smartphone, computer, personal digital assistant (PDA), or tablet computer. The server can be a standalone server, a cluster server, or a cloud server.

[0023] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0024] Figure 1 A flowchart illustrating a simulation playback test method based on multi-layer processing rules, provided for embodiments of this application. (Combined with...) Figure 1 As shown, the simulation playback test method based on multi-layer processing rules provided in this application embodiment may include the following steps S101-S105.

[0025] S101: Obtain the first transaction request data and the first transaction response data corresponding to the first transaction request data from the first business system.

[0026] Here, the primary business system refers to the original source system of the transaction data. For example, in the scenario of upgrading or reconstructing information systems in the financial sector, the primary business system can be the existing production environment's original business system that is already online and running, i.e., the old business system. During actual business operations, the primary business system generates a large amount of transaction request data and generates corresponding transaction response data after processing this transaction request data.

[0027] Accordingly, the first transaction request data refers to the request-side data corresponding to a single business transaction in the first business system. This first transaction request data may include at least one of the following: transaction code, interface identifier, message header, message body, field name, field value, channel information, institution information, transaction time, and serial number, etc.

[0028] Among them, the transaction code is an identifier used to identify a type of transaction, such as distinguishing different business transactions such as query, transfer, account opening or contract signing; the interface identifier is an identifier used to identify the interface called between systems; the message header is the data part that describes the transaction route, message length, encoding format or common parameters; and the message body is the data part that carries specific business fields.

[0029] The first transaction response data refers to the response data generated by the first business system after processing the first transaction request data. This first transaction response data may include at least one of the following: response code, response information, transaction processing result, returned fields, returned field values, error messages, and business result data.

[0030] Based on this, in the implementation of step S101, the first transaction request data and the first transaction response data can be obtained by collecting transaction messages from the first business system in the existing production environment. Specifically, a data acquisition node can be set up in the first business system, and the transaction messages actually received or sent by the first business system can be copied to an intermediate storage node through this data acquisition node. This intermediate storage node can be a database, message queue, file system, or caching system. In this way, the data used for simulation playback testing comes from real business transactions, which can improve the realism of the test scenario.

[0031] Alternatively, the first transaction request and response data can be retrieved from stored historical transaction data in a parallel verification environment. For example, testers can select historical production transactions within a specific time period and import the corresponding request and response messages into a simulation playback test platform. The test platform then sorts the transaction request data according to transaction time, transaction serial number, or business sequence, so that it can be replayed in the second business system in the original transaction order in subsequent steps. This can restore the context order of the transactions as much as possible and reduce test deviations caused by changes in the transaction order.

[0032] Alternatively, transaction data from the primary business system can be received via a simulation bypass application. A simulation bypass application is an application deployed outside the primary business system used to collect, sort, transform, send, and verify transaction data. This simulation bypass application does not need to participate in the actual transaction processing of the primary business system; instead, it replicates or receives transaction data from the primary business system in a bypass manner, thereby reducing the impact on the normal operation of the primary business system.

[0033] In this way, in this embodiment of the application, by acquiring the first transaction request data and the first transaction response data, a complete input-output basis for the same transaction can be provided for subsequent simulation playback on the request side and result verification on the response side. That is to say, not only can the first transaction request data be converted and sent to the second business system, but the corresponding first transaction response data can also be used to construct a verification benchmark, thereby avoiding the problem of not being able to determine whether the processing result of the second business system is correct based on only the request data.

[0034] S102: Process the first transaction request data based on multi-layer processing rules to generate second transaction request data adapted to the second business system. The multi-layer processing rules are used to convert the transaction request data of the first business system into transaction request data adapted to the second business system from the interface level, field level and field value level.

[0035] Here, the second business system refers to the target system that needs to be verified. Specifically, the second business system can be a restructured new business system, a target verification system, a parallel verification system, or a set of target verification systems. Because the second business system may differ from the first business system in terms of architecture, interfaces, fields, and field values, the first transaction request data is usually not sent directly to the second business system.

[0036] Multi-layered processing rules refer to a set of rules used to describe the adaptation relationship between a first business system and a second business system. This set of rules does not simply replace a single field, but rather processes transaction data sequentially or in combination from multiple levels. Specifically, multi-layered processing rules are used to transform various data from the first business system into data adapted to the second business system at the interface level, field level, and field value level, such as the transaction request data or its corresponding transaction response data mentioned above. Specifically, the interface level focuses on which interface in the second business system the transaction request should map to; the field level focuses on how fields in the first and second business systems correspond; and the field value level focuses on how specific values ​​in a field are converted into a form that the second business system can recognize or accept.

[0037] It should be noted that, in this embodiment, converting the data from the first business system into data adapted for the second business system means processing data originally conforming to the specifications of the first business system into data conforming to the specifications of the second business system. The adaptation process may include interface mapping, field name replacement, field structure reorganization, field value format conversion, and message structure reorganization, etc., which are not specifically limited in this embodiment. The processing process refers to the process of parsing, matching, transforming, generating, and reorganizing data according to multi-layered processing rules.

[0038] In practical implementation, the aforementioned multi-layered processing rules may include interface-level mapping rules, field-level mapping rules, and field value-level conversion rules. Based on this, for the implementation of step S102, firstly, based on the interface-level mapping rules, the first interface corresponding to the first transaction request data can be mapped to the second interface corresponding to the second business system; then, based on the field-level mapping rules, the first field in the first transaction request can be mapped to the second field in the second interface; finally, based on the field value-level conversion rules, the field value of the first field can be converted to obtain the field value of the second field, and the second transaction request data includes the field value of the second field.

[0039] Here, combined Figure 2 As shown, the execution process of multi-layered processing rules can proceed in the order of interface-level mapping, field-level mapping, and field value-level transformation and verification. It should be noted that interface-level mapping, field-level mapping, and field value-level transformation can be executed sequentially, or in some scenarios, in combination. For example, when the interface mapping result is determined and the field mapping rules have been loaded, mapping transformations can be directly performed on the fields and field values ​​in the message; when field value transformations depend on the target field type, field-level mapping can be performed first, followed by field value-level transformations.

[0040] Here, the first interface refers to the interface in the first business system corresponding to the first transaction request data. The second interface refers to the interface in the second business system used to process the adapted transaction requests. The first field refers to the field in the first transaction request data, and the second field refers to the field required by the second interface. Field values ​​refer to the specific values ​​carried in the field, such as the amount value in the amount field, the date value in the date field, the channel number in the channel field, and the enumerated values ​​in the status field.

[0041] As an example, interface-level mapping rules are used to address the issue of different interface granularities between the first and second business systems. For instance, a transaction interface in the first business system may directly correspond to one transaction interface in the second business system, or it may correspond to multiple transaction interfaces in the second business system. Furthermore, due to the splitting of business modules within the second business system, it may be mapped to interfaces in different target verification systems. Through interface-level mapping rules, it is possible to first determine which second interface the second transaction request data should correspond to, avoiding the lack of target interface context in subsequent field mappings.

[0042] Field-level mapping rules are used to resolve differences in naming, quantity, or structure between the first and second fields. For example, a customer name field in the first business system may still correspond to a customer name field in the second business system; an address field in the first business system may be split into multiple fields such as province, city, and detailed address in the second business system; multiple account-related fields in the first business system may be merged into one field in the second business system; newly added fields in the second business system may need to generate fixed or default values ​​according to the rules. Through field-level mapping rules, the field structure in the first transaction request data can be transformed into the field structure required by the second interface.

[0043] Field value-level conversion rules are used to resolve issues arising from differing field value representation methods. For example, a monetary field in the first business system might be represented without a decimal point but with a trailing sign, while the second business system requires the decimal point to be retained; a date field in the first business system might use a month-day-year format, while the second business system requires a year-month-day format; an enumeration value A in the first business system might correspond to an enumeration value 1 in the second business system; a numeric string in the first business system might contain leading zeros, while the second business system requires the removal of these leading zeros. Through field value-level conversion rules, the second field can not only have the correct name but also ensure that its value conforms to the value retrieval specifications of the second business system.

[0044] In this way, through the sequential processing at the interface level, field level, and field value level, a relatively complete request-side adaptation chain can be formed. Because this chain first determines the interface, then the fields, and then transforms the field values, each step of the processing has a clear context, which helps to improve the accuracy of the transformation results.

[0045] To facilitate understanding, the processing rules for these levels will be described below with reference to specific examples.

[0046] As one possible implementation, the interface-level mapping rules may include at least one of a first interface mapping rule, a second interface mapping rule, and a third interface mapping rule.

[0047] The first interface mapping rule is used to map the first interface to the second interface based on a pre-defined mapping relationship. Here, the pre-defined mapping relationship refers to a pre-configured interface correspondence. For example, transaction interface A in the first business system can be configured to correspond to transaction interface B in the second business system. In practice, the system can query the pre-defined mapping relationship based on the transaction code or interface identifier in the first transaction request data to determine the second interface. This method is suitable for one-to-one mapping scenarios where the interface relationship is relatively clear. The first interface mapping rule can improve the execution efficiency of conventional interface mapping.

[0048] The second interface mapping rule includes a preset logical expression. This rule is used to validate the preset logical expression, and if the validation passes, it maps the first interface to the second interface based on the preset logical expression. Here, the preset logical expression refers to the expression used to describe the interface mapping conditions. This expression can determine the second interface based on transaction code, message fields, business type, or other message content. For example, for the same first interface, when the business type field in the transaction request data has a certain value, it maps to the second interface B; when the business type field has another value, it maps to the second interface C. Validating the preset logical expression means checking its condition field mapping rules before executing the expression, such as whether the expression syntax, referenced fields, parentheses match, operators are correct, or the calculation logic is correct, to avoid mapping failure due to incorrect expression configuration. The second interface mapping rule supports more flexible condition mapping and adapts to scenarios where interfaces are split between new and old systems or business boundaries change.

[0049] The third interface mapping rule is used to invoke the first custom business logic to map the first interface to the second interface. Here, the first custom business logic can be extended processing logic pre-written by developers, such as a custom implementation class, a custom script, or a custom rule component. This approach is suitable for complex scenarios where interface mapping relationships cannot be expressed through simple preset relationships or logical expressions. For example, when the target interface requires the combination of multiple fields, external configurations, or complex business judgments to be determined, the first custom business logic can be invoked to execute the interface mapping. The third interface mapping rule improves the scalability of interface-level adaptability.

[0050] As another possible implementation, after the interface-level processing described above, field-level mapping rules can be further executed. These field-level mapping rules may include at least one of a first field mapping rule, a second field mapping rule, a third field mapping rule, a fourth field mapping rule, and a fifth field conversion rule.

[0051] The first field mapping rule is used to map the first field to the second field based on a pre-defined mapping relationship between the first and second fields. Specifically, if the field names in the first business system differ from those in the second business system but have the same business meaning, the first field can be assigned to the second field through the pre-defined field mapping relationship. For example, the original customer number field in the first business system can be mapped to the target customer number field in the second business system. The first field mapping rule allows for the rapid handling of one-to-one field mapping scenarios.

[0052] The second field mapping rule is used to add a preset field to a second business system based on the first field, thus obtaining the second field. In practical applications, taking a new system construction scenario as an example, the second business system may add fields that do not exist in the first business system, or the second interface may require certain fixed fields. In this case, the second field mapping rule can be used to add preset fields to the second business system. The value of this preset field can be a fixed value, a default value, or a value generated based on the first field or the transaction context. For example, if the second business system adds a channel field, it can be configured as a fixed channel number; or if the second business system adds a source system field, it can be configured as a fixed value representing the first business system. The second field mapping rule can solve the problem that the target interface cannot directly obtain the added field from the first transaction request data.

[0053] The third field mapping rule is used to merge multiple first subfields into a second field, where the first field includes multiple first subfields. Here, the first subfields can be understood as multiple related fields in the first business system. For example, the first business system may contain a province field, a city field, and a detailed address field, while the second business system requires a complete address field. In this case, multiple first subfields can be merged into the second field. The merging can be performed according to a preset order, concatenation operator, or expression. The third field mapping rule can adapt to scenarios where the first business system has more detailed fields and the second business system has more generalized fields.

[0054] The fourth field mapping rule is used to split the first field into multiple second subfields, where each second field includes multiple second subfields. Here, a second subfield can be understood as multiple target fields obtained by splitting a first field in the second business system. For example, if an account field in the first business system contains both the organization number and the account subject, while the second business system requires separate fields for the organization number and the account subject, then the first field can be split into multiple second subfields according to a fixed length, delimiter, or splitting rule. The fourth field mapping rule can adapt to scenarios where the first business system's fields are coarser and the second business system's fields are finer.

[0055] The fifth field mapping rule is used to invoke the second custom business logic to map the first and second fields. Here, the second custom business logic can be used to handle complex field transformation scenarios. For example, when the target field needs to be calculated by combining multiple original fields, field values, and business conditions, or when field mapping requires complex business judgments, the second custom business logic can be invoked. Through the fifth field mapping rule, the processing capabilities at the field level are not limited by predefined mapping templates.

[0056] It's important to note that field-level mapping rules can be configured as rule tables. These tables can record information such as the original system transaction code, the target system transaction code, the original field name, the target field name, the field mapping type, and mapping parameters. When a rule is executed, the corresponding rule can be loaded based on the transaction code and interface identifier, and different processing can be performed according to the field mapping type. This allows for centralized maintenance of field differences between different transactions and interfaces through rule configuration, improving maintainability.

[0057] For ease of understanding, combined with Figure 3 As shown, field-level mapping rules can be configured and executed through a field mapping relationship table. This table can include information such as the original system transaction code, the target system transaction code, the original system field name, the target system field name, the start offset, the end offset, the execution order, and the field mapping type. It should be noted that the start and end offsets can be used to handle fixed-length messages or scenarios requiring truncation of fields; the execution order can control the order in which multiple field mapping rules are executed; and the field mapping type can be used to identify direct mapping, fixed-value mapping, split mapping, merge mapping, or custom transformation.

[0058] Specifically, when the field mapping type adopts the first field mapping rule, the field value can be obtained from the first transaction request data based on the original system transaction code and the original field name, and written to the target system field. When the field mapping type adopts the second field mapping rule, a preset fixed value can be written to the second transaction request data based on the target system transaction code and the target field name. When the field mapping type adopts the fourth field mapping rule, an original field can be split into multiple target fields according to preset rules. When the field mapping type adopts the third field mapping rule, multiple original fields can be merged into one target field according to preset rules. When the field mapping type adopts the fifth field mapping rule, the preset second custom business logic can be called to complete the field mapping. Through the field mapping relationship table, the field mapping rules can be configured, reducing redundant development.

[0059] As another possible implementation, after completing the field-level mapping, field value-level conversion rules can be executed. These field value-level conversion rules may include at least one of the following: a first field value mapping rule, a second field value mapping rule, a third field value mapping rule, a fourth field value mapping rule, a fifth field value conversion rule, a sixth field value conversion rule, and a seventh field value conversion rule.

[0060] The first field's value can include monetary values. The mapping rules for the first field's value are used to convert the format of these monetary values ​​to obtain the value of the second field. Here, monetary values ​​refer to data values ​​representing monetary amounts. Monetary format conversion can include decimal adjustment, sign handling, removal of extra characters, or addition of decimal points. For example, monetary values ​​in the first business system can be represented with a trailing plus or minus sign and implicit decimal places, while the second business system may require a format with decimal points. By using the mapping rules for the first field's value, the monetary field can be made to conform to the monetary format requirements of the second business system, avoiding comparison errors or business processing errors caused by different monetary expression methods.

[0061] The field value of the first field can include a first placeholder character. The field value mapping rule for the second field is used to remove the first placeholder character to obtain the field value of the second field. Here, a placeholder character refers to a character used to fill space to meet fixed length or format requirements, such as leading zeros or spaces. Removing the first placeholder character can be understood as removing placeholder characters from the left, right, or specified positions of the field value according to the rules. For example, the numeric string 00123 in the first business system can be obtained by removing the leading zeros to get 123. The field value mapping rule for the second field can adapt the field value format of the second business system to those fields that do not require placeholder characters.

[0062] The third field value mapping rule is used to fill the field value of the first field with a second placeholder character to obtain the field value of the second field. Specifically, when the second business system requires the field value to meet a fixed length or fixed format, placeholder characters can be filled to the left, right, or at a specified position on the first field value. For example, the numeric string 456 in the first business system can be filled with 0s on the left to obtain 000456. The third field value mapping rule can adapt to scenarios where the second business system needs to pad the field length.

[0063] The first field's value can include date-related values. The fourth field's value mapping rules are used to convert the format of date-related values ​​to obtain the second field's value. Here, date-related values ​​refer to data values ​​representing dates. Date format conversion can include changing the year-month-day order, removing or adding separators, and adjusting the year's position. For example, the date value 01302026 in the first business system can be converted to 20260130. The fourth field's value mapping rules prevent the second business system from being unable to parse dates or avoid inconsistencies in simulation playback verification results due to differences in date format.

[0064] The first field's value can include database enumeration values. The fifth field's value mapping rule is used to convert the format of the system enumeration values ​​to obtain the second field's value. Here, a database enumeration value refers to a field value that uses a specific code to represent a certain business meaning. For example, in the first business system, code A represents a certain state, while in the second business system, code 1 can be used to represent the same state. Through the fifth field's value mapping rule, the enumeration values ​​of the first business system can be converted to the enumeration values ​​of the second business system based on the enumeration value mapping table. This ensures the consistency of field values ​​in terms of business semantics.

[0065] The sixth field value mapping rule is used to set the field value of the first field to a preset field value to obtain the field value of the second field. The preset field value can be a fixed value, a default value, or a replacement value. For example, the channel value 001 in the first business system can be replaced with the channel value 030 required by the second business system. The sixth field value mapping rule can handle scenarios where the second business system requires a fixed assignment or replacement.

[0066] The seventh field value mapping rule is used to invoke third-party custom business logic to convert the field value of the first field to the field value of the second field. Here, the third-party custom business logic can handle complex field value conversions that cannot be expressed using conversion rules for amounts, placeholders, dates, enumerations, or fixed values. For example, some field values ​​need to be calculated in conjunction with context, multiple fields, or complex business rules; this can be achieved by invoking the third-party custom business logic. The seventh field value mapping rule enhances the extensibility of field value-level conversion rules.

[0067] It's important to note that field value-level conversion rules can be configured as a field value conversion rule table. This table can record information such as transaction code, field name, field value conversion type, conversion parameters, field value placeholders, original code value, and code replacement value. During rule execution, the corresponding field value conversion rule can be located based on the target transaction code and field name, and the field value can be formatted. This allows for conversions of amounts, characters, dates, enumerations, fixed values, and custom values ​​to all be executed within a unified rule framework.

[0068] For ease of understanding, combined with Figure 4a and Figure 4bAs shown, field value-level conversion rules can be configured through a field value conversion configuration table and an enumeration value conversion rule table. The field value conversion configuration table can include information such as field name, field type, transaction code, whether it is required, field value conversion type, field value conversion parameters, and field value placeholders. The enumeration value conversion rule table can include information such as the field's English name, original code value, and code replacement value. It should be explained that the field type is used to distinguish different types such as amount, character, date, and enumeration; whether it is required indicates whether the field must exist; the field value conversion type indicates the conversion template; the field value conversion parameters record the parameters required for conversion, such as decimal places, date format, and padding length; and the field value placeholders record the placeholder characters that need to be removed or padded.

[0069] Specifically, for monetary fields, the sign, decimal places, or display format can be adjusted according to the monetary conversion rules. For character fields, placeholder characters on the left, right, or at specified positions can be removed according to the placeholder removal conversion rules, or the field length can be padded according to the placeholder filling conversion rules. For date fields, they can be converted to the date format required by the second business system according to the date format conversion rules. For enumeration fields, the original code value can be converted to the target code value according to the enumeration value conversion rule table. For fixed value replacement, the field value can be replaced with a preset value. For complex conversions, third-party custom business logic can be invoked. Through the above field value conversion configuration, the field values ​​can meet the requirements of the second business system interface processing and response verification.

[0070] To facilitate understanding, a specific example can also be provided in the embodiments of this application.

[0071] As an example, a transaction request in the first business system contains transaction code T1, amount field Amt, date field Date, and status field CheckFlag. In the second business system, this transaction corresponds to transaction code T2, and the target interface requires the field names to be Amount, TradeDate, and CheckFlagNew, respectively. Interface-level mapping rules can map the first interface corresponding to T1 to the second interface corresponding to T2; field-level mapping rules can map Amt to Amount, Date to TradeDate, and CheckFlag to CheckFlagNew; field value-level conversion rules can convert the amount value 00201000+ to 201.00, the date value 01302026 to 20260130, and the status value A to 1. After processing, second transaction request data that meets the requirements of the second business system can be generated.

[0072] It should be noted that the specific fields and values ​​mentioned above are merely examples and do not specifically limit the specific implementation process of the embodiments of this application.

[0073] In this embodiment, since the second transaction request data is already adapted to the second business system, request failures or parsing errors caused by differences in interfaces, fields, and field values ​​between the first and second business systems can be reduced. Furthermore, because the differences at the interface, field, and field value levels are incorporated into the same multi-layered processing rule system, testers can address the differences between the old and new systems by maintaining the rules instead of repeatedly writing a large amount of adaptation code, thereby improving the configurability and reusability of simulation playback testing.

[0074] S103: Send the second transaction request data to the second business system through a simulation tool to conduct simulation playback verification and obtain the second transaction response data corresponding to the second transaction request data.

[0075] In this embodiment, the simulation tool can be a test tool, simulation bypass application, or simulation playback platform used to perform transaction replay, message sending, response reception, and result registration. Correspondingly, sending second transaction request data to the second business system via the simulation tool for simulation replay verification means using the simulation tool to send the second transaction request data to the second business system, whereby the second business system processes the second transaction request data according to its own interface specifications and business processing logic, and returns the corresponding second transaction response data.

[0076] The second transaction response data refers to the response data generated by the second business system after processing the second transaction request data. This second transaction response data may include a response code, response information, fields returned by the target system, field values ​​of the fields returned by the target system, error information, or business processing results, etc.

[0077] Based on this, in this embodiment of the application, during the simulation playback verification process, the second transaction request data can first be formatted according to the data format requirements and character set encoding requirements of the second business system to obtain the third transaction request data. Then, based on the transaction routing mapping rules, the third transaction request data is sent to the second business system through a simulation tool to conduct simulation playback verification, thereby obtaining the second transaction response data.

[0078] The data format requirements refer to the data organization format required by the second business system when receiving transaction requests. For example, the second business system may require messages to use a fixed-length format, a delimiter format, JSON format, XML format, or other data exchange formats.

[0079] Character set encoding requirements refer to the character encoding requirements of the second business system. For example, some systems require the use of a specific character set encoding.

[0080] Format processing refers to performing message structure conversion, message reassembly, encoding conversion, or data exchange format conversion on the second transaction request data according to the data format requirements and character set encoding requirements of the second business system.

[0081] Transaction routing mapping rules are used to determine which secondary business system or target verification system transaction request data should be sent to. Because business modules may be separated after the construction of a new system and adopt different system architectures, a transaction that was originally in the first business system may be split into multiple transactions in the second business system and mapped to different systems. Therefore, transaction routing mapping rules can determine the target verification system based on the transaction code, routing information, interface identifier, business type, channel information, or message field content. Through transaction routing mapping rules, third-party transaction request data can be sent to the corresponding target verification system, instead of being fixed to a single system.

[0082] Furthermore, during simulation playback, the simulation bypass application can determine the target verification system based on transaction routing mapping rules after completing multi-layer processing rules. If a first transaction request data corresponds to a second interface, then the corresponding third transaction request data can be sent to a second business system. If a first transaction request data corresponds to multiple second interfaces, then multiple third transaction request data streams can be generated and sent to multiple target verification systems respectively. Each third transaction request data stream can be processed according to the data format requirements and character set encoding requirements of the corresponding target verification system.

[0083] In this way, in the embodiments of this application, the second business system can perform simulation playback after receiving data that conforms to its interface, fields, field values, data format, and encoding requirements, thereby increasing the probability that the playback request is correctly parsed and processed by the second business system. Furthermore, through transaction routing mapping rules, it is possible to adapt to architectural changes in the second business system, which consists of multiple target verification systems, reducing test failures caused by routing errors.

[0084] S104: Process the first transaction response data based on multi-layer processing rules to generate third transaction response data that is compatible with the second business system.

[0085] In this embodiment, since the first business system and the second business system may differ in response interfaces, response fields, and response field values, the first transaction response data cannot be directly compared with the second transaction response data. To make them comparable, this embodiment processes the first transaction response data based on multi-layer processing rules to generate third transaction response data adapted to the second business system.

[0086] Accordingly, the third transaction response data refers to the data obtained after the first transaction response data has been transformed through multiple layers of processing rules, and has the response format of the second business system or at least a format comparable to the second transaction response data. In other words, the third transaction response data is not the actual data returned by the second business system, but rather a verification benchmark obtained by transforming the response result of the first business system according to the interface, fields, and field value specifications of the second business system.

[0087] Therefore, the implementation of step S104 is similar to that of step S102 described above. Specifically, the second business system response interface corresponding to the first transaction response data can be determined first according to the mapping rules at the interface level; then, the first business system response field is mapped to the second business system response field according to the mapping rules at the field level, and the field values ​​of the first business system response field are converted to the field values ​​of the second business system response field according to the conversion rules at the field value level. After the above processing, the format and field value expression of the first transaction response data can be consistent with or comparable to the second transaction response data.

[0088] Therefore, as a possible implementation, the request and response sides can share the same set of multi-layered processing rules. Specifically, if the adaptation relationship between the request and response fields in the first business system is the same or similar to that in the second business system, the request and response data can be processed separately using the same interface-level mapping rules, field-level mapping rules, and field value-level conversion rules. This reduces the number of rules to maintain and improves rule consistency.

[0089] As an alternative implementation, different multi-layered processing rules can be used on the request and response sides. Specifically, the set of fields and their meanings in the response message may differ from those in the request message; therefore, rules can be configured for the response data that correspond to, but are not entirely identical to, the request data. These response-side rules can still include processing rules at the interface level, field level, and field value level. This improves the accuracy of response data adaptation.

[0090] In this way, in the embodiments of this application, by processing the first transaction response data into third transaction response data adapted to the second business system, subsequent comparisons can be based on the same or corresponding data expressions. This reduces errors caused by differences in response formats, field names, or field value expressions between the old and new systems, and improves the reliability of the simulation playback verification comparison results.

[0091] S105: Compare the second transaction response data and the third transaction response data to obtain the simulation playback verification comparison results.

[0092] In this embodiment of the application, comparing the second transaction response data and the third transaction response data means comparing the second transaction response data actually returned by the second business system with the third transaction response data converted from the first transaction response data to determine whether the processing result of the second business system is consistent with the processing result of the first business system or meets the preset consistency requirements.

[0093] Accordingly, the simulation playback verification comparison results may include states such as consistent, inconsistent, partially consistent, missing fields, different field values, different formats, or exception passed. They may also include information such as transaction identifier, interface identifier, field name, field values ​​in the second transaction response data, field values ​​in the third transaction response data, and difference descriptions.

[0094] Accordingly, for the implementation of step S105, the second transaction response data and the third transaction response data can be scanned based on the target comparison period to obtain the fields to be verified.

[0095] The target comparison period refers to the time period or triggering period for executing the comparison task. For example, the data to be verified can be scanned according to a specified period, or the comparison can be triggered immediately after receiving the second transaction response data. Scanning the second and third transaction response data means searching for data that has not yet been compared or needs to be re-compared from the data source storing the second and third transaction response data. The fields to be verified refer to the set of fields that need to be compared.

[0096] Next, based on the target comparison rules, the domain values ​​of the fields to be verified in the second and third transaction response data are compared for consistency to obtain the simulation playback verification comparison results.

[0097] Here, the target comparison rule refers to the rule used to determine whether the field values ​​of two fields are consistent. The target comparison rule can include general comparison rules, as well as exception comparison rules or custom verification methods set for certain fields.

[0098] It should be noted that, in the embodiments of this application, consistency comparison does not necessarily require that the two field values ​​be completely identical at the character level. In some scenarios, field values ​​are only comparable after transformation at the field value level. For example, monetary fields may require consistent numerical meaning; date fields may require consistent date meaning; enumeration fields may require consistent business meaning after transformation; some timestamps, serial numbers, or environment-related fields may not require complete consistency and can be handled through exception rules. By using target comparison rules, the comparison process can be made more in line with business verification requirements.

[0099] Specifically, during the comparison, the corresponding fields in the second and third transaction response data can be determined first based on the mapping relationships at the interface level and the field level. Then, the field values ​​of the corresponding fields are compared field by field. If a field has a field value conversion rule, the comparison can be performed according to the converted result. If a field has an exception verification rule, the consistency is determined according to the exception verification rule. Finally, the simulation playback verification comparison results are stored in a database or other result storage unit. For ease of understanding, an example is provided below.

[0100] As a concrete example, the status field value in the first business system's response message is "A". After conversion using field value-level rules, it is transformed to "1", resulting in a status field value of 1 in the third transaction response data. If the corresponding status field value in the actual second transaction response data returned by the second business system is also 1, then the field matches. Similarly, if the amount field in the first business system's response message is converted to 201.00, and the amount field returned by the second business system is also 201.00, then the amount field matches. If the second business system returns an amount field value of 202.00, then the difference in the amount field is recorded. In this way, format differences and actual business differences can be distinguished.

[0101] In this way, in this embodiment of the application, since the comparison objects are the second transaction response data and the adapted third transaction response data, the large number of format differences caused by directly comparing the first and second transaction response data can be avoided, thus improving the accuracy of difference location. Furthermore, by recording simulation playback to verify the comparison results, a basis can be provided for subsequent problem analysis, interface correction, rule adjustment, and test report generation.

[0102] Based on the above steps S101-S105, it is clear that in this embodiment, since the multi-layer processing rules simultaneously apply to the interface level, field level, and field value level, when the second business system and the first business system differ in interface definition, field structure, and field value methods, the first transaction request data can be converted into second transaction request data that the second business system can recognize and process through the multi-layer processing rules. This ensures that the second business system does not receive data that does not match its own interface specifications. Furthermore, the first transaction response data can also be processed into third transaction response data that is compatible with the second business system, instead of directly comparing the original transaction response data of the first business system with the transaction response data of the second business system mechanically. In this way, when the differences between the first and second business systems change, adaptation can be achieved by adjusting the multi-layer processing rules, without having to rewrite a large amount of dedicated code for each type of difference. This improves the rule reusability and maintenance convenience of simulation playback testing, and enhances the efficiency of simulation playback testing in scenarios of system upgrades, reconstruction, or continuous interface iteration. Furthermore, it can reduce the probability of simulation playback failure and comparison misjudgment caused by inconsistent interfaces, inconsistent fields, or inconsistent field value expressions, thereby improving the success rate of the simulation playback process and the reliability of the simulation playback verification comparison results.

[0103] Based on the simulation playback testing method based on multi-layer processing rules provided in the above embodiments, this application embodiment can also provide an application scenario for the simulation playback testing method based on multi-layer processing rules. The application scenario for this simulation playback testing method based on multi-layer processing rules will be described below with reference to embodiments and accompanying drawings.

[0104] Figure 5 This is a schematic diagram illustrating the architecture of a simulation playback testing method based on multi-layer processing rules, provided in an embodiment of this application. Combined with... Figure 5 As shown, in one application scenario, the first business system can be the existing production environment's original business system, and the second business system can include target verification system 1, target verification system 2 through target verification system N. During simulation playback testing, transaction messages can be collected from the first business system and stored in an intermediate database. The business system simulation bypass application can obtain transaction request data from the intermediate database, sort and convert the transaction request data, and send it to the corresponding target verification system according to the transaction routing mapping rules. After the target verification system returns the second transaction response data, the business system simulation bypass application can convert the first transaction response data corresponding to the first business system into third transaction response data, compare the second and third transaction response data, and record any differences.

[0105] In practical implementation, the business system simulation bypass application can include a message acquisition module, a sorting and data conversion module, a request message sending module, a transaction routing module, and a system business service return result verification module. Specifically, the message acquisition module can be used to obtain transaction request and response messages from the first business system; the sorting and data conversion module can be used to ensure the playback order and execute multi-layer processing rules; the request message sending module can be used to send adapted transaction request data to the target verification system; the transaction routing module can be used to send different transactions to the corresponding target verification system; and the system business service return result verification module can be used to compare the second transaction response data with the third transaction response data.

[0106] In this way, in this application scenario, the normal processing flow of the first business system can be maintained, and the collected real transaction data can be used to simulate and verify the second business system.

[0107] Based on the simulation playback testing method based on multi-layer processing rules provided in the above embodiments, this application can also provide a simulation playback testing device based on multi-layer processing rules. The simulation playback testing device based on multi-layer processing rules will be described below with reference to embodiments and accompanying drawings.

[0108] Figure 6 This is a schematic diagram of a simulation playback test device based on multi-layer processing rules, provided as an embodiment of this application. (Combined with...) Figure 6 As shown, the simulation playback test device 600 based on multi-layer processing rules provided in this application embodiment includes: Data acquisition module 601 is used to acquire the first transaction request data of the first business system and the first transaction response data corresponding to the first transaction request data; The first data processing module 602 is used to process the first transaction request data based on multi-layer processing rules to generate second transaction request data adapted to the second business system. The multi-layer processing rules are used to convert the transaction request data of the first business system into transaction request data adapted to the second business system from the interface level, field level and field value level. The data playback module 603 is used to send the second transaction request data to the second business system through a simulation tool to carry out simulation playback verification and obtain the second transaction response data corresponding to the second transaction request data. The second data processing module 604 is used to process the first transaction response data based on the multi-layer processing rules to generate third transaction response data that is compatible with the second business system. The data comparison module 605 is used to compare the second transaction response data and the third transaction response data to obtain the simulation playback verification comparison result.

[0109] Optionally, the multi-layer processing rules include mapping rules at the interface level, mapping rules at the field level, and conversion rules at the field value level. The step of processing the first transaction request data based on multi-layer processing rules to generate second transaction request data adapted to the second business system includes: Based on the interface-level mapping rules, the first interface corresponding to the first transaction request data is mapped to the second interface corresponding to the second business system; Based on the mapping rules at the field level, the first field in the first transaction request is mapped to the second field in the second interface; Based on the conversion rules at the field value level, the field value of the first field is converted to obtain the field value of the second field, and the second transaction request data includes the field value of the second field.

[0110] Optionally, the interface-level mapping rules include at least one of the following: a first interface mapping rule, a second interface mapping rule, and a third interface mapping rule; The first interface mapping rule is used to map the first interface and the second interface according to a preset mapping relationship between the first interface and the second interface; The second interface mapping rule includes a preset logical expression. The second interface mapping rule is used to validate the preset logical expression, and if the validation passes, to map the first interface and the second interface based on the preset logical expression. The third interface mapping rule is used to call the first custom business logic to map the first interface to the second interface.

[0111] Optionally, the field-level mapping rules include at least one of the following: a first field mapping rule, a second field mapping rule, a third field mapping rule, a fourth field mapping rule, and a fifth field conversion rule; The first interface mapping rule is used to map the first field to the second field through a preset mapping relationship between the first field and the second field; The second interface mapping rule is used to add a preset field to the second business system based on the first field to obtain the second field; The third field mapping rule is used to merge multiple first subfields into a second field, wherein the first field includes the multiple first subfields; The fourth interface mapping rule is used to split the first field into multiple second sub-fields, and the second field includes the multiple second sub-fields; The fifth field mapping rule is used to call the second custom business logic to map the first field and the second field.

[0112] Optionally, the conversion rules at the field value level include at least one of the following: a first field value mapping rule, a second field value mapping rule, a third field value mapping rule, a fourth field value mapping rule, a fifth field value conversion rule, a sixth field value conversion rule, and a seventh field value conversion rule; The field values ​​of the first field include monetary value field values. The mapping rule for the field values ​​of the first field is used to perform format conversion on the monetary value field values ​​to obtain the field values ​​of the second field. The field value of the first field includes a first placeholder character, and the field value mapping rule of the second field is used to delete the first placeholder character to obtain the field value of the second field; The third field value mapping rule is used to fill the field value of the first field with a second placeholder character to obtain the field value of the second field; The field values ​​of the first field include date-type field values, and the field value mapping rule of the fourth field is used to perform format conversion on the date-type field values ​​to obtain the field values ​​of the second field; The field value of the first field includes a database enumeration value, and the field value mapping rule of the fifth field is used to perform format conversion on the system enumeration value to obtain the field value of the second field; The sixth field value mapping rule is used to obtain the field value of the second field by setting the field value of the first field to a preset field value. The seventh field value mapping rule is used to call the third custom business logic to convert the field value of the first field into the field value of the second field.

[0113] Optionally, the data playback module 603 is specifically used for: The format processing module is used to process the second transaction request data based on the data format requirements and character set encoding requirements of the second business system to obtain the third transaction request data. The data sending module is used to send the third transaction request data to the second business system through a simulation tool based on the transaction routing mapping rules to conduct simulation playback verification and obtain the second transaction response data.

[0114] Optionally, the data comparison module 605 is specifically used for: Based on the target comparison period, the second transaction response data and the third transaction response data are scanned to obtain the fields to be verified; Based on the target comparison rules, the domain values ​​of the fields to be verified in the second and third transaction response data are compared for consistency, and the simulation playback verification comparison results are obtained.

[0115] Furthermore, embodiments of this application also provide an electronic device, including: a processor, a memory, and a system bus; The processor and the memory are connected via the system bus; The memory is used to store one or more programs, the one or more programs including instructions, which, when executed by the processor, cause the processor to perform any of the implementation steps of the simulation playback test method based on multi-layer processing rules described above.

[0116] Furthermore, embodiments of this application also provide a computer-readable storage medium storing instructions that, when executed on an electronic device, enable any of the above-described simulation playback test method based on multi-layer processing rules to be implemented.

[0117] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that all or part of the steps in the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, a server, or a network communication device such as a media gateway, etc.) to execute the methods described in various embodiments or some parts of the embodiments of this application. It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on describing the differences from other embodiments. The same or similar parts between the various embodiments can be referred to mutually.

[0118] The system disclosed in the embodiments is described in a relatively simple manner because it corresponds to the method disclosed in the embodiments. For relevant details, please refer to the method section.

[0119] It should also be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0120] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A simulation playback test method based on multi-layer processing rules, characterized in that, The method includes: Obtain the first transaction request data and the first transaction response data corresponding to the first transaction request data from the first business system; The first transaction request data is processed based on multi-layer processing rules to generate second transaction request data adapted to the second business system. The multi-layer processing rules are used to convert the transaction request data of the first business system into transaction request data adapted to the second business system from the interface level, field level and field value level. The second transaction request data is sent to the second business system through a simulation tool to conduct simulation playback verification, and the second transaction response data corresponding to the second transaction request data is obtained. The first transaction response data is processed based on the multi-layer processing rules to generate third transaction response data that is compatible with the second business system. The second transaction response data and the third transaction response data are compared to obtain the simulation playback verification comparison results.

2. The simulation playback test method based on multi-layer processing rules according to claim 1, characterized in that, The multi-layer processing rules include the mapping rules at the interface level, the mapping rules at the field level, and the conversion rules at the field value level. The step of processing the first transaction request data based on multi-layer processing rules to generate second transaction request data adapted to the second business system includes: Based on the interface-level mapping rules, the first interface corresponding to the first transaction request data is mapped to the second interface corresponding to the second business system; Based on the mapping rules at the field level, the first field in the first transaction request is mapped to the second field in the second interface; Based on the conversion rules at the field value level, the field value of the first field is converted to obtain the field value of the second field, and the second transaction request data includes the field value of the second field.

3. The simulation playback test method based on multi-layer processing rules according to claim 2, characterized in that, The interface-level mapping rules include at least one of the following: a first interface mapping rule, a second interface mapping rule, and a third interface mapping rule; The first interface mapping rule is used to map the first interface and the second interface according to a preset mapping relationship between the first interface and the second interface; The second interface mapping rule includes a preset logical expression. The second interface mapping rule is used to validate the preset logical expression, and if the validation passes, to map the first interface and the second interface based on the preset logical expression. The third interface mapping rule is used to call the first custom business logic to map the first interface to the second interface.

4. The simulation playback test method based on multi-layer processing rules according to claim 2, characterized in that, The field-level mapping rules include at least one of the following: a first field mapping rule, a second field mapping rule, a third field mapping rule, a fourth field mapping rule, and a fifth field conversion rule; The first interface mapping rule is used to map the first field to the second field through a preset mapping relationship between the first field and the second field; The second interface mapping rule is used to add a preset field to the second business system based on the first field to obtain the second field; The third field mapping rule is used to merge multiple first subfields into a second field, wherein the first field includes the multiple first subfields; The fourth interface mapping rule is used to split the first field into multiple second sub-fields, and the second field includes the multiple second sub-fields; The fifth field mapping rule is used to call the second custom business logic to map the first field and the second field.

5. The simulation playback test method based on multi-layer processing rules according to claim 2, characterized in that, The field value conversion rules include at least one of the following: a first field value mapping rule, a second field value mapping rule, a third field value mapping rule, a fourth field value mapping rule, a fifth field value conversion rule, a sixth field value conversion rule, and a seventh field value conversion rule; The field values ​​of the first field include monetary value field values. The mapping rule for the field values ​​of the first field is used to perform format conversion on the monetary value field values ​​to obtain the field values ​​of the second field. The field value of the first field includes a first placeholder character, and the field value mapping rule of the second field is used to delete the first placeholder character to obtain the field value of the second field; The third field value mapping rule is used to fill the field value of the first field with a second placeholder character to obtain the field value of the second field; The field values ​​of the first field include date-type field values, and the field value mapping rule of the fourth field is used to perform format conversion on the date-type field values ​​to obtain the field values ​​of the second field; The field value of the first field includes a database enumeration value, and the field value mapping rule of the fifth field is used to perform format conversion on the system enumeration value to obtain the field value of the second field; The sixth field value mapping rule is used to obtain the field value of the second field by setting the field value of the first field to a preset field value. The seventh field value mapping rule is used to call the third custom business logic to convert the field value of the first field into the field value of the second field.

6. The simulation playback test method based on multi-layer processing rules according to claim 1, characterized in that, The step of sending the second transaction request data to the second business system through a simulation tool to conduct simulation playback verification and obtaining the second transaction response data corresponding to the second transaction request data includes: Based on the data format requirements and character set encoding requirements of the second business system, the second transaction request data is processed to obtain the third transaction request data. Based on the transaction routing mapping rules, the simulation tool sends the third transaction request data to the second business system to conduct simulation playback verification, thereby obtaining the second transaction response data.

7. The simulation playback test method based on multi-layer processing rules according to any one of claims 1 to 6, characterized in that, The comparison of the second transaction response data and the third transaction response data to obtain the simulation playback verification comparison result includes: Based on the target comparison period, the second transaction response data and the third transaction response data are scanned to obtain the fields to be verified; Based on the target comparison rules, the domain values ​​of the fields to be verified in the second and third transaction response data are compared for consistency to obtain the simulation playback verification comparison results.

8. A simulation playback test device based on multi-layer processing rules, characterized in that, include: The data acquisition module is used to acquire the first transaction request data of the first business system and the first transaction response data corresponding to the first transaction request data; The first data processing module is used to process the first transaction request data based on multi-layer processing rules to generate second transaction request data adapted to the second business system. The multi-layer processing rules are used to convert the transaction request data of the first business system into transaction request data adapted to the second business system from the interface level, field level and field value level. The data playback module is used to send the second transaction request data to the second business system through a simulation tool to carry out simulation playback verification and obtain the second transaction response data corresponding to the second transaction request data. The second data processing module is used to process the first transaction response data based on the multi-layer processing rules to generate third transaction response data that is compatible with the second business system. The data comparison module is used to compare the second transaction response data and the third transaction response data to obtain the simulation playback verification comparison results.

9. An electronic device, characterized in that, The device includes: a processor, a memory, and a system bus; The processor and the memory are connected via the system bus; The memory is used to store a program, the program including instructions that, when executed by the processor, cause the processor to perform the steps of the simulation playback test method based on multi-layer processing rules as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the simulation playback test method based on multi-layer processing rules as described in any one of claims 1 to 7.