Transaction data processing method and apparatus, storage medium, and electronic device

Through the synergy of the service double-write switch and the target list, the problem of data processing anomalies in the heterogeneous ecosystem of host and distributed platform systems is solved, efficient and secure transaction data processing is achieved, the failure rate is reduced and data consistency is maintained.

CN119831745BActive Publication Date: 2025-10-21INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411974363.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-10-21
Estimated Expiration
2044-12-30

AI Technical Summary

Technical Problem

In financial services, when the heterogeneous ecosystem of host and distributed platform systems provides external services, data input and output are maintained separately, resulting in abnormal transaction data processing, high failure rate, and difficulty in maintaining parallel processing and consistency of data.

Method used

The writing path of transaction data is determined by the service dual-write switch and target list, and data anti-corruption processing and consistency verification are performed to ensure data consistency in the host and distributed platform systems.

Benefits of technology

It achieves efficient and secure transaction data processing between heterogeneous systems, reduces transaction failure rate, and ensures data consistency and system stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119831745B_ABST
    Figure CN119831745B_ABST
Patent Text Reader

Abstract

The application discloses a transaction data processing method and device, a storage medium and an electronic device, and relates to the fields of financial technology and big data technology. The method comprises the following steps: determining, according to a service double-write switch and a target list, that transaction data is to be written into a host and / or a distributed platform system; and performing data preservation processing on the transaction data stored in the host and / or the transaction data stored in the distributed platform system after the transaction data is written into the host and / or the distributed platform system. The application solves the technical problem that, in the prior art, a host and a distributed platform system are used as a whole to provide external services for transaction data for the purpose of information security, but the data input and the data output are still maintained for each system, so that it is difficult to maintain the parallel processing and consistency of the data, and the transaction data is prone to processing abnormalities, thereby causing a high transaction failure rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the fields of financial technology and big data technology, and specifically to a method, device, storage medium and electronic device for processing transaction data. Background Art

[0002] For many years, mainframes, owing to their stability, high availability, and high throughput, have been widely used in large-scale commercial core systems. However, in recent years, due to traditional centralized architecture concepts, relatively closed technology ecosystems, and high expansion costs, various industries have found it increasingly difficult to adapt to the new era of digital transformation and the demand for independent control in key core areas. Faced with these challenges, various industries are exploring ways to migrate core businesses to open ecosystems to fully leverage new technologies and accelerate financial innovation. At the same time, they are expanding the application of open technology products, breaking through external closed technology ecosystems, achieving independent control of critical information infrastructure, and achieving long-term sustainable development.

[0003] Therefore, for financial businesses, it's essential to actively promote the migration of mainframe operations to distributed systems, using a heterogeneous ecosystem of mainframe and distributed platform systems as a single entity to provide external services for transaction data. However, migrating mainframe operations to distributed systems is characterized by its wide scope, high investment, long duration, complex solutions, significant internal and external impacts, and high overall implementation risk. Therefore, data input and output are currently maintained separately for each system, making it difficult to maintain parallel data processing and consistency. This invariably leads to transaction data processing anomalies, resulting in a high rate of transaction failures.

[0004] To address the above-mentioned problems, no effective solutions have been proposed so far. Summary of the Invention

[0005] The main purpose of the present application is to provide a transaction data processing method, device, storage medium and electronic device, so as to at least solve the technical problem that in the prior art, for information security reasons, two heterogeneous ecosystems, namely a host and a distributed platform system, are used as a whole to provide external services for transaction data. However, at present, data input and data output are still maintained separately for each system, making it difficult to maintain parallel processing and consistency of data, resulting in transaction data being prone to processing exceptions, which in turn causes a high transaction failure rate.

[0006] In order to achieve the above-mentioned purpose, according to one aspect of an embodiment of the present application, a method for processing transaction data is provided, including: determining to write transaction data to a host and / or a distributed platform system based on a service double-write switch and a target list, wherein the target list is used to record transaction objects for which transaction risks have been eliminated, and the service double-write switch is used to determine data write selection based on transaction attributes of the transaction data; after the transaction data is written to the host and / or the distributed platform system, performing data anti-corrosion processing on the transaction data stored in the host and / or the transaction data stored in the distributed platform system, wherein the data anti-corrosion processing is used to determine to use the transaction data stored in the host as an output result, or to use the transaction data stored in the distributed platform system as an output result.

[0007] Optionally, the method for processing transaction data also includes: when the transaction data is written to the host and the distributed platform system at the same time, performing a consistency check on the transaction data stored in the host and the transaction data stored in the distributed platform system to obtain a check result; when it is found that the transaction data stored in the host and the transaction data stored in the distributed platform system are inconsistent, marking the state of the protocol routing state table as a target state, wherein the protocol routing state table is used to record the state of the transaction protocol related to the transaction data, and the protocol routing state table in the target state is used to control all subsequent transaction requests using the transaction protocol to be processed by the host and not sent to the distributed platform system.

[0008] Optionally, a consistency check is performed on the transaction data stored in the host and the transaction data stored in the distributed platform system, including: obtaining a key field value returned by the host after the transaction data is written to the host; obtaining a key field value returned by the distributed platform system after the transaction data is written to the distributed platform system; when it is detected that the key field value returned by the host is the same as the key field value returned by the distributed platform system, determining that the transaction data stored in the host and the transaction data stored in the distributed platform system are consistent; when it is detected that the key field value returned by the host is different from the key field value returned by the distributed platform system, determining that the transaction data stored in the host and the transaction data stored in the distributed platform system are inconsistent.

[0009] Optionally, determining whether to write transaction data to the host and / or distributed platform system is based on the service double-write switch and the target list, including: when it is detected that the transaction object of the transaction data is the transaction object in the target list, writing the transaction data to the host and distributed platform system; when it is detected that the transaction object of the transaction data is not the transaction object in the target list, detecting whether the dependent transaction attribute of the service double-write switch matches the transaction attribute of the transaction data, wherein the dependent transaction attribute is a prerequisite for turning on the service double-write switch, and after the service double-write switch is turned on, it is used to write the transaction data to the host and distributed platform system at the same time; when the transaction attribute of the transaction data matches the dependent transaction attribute, the transaction data is written to the host and distributed platform system by turning on the service double-write switch; when the transaction attribute of the transaction data does not match the dependent transaction attribute, prohibiting the service double-write switch from being turned on, and writing the transaction data to the host.

[0010] Optionally, the dependent transaction attributes include at least one of the following three attributes: a preset transaction area; a preset transaction outlet; and a preset transaction channel.

[0011] Optionally, detecting whether the dependent transaction attributes of the service double-write switch match the transaction attributes of the transaction data includes: when the transaction attributes of the transaction data satisfy all attributes included in the dependent transaction attributes, determining that the dependent transaction attributes of the service double-write switch match the transaction attributes of the transaction data; when the transaction attributes of the transaction data do not satisfy any attribute included in the dependent transaction attributes, determining that the dependent transaction attributes of the service double-write switch do not match the transaction attributes of the transaction data.

