Business processing method and device, equipment and storage medium

By generating and executing target transactions in the database and updating the to-called programs to replace the database identity, the problem of performance degradation in the database when processing a large number of pending transactions is solved, and the accuracy and efficiency of transaction processing are improved.

CN119557058APending Publication Date: 2025-03-04CHINA CONSTRUCTION BANK +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410292227.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-14
Publication Date
2025-03-04

AI Technical Summary

Technical Problem

In the prior art, when a database processes a large number of pending transactions, its processing performance deteriorates, resulting in low accuracy of target transactions.

Method used

By receiving service processing requests for target services, the target transaction is generated, and the target database is determined. Update the to-called program according to the target database, obtain the target call program, execute the target transaction and the target call program through the current thread of the target transaction, replace the initial database identity, reduce the database storage pressure, and process the pending transactions through multiple threads.

Benefits of technology

Improves the accuracy of handling target transactions, reduces the storage pressure of the database, and reduces the impact between read and write programs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119557058A_ABST
    Figure CN119557058A_ABST
Patent Text Reader

Abstract

The invention provides a business processing method and device, equipment and a storage medium. Relates to the technical field of artificial intelligence. The method comprises the following steps: receiving a service processing request of a target service; according to the service processing request, a target transaction corresponding to the target service is generated, a target database corresponding to the target service is determined, and the target transaction comprises a calling field and a database field; according to the target database, a to-be-called program corresponding to the calling field is updated, a target calling program is obtained, and the target calling program is used for replacing an initial database identifier corresponding to the database field; and executing the target transaction and the target calling program through the current thread corresponding to the target transaction so as to process the target business. According to the method, the accuracy of processing the target transaction can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a business processing method, device, equipment and storage medium. Background Art

[0002] After receiving the business request of the target business, a target transaction corresponding to the target business can be generated through the transaction processing model, and the target transaction can be executed to complete the target business.

[0003] In the prior art, a target transaction may include a reading program and a writing program. When executing a target transaction, the required data may be read from a database through the reading program, and the data may be stored in the database through the writing program. However, when there are many transactions to be processed, the processing performance of the database decreases, resulting in low accuracy in processing the target transaction. Summary of the invention

[0004] The present application provides a business processing method, apparatus, device and storage medium to solve the problem of low accuracy in processing target transactions in the prior art.

[0005] In a first aspect, the present application provides a business processing method, including:

[0006] Receiving a business processing request of a target business;

[0007] Generate a target transaction corresponding to the target business according to the business processing request, and determine a target database corresponding to the target business, wherein the target transaction includes a call field and a database field;

[0008] According to the target database, the program to be called corresponding to the calling field is updated to obtain a target calling program, wherein the target calling program is used to replace the initial database identifier corresponding to the database field;

[0009] The target transaction and the target calling program are executed through the current thread corresponding to the target transaction to realize the processing of the target business.

[0010] In a possible embodiment, updating the to-be-called program corresponding to the calling field according to the target database to obtain the target calling program includes:

[0011] Determine the field to be replaced of the program to be called;

[0012] Generate a replacement field according to the target database and the field to be replaced;

[0013] The replacement field is used to replace the field to be replaced to obtain the target calling program.

[0014] In a possible embodiment, generating a replacement field according to the target database and the field to be replaced includes:

[0015] Obtain a target database identifier of the target database;

[0016] Analyze and process the field to be replaced to determine the structure information of the field to be replaced;

[0017] A replacement field is generated according to the target database identifier and the structural information of the field to be replaced.

[0018] In a possible embodiment, executing the target transaction and the target calling program includes:

[0019] Executing the target transaction, calling the target calling program through the calling program and the calling interface to replace the initial database identifier of the database field with the target database identifier;

[0020] A read program and a write program are determined, and the read program and the write program are executed to realize processing of the target service.

[0021] In a possible embodiment, executing the reading procedure and the writing procedure includes:

[0022] executing the read program to obtain intermediate data in the target database;

[0023] Processing the intermediate data to obtain data to be stored;

[0024] The writing program is executed to store the data to be stored in the target database.

