Search

CN-122019271-A - Financial operation fault path switching method and device, electronic equipment and program product

CN122019271ACN 122019271 ACN122019271 ACN 122019271ACN-122019271-A

Abstract

The invention discloses a financial operation fault path switching method and device, electronic equipment and program products, and relates to the field of financial science and technology, wherein the method comprises the steps of analyzing SQL sentences in target financial things to obtain an atomic operation unit set, and implanting quantum check points into each atomic operation unit; the method comprises the steps of carrying out database operation verification by utilizing quantum check points, determining fault types based on verification results, capturing and comparing operation results of database operation in two financial disaster recovery heterogeneous environments by utilizing the quantum check points to obtain operation difference degrees, determining operation fault events based on the fault types and the operation difference degrees, calculating comprehensive scores of the operation fault events in multiple dimensions, selecting an optimal processing path to be switched and a target financial disaster recovery heterogeneous environment according to the comprehensive scores, and switching the processing paths. The invention solves the technical problems of long time consumption and low data consistency when heterogeneous environment switching is performed in the related technology.

Inventors

  • XU JIA

Assignees

  • 中国工商银行股份有限公司

Dates

Publication Date
20260512
Application Date
20260204

Claims (11)

  1. 1. A financial operation failover method, applied to a financial transaction system comprising two different financial disaster recovery heterogeneous environments, each of the financial disaster recovery heterogeneous environments capable of independently processing financial transaction requests, comprising: analyzing an SQL statement in a target financial object to obtain an atomic operation unit set, wherein the SQL statement comprises database operations to be executed which are sent to a target database in advance, and the atomic operation unit set comprises N atomic operation units, wherein N is a positive integer; Implanting quantum check points in each atomic operation unit; performing database operation verification by using the quantum verification points, and determining a fault type based on a verification result; Capturing and comparing operation results of database operation in two financial disaster recovery heterogeneous environments by using the quantum check points to obtain operation difference degree; and determining an operation fault event based on the fault type and the operation difference degree, calculating comprehensive scores of the operation fault event in multiple dimensions, selecting an optimal processing path to be switched and a target financial disaster recovery heterogeneous environment according to the comprehensive scores, and switching the processing path of the operation fault event to the optimal processing path in the target financial disaster recovery heterogeneous environment.
  2. 2. The path switching method according to claim 1, wherein the step of parsing the SQL statement in the target financial object to obtain the atomic operation unit set includes: Before the database operation is executed, intercepting SQL sentences to be executed, which are sent to a target database, through a preset monitoring interface; Utilizing an atomic object analyzer to disassemble SQL sentences in the target financial objects to obtain object analysis results; marking as a balance update operation unit when the operation type in the object analysis result indicates that the SQL statement comprises a balance update statement; Marking as a pipeline creation operation unit in the case that the operation type in the object analysis result indicates that the SQL sentence comprises a pipeline creation sentence; And integrating the balance updating operation unit, the stream creation operation unit and other atomic operation units to be executed to obtain the atomic operation unit set.
  3. 3. The path switching method according to claim 2, further comprising, after parsing the SQL statement in the target financial object to obtain the atomic operation unit set: under the condition that the current running environment is a first type financial disaster recovery heterogeneous environment, performing data type conversion on the SQL statement to complete heterogeneous environment database grammar adaptation processing.
  4. 4. The path switching method according to claim 1, wherein the step of implanting quantum dots in each of the atomic operation units comprises: and implanting lightweight verification nodes into key nodes of the execution paths in each atomic operation unit to finish the operation of implanting quantum check points.
  5. 5. The path switching method according to claim 1, wherein the step of performing database operation verification using the quantum verification points and determining the type of fault based on the verification result comprises: constructing a check SQL sentence, and splicing all fields of target tables in databases of two financial disaster recovery heterogeneous environments into character strings according to a preset format by using the check SQL sentence to obtain two character strings; Generating a check code for each character string through a preset data transmission error detection algorithm; determining whether operation data of database operation are consistent or not based on the generated two check codes, under the condition of inconsistency, determining that data fingerprints of two financial disaster recovery heterogeneous environments detected by the quantum check points are not matched, and determining that the fault type is inconsistent; Detecting the response time length of the database operation, and determining that the fault type is system performance degradation under the condition that the response time length is larger than a preset response time length threshold value; and sending a heartbeat detection instruction, and determining that the fault type is the downtime of the system under the condition that the continuous failure time length of the heartbeat detection exceeds a preset heartbeat detection threshold value.
  6. 6. The path switching method according to claim 1, wherein the step of capturing and comparing operation results of database operation in two financial disaster recovery heterogeneous environments by using the quantum check points to obtain operation difference degree comprises: Acquiring a first operation result of the database operation in a first type of financial disaster recovery heterogeneous environment and acquiring a second operation result of the database operation in a second type of financial disaster recovery heterogeneous environment; Extracting field values recorded by a preset number in the first operation result and field values recorded by a preset number in the second operation result; comparing whether the field values of the predetermined number records in the first operation result are consistent with the field values of the predetermined number records in the second operation result or not to obtain a field value comparison result; Calculating the absolute value of the difference value of the field value of the inconsistent record indicated by the field value comparison result, and accumulating all the absolute values of the difference value to obtain a field difference sum; And calculating the operation difference degree by adopting a preset difference analysis algorithm based on the field difference sum and a maximum error reference value allowed by a system.
  7. 7. The path switching method of claim 1, wherein the steps of determining an operational failure event based on the failure type and the operational variance, and calculating a composite score of the operational failure event in a plurality of dimensions, comprise: Determining a fault severity in a fault dimension based on the fault type, the numerical range of operational variances; Acquiring the priority of the financial transaction type corresponding to the target financial transaction, and determining a transaction type weight value in a service dimension based on the priority; detecting the environmental health of the current running environment, and determining a system environment score based on the environmental health; And calculating comprehensive scores of the operation fault event in multiple dimensions based on the fault severity and the fault dimension proportion, the transaction type weight value and the service dimension proportion, the system environment score and the environment dimension score.
  8. 8. The path switching method according to claim 1, wherein the step of selecting an optimal processing path to be switched and a target financial disaster recovery heterogeneous environment according to the composite score and switching the processing path of the operation failure event to the optimal processing path in the target financial disaster recovery heterogeneous environment comprises: executing a full-scale switching instruction under the condition that the comprehensive score is larger than a preset score threshold value; Under the condition that the current operation environment is a first type financial disaster recovery heterogeneous environment, switching the operation environment of the operation fault event from the first type financial disaster recovery heterogeneous environment to a second type financial disaster recovery heterogeneous environment; switching the processing path of the operation fault event to the optimal processing path; And calling a preset compensation framework to carry out data compensation on the incomplete transaction.
  9. 9. A financial operation failure path switching device, applied to a financial service system comprising two different financial disaster recovery heterogeneous environments, each of the financial disaster recovery heterogeneous environments capable of independently processing financial service requests, comprising: The object analysis unit is used for analyzing SQL sentences in the target financial objects to obtain an atomic operation unit set, wherein the SQL sentences comprise database operations to be executed which are sent to the target database in advance, and the atomic operation unit set comprises N atomic operation units, wherein N is a positive integer; The check point implantation unit is used for implanting quantum check points into each atomic operation unit; The fault type determining unit is used for performing database operation verification by utilizing the quantum verification points and determining the fault type based on a verification result; The operation difference degree calculation unit is used for capturing and comparing operation results of database operation in two financial disaster recovery heterogeneous environments by using the quantum check points to obtain operation difference degree; And the processing path switching unit is used for determining an operation fault event based on the fault type and the operation difference degree, calculating comprehensive scores of the operation fault event in multiple dimensions, selecting an optimal processing path to be switched and a target financial disaster recovery heterogeneous environment according to the comprehensive scores, and switching the processing path of the operation fault event to the optimal processing path in the target financial disaster recovery heterogeneous environment.
  10. 10. An electronic device comprising one or more processors and a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the financial operation failover method of any of claims 1-8.
  11. 11. A computer program product comprising a computer program which when executed by a processor implements the steps of the financial operational failover method of any one of claims 1 to 8.