[0012] Optionally, before performing data anti-corrosion processing on the transaction data stored in the host and / or the transaction data stored in the distributed platform system, the transaction data processing method further includes: when the transaction data in the host and / or the distributed platform system is updated, copying the updated data to the data lake; detecting the primary key, version and time information corresponding to each data received by the data lake; and performing a filtering operation on the multiple data received by the data lake according to the primary key, version and time information corresponding to each data, wherein the filtering operation is used to filter out the data with the latest update time and the target version from multiple data with the same primary key but different versions for retention, and the target version data represents the data on which the deletion operation has been performed.

[0013] Optionally, data anti-corrosion processing is performed on the transaction data stored in the host and / or the transaction data stored in the distributed platform system, including: in response to the output instruction of the transaction data, querying the transaction data from the host and the distributed platform system respectively; when it is queried that the transaction data exists in the host but not in the distributed platform system, using the transaction data in the host as the output result; when it is queried that the transaction data exists in both the host and the distributed platform system, using the transaction data in the host as the output result; when it is queried that the transaction data does not exist in the host but exists in the distributed platform system, using the transaction data in the distributed platform system as the output result.

[0014] Optionally, the method for processing transaction data also includes: when a transaction corresponding to the transaction data fails and data rollback is required, determining the data source involved in the data rollback based on the service double-write switch and the target list, wherein the data source includes a host and / or a distributed platform system; and performing a data rollback operation on the transaction data in the data source.

[0015] In order to achieve the above-mentioned purpose, according to another aspect of an embodiment of the present application, a transaction data processing device is further provided, including: a determination unit, which determines to write the transaction data into the host and / or distributed platform system based on the service double-write switch and the target list, wherein the target list is used to record the transaction objects for which transaction risks have been eliminated, and the service double-write switch is used to determine the data write selection based on the transaction attributes of the transaction data; a processing unit, which performs data anti-corrosion processing on the transaction data stored in the host and / or the transaction data stored in the distributed platform system after the transaction data is written to the host and / or the distributed platform system, wherein the data anti-corrosion processing is used to determine to use the transaction data stored in the host as the output result, or to use the transaction data stored in the distributed platform system as the output result.

[0016] According to another aspect of an embodiment of the present application, an electronic device is also provided, comprising one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors execute the above-mentioned transaction data processing method.

[0017] According to another aspect of an embodiment of the present application, a computer-readable storage medium is further provided, in which a computer program is stored. When the computer program is executed, the device where the computer-readable storage medium is located executes the above-mentioned transaction data processing method.

[0018] According to another aspect of an embodiment of the present application, a computer program product is further provided, comprising computer instructions, which implement the steps of the above-mentioned transaction data processing method when executed by a processor.

[0019] In an embodiment of the present application, first, the transaction data is determined to be written into the host and / or distributed platform system based on the service double-write switch and the target list, wherein the target list is used to record the transaction objects for which transaction risks have been eliminated, and the service double-write switch is used to determine the data write selection based on the transaction attributes of the transaction data. Then, after the transaction data is written into the host and / or distributed platform system, the transaction data stored in the host and / or the transaction data stored in the distributed platform system are subjected to data anti-corrosion processing, wherein the data anti-corrosion processing is used to determine whether the transaction data stored in the host is used as the output result, or whether the transaction data stored in the distributed platform system is used as the output result.

[0020] As can be seen from the above, the core of this application lies in determining whether transaction data is written to both the host and distributed platform systems, or only to one of them, based on the service dual-write switch and target list. The service dual-write switch determines the data writing strategy based on the transaction data's attributes (such as transaction region, branch, channel, etc.), while the target list records transaction partners that have been excluded from transaction risks, providing additional protection for high-risk transactions.

[0021] Secondly, after transaction data is written, data consistency verification and data anti-corruption measures are provided to ensure consistency between the mainframe and distributed platform systems. This includes daily incremental verification of transaction data in both systems. When inconsistencies are found, the correct output is selected according to pre-set rules, and abnormal transaction protocols are marked for subsequent analysis and governance.

[0022] It can be seen that through the technical solution of the present application, the purpose of efficiently and securely processing transaction data between heterogeneous systems is achieved, thereby realizing the technical effect of using two heterogeneous ecosystems of the host and distributed platform system as a whole to provide external services for transaction data, thereby solving the problem in the prior art that for information security, two heterogeneous ecosystems of the host and distributed platform system are used as a whole to provide external services for transaction data, but currently data input and data output are still maintained separately for each system, making it difficult to maintain parallel processing and consistency of data, resulting in transaction data being prone to processing exceptions, and thus causing a high transaction failure rate. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0024] Figure 1 A hardware structure block diagram of a computer terminal for implementing a method for processing transaction data is shown;

[0025] Figure 2 is a flowchart of an optional transaction data processing method according to an embodiment of the present application;

[0026] Figure 3 This is a schematic diagram of routing states of an optional transaction data processing method according to an embodiment of the present application;

[0027] Figure 4 1 is a schematic diagram of checking errors in an optional transaction data processing method according to an embodiment of the present application;

[0028] Figure 5 is a schematic diagram of dual-write switch parameters of an optional transaction data processing method according to an embodiment of the present application;

[0029] Figure 6 This is a flowchart of a dual-write switch priority determination method according to an optional transaction data processing method of an embodiment of the present application;

[0030] Figure 7 This is a flow chart of logically merging host and platform table data in an optional transaction data processing method according to an embodiment of the present application;

[0031] Figure 8 This is a data anti-corruption flow chart of an optional transaction data processing method according to an embodiment of the present application;

[0032] Figure 9 This is a data rollback operation flow chart of an optional transaction data processing method according to an embodiment of the present application;

[0033] Figure 10 is a flowchart of an optional transaction data processing method according to an embodiment of the present application;

[0034] Figure 11 is a schematic diagram of a transaction data processing device provided in accordance with an embodiment of the present application;

[0035] Figure 12 This is a structural block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0036] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.

[0037] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in a sequence other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0038] It should also be noted that the collected information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for display, data for analysis, etc.) involved in this application are information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with relevant laws, regulations and standards, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation portals for users to choose to authorize or refuse. For example, an interface is set up between this system and relevant users or institutions to provide users with corresponding operation portals for users to choose to agree or refuse the automated decision-making results; if the user chooses to refuse, the expert decision-making process will be entered.

[0039] According to an embodiment of the present application, a method embodiment of a method for processing transaction data is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0040] It should be noted that a transaction data processing system can be used as the execution subject of the transaction data processing method of the embodiment of the present application. It is understandable that the transaction data processing method provided in the embodiment of the present application can also be executed by other systems or devices, and the embodiment of the present application does not specifically limit this.

