Transaction order sub-library processing method and device, equipment, storage medium and product

By selecting the secondary selection of the database to process transaction data when the database is broken, the transaction processing time problem caused by the database breakdown is solved, and the availability and performance of the system are improved.

CN119205291APending Publication Date: 2024-12-27CHINA MERCHANTS BANK
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411271833.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-11
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

When a partition fails, the transaction processing time becomes longer because all transaction data needs to be recalculated, resulting in a degradation of system performance.

Method used

By receiving transaction requests and data, determine the corresponding transaction sub-store, and select the secondary selection sub-store from other normal-performance sub-stores for data processing when a fault is detected, avoiding the loss of all transaction data and thus reducing processing time.

Benefits of technology

Effectively reduce transaction processing time in case of library failures, and improve system availability and performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119205291A_ABST
    Figure CN119205291A_ABST
Patent Text Reader

Abstract

The invention discloses a transaction order sub-library processing method and device, equipment, a storage medium and a product, and relates to the technical field of data processing, and the transaction order sub-library processing method comprises the steps: receiving an uploaded transaction request and transaction data; based on the transaction request, determining a plurality of transaction sub-libraries corresponding to the transaction data; when it is detected that the current transaction sub-library breaks down, a secondary sub-library is selected from other first sub-libraries with normal performance; and dividing the transaction data into the secondary branch library for data processing to obtain a processing result. According to the invention, the transaction data processing time is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a transaction order sub-database processing method, device, equipment, storage medium and computer program product. Background Art

[0002] At present, when using software systems, anti-duplicate mechanisms are required to ensure the uniqueness and accuracy of data, while also improving system performance and user experience. For example, in a bank's transaction system, duplicate orders cannot be allowed to enter the same database.

[0003] The existing method mainly introduces fixed sub-library routing rules, which calculates a sub-library factor based on the key value information of a transaction, and routes each transaction to the corresponding sub-library based on the fixed mapping relationship between the sub-library factor and the sub-library, so as to achieve transaction duplication prevention in the same sub-library. However, when a sub-library fails, all transactions in the sub-library will be lost, and the transaction information needs to be recalculated, which will increase the transaction processing time.

[0004] Therefore, how to reduce the impact of failures on the transaction process when a sub-database fails is a problem that needs to be solved urgently.

[0005] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention

[0006] The main purpose of this application is to provide a transaction order sub-library processing method, device, equipment, storage medium and computer program product, aiming to solve the technical problem in the related technology that when a sub-library fails, all transactions in the sub-library will be lost, resulting in longer transaction processing time.

[0007] To achieve the above purpose, the present application proposes a transaction order sub-database processing method, which includes:

[0008] Receive uploaded transaction requests and transaction data;

[0009] Based on the transaction request, determining a transaction sub-library corresponding to the transaction data, wherein the transaction sub-library includes a plurality of sub-libraries;

[0010] When a failure is detected in the current transaction sub-database, a secondary sub-database is selected from other first sub-databases with normal performance;

[0011] The transaction data is divided into the secondary selected sub-database for data processing to obtain a processing result.

[0012] In one embodiment, the step of determining the transaction sub-database corresponding to the transaction data based on the transaction request includes:

[0013] Based on the transaction request, calculating a database partitioning factor corresponding to the transaction data;

[0014] When it is determined that the transaction sub-database exists in an available instance, the transaction sub-database corresponding to the transaction data is determined according to a mapping relationship between the sub-database factor and each of the transaction sub-databases.

[0015] In one embodiment, after the step of determining the transaction sub-database corresponding to the transaction data based on the transaction request, the step further includes:

[0016] Performing a duplicate checking process on the transaction sub-database to obtain a duplicate checking result;

[0017] If the duplicate check result shows that the transaction sub-database does not have a routing record of the current transaction, the duplicate check passes, and the transaction request is sent to the transaction sub-database;

[0018] If the duplicate check result shows that the transaction sub-database exists in the routing record of the current transaction, and the routing sub-database in the routing record is the current transaction sub-database, the duplicate check passes, and the transaction request is sent to the transaction sub-database.

[0019] In one embodiment, when a fault is detected in the current transaction sub-database, the step of selecting a secondary sub-database from other first sub-databases with normal performance includes:

[0020] If it is detected that there is no available instance in the current transaction sub-database, it is determined that the current transaction sub-database is faulty;

[0021] After determining that the current transaction sub-database fails, a secondary sub-database is selected from other first sub-databases with normal performance, and the transaction request is forwarded to the secondary sub-database.

[0022] In one embodiment, before the step of dividing the transaction data into the secondary selected sub-database for data processing and obtaining the processing result, the step further includes:

[0023] Predicting the computing resource requirements of each of the transaction sub-databases;

[0024] Based on the computing resource requirements, computing resources are allocated to each of the transaction sub-databases.

[0025] In one embodiment, the step of dividing the transaction data into the secondary selected sub-database for data processing to obtain the processing result includes:

[0026] Query the transaction order data in the secondary sub-database according to the transaction identifier corresponding to the transaction data;

[0027] Based on the secondary selected sub-database, the transaction order data is modified or deleted to obtain a processing result.

[0028] In addition, to achieve the above-mentioned purpose, the present application also proposes a transaction order sub-database processing device, the transaction order sub-database processing device comprising:

[0029] A receiving module, used to receive uploaded transaction requests and transaction data;

[0030] A determination module, configured to determine, based on the transaction request, a transaction sub-library corresponding to the transaction data, wherein the transaction sub-library includes a plurality of sub-libraries;

[0031] A selection module is used to select a secondary sub-database from other first sub-databases with normal performance when a failure of the current transaction sub-database is detected;

[0032] The processing module is used to divide the transaction data into the secondary selected sub-database for data processing to obtain processing results.

[0033] In addition, to achieve the above-mentioned purpose, the present application also proposes a transaction order sub-library processing device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the transaction order sub-library processing method as described above.

[0034] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the transaction order sub-library processing method as described above are implemented.

[0035] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the steps of the transaction order sub-library processing method as described above.

[0036] The present application proposes a transaction order sub-library processing method, device, equipment, storage medium and computer program product. The present application receives a transaction request and transaction data to be processed, and determines the transaction sub-library corresponding to the transaction data based on the transaction request. The transaction sub-library includes multiple sub-libraries. When a sub-library determined to process the transaction fails, the transaction data can be divided into another sub-library with normal performance for processing, so as to avoid the loss of all transactions in a sub-library when the sub-library fails, thereby reducing the processing time of the transaction data. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0038] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0039] Figure 1 A flowchart of the first embodiment of the transaction order database processing method of this application;

[0040] Figure 2 This is a schematic diagram of the overall system architecture involved in the transaction order sub-database processing method of this application;

[0041] Figure 3 This is a brief flow chart of the transaction sub-database processing method of this application when each transaction sub-database is normal;

[0042] Figure 4 This is a schematic diagram of the module structure of the transaction order sub-database processing device according to an embodiment of the present application;

[0043] Figure 5 A schematic diagram of the device structure of the hardware operating environment involved in the transaction order sub-database processing method in the embodiment of the present application;

[0044] Figure 6 This is a schematic diagram of a preferred processing flow when a transaction sub-database fails in the transaction order sub-database processing method in the embodiment of the present application;

[0045] Figure 7 It is a schematic diagram of the processing flow when the secondary transaction sub-database fails involved in the transaction order sub-database processing method in the embodiment of the present application.

[0046] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0047] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0048] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0049] The main solutions of the embodiments of this application are:

[0050] Receive uploaded transaction requests and transaction data;

[0051] Based on the transaction request, determining a transaction sub-library corresponding to the transaction data, wherein the transaction sub-library includes a plurality of sub-libraries;

[0052] When a failure is detected in the current transaction sub-database, a secondary sub-database is selected from other first sub-databases with normal performance;

[0053] The transaction data is divided into the secondary selected sub-database for data processing to obtain a processing result.

[0054] Because in the related technology, when distributing transaction data to each sub-library for processing, a fixed sub-library routing rule is introduced, a sub-library factor is calculated based on the key value information of a transaction, and each transaction is routed to the corresponding sub-library according to the fixed mapping relationship between the sub-library factor and the sub-library, so as to achieve transaction duplication prevention in the same sub-library. However, when a sub-library fails, all transactions in the sub-library will be lost, and the transaction information needs to be recalculated, which will increase the transaction processing time.