[0025] In a possible embodiment, the business processing request includes a target user identifier, a business type, and information about the business to be processed; generating a target transaction corresponding to the target business according to the business processing request, and determining a target database corresponding to the target business, including:

[0026] Obtaining an initial transaction corresponding to the business type;

[0027] Update the initial transaction according to the pending business information to obtain the target transaction;

[0028] A target database for the target service is determined from multiple databases according to the target user identifier and the service type.

[0029] In a possible embodiment, determining a target database for the target service from a plurality of databases according to the target user identifier and the service type includes:

[0030] Acquire storage location information of the target service according to the target user identifier and the service type;

[0031] The target database is determined from a plurality of databases according to the storage location information.

[0032] In a second aspect, an embodiment of the present application provides a service processing device, including a receiving module, a generating module, an updating processing module and an executing module:

[0033] The receiving module is used to receive a service processing request of a target service;

[0034] The generating module is used to generate a target transaction corresponding to the target business according to the business processing request, and determine a target database corresponding to the target business, wherein the target transaction includes a calling field and a database field;

[0035] The update processing module is used to update the program to be called corresponding to the calling field according to the target database to obtain a target calling program, and the target calling program is used to replace the initial database identifier corresponding to the database field;

[0036] The execution module is used to execute the target transaction and the target calling program through the current thread corresponding to the target transaction, so as to realize the processing of the target business.

[0037] In a possible embodiment, the update processing module is specifically used for:

[0038] Determine the field to be replaced of the program to be called;

[0039] Generate a replacement field according to the target database and the field to be replaced;

[0040] The replacement field is used to replace the field to be replaced to obtain the target calling program.

[0041] In a possible embodiment, the update processing module is specifically used for:

[0042] Obtain a target database identifier of the target database;

[0043] Analyze and process the field to be replaced to determine the structure information of the field to be replaced;

[0044] A replacement field is generated according to the target database identifier and the structural information of the field to be replaced.

[0045] In a possible embodiment, the execution module is specifically used for:

[0046] Executing the target transaction, calling the target calling program through the calling program and the calling interface to replace the initial database identifier of the database field with the target database identifier;

[0047] A read program and a write program are determined, and the read program and the write program are executed to realize processing of the target service.

[0048] In a possible embodiment, the execution module is specifically used for:

[0049] executing the read program to obtain intermediate data in the target database;

[0050] Processing the intermediate data to obtain data to be stored;

[0051] The writing program is executed to store the data to be stored in the target database.

[0052] In a possible embodiment, the service processing request includes a target user identifier, a service type, and information about the service to be processed; and the generating module is specifically configured to:

[0053] Obtaining an initial transaction corresponding to the business type;

[0054] Update the initial transaction according to the pending business information to obtain the target transaction;

[0055] A target database for the target service is determined from multiple databases according to the target user identifier and the service type.

[0056] In a possible embodiment, the generating module is specifically used for:

[0057] Acquire storage location information of the target service according to the target user identifier and the service type;

[0058] The target database is determined from a plurality of databases according to the storage location information.

[0059] In a third aspect, an embodiment of the present application provides an electronic device, comprising: at least one processor and a memory; the memory stores computer execution instructions; the at least one processor executes the computer execution instructions stored in the memory, so that the at least one processor executes the business processing method described in the first aspect and various possible designs of the first aspect.

[0060] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, the business processing method described in the first aspect and various possible designs of the first aspect is implemented.

[0061] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program. When the computer program is executed by a processor, it implements the business processing method described in the first aspect and various possible designs of the first aspect.

[0062] The business processing method, apparatus, device and storage medium provided by the present application can store data information in multiple databases. After generating a target transaction for a target business, the target database corresponding to the target business can be determined, and the target calling program can be determined. The target calling program can update the initial database identifier of the target transaction and execute the target transaction in the current thread corresponding to the target transaction, which can reduce the storage pressure of the database. At the same time, multiple threads are used to process and multiple transactions to be processed are divided and processed, which reduces the impact between the reading and writing programs and can improve the accuracy of processing the target transaction. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] 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.