[0041] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 The hardware structure block diagram of a computer terminal (or mobile device) for implementing a method for processing transaction data is shown. Figure 1As shown, the computer terminal 10 (or mobile device) may include one or more (illustrated as 102a, 102b, ..., 102n in the figure) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It will be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.

[0042] It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuitry". The data processing circuitry may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuitry may be a single independent processing module, or may be fully or partially integrated into any of the other components in the computer terminal 10 (or mobile device). As in the transaction data processing method involved in the embodiments of the present application, the data processing circuitry serves as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).

[0043] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the transaction data processing method in the embodiments of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, implementing the above-mentioned transaction data processing method. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0044] The transmission device 106 is configured to receive or transmit data via a network. A specific example of the aforementioned network may include a wireless network provided by the communications provider of the computer terminal 10. In one embodiment, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, the transmission device 106 may be a radio frequency (RF) module, which is configured to communicate with the Internet wirelessly.

[0045] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 (or mobile device).

[0046] Under the above operating environment, this application provides Figure 2 The transaction data processing method shown. Figure 2 FIG. 1 is a flow chart of an optional transaction data processing method according to an embodiment of the present application. Figure 2 As shown, the method includes the following steps:

[0047] Step S201 : Determine whether to write transaction data into a host and / or distributed platform system according to the service dual-write switch and the target list.

[0048] In step S201, the target list is used to record transaction objects that have eliminated transaction risks, and the service dual write switch is used to determine data writing selection according to transaction attributes of transaction data.

[0049] Optionally, the transaction data processing system determines to write the transaction data into the host and / or distributed platform system according to the coordinated action of the service dual-write switch and the target list.

[0050] Optionally, a service dual-write switch can dynamically determine whether transaction data should be written to both the host system and the distributed platform system, or to only one of them, based on inherent transaction attributes (such as transaction geolocation, branch attributes, and channel type). This ensures efficient data storage and access, while providing a stable data processing environment while addressing the complexities of system migration and parallel operation.

[0051] Optionally, a target list is used to record entities or transaction partners that have passed rigorous risk assessments and are deemed to present lower transaction risk. This target list not only expedites the processing of low-risk transactions but also ensures a secure write path for high-risk transaction data by enabling a dual-write switch, prioritizing or exclusively writing data to the host system for processing, effectively mitigating potential systemic risks.

[0052] Step S202: After the transaction data is written into the host and / or the distributed platform system, data anti-corrosion processing is performed on the transaction data stored in the host and / or the transaction data stored in the distributed platform system.

[0053] In step S202, data anti-corrosion processing is used to determine whether to use the transaction data stored in the host as the output result, or to use the transaction data stored in the distributed platform system as the output result.

[0054] Optionally, data anti-corrosion processing is used to determine whether the transaction data stored in the host is used as the output result, or whether the transaction data stored in the distributed platform system is used as the output result, so as to scientifically determine the data source of the system output result.

[0055] Alternatively, in a complex environment where host and distributed platform systems coexist, the selection of output results must take into account multiple factors, including the timeliness and consistency of the data and the stability of the system operation, and use data anti-corrosion processing to select the output results.

[0056] It can be seen from the contents of steps S201 to S202 that in an embodiment of the present application, the transaction data is first determined to be written to the host and / or distributed platform system based on the service double-write switch and the target list, wherein the target list is used to record transaction objects for which transaction risks have been eliminated, and the service double-write switch is used to determine the data write selection based on the transaction attributes of the transaction data. Then, after the transaction data is written to the host and / or distributed platform system, the transaction data stored in the host and / or the transaction data stored in the distributed platform system are subjected to data anti-corrosion processing, wherein the data anti-corrosion processing is used to determine whether the transaction data stored in the host is used as the output result, or whether the transaction data stored in the distributed platform system is used as the output result.

[0057] As can be seen from the above, the core of this application lies in determining whether transaction data is written to both the host and distributed platform systems, or only to one of them, based on the service dual-write switch and target list. The service dual-write switch determines the data writing strategy based on the transaction data's attributes (such as transaction region, branch, channel, etc.), while the target list records transaction partners that have been excluded from transaction risks, providing additional protection for high-risk transactions.

[0058] Secondly, after transaction data is written, data consistency verification and data anti-corruption measures are provided to ensure consistency between the mainframe and distributed platform systems. This includes daily incremental verification of transaction data in both systems. When inconsistencies are found, the correct output is selected according to pre-set rules, and abnormal transaction protocols are marked for subsequent analysis and governance.

[0059] It can be seen that through the technical solution of the present application, the purpose of efficiently and securely processing transaction data between heterogeneous systems is achieved, thereby realizing the technical effect of using two heterogeneous ecosystems of the host and distributed platform system as a whole to provide external services for transaction data, thereby solving the problem in the prior art that for information security, two heterogeneous ecosystems of the host and distributed platform system are used as a whole to provide external services for transaction data, but currently data input and data output are still maintained separately for each system, making it difficult to maintain parallel processing and consistency of data, resulting in transaction data being prone to processing exceptions, and thus causing a high transaction failure rate.

[0060] In an optional embodiment, the transaction data processing system first performs a consistency check on the transaction data stored in the host and the transaction data stored in the distributed platform system when the transaction data is simultaneously written to the host and the distributed platform system to obtain a check result. Then, when it is found that the transaction data stored in the host and the transaction data stored in the distributed platform system are inconsistent, the status of the protocol routing status table is marked as a target status, wherein the protocol routing status table is used to record the status of the transaction protocol related to the transaction data, and the protocol routing status table in the target status is used to control all subsequent transaction requests using the transaction protocol to be processed by the host and not sent to the distributed platform system.

[0061] Optionally, in a heterogeneous system parallel write environment, transaction data consistency verification ensures data integrity. When transaction data is written to both the host and distributed platform systems simultaneously, the transaction data stored in the host is compared with the corresponding data stored in the distributed platform system to detect any discrepancies, identify the data consistency status, and output detailed verification results.

[0062] Optionally, when it is verified that the transaction data stored in the host is inconsistent with the transaction data stored in the distributed platform system, the transaction data processing system will automatically adjust the status mark in the protocol routing status table to the target state, which is a predefined emergency state indicating that all subsequent transaction requests involving the transaction protocol should be processed directly by the host system instead of being sent to the distributed platform system in parallel.

[0063] Optionally, the protocol status related to the transaction data is recorded through the protocol routing status table, so that in the event of data inconsistency, prompt action can be taken to ensure the accurate processing of business requests and prevent potential business interruptions or data errors from affecting bank operations.