[0055] The present application proposes a transaction order sub-library processing method, device, equipment, storage medium and computer program product. The present application receives a transaction request and transaction data to be processed, and determines the transaction sub-library corresponding to the transaction data based on the transaction request. The transaction sub-library includes multiple sub-libraries. When a sub-library determined to process the transaction fails, the transaction data can be divided into another sub-library with normal performance for processing, so as to avoid the loss of all transactions in a sub-library when the sub-library fails, thereby reducing the processing time of the transaction data.

[0056] It should be noted that the execution subject of this embodiment may be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, a transaction order sub-database processing device, a routing application terminal, etc. The following takes the routing application terminal as an example to illustrate this embodiment and the following embodiments.

[0057] Based on this, the present application embodiment provides a transaction order sub-database processing method, referring to Figure 1 , Figure 1 This is a flowchart of the first embodiment of the transaction order sub-database processing method of this application.

[0058] In this embodiment, the transaction order sub-database processing method includes steps S10 to S40:

[0059] Step S10, receiving the uploaded transaction request and transaction data;

[0060] It should be noted that the distributed system used in this application is as follows: Figure 2As shown, it mainly includes a routing application, a transaction application and various transaction sub-libraries. Among them, the routing application is the main control end and also the application end of this method. The routing application is responsible for calculating the sub-library to which the transaction should be sent to the transaction application, and forwarding the transaction request to the corresponding sub-library instance.

[0061] The transaction application is responsible for transaction process processing. The application is connected to a group of transaction sub-databases, and a certain number of application instances are deployed separately on each sub-database.

[0062] The transaction data sub-library stores transaction data tables and routing record tables, corresponding to the A1, A2, B1, and B2 libraries in the figure. The number of transaction sub-libraries in each group includes but is not limited to two, and may also be 3, 4, etc., without specific limitation.

[0063] It should be noted that the transaction request can be uploaded by the user or automatically uploaded by the server, without any specific limitation. The transaction request also includes the transaction data that needs to be processed. Through the transaction request, the transaction data is allocated to the corresponding transaction sub-library, and then the transaction data is processed through each transaction sub-library.

[0064] Step S20, based on the transaction request, determining a transaction sub-library corresponding to the transaction data, wherein the transaction sub-library includes a plurality of sub-libraries;

[0065] It should be noted that the database partitioning factor is a specific field contained in the transaction request message. The database partitioning routing parameters are also set in the routing application. The database partitioning routing parameters configure the mapping relationship between the database partitioning factor and the database partitioning grouping parameters. Through this mapping relationship, the transaction database partition to be allocated is determined.

[0066] It should be noted that the sub-database grouping parameters are corresponding parameters for each group, and each group includes but is not limited to two transaction sub-databases. Taking two as an example, the sub-databases in the group are each other's primary and backup sub-databases, and can be divided into preferred sub-databases and secondary sub-databases according to priority.

[0067] Specifically, the sharding factor of a transaction request corresponds to a fixed sharding grouping parameter. The routing application will give priority to processing the transaction request on the preferred sharding database. If the preferred sharding database is unavailable, it will choose to process it on the secondary sharding database.

[0068] In a feasible implementation manner, the step S20 of determining the transaction sub-database corresponding to the transaction data based on the transaction request includes:

[0069] Based on the transaction request, calculating a database partitioning factor corresponding to the transaction data;

[0070] It should be noted that the transaction request carries a partitioning factor corresponding to the transaction data, and the partitioning factor can be obtained by extracting data.

[0071] It should be noted that the database partitioning factor can be the last two digits of the transaction request serial number or the unique identifier of the transaction serial number. Here, the transaction serial number is used as an example. The value range of the database partitioning factor is 00-99. The database partitioning routing parameters are defined as follows:

[0072] (1) The database grouping parameter corresponding to the database factor 00-24 is (A1, A2). The first choice is to route to the A1 database, and then to the A2 database;

[0073] (2) The partitioning factor 25-49 corresponds to the partitioning grouping parameter (A2, A1). The first choice is to route to the A2 library, and then to the A1 library;

[0074] (3) The partitioning factor 50-74 corresponds to the partitioning grouping parameter (B1, B2). The first choice is to route to the B1 library, and then to the B2 library;