[0064] Figure 1 A schematic diagram of an application scenario improved by an embodiment of the present application;

[0065] Figure 2 A flowchart of a business processing method provided in an embodiment of the present application;

[0066] Figure 3 A schematic diagram of another business process flow provided in an embodiment of the present application;

[0067] Figure 4 A schematic diagram of the architecture of a business processing method provided in an embodiment of the present application;

[0068] Figure 5 A schematic diagram of the structure of a service processing device provided in an embodiment of the present application;

[0069] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0070] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0071] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0072] It should be noted that the collection, storage, use, processing, transmission, provision and disclosure of financial data or user data and other information involved in the technical solution of this application are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals. The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards, and provide corresponding operation portals for users to choose to authorize or refuse.

[0073] Terminology explanation:

[0074] Transaction: In computer terms, it refers to a program execution unit that accesses and possibly updates various data items in a database. It is usually caused by the execution of a user program written in a high-level database manipulation language or programming language (such as SQL, C++ or Java), and is defined by statements (or function calls) such as begin transaction and end transaction.

[0075] Thread: It is the smallest unit that the operating system can schedule operations on. Threads are contained in processes and are the actual operating units in processes. A thread refers to a single sequential control flow in a process. Multiple threads can run concurrently in a process, and each thread executes different tasks in parallel.

[0076] Figure 1 A schematic diagram of an application scenario for the present application embodiment. Figure 1 , including a processing device 101 and multiple databases 102.

[0077] The processing device 101 can receive a business processing request of a target business, generate a target transaction according to the business processing request, and complete the processing of the target business through the target transaction. Each database 102 can store business information of multiple users, and the target database corresponding to the target business can be determined from multiple databases 102. The program to be called can be updated according to the target database to obtain the target calling program. The target transaction and the target calling program can be executed through the current thread corresponding to the target transaction to realize the processing of the target business, wherein the target transaction can include a calling field and a database field. When executing the target transaction, the calling field can call the target calling program, and the target calling program can replace the initial database identifier corresponding to the database field in the target transaction with the target database identifier.

[0078] In the prior art, a target transaction may include a reader program and a writer program. When executing a target transaction, the required data may be read from a database through the reader program, and the data may be stored in the database through the writer program. However, if all the data are stored in one database and there are many transactions to be processed, the processing performance of the database will decrease, and the multiple reader-writer programs will affect each other, resulting in low accuracy in processing the target transaction.

[0079] The method provided by the embodiment of the present application can store data information in multiple databases. After generating a target transaction of a target business, the target database corresponding to the target business can be determined, and the target calling program can be determined. The target calling program can update the initial database identifier of the target transaction and execute the target transaction in the current thread corresponding to the target transaction, which can reduce the storage pressure of the database. At the same time, multiple threads are used to process and multiple transactions to be processed are divided and processed, which reduces the impact between the reading and writing programs and can improve the accuracy of processing the target transaction.

[0080] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0081] Figure 2 A flowchart of a business processing method provided in an embodiment of the present application. Figure 2 , the method may include:

[0082] S201: Receive a business processing request of a target business.

[0083] The execution subject of the embodiment of the present application may be a processing device, or a processing device of a structural part arranged in the processing device. The processing device of the structural part may be implemented by software, or by a combination of software and hardware.

[0084] The target user may submit a business processing request through a user terminal, or a staff member may submit a business processing request through a business terminal.

[0085] The service processing request may include a target user identifier, a service type, and service information to be processed of the target service.

[0086] S202: Generate a target transaction corresponding to the target business according to the business processing request.

[0087] The initial transaction corresponding to the business type can be obtained, and the initial transaction is updated according to the pending business information to obtain the target transaction.

[0088] The initial transaction can be a SpringBatch framework. The SpringBatch framework only supports the configuration of a single database. After the initial transaction is updated according to the business information to be processed, the target transaction only supports the configuration of a single database.

[0089] The target transaction may include a call field and a database field, wherein the database identifier corresponding to the database field is initial configuration information, and the target call program may be called through the call field, and the target transaction may be connected to multiple databases through the target call program.