[0064] Optionally, there is an optional routing status technology table for the transaction data processing method, recording the product protocol routing status, such as Figure 3As shown in the figure: PRTOEX represents the participant's agreement number, with a data type of VARCHAR(34); STATUS represents the routing status, with a data type of TINYINT. When STATUS is 0, it indicates that the routing status is normal, and when STATUS is 1, it indicates that the status has been switched back to the host. LST_DATE represents the last update date, with a data type of DATE. ROUTE_KEY represents the routing field, with a data type of VARCHAR(34). When the host platform data verification fails, the status of the corresponding product agreement record is updated to "switch back to host", and all subsequent transactions initiated from the corresponding product agreement record will only be processed on the host. The host dual-write public component adds a check on the corresponding record status of the product agreement routing status technical table during the dual-write (platform-based) stage. If the status is "switch back to host", only the host branch is called (not the platform branch).

[0065] From the above content, it can be seen that the transaction data processing system performs output verification in parallel on two machines to ensure the consistency of system output and supports manual switching back to the host when the data is inconsistent. This reflects the strict requirements for data integrity and highlights the foresight and innovation of the bank system in business continuity and data consistency management in the context of digital transformation.

[0066] In an optional embodiment, the transaction data processing system first obtains the key field value returned by the host after the transaction data is written to the host, then obtains the key field value returned by the distributed platform system after the transaction data is written to the distributed platform system, and then, when it is detected that the key field value returned by the host is the same as the key field value returned by the distributed platform system, determines that the transaction data stored in the host and the transaction data stored in the distributed platform system are consistent, and finally, when it is detected that the key field value returned by the host is different from the key field value returned by the distributed platform system, determines that the transaction data stored in the host and the transaction data stored in the distributed platform system are inconsistent.

[0067] Optionally, the transaction data processing system obtains key field values ​​returned by the host after the transaction data is written to the host, ensuring complete capture of all key field values ​​and laying a solid foundation for subsequent consistency verification.

[0068] Optionally, the transaction data processing system obtains key field values ​​returned by the distributed platform system after writing the transaction data into the distributed platform system, thereby ensuring real-time synchronization and comparison of data responses in the dual-machine parallel architecture.

[0069] Optionally, when the key field values ​​returned by the host system and the distributed platform system are completely consistent, the transaction data processing system will automatically confirm that the transaction data status of the two systems remains synchronized, that is, the data consistency has been scientifically verified. If the key field values ​​returned by the host system differ from the key field values ​​returned by the distributed platform system, the system will immediately determine that the transaction data status stored by the host and the platform are inconsistent.

[0070] Optionally, there is an optional transaction data processing method error checking technology table, recording the product protocol routing status, such as Figure 4 As shown: PRTOEX represents the participant's protocol number, with a data type of VARCHAR(34); MAINFRAME_OUTPUT represents the host return communication area, with a data type of TEXT; PLATFORM_OUTPUT represents the platform return communication area, with a data type of TEXT; CHECK_NAME represents the difference field name, with a data type of TEXT; LST_DATE represents the last updated date, with a data type of DATE; ROUTE_KEY represents the routing field, with a data type of VARCHAR(34). The host dual-write public component adds a logic for checking the dual-machine return communication area during the dual-write (platform-based, host-based) phase. Based on the important field information and verification rules configured by the application, the values ​​returned by the platform / host are compared one by one to see if they are consistent. When the verification is inconsistent, the relevant information is output to a separate log file, supporting the application to register the inconsistent verification information in the error register. When the application service needs to be switched back, the corresponding record status of the product protocol routing status technical table is updated to "switch back to host".

[0071] From the above content, it can be seen that the transaction data processing system provides an efficient and reliable method for verifying the consistency of transaction data, ensuring the accuracy of the data. It can also take quick measures when the data status is abnormal to prevent system risks caused by data inconsistency.

[0072] In an optional embodiment, the transaction data processing system first writes the transaction data into the host and the distributed platform system when it detects that the transaction object of the transaction data is the transaction object in the target list. Then, when it detects that the transaction object of the transaction data is not the transaction object in the target list, it detects whether the dependent transaction attribute of the service double-write switch matches the transaction attribute of the transaction data, wherein the dependent transaction attribute is a prerequisite for turning on the service double-write switch. After the service double-write switch is turned on, it is used to write the transaction data to the host and the distributed platform system at the same time. Then, when the transaction attribute of the transaction data matches the dependent transaction attribute, the transaction data is written to the host and the distributed platform system by turning on the service double-write switch. Finally, when the transaction attribute of the transaction data does not match the dependent transaction attribute, the service double-write switch is prohibited from being turned on, and the transaction data is written to the host.

[0073] Alternatively, the target list is a scientifically screened and risk-assessed database that records all entities or objects that are considered to have eliminated transaction risks.

[0074] Optionally, the transaction data processing system detects whether the dependent transaction attributes of the service double-write switch match the transaction attributes of the transaction data. The matching process not only takes into account basic attributes such as the time, place and channel of the transaction, but also covers more complex business logic and risk assessment rules, providing a scientific basis for the dynamic opening of the service double-write switch.

[0075] Optionally, when the transaction attributes of the transaction data are completely consistent with the dependent transaction attributes of the service dual-write switch, the transaction data processing system turns on the service dual-write switch and executes the dual-machine parallel writing process. If it is detected that the transaction attributes of the transaction data do not match the dependent transaction attributes, the transaction data is written to the host.

[0076] Optionally, there is an optional double write switch priority determination flow chart of a transaction data processing method, such as Figure 5 As shown: System applications are supported to set target lists based on customer information numbers, media numbers, agreement accounts, and other information. The target list information is set and implemented in the application database. For customer transaction requests that are on the target list, the service double-write switch judgment is bypassed and directly processed according to the double-write process (the specific processing rules can be customized by the application). For customer transaction requests that are not on the target list, the switches for transaction region, transaction outlet, and transaction channel are obtained. If the above switches are not set, the regional switches for transaction region, 0 outlets, and 0 channels are obtained. If the above switches are not set, the master switch for 0 regions, 0 outlets, and 0 channels is obtained. If the master switch is also not set, the default switch is to call only the host (service-based process).

[0077] From the above content, it can be seen that the transaction data processing system matches transaction data by using the target list and dependent transaction attributes, thereby achieving efficient and secure transaction data processing.

[0078] In an optional embodiment, the dependent transaction attribute includes at least one of the following three attributes: a preset transaction area; a preset transaction outlet; and a preset transaction channel.

[0079] Optionally, the transaction data processing system provides accurate decision-making basis for data processing under the dual-machine parallel architecture based on the settings of three dimensions: preset transaction areas, preset transaction outlets, and preset transaction channels.

[0080] Optionally, the preset transaction area attribute takes into account the geographical location information of the transaction, the preset transaction outlet attribute focuses on the specific location of the transaction, and the preset transaction channel attribute covers the execution method of the transaction.