[0075] (4) The partitioning factor 75-99 corresponds to the partitioning grouping parameter (B2, B1). The first choice is to route to the B2 library, and then to the B1 library.

[0076] When it is determined that the transaction sub-database exists in an available instance, the transaction sub-database corresponding to the transaction data is determined according to a mapping relationship between the sub-database factor and each of the transaction sub-databases.

[0077] It should be noted that the available instance is a computing instance used to calculate transaction data. Only when there is an available computing case with normal performance in the transaction sub-database can the transaction data be sent to the transaction sub-database for processing.

[0078] It should be noted that, based on the mapping relationship between the sub-library factors and each transaction sub-library, the transaction request and transaction data are selected to be allocated to the transaction sub-library.

[0079] In a feasible implementation manner, after the step S20 of determining the transaction sub-database corresponding to the transaction data based on the transaction request, the following further includes:

[0080] Performing a duplicate checking process on the transaction sub-database to obtain a duplicate checking result;

[0081] It should be noted that the purpose of duplicate checking is to avoid the occurrence of two identical transaction requests or transaction data in the same transaction sub-database, wherein the duplicate checking result may be that there are no duplicate transaction requests or there are duplicate transaction requests.

[0082] If the duplicate check result shows that the transaction sub-database does not have a routing record of the current transaction, the duplicate check passes, and the transaction request is sent to the transaction sub-database;

[0083] It should be noted that the routing record is the transaction record registered by the routing application. After each transaction calculation is completed, a corresponding transaction record will be generated. Before sending the transaction data to the transaction sub-library, if it is determined that the current sub-library has no identical transaction records, it can be determined that the anti-duplicate mechanism will not be triggered, and the transaction request can be sent to the transaction sub-library.

[0084] If the duplicate check result shows that the transaction sub-database exists in the routing record of the current transaction, and the routing sub-database in the routing record is the current transaction sub-database, the duplicate check passes, and the transaction request is sent to the transaction sub-database.

[0085] It should be noted that when the duplicate check result shows that the transaction sub-database exists in the routing record of the current transaction, and the routing sub-database in the routing record is the transaction sub-database that needs to be allocated for the current transaction request, it is determined that there is no error in the transaction sub-database, but the final transaction sub-database instance can choose to reject the transaction or return the result of the last request according to business needs.

[0086] It should be noted that if there is a routing record for this transaction in the transaction sub-database, and the routing sub-database in the routing record is not the transaction sub-database, the check fails and the transaction request is rejected.

[0087] Step S30, when it is detected that the current transaction sub-database fails, a secondary sub-database is selected from other first sub-databases with normal performance;

[0088] It should be noted that the failure may occur due to damage to the available instance, downtime, etc., without any specific limitation.

[0089] In a feasible implementation manner, when a failure of the current transaction sub-database is detected, the step S30 of selecting a secondary sub-database from other first sub-databases with normal performance includes:

[0090] If it is detected that there is no available instance in the current transaction sub-database, it is determined that the current transaction sub-database is faulty;

[0091] It should be noted that the available instance is a computing instance that can be used normally. The computing instance is an execution component mainly used for data processing. When there is no available instance in the transaction sub-database, it is determined that the current transaction sub-database has a fault.

[0092] After determining that the current transaction sub-database fails, a secondary sub-database is selected from other first sub-databases with normal performance, and the transaction request is forwarded to the secondary sub-database.

[0093] It should be noted that when it is determined that the current transaction sub-database to be allocated has a fault, the transaction data can be transferred from the current transaction sub-database through the routing application. Since each transaction sub-database shares a routing application, the data is also shared and can be transferred directly.

[0094] It should be noted that the first sub-database is a transaction sub-database other than the currently selected preferred sub-database, and the number of first sub-databases is not limited.

[0095] Specifically, when accepting a transaction, the routing application first calculates the database partitioning factor according to the transaction request flow, and calculates the corresponding database partitioning grouping parameters based on the database partitioning routing parameters.

[0096] Under normal circumstances, both the preferred sub-database and the secondary sub-database have available instances. The routing application initially calculates the transaction sub-database as the preferred sub-database and notifies the secondary sub-database instance of the initial calculation result. The secondary sub-database instance calculates the final routing sub-database based on the routing table records and the initial calculation result and registers the routing record, and finally returns the final routing sub-database to the routing application. The routing application forwards the transaction to the final transaction sub-database instance based on the routing result, and the final transaction sub-database instance will register the same routing record when processing the transaction.