[0090] S203: Determine the target database corresponding to the target business.

[0091] A target database for a target service may be determined from multiple databases according to a target user identifier and a service type.

[0092] S204: Update the program to be called corresponding to the calling field according to the target database to obtain a target calling program.

[0093] The program to be called may be postProcessBeanFactory. BeanFactory is the basis of container functions in Spring. Auxiliary processing functions can be implemented by configuring postProcessBeanFactory information.

[0094] The postProcessBeanFactory can be configured to obtain the program to be called, which can include fixed fields and fields to be replaced.

[0095] The target caller can be used to replace the original database identifier corresponding to the database field.

[0096] The target calling program can be determined in the following manner: determining the field to be replaced of the program to be called; generating a replacement field according to the target database and the field to be replaced; and replacing the field to be replaced with the replacement field to obtain the target calling program.

[0097] For example, assuming that the program to be called is {fixed field 1, fixed field 2, field 1 to be replaced, and fixed field 3}, then field 1 to be replaced can be determined. Assuming that the target database is database 1, replacement field 1 can be generated based on database 1 and field 1 to be replaced. Then field 1 to be replaced can be replaced with replacement field 1 to obtain the target calling program. The target calling program is {fixed field 1, fixed field 2, replacement field 1, and fixed field 3}.

[0098] S205. Execute the target transaction and the target calling program through the current thread corresponding to the target transaction to process the target business.

[0099] Multiple threads can be run concurrently, and each thread can execute different transactions in parallel, which can improve transaction processing efficiency. At the same time, multiple transactions can be divided to reduce the mutual impact between transactions and improve the accuracy of transaction processing.

[0100] A current thread corresponding to a target transaction may be determined among multiple threads, and the target transaction may be executed through the current thread.

[0101] The target transaction can also include readers and writers.

[0102] The target transaction and the target calling program can be executed in the following manner: execute the target transaction, call the target calling program through the calling program and the calling interface to replace the initial database identifier of the database field with the target database identifier; determine the reading program and the writing program, and execute the reading program and the writing program to realize the processing of the target business.

[0103] For example, assuming that the target transaction is executed and executed to the calling program, the calling program can call the target calling program through the calling interface, determine the target database, execute the reading program and the writing program, and complete the processing of the target business.

[0104] The business processing method provided by the embodiment of the present application can generate a target transaction corresponding to the target business and determine the target database after receiving the business processing request of the target business. The target calling program can be determined according to the target database. When the current thread executes the target transaction, the target calling program can be called by the calling program of the target transaction, and the initial database identifier of the target transaction can be updated to the target database identifier, which can reduce the storage pressure of the database. At the same time, multiple threads are used to process and multiple transactions to be processed are divided and processed, which reduces the influence between the reading and writing programs and can improve the accuracy of processing the target transaction.

[0105] Figure 3 This is a flow chart of another business process provided by the embodiment of the present application. Figure 3 , the method may include:

[0106] S301: Receive a business processing request of a target business.

[0107] The execution process of S301 can refer to the execution process of S201, which will not be repeated here.

[0108] S302: Obtain an initial transaction corresponding to the business type.

[0109] In the initial transaction, the database identifier for storing data can be configured in the database field. The initial transaction also includes calling fields, reading programs, business processing programs, and writing programs.

[0110] The calling field can be used to call the target calling field, and the field to be called can be updated according to the target database identifier to obtain the target calling field.

[0111] The reader can obtain data to be used for processing the target business, or data to be updated, in the target database and determine it as intermediate data.

[0112] The business processing program can perform business processing on the intermediate data obtained from the target database to obtain the data to be stored.

[0113] The writing program can store the processed data to be stored in the target database.

[0114] S303: Update the initial transaction according to the business information to be processed to obtain the target transaction.

[0115] The business processing program of the initial transaction can be updated according to the business information to be processed to obtain the target transaction.

[0116] Different business types may have different business processing procedures, and the target business has its corresponding initial data, and the business processing procedure needs to be updated according to the business information to be processed.

[0117] S304: Determine a target database for the target service from multiple databases according to the target user identifier and the service type.