[0081] Optionally, there is an optional double-write switch parameter table for the transaction data processing method, which supports the system application to set the service double-write switch according to the region, outlet, and channel. The service double-write switch parameters are set in the application database, such as Figure 6 As shown: ZONE_NO indicates the region number, 0 means it is effective for the entire region; BR_NO indicates the branch number, 0 means it is effective for all branches in the region; CHAN_TYPE indicates the channel type, 0 means it is effective for all channels; PARAM_VALUE indicates the parameter value, 1 - only on the host, 2 - double write - based on the host, 3 - double write - based on the platform, 4 - only on the platform.

[0082] From the above content, it can be seen that the transaction data processing system can accurately analyze and judge the characteristics of each transaction data based on the settings of preset transaction areas, preset transaction outlets and preset transaction channels, ensuring that the decision to turn on the service double-write switch not only conforms to business logic but also effectively avoids potential risks.

[0083] In an optional embodiment, the transaction data processing system first determines that the dependent transaction attributes of the service double-write switch match the transaction attributes of the transaction data when the transaction attributes of the transaction data satisfy all attributes included in the dependent transaction attributes, and then determines that the dependent transaction attributes of the service double-write switch do not match the transaction attributes of the transaction data when the transaction attributes of the transaction data do not satisfy any attribute included in the dependent transaction attributes.

[0084] Optionally, the transaction data processing system conducts a comprehensive comparative analysis of attributes such as the transaction area, transaction outlets, and transaction channels of the transaction data, and when it is found that the transaction attributes of the transaction data are completely consistent with all preset conditions in the dependent transaction attributes, it is determined that the dependent transaction attributes of the service double-write switch match the transaction attributes of the transaction data.

[0085] Optionally, when determining whether a transaction attribute matches a dependent transaction attribute, the transaction data processing system considers situations where any attribute condition is not met. When a transaction attribute of the transaction data fails to fully match any pre-defined condition in a dependent transaction attribute, the system immediately identifies and determines a mismatch between the dependent transaction attribute and the transaction attribute of the transaction data.

[0086] Alternatively, here's an example to check whether the dependent transaction attributes of the service's dual-write switch match the transaction attributes of the transaction data: Method 1: The dependent transaction attributes are limited to: A transaction region, B transaction outlet, and C transaction channel. If the transaction data exactly meets A transaction region, B transaction outlet, and C transaction channel, it matches; otherwise, it does not match. Method 2: The dependent transaction attributes are limited to: C transaction channel. If transaction data 1 meets A transaction region, B transaction outlet, and C transaction channel, it matches; transaction data 2 meets A1 transaction region, B1 transaction outlet, and C transaction channel, it also matches. However, if transaction data 3 meets A transaction region, B transaction outlet, and D transaction channel, it does not match.

[0087] From the above content, we can see that the transaction data processing system realizes intelligent decision-making and dynamic control of service dual-write switches by matching transaction attributes with dependent transaction attributes, reflecting the application value of data science in transaction data processing.

[0088] In an optional embodiment, before performing data anti-corrosion processing on the transaction data stored in the host and / or the transaction data stored in the distributed platform system, the transaction data processing system first copies the updated data to the data lake when the transaction data in the host and / or distributed platform system is updated, and then detects the primary key, version and time information corresponding to each data received by the data lake, and then performs a filtering operation on the multiple data received by the data lake according to the primary key, version and time information corresponding to each data, wherein the filtering operation is used to filter out the data with the latest update time and the target version from multiple data with the same primary key but different versions for retention, and the target version data represents the data on which the deletion operation has been performed.

[0089] Optionally, when any data update occurs in the transaction data in the host or distributed platform system, the transaction data processing system will accurately copy the updated data to the data lake, ensuring data synchronization in the heterogeneous system environment and providing a solid data foundation for subsequent data consistency verification and processing.

[0090] Optionally, the transaction data processing system detects the primary key, version, and time information corresponding to each data received by the data lake, and can perform comprehensive attribute analysis on each data received by the data lake.

[0091] Optionally, the filtering operation is used to filter out the data with the latest update time and the target version from multiple data with the same primary key but different versions and retain them. The target version data represents the data on which the deletion operation has been performed, thereby improving the efficiency of data processing.

[0092] Optionally, during the process of switching from the host to the platform, there may be switching back and forth between the host and platform tables. To prevent the impact on downstream data, a layer of processing is performed on the source data generation side to logically merge the host and platform table data so that downstream users can use the data service normally. An optional example of the process of logically merging the host and platform table data is as follows:

[0093] (1) When the source application database performs DML operations, the data records will be stored in the lake through data replication (such as high-efficiency DRP replication or end-of-day file storage).

[0094] (2) For the original table entering the lake, the data lake will determine that after the data for the day is completed, it will filter the data from this table through the Hive data warehouse SQL stored procedure and enter the data into the lake's external service table (the filtering conditions vary depending on the table. The general principle is to select the last record that is not D for the records with the same primary key, and to select the workdate field based on the business date, etc.).

[0095] (3) After running the Hive data warehouse SQL stored procedure to process and filter the records in the data lake, determine whether anti-corrosion treatment is required based on the configuration table BDP_ANTI_CONFIG: If anti-corrosion treatment is required, perform data backup and back up the data generated by the processing to the external service table to the ANTI backup table (temporarily retain it for 1 month, and the table can be accessed later to check for problems); then execute the Hive data warehouse SQL stored procedure

[0096] _ANTI completes the anti-corrosion process; this step is intended to decide whether to use the original host table a data or the platform table A data.

[0097] Optionally, there is an optional transaction data processing method that logically merges the host and platform table data flow chart, such as Figure 7 As shown in the figure: For host table a, the end-of-day file is entered into the data lake to obtain the host source table a'; for platform table A, according to DRP, the FRN_ temporary table (96 partitions) is obtained, and then 050.hql is obtained. Then, it is determined whether it needs anti-corrosion. If so, the data is backed up to A", and the host source table a' and / or A" are anti-corrosion processed to finally obtain the platform source table A'; if anti-corrosion is not required, the platform source table A' is directly obtained.

[0098] From the above content, we can see that before the transaction data processing system performs data anti-corrosion processing, it performs a layer of processing on the source data generation side to achieve logical merging of host and platform table data, shielding the impact on downstream data, and improving the data lake's response speed and accuracy when processing complex data update events.

[0099] In an optional embodiment, the transaction data processing system first responds to the output instruction of the transaction data, queries the transaction data from the host and the distributed platform system respectively, and then, when it is found that the transaction data exists in the host but not in the distributed platform system, uses the transaction data in the host as the output result; and then, when it is found that the transaction data exists in both the host and the distributed platform system, uses the transaction data in the host as the output result; finally, when it is found that the transaction data does not exist in the host but exists in the distributed platform system, uses the transaction data in the distributed platform system as the output result.

[0100] Optionally, the transaction data processing system, in response to the output instruction of transaction data, queries the transaction data from the host and distributed platform systems respectively, thereby ensuring the efficiency and synchronization of the query process.