[0097] If there is no available instance of the preferred sub-database, the routing application determines that the final routing sub-database is the secondary sub-database and forwards the transaction request to the final transaction sub-database (secondary sub-database) instance. The final transaction sub-database instance registers the routing record and synchronizes the routing record to the preferred sub-database through an asynchronous backup method.

[0098] If there is no available instance of the secondary sub-database, the routing application determines the final routing sub-database as the preferred sub-database and forwards the transaction request to the final transaction sub-database (preferred sub-database) instance. The final transaction sub-database instance registers the routing record and synchronizes the routing record to the secondary sub-database through an asynchronous backup method.

[0099] Specifically, when both the preferred transaction sub-database and the secondary selected sub-database are normal, the workflow of this method is as follows: Figure 3 As shown, the processing steps are as follows:

[0100] (1) After receiving the transaction request, the routing application calculates the preferred sub-database as A1 based on the sub-database routing parameters, and the sub-database A2 is the secondary sub-database. Since there is an available instance of sub-database A1, the routing application initially calculates the transaction sub-database as the preferred sub-database (A1).

[0101] (2) The routing application notifies the transaction application of the initial calculation result (A1) of the secondary selected sub-database (A2);

[0102] (3) The second selected sub-database (A2) instance determines whether there is a routing record in the routing table. If so, the final transaction sub-database is determined to be the sub-database in the routing record (A1 or A2). If not, the final transaction sub-database is determined to be the A1 sub-database, and a new routing record is added to the routing table (routing to the A1 sub-database).

[0103] (4) The second selected sub-database (A2) instance returns to the final transaction sub-database (for the convenience of subsequent explanation, it is assumed to be the A1 sub-database);

[0104] (5) The routing application determines that the final transaction sub-database is the return result of the second-selected sub-database (A1);

[0105] (6) The routing application forwards the transaction message to the final transaction sub-database (A1) instance of the transaction application;

[0106] (7) The final routing sub-database (A1) instance first checks whether the routing record exists. If not, it registers the transaction route and then processes the transaction. If it exists, the transaction sub-database can choose to reject the transaction or return the result of the last request according to business needs.

[0107] (8) Finally, the transaction sub-database (A1) instance returns the transaction result.

[0108] In another embodiment, when the preferred transaction sub-database is normal and the secondary transaction sub-database is faulty, the workflow of the method is as follows: Figure 6 As shown, the processing steps are as follows:

[0109] (1) After receiving the transaction request, the routing application calculates the preferred sub-database as A1 based on the sub-database routing parameters, and the second-choice sub-database is A2. Since A1 sub-database has a surviving instance, the initial transaction sub-database is the preferred sub-database (A1);

[0110] (2) The routing application notifies the transaction application of the initial calculation result (A1) of the secondary selected sub-database (A2);

[0111] (3) Due to reasons such as downtime of the secondary database (A2) or network failure, the routing application fails to obtain a response from the secondary database (A2) instance and determines that the final transaction database is the primary database (A1);

[0112] (4) The routing application forwards the transaction message to the final transaction sub-database (A1) instance of the transaction application. The transaction message carries a routing synchronization flag.

[0113] (5) The final transaction sub-database (A1) instance first determines whether the routing record exists. If not, the transaction route is registered and the transaction is processed. If it exists and the routing sub-database is the A1 sub-database, the transaction can be rejected or the result of the last request can be returned according to business needs. If it exists and the routing sub-database is the A2 sub-database, the routing is judged to be wrong and the transaction is rejected.

[0114] (6) Finally, the transaction sub-database (A1) instance returns the transaction result;

[0115] (7) If the final transaction sub-database (A1) instance determines that the routing synchronization flag in the message is valid, the subsequent asynchronous synchronization routing information is sent to the secondary sub-database (A2);

[0116] (8) The secondary sub-database (A2) instance registers the routing record;

[0117] (9) After the secondary sub-database (A2) instance successfully registers the routing record, it returns the processing result to the transaction sub-database (A1) instance.