Description

Financial operation fault path switching method and device, electronic equipment and program product Technical Field The present invention relates to the field of financial science and technology or other related fields, and in particular, to a method and apparatus for switching a failure path of a financial operation, an electronic device, and a program product. Background In the field of information technology, especially in industries such as finance, the high availability and data consistency of a system are of great importance, with the continuous development of information technology, more and more institutions begin to migrate business systems from traditional heterogeneous financial environments to created environments, however, in the process of coexistence of dual environments and data migration, obvious defects exist, namely a consistency verification scheme in the related art usually adopts a table-level SQL comparison mode, and whether values of key fields are completely consistent or not is compared through a data table of an all-external connection (FULL JOIN) dual environment, and although the method is intuitive and easy to understand, the obvious limitation is exposed under the background that the requirements of large data volume and real-time are increasingly increased. Specifically, the conventional consistency comparison method executed once in the early morning takes about 45 minutes to complete for a table containing 1 hundred million records, and cannot meet the high requirement of business on real-time data consistency. In addition, when large-scale data migration and dual-activity architecture construction are performed, the heterogeneous characteristics among architecture environments are not considered in the related art, namely, the differences of data types, the differences of operation precision and the compatibility of database grammar are not considered. In view of the above problems, no effective solution has been proposed at present. Disclosure of Invention The embodiment of the invention provides a financial operation fault path switching method and device, electronic equipment and a program product, which at least solve the technical problems of long time consumption and low data consistency when heterogeneous environment switching is performed in the related technology. In order to achieve the above object, according to one aspect of the present application, a financial operation fault path switching method is provided, and is applied to a financial service system comprising two different financial disaster recovery heterogeneous environments, wherein each financial disaster recovery heterogeneous environment can independently process financial service requests, and the method comprises the steps of analyzing SQL sentences in a target financial object to obtain an atomic operation unit set, wherein the SQL sentences comprise database operations to be executed, the database operations are sent to a target database in advance, the atomic operation unit set comprises N atomic operation units, N is a positive integer, quantum check points are implanted into each atomic operation unit, database operation check is performed by utilizing the quantum check points, a fault type is determined based on check results, operation fault events are determined based on the fault type and the operation fault difference, an optimal processing path to be switched and a target financial disaster recovery environment are selected according to the comprehensive scores, and the operation fault events are processed under the optimal processing path of the heterogeneous environments. The method comprises the steps of analyzing SQL sentences in a target financial object to obtain an atomic operation unit set, intercepting the SQL sentences to be executed sent to the target database through a preset monitoring interface before the database operation is executed, utilizing an atomic object analyzer to disassemble the SQL sentences in the target financial object to obtain object analysis results, marking the SQL sentences as balance update operation units when operation types in the object analysis results indicate that the SQL sentences contain balance update sentences, marking the SQL sentences as flow creation operation units when operation types in the object analysis results indicate that the SQL sentences contain flow creation sentences, and integrating the balance update operation units, the flow creation operation units and other atomic operation units to be executed to obtain the atomic operation unit set. Optionally, after analyzing the SQL sentence in the target financial object to obtain the atomic operation unit set, the method further comprises the step of performing data type conversion on the SQL sentence to complete grammar adaptation processing of a heterogeneous environment database under the condition that the current running environment is a first type financial disaster tolera