[0118] The target database may be determined in the following manner: obtaining storage location information of the target service according to the target user identifier and service type; and determining the target database from multiple databases according to the storage location information.

[0119] User information may be stored in multiple databases, and storage location information of a target service may be obtained according to a target user identifier and service type. The storage location information includes a database identifier and a storage location in the database.

[0120] For example, assuming that the target user identifier is user identifier 1 and the service type is service type 1, the storage location information may be determined to be storage location information 1, and the target database may be determined to be database 1 according to storage location information 1.

[0121] S305: Determine the fields to be replaced of the program to be called.

[0122] The initial fields to be replaced can be configured in the program to be called, and for a target transaction corresponding to any target business, the fields to be replaced can be replaced according to the business processing request of the target business.

[0123] In the initial transaction, the fields to be replaced can be ConstructorArgumentValues ​​objects.

[0124] S306: Generate a replacement field according to the target database and the field to be replaced.

[0125] The replacement field may be determined in the following manner: obtaining a target database identifier of the target database; analyzing and processing the field to be replaced to determine structural information of the field to be replaced; and generating the replacement field according to the target database identifier and the structural information of the field to be replaced.

[0126] For example, assuming that the target database is identified as target database 1, assuming that the field to be replaced is field to be replaced 1, and the structure information of field to be replaced 1 is structure information 1, replacement field 1 can be generated according to structure information 1 and target database 1.

[0127] The structure information can be obtained through the getConstructorArgumentValues ​​method, and the replacement field can be generated according to the target database identifier and the structure information of the field to be replaced. The replacement field can be a RuntimeBeanDefinition object.

[0128] S307: Replace the field to be replaced with the replacement field to obtain the target calling program.

[0129] For example, assuming that the program to be called is {fixed field 1, fixed field 2, field 1 to be replaced, and fixed field 3}, and assuming that the replacement field is replacement field 1, then the target calling program can be determined to be {fixed field 1, fixed field 2, replacement field 1, and fixed field 3}.

[0130] For example, the field to be replaced may be a ConstructorArgumentValues ​​object, and the replacement field may be a RuntimeBeanDefinition object. The RuntimeBeanDefinition object may be assigned to the ConstructorArgumentValues ​​object to implement replacement processing.

[0131] S308. Execute the target transaction through the current thread corresponding to the target transaction, and call the target calling program through the calling program and the calling interface to replace the initial database identifier of the database field with the target database identifier.

[0132] The current thread may be determined among multiple threads in the following manner: the number of pending transactions of each thread is determined, and the thread having the smallest number of pending transactions is determined as the current thread.

[0133] Furthermore, in the current thread, there may be a queue of pending transactions corresponding to the current thread, and the target transaction may wait in the queue of pending transactions for processing by the current thread.

[0134] The current thread can process the transactions in the queue of pending transactions in sequence. The current thread can obtain the data of the target transaction through the set() function. After completing the execution of the target transaction, the data processed in the current thread can be returned through the get() function.

[0135] For example, assuming that there are 3 threads, namely thread 1, thread 2 and thread 3, assuming that the current thread of target transaction 1 is thread 1, assuming that there are 2 pending transactions in the queue corresponding to thread 1, namely pending transaction 1 and pending transaction 2, and the target transaction is determined to be pending transaction 3, thread 1 can process transactions in sequence according to pending transaction 1, pending transaction 2 and pending transaction 3.

[0136] The calling interface can be the BeanFactoryPostProcessor interface.

[0137] S309: Execute the read program to obtain intermediate data in the target database.

[0138] The reader can establish a connection with the target database through ThreadLocal to read the data in the target database. After the connection is established, the select operation in the reader can be executed to obtain intermediate data.

[0139] S310: Process the intermediate data to obtain data to be stored.

[0140] The intermediate data can be processed through the business processing program to obtain the data to be stored.

[0141] S311, executing a writing program to store the data to be stored in a target database to implement processing of the target business.

[0142] The writer can establish a connection with the target database through ThreadLocal. After the connection is established, the update operation, delete operation, and insert operation in the writer can be executed according to the data to be stored to update the data in the target database.