[0101] Optionally, during the query process, if it is found that the specified transaction data does not exist in the distributed platform system, but the corresponding data records are stored in the host, the transaction data in the host will be used as the output result to ensure that in the event of missing distributed platform data, a complete and accurate service response can be provided based on the data backup of the host system.

[0102] Optionally, there is a data anti-corrosion flow chart of an optional transaction data processing method, such as Figure 8 As shown in the following example: In the BDP, based on the field correspondence between table A in the host lake and table B in the platform lake, data is merged and processed by primary key in EDI. If the host is present but the platform is not, this indicates a non-failure or emergency failback scenario, in which the host is used as the primary key. If the host is present but the platform is not, this indicates a host failure scenario, in which the platform is used as the primary key. If the host is present but the platform is present, this indicates a dual-write scenario, in which the host is used as the primary key. After processing, if the structure of the result table B' is consistent with the platform table, data anti-corruption is performed, and the anti-corrupted data is then logically processed in downstream applications.

[0103] From the above content, it can be seen that the transaction data processing system achieves accurate, consistent and timely response of transaction data output results by performing anti-corrosion processing on the data.

[0104] In an optional embodiment, when a transaction corresponding to the transaction data fails and data rollback is required, the transaction data processing system first determines the data source involved in the data rollback based on the service double-write switch and the target list, where the data source includes a host and / or a distributed platform system, and then performs a data rollback operation on the transaction data in the data source.

[0105] Optionally, when a transaction corresponding to transaction data fails and the system determines that data rollback is required to repair possible data anomalies, the transaction data is restored to the state before the failure, eliminating possible data anomalies and system risks.

[0106] Optionally, there is an optional data rollback operation flow chart of a transaction data processing method, such as Figure 9 As shown in the figure: For FMTA, in grayscale mode, when the switch for the flow switching region is on, the platform uses the FMTA service-based interface to enter the platform program. If the transaction is successful, the host value is returned through the host; if the transaction fails, the platform value is directly returned. For the host, the platform uses the FMTA service-based interface to enter the platform program. Regardless of whether the transaction is successful or not, the host value is returned based on the host. When the flow switching region is off, the host value is returned directly based on the host according to the FMTA service-based interface. In non-grayscale mode, when the flow switching region is off, the host value is returned directly based on the host according to the FMTA service-based interface.

[0107] Optionally, in addition to the data rollback operation, an example is to add a host dual-write base class AbstractACSBaseService to implement the following unified scheduling, including:

[0108] (1) Data Check: The application implements the specific parameter checking logic.

[0109] (2) Read the service double write switch (getDoubleSwitch): Get the double write switch according to a unified rule.

[0110] (3) Preprocessing (preCheck): The application implements it by itself.

[0111] (4) Host processing flow (mainFrameDeal): The application calls the specific host interface to implement business processing.

[0112] (5) Platform processing flow (platformDeal): The application implements the platform business logic processing by itself.

[0113] (6) Host compensation processing flow (mainFrameDealRollBack): The application calls the specific host interface to implement the compensation process.

[0114] (7) Platform Compensation Process (platformDealRollBack): The application implements the platform business logic compensation processing by itself.

[0115] (8) Sub-transaction positive transaction method, according to the service double write switch, execution process:

[0116] 1) The switch value is MAINFRAME_ONLY, which means that only the host process is called (service-oriented transformation), only mainFrameDeal is called to implement host process processing, and the host processing result is returned;

[0117] 2) The switch value is DOUBLE_WRITE_MAINFRAME, which means double write - the host is the priority. First, call platformDeal to implement platform business logic processing, and then call mainFrameDeal to implement host process processing. Platform business logic errors do not affect the host processing process. The result returned by the host is the service return result.

[0118] 3) The switch value is DOUBLE_WRITE_PLATFORM, which means double write - whichever is greater, depending on the platform.

[0119] 4) The switch value is PLATFORM_ONLY, which means that only the platform process is called (disconnecting the host), only platformDeal is called to implement the platform business logic processing, and the platform processing results are returned.

[0120] (9) Sub-transaction compensation method, according to the service double write switch, execution process:

[0121] 1) The switch value is MAINFRAME_ONLY, which only calls mainFrameDealRollBack to implement the compensation process of the host process and returns according to the host processing result;

[0122] 2) The switch value is DOUBLE_WRITE_MAINFRAME, which implements the compensation processing of the host process. Regardless of the compensation result of the platform, the compensation result of the host is returned;

[0123] 3) If the switch value is DOUBLE_WRITE_PLATFORM, platformDealRollBack is called first to implement the compensation processing of the platform business logic, and then mainFrameDealRollBack is called to implement the host process processing, and the platform compensation result is returned.

[0124] (10) The switch value is PLATFORM_ONLY, which means that only platformDealRollBack is called to implement the compensation processing of the platform business logic and returns according to the platform compensation result.

[0125] From the above content, we can see that the transaction data processing system builds an intelligent data backtracking and repair framework to ensure data consistency and system stability by determining the data rollback source of failed transactions and scientifically rolling back transaction data in the data source, reflecting the application value of data science in transaction failure scenarios.

[0126] From the above content, it can be seen that according to the technical solution of this application, at least the following technical effects can be achieved:

[0127] 1. It realizes the requirements of a super-large core system to provide normal, stable and efficient external services during the host migration process, and meets the requirements of implementing business promotion and business innovation projects in parallel within the system, providing sufficient guarantees for the stability and robustness of the core system and preventing systemic risks from being introduced during the host migration process.

[0128] 2. It realizes the security requirement of migrating massive system data and business data as they move downward with the host; it ensures the safe downward migration of massive customer business data while providing normal data services to the outside world.

[0129] 3. It ensures the daily business operations of a large number of customers and the normal business operations of hundreds of thousands of partners.

[0130] In an optional embodiment, Figure 10 A flowchart illustrating an optional transaction data processing method according to an embodiment of the present application is provided, which provides a clearer understanding of the transaction data processing process. The method proposes deploying a dual-machine parallel control device in the external channel access portion of the system to achieve unified external services for the dual-machine system and gradually switch the control system internally at different stages of the host migration, thereby reducing the risks posed by the migration process to business operations. A device for verifying system outputs outside the dual-machine parallel system is proposed to ensure that the dual-machine system is transparent to the outside at different stages of the host migration and that the overall system's external output is not affected. A device for verifying incremental data and synchronizing data at the daily final state is proposed to ensure that system data and business systems can provide normal external services at different stages of the host migration. The specific process is as follows: First, the channel access is established to the dual-machine parallel entry, which mainly includes the mainframe system and the distributed platform. Then, based on data replication technology, the mainframe source data and the platform source data are verified, and then data anti-corrosion processing is performed. The anti-corrosion data is directly applied to external applications of the system. If data does not require anti-corrosion processing, it can be directly output to external applications of the system through output verification.