[0118] In another embodiment, when the preferred transaction sub-database fails and the secondary transaction sub-database is normal, the workflow of the method is as follows: Figure 7 As shown, the processing steps are as follows:

[0119] (1) After receiving the transaction request, the routing application calculates the preferred sub-database as A1 based on the sub-database routing parameters, and the A2 sub-database is the second-choice sub-database. When there is no surviving instance of the A1 sub-database and there is a surviving instance of the A2 sub-database, the final transaction sub-database is confirmed to be the second-choice sub-database (A2);

[0120] (2) The routing application forwards the transaction message to the final transaction sub-database (A2) instance of the transaction application;

[0121] (3) The final transaction sub-database (A2) instance first determines whether the route exists. If the route does not exist, the transaction route is registered and then the transaction is processed. If the route exists and the route sub-database is the A2 sub-database, the transaction can be rejected or the result of the last request can be returned according to business requirements. If the route exists and the route sub-database is the A1 sub-database, the route is determined to be wrong and the transaction is rejected.

[0122] (4) Finally, the transaction sub-database (A2) instance returns the transaction result;

[0123] (5) If the final transaction sub-database (A2) instance determines that the routing synchronization flag in the message is valid, the subsequent asynchronous synchronization routing information is sent to the preferred sub-database (A1) instance;

[0124] (6) The preferred sub-database (A1) instance registration routing record;

[0125] (7) After the preferred sub-database (A1) instance registers the routing record, it returns the processing result to the transaction sub-database (A2) instance.

[0126] Step S40, dividing the transaction data into the secondary selected sub-database for data processing to obtain a processing result.

[0127] It should be noted that after the transaction data is divided into the secondary sub-database, the data is processed through the computing instance in the secondary sub-database. If the preferred transaction sub-database has not failed, the data is processed through the preferred sub-database to obtain the processing result.

[0128] In a feasible implementation manner, before the step S40 of dividing the transaction data into the secondary selected sub-databases for data processing and obtaining the processing results, the step further includes:

[0129] Predicting the computing resource requirements of each of the transaction sub-databases;

[0130] It should be noted that the calculation process of the transaction sub-database is carried out all the time. During the calculation process, there will be an uneven distribution of computing power, so computing power resources need to be allocated to each transaction sub-database according to its computing power needs.

[0131] It should be noted that the method of predicting the computing resource requirements of each transaction sub-database can be: by calculating the computing power resource consumption in the historical time period, determining the average consumed computing power of each transaction sub-database, and obtaining the computing power requirements of each transaction sub-database.

[0132] Based on the computing resource requirements, computing resources are allocated to each of the transaction sub-databases.

[0133] It should be noted that after determining the computing resource requirements, computing resources are allocated to each transaction sub-database based on the computing resource requirements.

[0134] In a feasible implementation manner, the step S40 of dividing the transaction data into the secondary selected sub-database for data processing to obtain the processing result includes:

[0135] Query the transaction order data in the secondary sub-database according to the transaction identifier corresponding to the transaction data;

[0136] It should be noted that the transaction identifier may be a serial number carried by the transaction data or the transaction request, and the transaction order data stored in the secondary sub-database may be queried based on the serial number.

[0137] Based on the secondary selected sub-database, the transaction order data is modified or deleted to obtain a processing result.

[0138] It should be noted that there is a calculation instance in the secondary sub-database, and the transaction order data is modified or deleted according to the calculation instance, and the corresponding processing result is input.

[0139] The present application proposes a transaction order sub-library processing method, device, equipment, storage medium and computer program product. The present application receives a transaction request and transaction data to be processed, and determines the transaction sub-library corresponding to the transaction data based on the transaction request. The transaction sub-library includes multiple sub-libraries. When a sub-library determined to process the transaction fails, the transaction data can be divided into another sub-library with normal performance for processing, so as to avoid the loss of all transactions in a sub-library when the sub-library fails, thereby reducing the processing time of the transaction data.

[0140] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the transaction order sub-database processing method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.

[0141] This application also provides a transaction order sub-database processing device, please refer to Figure 4 , the transaction order sub-database processing device comprises:

[0142] The receiving module 10 is used to receive the uploaded transaction request and transaction data;

[0143] A determination module 20, configured to determine, based on the transaction request, a transaction sub-library corresponding to the transaction data, wherein the transaction sub-library includes a plurality of sub-libraries;