[0143] The business processing method provided by the embodiment of the present application can obtain the initial transaction corresponding to the business type after receiving the business processing request of the target business, and update the initial transaction according to the business information to be processed to obtain the target transaction. The target database of the target business can be determined in multiple databases according to the target user identifier and the business type. The to-be-replaced field of the program to be called can be determined, and the replacement field can be determined according to the target database and the field to be replaced. The field to be replaced can be replaced with the replacement field to obtain the target calling program. When the current thread executes the target transaction, the calling program of the target transaction can call the target calling program, so that the reading program and the writing program can determine the corresponding target database, and store the business data in multiple databases, which can reduce the storage pressure of the database. At the same time, multiple to-be-processed transactions are processed by multiple threads, and the impact between the reading and writing programs is reduced, which can improve the accuracy of processing the target transaction.

[0144] Figure 4 This is a schematic diagram of the architecture of a business processing method provided in an embodiment of the present application. Figure 4 After receiving the business processing request of the target business, the initial transaction corresponding to the business type can be obtained. The business processing request can include the target user identifier, the business type and the business information to be processed. The initial transaction can be updated according to the business information to be processed to obtain the target transaction. According to the target user identifier and the business type, the target database is determined from multiple databases. The program to be called is obtained, and the field to be replaced of the program to be called is determined. According to the target database identifier and the field to be replaced of the target database, a replacement field is generated, and the field to be replaced is replaced with the replacement field to obtain the target calling program.

[0145] The target transaction can be executed through the current thread corresponding to the target transaction, the target calling program can be called through the calling program and calling interface of the target transaction, the reading program can be executed to obtain intermediate data in the target database, the intermediate data can be processed to obtain the data to be stored, and the writing program can be executed to store the data to be stored in the target database, thereby realizing the processing of the target business.

[0146] Figure 5 This is a schematic diagram of the structure of a service processing device provided in an embodiment of the present application. Figure 5 The service processing device 10 may include a receiving module 11, a generating module 12, an updating processing module 13 and an executing module 14:

[0147] The receiving module 11 is used to receive a service processing request of a target service;

[0148] The generating module 12 is used to generate a target transaction corresponding to the target business according to the business processing request, and determine the target database corresponding to the target business, wherein the target transaction includes a call field and a database field;

[0149] The update processing module 13 is used to update the program to be called corresponding to the calling field according to the target database to obtain the target calling program, and the target calling program is used to replace the initial database identifier corresponding to the database field;

[0150] The execution module 14 is used to execute the target transaction and the target calling program through the current thread corresponding to the target transaction to realize the processing of the target business.

[0151] The business processing device provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.

[0152] In a possible embodiment, the update processing module 13 is specifically used for:

[0153] Determine the fields to be replaced of the program to be called;

[0154] Generate replacement fields according to the target database and the fields to be replaced;

[0155] The replacement field is replaced with the field to be replaced to obtain the target calling program.

[0156] In a possible embodiment, the update processing module 13 is specifically used for:

[0157] Get the target database ID of the target database;

[0158] Analyze and process the field to be replaced to determine the structure information of the field to be replaced;

[0159] Generate a replacement field based on the target database identifier and the structure information of the field to be replaced.

[0160] In a possible embodiment, the execution module 14 is specifically used for:

[0161] Execute the target transaction, call the target calling program through the calling program and the calling interface to replace the initial database identifier of the database field with the target database identifier;

[0162] Determine the read program and the write program, and execute the read program and the write program to realize the processing of the target business.

[0163] In a possible embodiment, the execution module 14 is specifically used for:

[0164] Execute the read program to obtain intermediate data in the target database;

[0165] Process the intermediate data to obtain data to be stored;

[0166] Execute the write program to store the data to be stored in the target database.

[0167] In a possible embodiment, the service processing request includes a target user identifier, a service type, and information about the service to be processed; the generating module 12 is specifically used for:

[0168] Get the initial transaction corresponding to the business type;

[0169] The initial transaction is updated according to the pending business information to obtain the target transaction;

[0170] A target database for a target service is determined from multiple databases according to a target user identifier and a service type.