[0131] According to another aspect of the embodiment of the present application, a device for processing transaction data is also provided, wherein: Figure 11 is a schematic diagram of an optional transaction data processing device according to an embodiment of the present application, such as Figure 11 As shown, the transaction data processing device includes: a determination unit 1101 and a processing unit 1102.

[0132] The determination unit 1101 determines to write the transaction data into the host and / or the distributed platform system based on the service double-write switch and the target list, wherein the target list is used to record the transaction objects for which the transaction risks have been eliminated, and the service double-write switch is used to determine the data writing selection based on the transaction attributes of the transaction data; the processing unit 1102 performs data anti-corrosion processing on the transaction data stored in the host and / or the transaction data stored in the distributed platform system after the transaction data is written to the host and / or the distributed platform system, wherein the data anti-corrosion processing is used to determine to use the transaction data stored in the host as the output result, or to use the transaction data stored in the distributed platform system as the output result.

[0133] Optionally, the transaction data processing apparatus further includes: a verification unit and a second processing unit. The verification unit is configured to, when the transaction data is simultaneously written to the host and the distributed platform system, perform a consistency check on the transaction data stored in the host and the transaction data stored in the distributed platform system to obtain a verification result; and the second processing unit is configured to, when the transaction data stored in the host and the transaction data stored in the distributed platform system are found to be inconsistent, mark the state of the protocol routing state table as a target state. The protocol routing state table is configured to record the state of a transaction protocol related to the transaction data. The protocol routing state table in the target state is configured to control all subsequent transaction requests using the transaction protocol to be processed entirely by the host and not sent to the distributed platform system.

[0134] Optionally, the checking unit includes: a first obtaining subunit, a second obtaining subunit, a first determining subunit, and a second determining subunit. The first obtaining subunit is used to obtain the key field value returned by the host after the transaction data is written to the host; the second obtaining subunit is used to obtain the key field value returned by the distributed platform system after the transaction data is written to the distributed platform system; the first determining subunit is used to determine that the transaction data stored in the host and the transaction data stored in the distributed platform system are consistent when it is detected that the key field value returned by the host is the same as the key field value returned by the distributed platform system; the second determining subunit is used to determine that the transaction data stored in the host and the transaction data stored in the distributed platform system are inconsistent when it is detected that the key field value returned by the host is different from the key field value returned by the distributed platform system.

[0135] Optionally, the determination unit 1101 includes: a first processing subunit, a first detection subunit, a second processing subunit, and a third processing subunit. The first processing subunit is configured to, if it is detected that the transaction object of the transaction data is a transaction object in the target list, write the transaction data into the host and the distributed platform system; the first detection subunit is configured to, if it is detected that the transaction object of the transaction data is not a transaction object in the target list, detect whether the dependent transaction attribute of the service double-write switch matches the transaction attribute of the transaction data, wherein the dependent transaction attribute is a prerequisite for enabling the service double-write switch, which, when enabled, is used to simultaneously write the transaction data into the host and the distributed platform system; the second processing subunit is configured to, if the transaction attribute of the transaction data matches the dependent transaction attribute, enable the service double-write switch to write the transaction data into the host and the distributed platform system; and the third processing subunit is configured to, if the transaction attribute of the transaction data does not match the dependent transaction attribute, disable the enabling of the service double-write switch and write the transaction data into the host.

[0136] Optionally, the dependent transaction attributes include at least one of the following three attributes: a preset transaction area; a preset transaction outlet; and a preset transaction channel.

[0137] Optionally, the first detection subunit includes: a first determination module and a second determination module. The first determination module is configured to determine that the dependent transaction attributes of the service dual-write switch match the transaction attributes of the transaction data when the transaction attributes of the transaction data satisfy all attributes included in the dependent transaction attributes; and the second determination module is configured to determine that the dependent transaction attributes of the service dual-write switch do not match the transaction attributes of the transaction data when the transaction attributes of the transaction data do not satisfy any attribute included in the dependent transaction attributes.

[0138] Optionally, the transaction data processing apparatus further includes: a third processing unit, a detection unit, and a screening unit. The third processing unit is configured to copy the updated transaction data to the data lake when data is updated in the host and / or distributed platform system; the detection unit is configured to detect the primary key, version, and time information corresponding to each data item received by the data lake; and the screening unit is configured to perform a screening operation on the multiple data items received by the data lake based on the primary key, version, and time information corresponding to each data item, wherein the screening operation is configured to screen out the data with the latest update time and of the target version from multiple data items with the same primary key but different versions, and retain the data, wherein the target version of the data represents the data on which a deletion operation has been performed.

[0139] Optionally, the processing unit 1102 includes: a first query subunit, a fourth processing subunit, a fifth processing subunit, and a sixth processing subunit. The first query subunit is configured to query transaction data from the host and the distributed platform system, respectively, in response to a transaction data output instruction; the fourth processing subunit is configured to, if the query finds that the transaction data exists in the host but not in the distributed platform system, use the transaction data in the host as the output result; the fifth processing subunit is configured to, if the query finds that the transaction data exists in both the host and the distributed platform system, use the transaction data in the host as the output result; and the sixth processing subunit is configured to, if the query finds that the transaction data does not exist in the host but exists in the distributed platform system, use the transaction data in the distributed platform system as the output result.

[0140] Optionally, the transaction data processing apparatus further includes: a second determining unit and a fourth processing unit. The second determining unit is configured to determine, based on the service dual-write switch and the target list, a data source involved in the data rollback when a transaction corresponding to the transaction data fails and data rollback is required, wherein the data source includes a host and / or a distributed platform system; and the fourth processing unit is configured to perform a data rollback operation on the transaction data in the data source.

[0141] An embodiment of the present application may provide an electronic device, Figure 12 This is a structural block diagram of an electronic device according to an embodiment of the present application. Figure 12 As shown, the electronic device may include: one or more ( Figure 12 Only one is shown) processor, memory, storage controller, and peripheral interface, wherein the peripheral interface is connected to the radio frequency module, audio module and display.

[0142] Among them, the memory can be used to store software programs and modules, such as program instructions / modules corresponding to the methods and devices in the embodiments of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, implementing the above-mentioned method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network and a combination thereof.

[0143] It can be understood by those skilled in the art that Figure 12The structure shown is for illustration only, and the electronic device may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, MID), a PAD, or other terminal devices. Figure 12 It does not limit the structure of the above electronic device. For example, the electronic device may also include Figure 12 More or fewer components (such as network interfaces, display devices, etc.) shown in, or with Figure 12 Different configurations shown.

[0144] A person skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, which may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0145] According to another aspect of the present application, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium. When the computer program runs, the device where the computer-readable storage medium is located executes the above-mentioned transaction data processing method.

[0146] According to another aspect of the present application, a computer program product is provided, wherein the computer program product includes computer instructions, wherein when the computer instructions are executed, the device where the computer program product is located executes the above-mentioned transaction data processing method.