[0144] The selection module 30 is used to select a secondary sub-database from other first sub-databases with normal performance when a failure is detected in the current transaction sub-database;

[0145] The processing module 40 is used to divide the transaction data into the secondary selected sub-databases for data processing to obtain processing results.

[0146] Optionally, the determining module includes:

[0147] A calculation unit, configured to calculate a database partitioning factor corresponding to the transaction data based on the transaction request;

[0148] The first determining unit is used to determine the transaction sub-database corresponding to the transaction data according to the mapping relationship between the sub-database factor and each of the transaction sub-databases when determining that the transaction sub-database exists in an available instance.

[0149] Optionally, the device further comprises:

[0150] A duplicate checking processing module is used to perform duplicate checking processing on the transaction sub-database to obtain a duplicate checking result;

[0151] A first sending module, configured to, if the duplicate check result shows that the transaction sub-database does not have a routing record of the current transaction, then the duplicate check passes and the transaction request is sent to the transaction sub-database;

[0152] The second sending module is used to pass the duplication check and send the transaction request to the transaction sub-database if the duplication check result shows that the transaction sub-database exists in the routing record of the current transaction, and the routing sub-database in the routing record is the current transaction sub-database.

[0153] Optionally, the selection module includes:

[0154] A second determining unit is used to determine that the current transaction sub-database has a fault if it is detected that there is no available instance in the current transaction sub-database;

[0155] The forwarding unit is used to select a secondary sub-database from other first sub-databases with normal performance after determining that the current transaction sub-database has a fault, and forward the transaction request to the secondary sub-database.

[0156] Optionally, the device further comprises:

[0157] A prediction module, used to predict the computing resource requirements of each of the transaction sub-databases;

[0158] An allocation module is used to allocate computing resources to each of the transaction sub-databases based on the computing resource requirements.

[0159] Optionally, the processing module includes:

[0160] A query unit, configured to query the transaction order data in the secondary sub-database according to the transaction identifier corresponding to the transaction data;

[0161] An operation unit is used to modify or delete the transaction order data based on the secondary selection sub-database to obtain a processing result.

[0162] The transaction order sub-library processing device provided by the present application adopts the transaction order sub-library processing method in the above embodiment, which can solve the technical problem of transaction order sub-library processing. Compared with the prior art, the beneficial effects of the transaction order sub-library processing device provided by the present application are the same as the beneficial effects of the transaction order sub-library processing method provided by the above embodiment, and other technical features in the transaction order sub-library processing device are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0163] The present application provides a transaction order sub-database processing device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the transaction order sub-database processing method in the above-mentioned embodiment one.

[0164] Reference below Figure 5, which shows a schematic diagram of the structure of a transaction order sub-database processing device suitable for implementing the embodiment of the present application. The transaction order sub-database processing device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The transaction order sub-database processing device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0165] like Figure 5 As shown, the transaction order sub-database processing device may include a processing device 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. Various programs and data required for the operation of the transaction order sub-database processing device are also stored in the RAM 1004. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 1003 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 1009. The communication device 1009 can allow the transaction order sub-library processing device to communicate wirelessly or wired with other devices to exchange data. Although the transaction order sub-library processing device with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or have alternatively.

[0166] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0167] The transaction order sub-library processing device provided by the present application adopts the transaction order sub-library processing method in the above embodiment, which can solve the technical problem of transaction order sub-library processing. Compared with the prior art, the beneficial effects of the transaction order sub-library processing device provided by the present application are the same as the beneficial effects of the transaction order sub-library processing method provided by the above embodiment, and the other technical features in the transaction order sub-library processing device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0168] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0169] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0170] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the transaction order sub-library processing method in the above-mentioned embodiment.

[0171] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.

[0172] The above-mentioned computer-readable storage medium may be included in the transaction order sub-library processing device; or it may exist independently without being assembled into the transaction order sub-library processing device.

[0173] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the transaction order sub-database processing device, the transaction order sub-database processing device:

[0174] Receive uploaded transaction requests and transaction data;

[0175] Based on the transaction request, determining a transaction sub-library corresponding to the transaction data, wherein the transaction sub-library includes a plurality of sub-libraries;