[0171] In a possible embodiment, the generating module 12 is specifically used for:

[0172] According to the target user ID and business type, obtain the storage location information of the target business;

[0173] A target database is determined among the multiple databases according to the storage location information.

[0174] The business processing device provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.

[0175] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 6The electronic device 20 may include a processor 21 and a memory 22. Exemplarily, the processor 21 and the memory 22 are interconnected via a bus 23.

[0176] The memory 22 stores computer executable instructions;

[0177] The processor 21 executes the computer execution instructions stored in the memory 22, so that the processor 21 executes the service processing method shown in the above method embodiment.

[0178] Accordingly, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the business processing method of the above method embodiment.

[0179] Accordingly, an embodiment of the present application may also provide a computer program product, including a computer program, which, when executed by a processor, can implement the business processing method shown in the above method embodiment.

[0180] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0181] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0182] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1A function specified in one or more boxes.

[0183] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0184] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0185] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0186] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0187] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0188] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. A business processing method, characterized in that: include: Receiving a business processing request of a target business; Generate a target transaction corresponding to the target business according to the business processing request, and determine a target database corresponding to the target business, wherein the target transaction includes a call field and a database field; According to the target database, the program to be called corresponding to the calling field is updated to obtain a target calling program, wherein the target calling program is used to replace the initial database identifier corresponding to the database field; The target transaction and the target calling program are executed through the current thread corresponding to the target transaction to realize the processing of the target business.

2. The method according to claim 1, characterized in that The process of updating the program to be called corresponding to the calling field according to the target database to obtain the target calling program includes: Determine the field to be replaced of the program to be called; Generate a replacement field according to the target database and the field to be replaced; The replacement field is used to replace the field to be replaced to obtain the target calling program.

3. The method according to claim 2, characterized in that Generating a replacement field according to the target database and the field to be replaced includes: Obtain a target database identifier of the target database; Analyze and process the field to be replaced to determine the structure information of the field to be replaced; A replacement field is generated according to the target database identifier and the structural information of the field to be replaced.

4. The method according to any one of claims 1 to 3, characterized in that: Executing the target transaction and the target calling program, including: Executing the target transaction, calling the target calling program through the calling program and the calling interface to replace the initial database identifier of the database field with the target database identifier; A read program and a write program are determined, and the read program and the write program are executed to realize processing of the target service.

5. The method according to claim 4, characterized in that Executing the reading procedure and the writing procedure includes: executing the read program to obtain intermediate data in the target database; Processing the intermediate data to obtain data to be stored; The writing program is executed to store the data to be stored in the target database.

6. The method according to any one of claims 1 to 5, characterized in that: The business processing request includes a target user identifier, a business type, and information about the business to be processed; generating a target transaction corresponding to the target business according to the business processing request, and determining a target database corresponding to the target business, including: Obtaining an initial transaction corresponding to the business type; Update the initial transaction according to the pending business information to obtain the target transaction; A target database for the target service is determined from multiple databases according to the target user identifier and the service type.

7. The method according to claim 6, characterized in that Determining a target database for the target service from multiple databases according to the target user identifier and the service type includes: Acquire storage location information of the target service according to the target user identifier and the service type; The target database is determined from a plurality of databases according to the storage location information.

8. A service processing device, characterized in that: Including receiving module, generating module, updating processing module and executing module: The receiving module is used to receive a service processing request of a target service; The generating module is used to generate a target transaction corresponding to the target business according to the business processing request, and determine a target database corresponding to the target business, wherein the target transaction includes a calling field and a database field; The update processing module is used to update the program to be called corresponding to the calling field according to the target database to obtain a target calling program, and the target calling program is used to replace the initial database identifier corresponding to the database field; The execution module is used to execute the target transaction and the target calling program through the current thread corresponding to the target transaction, so as to realize the processing of the target business.

9. An electronic device, characterized in that: include: Memory and processor, The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor executes the business processing method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the business processing method according to any one of claims 1 to 7 when executed by a processor.

11. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the service processing method according to any one of claims 1 to 7 is implemented.