[0147] The above-mentioned embodiments or examples disclosed in this application are not exhaustive, but are only illustrations of some embodiments or examples, and are not intended to be specific limitations on the scope of protection disclosed in this application. In the absence of contradiction, each step in a certain embodiment or example in this application can be implemented as an independent example, and the steps can be arbitrarily combined. For example, the solution after removing some steps in a certain embodiment or example can also be implemented as an independent example, and the order of the steps in a certain embodiment or example can be arbitrarily exchanged. In addition, the optional methods or optional examples in a certain embodiment or example can be arbitrarily combined; in addition, the various embodiments or examples can be arbitrarily combined. For example, some or all of the steps in different embodiments or examples can be arbitrarily combined, and a certain embodiment or example can be arbitrarily combined with the optional methods or optional examples of other embodiments or examples.

[0148] The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0149] In the above embodiments of the present application, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0150] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only exemplary. For example, the division of the units can be a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0151] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0152] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0153] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0154] The above is only a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A method for processing transaction data, characterized in that: include: Determining whether to write transaction data to a host and / or distributed platform system based on a service dual-write switch and a target list includes: writing the transaction data to the host and the distributed platform system when it is detected that the transaction object of the transaction data is a transaction object in the target list; and detecting whether the dependent transaction attribute of the service dual-write switch matches the transaction attribute of the transaction data when it is detected that the transaction object of the transaction data is not a transaction object in the target list, wherein the dependent transaction attribute is a precondition for turning on the service dual-write switch, and after the service dual-write switch is turned on, it is used to write the transaction data to the host and the distributed platform at the same time. system; when the transaction attributes of the transaction data match the dependent transaction attributes, the transaction data is written to the host and the distributed platform system by turning on the service double-write switch; when the transaction attributes of the transaction data do not match the dependent transaction attributes, the service double-write switch is disabled and the transaction data is written to the host; the dependent transaction attributes include at least one of the following three attributes: a preset transaction area; a preset transaction outlet; and a preset transaction channel; wherein the target list is used to record transaction objects that have been excluded from transaction risks, and the service double-write switch is used to determine data writing selection based on the transaction attributes of the transaction data; After the transaction data is written into the host and / or the distributed platform system, performing data anti-corrosion processing on the transaction data stored in the host and / or the transaction data stored in the distributed platform system, wherein the data anti-corrosion processing is used to determine whether to use the transaction data stored in the host as an output result, or to use the transaction data stored in the distributed platform system as an output result; Before performing data anti-corrosion processing on the transaction data stored in the host and / or the transaction data stored in the distributed platform system, the transaction data processing method further includes: when the transaction data in the host and / or the distributed platform system is updated, copying the updated data to the data lake; detecting the primary key, version and time information corresponding to each data received by the data lake; and performing a filtering operation on multiple data received by the data lake according to the primary key, version and time information corresponding to each data, wherein the filtering operation is used to filter out the data with the latest update time and the target version from multiple data with the same primary key but different versions, and retain the data, and the target version data represents the data on which the deletion operation has been performed.

2. The transaction data processing method according to claim 1, characterized in that: The transaction data processing method further includes: In a case where the transaction data is simultaneously written into the host and the distributed platform system, performing consistency check on the transaction data stored in the host and the transaction data stored in the distributed platform system to obtain a check result; When it is verified that the transaction data stored in the host is inconsistent with the transaction data stored in the distributed platform system, the status of the protocol routing status table is marked as the target status, wherein the protocol routing status table is used to record the status of the transaction protocol related to the transaction data, and the protocol routing status table in the target status is used to control all subsequent transaction requests using the transaction protocol to be processed by the host and not sent to the distributed platform system.

3. The method for processing transaction data according to claim 2, characterized in that: Performing consistency checking on the transaction data stored in the host and the transaction data stored in the distributed platform system, including: Obtaining a key field value returned by the host after writing the transaction data to the host; Obtaining a key field value returned by the distributed platform system after writing the transaction data into the distributed platform system; In the case where it is detected that the key field value returned by the host is the same as the key field value returned by the distributed platform system, determining that the transaction data stored in the host and the transaction data stored in the distributed platform system are consistent; When it is detected that the key field value returned by the host is different from the key field value returned by the distributed platform system, it is determined that the transaction data stored in the host and the transaction data stored in the distributed platform system are inconsistent.

4. The method for processing transaction data according to claim 1, wherein: Detecting whether the dependent transaction attribute of the service dual-write switch matches the transaction attribute of the transaction data includes: When the transaction attributes of the transaction data satisfy all attributes included in the dependent transaction attributes, determining that the dependent transaction attributes of the service dual-write switch match the transaction attributes of the transaction data; When the transaction attribute of the transaction data does not satisfy any attribute included in the dependent transaction attribute, it is determined that the dependent transaction attribute of the service dual-write switch does not match the transaction attribute of the transaction data.

5. The method for processing transaction data according to claim 1, wherein: Performing data anti-corruption processing on the transaction data stored in the host and / or the transaction data stored in the distributed platform system, including: In response to the output instruction of the transaction data, query the transaction data from the host and the distributed platform system respectively; When it is found that the transaction data exists in the host but does not exist in the distributed platform system, the transaction data in the host is used as the output result; In the case that it is found that the transaction data exists in both the host and the distributed platform system, the transaction data in the host is used as the output result; When it is found that the transaction data does not exist in the host but exists in the distributed platform system, the transaction data in the distributed platform system is used as the output result.

6. The method for processing transaction data according to claim 1, wherein: The transaction data processing method further includes: When a transaction corresponding to the transaction data fails and data rollback is required, determining a data source involved in the data rollback according to the service dual-write switch and the target list, wherein the data source includes the host and / or the distributed platform system; Perform a data rollback operation on the transaction data in the data source.

7. A transaction data processing device, configured to execute the transaction data processing method according to any one of claims 1 to 6, characterized in that: include: a determination unit, configured to determine whether to write transaction data to a host and / or distributed platform system based on a service dual-write switch and a target list, wherein the target list is used to record transaction objects that have been cleared of transaction risks, and the service dual-write switch is used to determine data writing selection based on transaction attributes of the transaction data; A processing unit performs data anti-corrosion processing on the transaction data stored in the host and / or the transaction data stored in the distributed platform system after the transaction data is written into the host and / or the distributed platform system, wherein the data anti-corrosion processing is used to determine whether to use the transaction data stored in the host as an output result, or to use the transaction data stored in the distributed platform system as an output result.

8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located executes the transaction data processing method according to any one of claims 1 to 6.

9. An electronic device, characterized in that: It includes one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors execute the transaction data processing method described in any one of claims 1 to 6.

10. A computer program product comprising computer instructions, characterized in that When the computer instructions are executed by a processor, the steps of the transaction data processing method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Network data security exchange method and system

    CN107172020A

  • Cross-platform collaborative transaction data processing method and related system

    CN110400214A