[0176] When a failure is detected in the current transaction sub-database, a secondary sub-database is selected from other first sub-databases with normal performance;

[0177] The transaction data is divided into the secondary selected sub-database for data processing to obtain a processing result.

[0178] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0179] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0180] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0181] The readable storage medium provided in this application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned transaction order sub-library processing method, and can solve the technical problems of transaction order sub-library processing. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the transaction order sub-library processing method provided in the above-mentioned embodiment, and will not be repeated here.

[0182] The present application also provides a computer program product, including a computer program, which implements the steps of the transaction order sub-database processing method as described above when executed by a processor.

[0183] The computer program product provided by this application can solve the technical problem of transaction order sub-database processing. Compared with the prior art, the beneficial effects of the computer program product provided by this application are the same as the beneficial effects of the transaction order sub-database processing method provided by the above embodiment, which will not be repeated here.

[0184] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A transaction order database processing method, characterized in that: The method comprises: Receive uploaded transaction requests and transaction data; Based on the transaction request, determining a transaction sub-library corresponding to the transaction data, wherein the transaction sub-library includes a plurality of sub-libraries; When a failure is detected in the current transaction sub-database, a secondary sub-database is selected from other first sub-databases with normal performance; The transaction data is divided into the secondary selected sub-database for data processing to obtain a processing result.

2. The method according to claim 1, characterized in that The step of determining the transaction sub-database corresponding to the transaction data based on the transaction request includes: Based on the transaction request, calculating a database partitioning factor corresponding to the transaction data; When it is determined that the transaction sub-database exists in an available instance, the transaction sub-database corresponding to the transaction data is determined according to a mapping relationship between the sub-database factor and each of the transaction sub-databases.

3. The method according to claim 2, characterized in that After the step of determining the transaction sub-database corresponding to the transaction data based on the transaction request, the method further includes: Performing a duplicate checking process on the transaction sub-database to obtain a duplicate checking result; If the duplicate check result shows that the transaction sub-database does not have a routing record of the current transaction, the duplicate check passes, and the transaction request is sent to the transaction sub-database; If the duplicate check result shows that the transaction sub-database exists in the routing record of the current transaction, and the routing sub-database in the routing record is the current transaction sub-database, the duplicate check passes, and the transaction request is sent to the transaction sub-database.

4. The method according to any one of claims 1 to 3, characterized in that The step of selecting a secondary sub-database from other first sub-databases with normal performance when a failure of the current transaction sub-database is detected includes: If it is detected that there is no available instance in the current transaction sub-database, it is determined that the current transaction sub-database is faulty; After determining that the current transaction sub-database fails, a secondary sub-database is selected from other first sub-databases with normal performance, and the transaction request is forwarded to the secondary sub-database.

5. The method according to claim 1, characterized in that Before the step of dividing the transaction data into the secondary selected sub-database for data processing to obtain the processing result, the step further includes: Predicting the computing resource requirements of each of the transaction sub-databases; Based on the computing resource requirements, computing resources are allocated to each of the transaction sub-databases.

6. The method according to claim 1, characterized in that The step of dividing the transaction data into the secondary selected sub-database for data processing to obtain the processing result includes: Query the transaction order data in the secondary sub-database according to the transaction identifier corresponding to the transaction data; Based on the secondary selected sub-database, the transaction order data is modified or deleted to obtain a processing result.

7. A transaction order sub-database processing device, characterized in that: The device comprises: A receiving module, used to receive uploaded transaction requests and transaction data; A determination module, configured to determine, based on the transaction request, a transaction sub-library corresponding to the transaction data, wherein the transaction sub-library includes a plurality of sub-libraries; A selection module is used to select a secondary sub-database from other first sub-databases with normal performance when a failure of the current transaction sub-database is detected; The processing module is used to divide the transaction data into the secondary selected sub-database for data processing to obtain processing results.

8. A transaction order sub-database processing device, characterized in that: The device comprises: a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the transaction order sub-database processing method as described in any one of claims 1 to 6.

9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the transaction order sub-database processing method as described in any one of claims 1 to 6 are implemented.

10. A computer program product, characterized in that The computer program product includes a computer program, and when the computer program is executed by a processor, the steps of the transaction order sub-database processing method as described in any one of claims 1 to 6 are implemented.