CN112597222A - Financial database connection processing method, device, equipment and storage medium - Google Patents

Financial database connection processing method, device, equipment and storage medium Download PDF

Info

Publication number
CN112597222A
CN112597222A CN202011492400.0A CN202011492400A CN112597222A CN 112597222 A CN112597222 A CN 112597222A CN 202011492400 A CN202011492400 A CN 202011492400A CN 112597222 A CN112597222 A CN 112597222A
Authority
CN
China
Prior art keywords
database
connection request
online component
identifier
financial database
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011492400.0A
Other languages
Chinese (zh)
Inventor
李承文
王鸶楠
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Construction Bank Corp filed Critical China Construction Bank Corp
Priority to CN202011492400.0A priority Critical patent/CN112597222A/en
Publication of CN112597222A publication Critical patent/CN112597222A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/219Managing data history or versioning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Finance (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the specification provides a financial database connection processing method, a device, equipment and a storage medium, wherein the method comprises the following steps: performing global routing interception on the connection request; acquiring an online component identifier to which the connection request belongs from a configuration center; routing the connection request to an online component corresponding to the online component identifier; enabling the online component to acquire a sub-library identifier corresponding to the connection request from the configuration center; and enabling the online component to route the connection request to the financial database sub-base corresponding to the sub-base identification. Embodiments of the present description may enable dynamic routing of database connection requests for a tomcat application server-based financial system.

Description

Financial database connection processing method, device, equipment and storage medium
Technical Field
The present disclosure relates to the field of database technologies, and in particular, to a method, an apparatus, a device, and a storage medium for processing a connection of a financial database.
Background
The financial system is used as a national key information infrastructure and is directly related to the normal operation of national economy and society. Currently, most existing financial systems operate on the non-open source x86 platform. However, the system relies on import equipment and systems for a long time, which not only needs to spend huge amount of foreign exchange, but also relates to the safety control of the financial industry in China. In order to realize the localization of the financial system, the localization of the current financial system needs to be adapted, so that the current financial system is compatible with the non-open-source x86 platform and the open-source platform (such as the ARM platform). In a database connection operation layer, a non-open-source weblogic application server is used in an existing x86 platform-based financial system version (hereinafter referred to as x86 version), the weblogic application server can configure multiple data sources, different servers are configured to connect different databases, connection problems of the data sources do not need to be processed in codes, switching of the multiple data sources can be completed only by configuring corresponding jndi names, and after connection of the databases is established, corresponding mappers are executed to complete operation of the databases.
In order to improve the security of financial information and facilitate the cost reduction, an open-source tomcat application server is adopted in a financial system version (hereinafter referred to as an ARM version) based on an open-source platform (such as an ARM platform) on the aspect of database connection operation. However, since the tomcat application server cannot configure multiple data sources therein, a database needs to be specified in the code. Thus, dynamic routing of ARM version connection requests is difficult to achieve.
Disclosure of Invention
An object of the embodiments of the present specification is to provide a method, an apparatus, a device, and a storage medium for processing a financial database connection, so as to implement dynamic routing of a database connection request of a financial system based on a tomcat application server.
In order to achieve the above object, in one aspect, an embodiment of the present specification provides a financial database connection processing method, including:
performing global routing interception on the connection request;
acquiring an online component identifier to which the connection request belongs from a configuration center;
routing the connection request to an online component corresponding to the online component identifier;
enabling the online component to acquire a sub-library identifier corresponding to the connection request from the configuration center;
and enabling the online component to route the connection request to the financial database sub-base corresponding to the sub-base identification.
In an embodiment of this specification, the performing global route interception on the connection request includes:
and performing global routing interception on the connection request through a preset Spring interceptor.
In an embodiment of the present specification, the obtaining, from the configuration center, the online component identifier to which the connection request belongs includes:
inquiring an online component identifier to which a transaction type identifier carried by the connection request belongs from a configuration file of the configuration center; and the configuration file is configured with a mapping relation between the transaction type identifier and the online component.
In an embodiment of this specification, the enabling the online component to obtain the sublibrary identifier corresponding to the connection request from the configuration center includes:
enabling the online component to initiate a financial database sub-database distribution request carrying the connection request to the configuration center;
causing the online component to receive a sublibrary identification; the database partitioning identifier is a financial database partitioning identifier dynamically allocated by the configuration center according to the financial database partitioning allocation request.
In an embodiment of the present specification, causing the online component to route the connection request to the financial database sub-base corresponding to the sub-base identifier includes:
and allocating a connection for the connection request from the database connection pool corresponding to the sub-library identification.
In an embodiment of the present specification, the database connection pool includes a Druid component.
In an embodiment of the present specification, the financial database sub-library includes a gaussian database.
In one embodiment of the present description, the online component identifier is an SPU processor identifier.
In an embodiment of the present specification, after causing the online component to route the connection request to the financial database sub-base corresponding to the sub-base identifier, the method further includes:
invoking a Druid component to execute the sql statement banked against the financial database.
In an embodiment of the present specification, the invoking the Druid component to execute the sql statement of the banking database includes:
calling an sql session factory class of a Mybatis framework to create an sql session object;
calling the sql session object to obtain a Mapper interface;
and executing the sql sentences for the banking of the financial database according to the Mapper interface.
In an embodiment of this specification, the invoking the sql session object to obtain the Mapper interface includes:
calling the sql session object to confirm whether a Mapper interface of a target version exists under a specified path;
and if so, acquiring the Mapper interface of the target version.
In an embodiment of the present specification, the method further includes:
and if the Mapper interface of the target version does not exist in the specified path, acquiring the original Mapper interface of the Mybatis framework.
In another aspect, an embodiment of the present specification further provides a financial database connection processing apparatus, including:
the request interception module is used for carrying out global routing interception on the connection request;
the first acquisition module is used for acquiring the online component identifier to which the connection request belongs from a configuration center;
the first routing module is used for routing the connection request to the online component corresponding to the online component identifier;
a second obtaining module, configured to enable the online component to obtain, from the configuration center, a sublibrary identifier corresponding to the connection request;
and the second routing module is used for enabling the online component to route the connection request to the sub-database of the financial database corresponding to the sub-database identification.
In another aspect, the embodiments of the present specification further provide a computer device, which includes a memory, a processor, and a computer program stored on the memory, and when the computer program is executed by the processor, the computer program executes the instructions of the above method.
In another aspect, the present specification further provides a computer storage medium, on which a computer program is stored, and the computer program is executed by a processor of a computer device to execute the instructions of the method.
As can be seen from the technical solutions provided in the embodiments of the present specification, a financial system based on a tomcat application server may perform global routing interception on a database connection request, obtain an online component identifier to which the connection request belongs from a configuration center, and route the connection request to a corresponding online component according to the online component identifier; and then, the online component acquires the sub-database identification corresponding to the connection request from the configuration center (namely, the configuration center dynamically allocates database sub-databases for the connection request), and the online component routes the connection request to the corresponding financial database sub-databases according to the sub-database identification, so that the dynamic routing of the database connection request of the financial system is realized.
Drawings
In order to more clearly illustrate the embodiments of the present specification or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only some embodiments described in the present specification, and for those skilled in the art, other drawings can be obtained according to the drawings without any creative effort. In the drawings:
FIG. 1 illustrates a flow diagram of a method of financial database connection processing in some embodiments of the present description;
FIG. 2 is an interaction diagram illustrating a financial database connection process in one embodiment of the present disclosure;
FIG. 3 is a block diagram showing the structure of a financial database connection processing apparatus in some embodiments of the present disclosure;
FIG. 4 shows a block diagram of a computing device in some embodiments of the present description.
[ description of reference ]
30. A request interception module;
31. a first acquisition module;
32. a first routing module;
33. a second acquisition module;
34. a second routing module;
402. a computer device;
404. a processor;
406. a memory;
408. a drive mechanism;
410. an input/output module;
412. an input device;
414. an output device;
416. a presentation device;
418. a graphical user interface;
420. a network interface;
422. a communication link;
424. a communication bus.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the present specification, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only a part of the embodiments of the present specification, and not all of the embodiments. All other embodiments obtained by a person skilled in the art based on the embodiments in the present specification without any inventive step should fall within the scope of protection of the present specification.
Embodiments of the present description relate to database technology that may be applied in any tomcat application server based business system. The tomcat application server is an open-source lightweight Web application server, and the service system can be realized based on the tomcat application server. Since there is no way to configure multiple data sources in a tomcat application server (a data source refers to a database or a database server used by a database application), it is generally necessary to specify a database in code. Thus, dynamic routing of database connection requests of a service system based on the tomcat application server is difficult to realize.
For example, taking a localized financial system (e.g., a bank transaction system, etc.) as an example, in order to improve the operation security of the financial system, the localized financial system employs a tomcat application server; however, in this scenario, the localized financial system will also face the problem that dynamic routing of database connection requests is difficult to implement. The domestic financial system is as follows: the basic environment of software and hardware on which the financial system operates is a domestic ARM platform. Under the ARM platform, the processor of the localized financial system may be based on a native CPU of the ARM architecture (e.g., a 48-core spread-pen 920 chip based on the ARM architecture); the application server of the domestic financial system can be realized based on an open-source tomcat application server; the operating system of the domestic financial system can use a domestic operating system (such as the operating system of the winning bid kylin, etc.); the database of the localized financial system may use a localized database (e.g., gaussian database, etc.). The software basic environments are integrated together to form a full-stack localization environment capable of supporting the practical application of the financial system. In contrast, the software and hardware basic environment relied on by conventional financial systems (i.e., non-domestic versions of financial systems) is the X86 platform, and the X86 platform may include: the processor is based on the X86 architecture; the application server is based on non-open source weblogic and other application servers; operating systems are UNIX or Linux based; the database is based on Oracle et al.
In view of this, in order to implement dynamic routing of a database connection request of a tomcat application server-based financial system, embodiments of the present specification provide a financial database connection processing method, which may be applied to a tomcat application server-based financial system.
However, as will be appreciated by those skilled in the art, in contrast to conventional financial systems, the financial system of the embodiments of the present specification is required to be pre-configured with the gas database driver because the financial system of the embodiments of the present specification uses different databases (i.e., gas databases) and relies on different open-source infrastructure. In addition, because connection pool resources of the customized Gauss database are required, a localization database connection pool component (e.g., a drain component) is required to be configured in advance in the financial system according to the embodiment of the present specification. The developer of the financial system may provide the gas database driver dependency package and the drain dependency package, and may acquire (e.g., remotely download) and install the gas database driver dependency package and the drain dependency package before actually applying the financial database connection processing method according to the embodiment of the present disclosure.
Of course, for a developer, the x86 platform and the ARM platform are compatible for realizing a financial software, that is, a version (namely, a conventional financial system) which can be respectively operated on the x86 platform and a version (namely, a domestic financial system) which can be respectively operated on the ARM platform are provided based on a financial software. In controlling version dependencies, two parent (parent) items may be created using the item management tool Maven, and x86 and the localized dependency version are defined in the two parent items, respectively. The localization version of the Project Object Model (POM) file introduces the localization parent version, and the x86 version of the POM file introduces the x86 parent version. Therefore, when the versions are compiled, different POM files are compiled and packaged, and the dependency packages of different versions can be obtained.
Referring to fig. 1, in some embodiments of the present description, a financial database connection processing method may include the steps of:
s101, performing global routing interception on the connection request.
S102, obtaining the online component identification of the connection request from the configuration center.
S103, routing the connection request to the online component corresponding to the online component identifier.
S104, the online component obtains the sub-library identification corresponding to the connection request from the configuration center.
S105, enabling the online component to route the connection request to the financial database sub-base corresponding to the sub-base identification.
In the embodiment of the specification, a financial system based on a tomcat application server can perform global routing interception on a database connection request, acquire an online component identifier to which the connection request belongs from a configuration center, and route the connection request to a corresponding online component according to the online component identifier; and then, the online component acquires the sub-database identification corresponding to the connection request from the configuration center (namely, the configuration center dynamically allocates database sub-databases for the connection request), and the online component routes the connection request to the corresponding financial database sub-databases according to the sub-database identification, so that the dynamic routing of the database connection request of the financial system is realized.
In an embodiment of the present specification, the connection request is a database connection request. The connection request may be initiated based on any business scenario requiring the database to be operated. For example, in an embodiment of the present specification, after a user initiates a financial transaction request (e.g., a transfer request, a payment request, etc.) to a financial system through a client, the financial system needs to connect to a database and perform a corresponding transaction operation; thus, the financial system receiving a financial transaction request is equivalent to receiving a connection request. For another example, in another embodiment of the present specification, when the financial system performs data summarization processing on end of each day, it also needs to connect to the database and perform corresponding transaction operations; when the triggering condition of the data summarization processing at the end of each day is met, the financial system equivalently receives the connection request.
In an embodiment of the present disclosure, the client may be a desktop computer, a tablet computer, a notebook computer, a smart phone, a digital assistant, a smart wearable device, and the like. Wherein, wearable equipment of intelligence can include intelligent bracelet, intelligent wrist-watch, intelligent glasses, intelligent helmet etc.. Of course, the client is not limited to the electronic device with certain entities, and may also be software running in the electronic device.
In some embodiments of the present specification, the connection request may be subjected to global route interception by a preconfigured global Interceptor (Interceptor), so that all connection requests may be dynamically routed subsequently. For example, in an embodiment of the present specification, the connection request may be subjected to global route interception by a Spring interceptor. In an exemplary embodiment, the connection request may be subject to global route interception via an Interceptor in the SpringMVC framework. The SpringMVC framework is an application framework which is designed around a service connector (Servlet) and is based on View, Model and Controller (MVC) ideas by taking requests as drivers, and a core class is Dispatcterservlet. The interception principle of an Interceptor in the SpringMVC framework roughly includes the following:
(1) the request sent by the client is directly requested to the Dispatcterservlet.
(2) The Dispatcterservlet calls HandlerMapping according to the request information and analyzes the Handler corresponding to the request.
(3) After resolving to the corresponding Handler, processing by the Handler adapter is started.
(4) The HandlerAdapter calls the real processor to open the processing request according to the Handler and processes the corresponding business logic.
(5) After the processor finishes processing the service, a Model AndView object is returned, the Model is a returned data object, and the View is a logical View.
(6) The ViewResolver looks up the actual View from the logical View.
(7) The DispaterServlet passes the returned Model to View.
(8) And returning the information to the client through the View.
In some embodiments of the present description, a configuration file of the configuration center is configured with a mapping relationship between the transaction type identifier and the online component. For example, a plurality of transaction type identifiers may correspond to one online component, or one transaction type identifier may correspond to one online component. Therefore, the obtaining the online component identifier to which the connection request belongs from the configuration center may include: and inquiring the online component identifier to which the transaction type identifier carried by the connection request belongs from the configuration file of the configuration center.
In an exemplary embodiment, taking a bank transaction code as an example of the transaction type identifier, the mapping relationship between the transaction type identifier and the online component may be as shown in table 1 below.
TABLE 1
Transaction code On-line assembly Business content corresponding to transaction code
1121 SPU1001 Opening account with one account in current period
1122 SPU1001 One-time-to-one continuous storage in life cycle
1123 SPU1001 Obtaining the active
1124 SPU1001 Yibentongjiejing medicine for curing constipation
1125 SPU1001 Sale account with one account in current period
1026 SPU1002 Savings charge
1066 SPU1003 Password reset
4114 SPU1004 Bank draft
4132 SPU1005 Bank note payment
In an embodiment of the present specification, when a new transaction type identifier or an online component changes, a configuration file of the configuration center needs to be changed accordingly. Considering the relatively small variation of transaction types in the financial field, the above variation can be obtained by means of message subscription in one embodiment of the present specification. When the transaction type is changed by the main environment configuration center, the changed information such as the transaction name, the component name and the like is sent to the message middleware (such as a kafka server and the like); the configuration center of the dynamic route (such as the configuration center shown in fig. 2) reads the information in the kafka server, and if a new message exists, the configuration center synchronously changes the configuration file of the configuration center. The new transaction type identifier may be, for example, one or more new transaction types or one or more old transaction types.
In an embodiment of the present description, the online component may include one or a group of database sub-libraries and Access Points (APs) corresponding to the database sub-libraries. For example, in the embodiment shown in FIG. 2, the financial system is configured with n online components, each providing a unified API interface (e.g., AP 1-APn in FIG. 2) that accesses 6 database repositories, each AP being identifiable by a corresponding SPU (sensor Processing Unit) processor identification, namely an SPU processor identification. Taking the online component 1 as an example, the online component 1 includes an AP1 and 6 database sub-libraries: the subbase 11 to the subbase 16, and the AP1 provides an API interface for accessing the subbase 11 to the subbase 16.
The configuration center is not only configured with the mapping relation between the transaction type identifier and the online component; processing logic is also provided for dynamically allocating databases for connection requests (here processing logic is essentially a distributed task allocation algorithm). In practical implementation, any suitable distributed task allocation algorithm (for example, an allocation algorithm based on graph theory, an overall planning method, a heuristic method, etc.) can be selected according to practical needs, and this specification does not limit this. Therefore, after the connection request is routed to the online component corresponding to the online component identifier, the online component can be triggered to initiate a database dynamic allocation request to a configuration center. The configuration center can allocate a database sub-base for the connection request by executing the processing logic, and return a sub-base identifier corresponding to the database sub-base. Correspondingly, the online component routes the connection request to the financial database sub-base corresponding to the sub-base identification.
In some embodiments of the present description, causing the online component to route the connection request to the financial database vault corresponding to the vault identity may include: and allocating a connection for the connection request from the database connection pool corresponding to the sub-library identification.
The database connection is an expensive resource, and therefore, the management of the database connection will significantly affect performance indexes such as flexibility and robustness of the whole financial system. The database connection pool is proposed to solve this problem. Database connection pooling is a technique for creating and managing a buffer pool of database connections that is responsible for allocating, managing, and releasing multiple database connections that are previously established and ready for use by any thread that needs them. Thus, when a connection request is received, a database connection may be taken from the database connection pool for use by the corresponding thread and placed back in the database connection pool after use.
In some embodiments of the present description, the database connection pool may be implemented based on any existing database connection pool. For example, in an exemplary embodiment, the database connection pool may be implemented based on a Druid component. The hardware component is a Java Database Connectivity (JDBC). Not only can a connection pool be created with the drive component, but also database operations can be performed with a series of JDBC component libraries contained by the drive component.
After a connection is allocated to the connection request from the database connection pool corresponding to the sublibrary identifier, the JDBC component library may be called to execute an sql statement for the banking database sublibrary, that is, the database operation for the banking database sublibrary may be executed. Database operations may include, for example, Creating (CREATE), modifying (ALTER) data tables, etc.) and table data modifying (INSERT), UPDATE (UPDATE), DELETE (DELETE), etc.).
For example, in an exemplary embodiment, invoking the JDBC component library to execute the sql statement banked to the financial database may include:
(1) and the sql session factory (sqlSessionFacor) class calling the Mybatis framework creates an sql session object (i.e., SqlSessionobject). The Mybatis framework is a persistent layer framework that can support customized SQL, stored procedures, and advanced mapping. Thus, MyBatis avoids almost all JDBC code and manual setting of parameters and acquisition of result sets.
(2) And calling the sql session object to obtain the Mapper interface.
(3) And executing the sql sentences of the financial database according to the Mapper interface.
Specifically, after a SqlSessionFacony object is created by using a SqlSessionFacony class, a getMapper method can be called to obtain a dynamic proxy object, namely a Mapperproxy, generated by Mybatis according to a self-defined Mapper interface. When the method of the Mapper interface is called, the method is intercepted by the Mapper proxy, and then the invoke method is executed, and the execute method of the Mapper method is called in the invoke method to execute sql. In the execute method, a getType method of an SqlCommand object is called to acquire the type of an sql statement, a resolveReturnType acquisition method of a MethodSignature object is called to return a value type, converterTargsToSqlCommand param is called to analyze a Mapper method parameter, and finally a corresponding method of SqlSesion is called to execute the sql statement according to the sql statement type.
In an embodiment of the present specification, the invoking the sql session object acquisition Mapper interface may include: calling the sql session object to confirm whether a Mapper interface of a target version (namely a home-made version of the financial system) exists under a specified path (namely a Mapper directory); if the target version exists, a Mapper interface of the target version can be obtained; otherwise, the original Mapper interface of the Mybatis framework (namely, the Mapper interface of the Mybatis framework itself) can be obtained.
It has been stated hereinbefore that the financial system of the embodiment of the present specification is a localized financial system that uses the Gauss database. The grammar compatibility of the Gauss database and the Oracle database reaches 90%, and the sql statements defined in the current system can generally run effectively on the Gauss database, but the compatibility problem possibly caused by 10% difference is avoided. The SqlSessinfacory class in the Mybatis framework can be rewritten in advance (that is, besides the original Mapper interface of the Mybatis framework, a Mapper interface adapted to the financial system of the localization version can be provided additionally), and the Mapper interface is stored in the Mapper directory to be adapted to the Gauss database. When the database operation is carried out, whether the Mapper interface file of the target version exists in the Mapper directory is judged firstly, if yes, the Mapper interface file is analyzed preferentially, and if not, the original Mapper interface file is analyzed.
While the process flows described above include operations that occur in a particular order, it should be appreciated that the processes may include more or less operations that are performed sequentially or in parallel (e.g., using parallel processors or a multi-threaded environment).
Corresponding to the financial database connection processing method, the present specification also provides an embodiment of a financial database connection processing apparatus. Referring to fig. 3, in some embodiments of the present disclosure, the financial database connection processing apparatus may include:
a request intercepting module 30, which may be configured to perform global route interception on the connection request;
a first obtaining module 31, configured to obtain, from a configuration center, an online component identifier to which the connection request belongs;
a first routing module 32, configured to route the connection request to an online component corresponding to the online component identifier;
a second obtaining module 33, configured to enable the online component to obtain a sub-base identifier corresponding to the connection request from the configuration center;
a second routing module 34, configured to cause the online component to route the connection request to the financial database sub-base corresponding to the sub-base identifier.
In some embodiments of the present specification, the obtaining, from the configuration center, the online component identifier to which the connection request belongs may include:
inquiring an online component identifier to which a transaction type identifier carried by the connection request belongs from a configuration file of the configuration center; and the configuration file is configured with a mapping relation between the transaction type identifier and the online component.
In some embodiments of the present specification, enabling the online component to obtain the sublibrary identifier corresponding to the connection request from the configuration center may include:
enabling the online component to initiate a financial database sub-database distribution request carrying the connection request to the configuration center;
causing the online component to receive a sublibrary identification; the database partitioning identifier is a financial database partitioning identifier dynamically allocated by the configuration center according to the financial database partitioning allocation request.
In some embodiments of the present description, causing the online component to route the connection request to a financial database sublibrary corresponding to the sublibrary identifier includes:
and allocating a connection for the connection request from the database connection pool corresponding to the sub-library identification.
In some embodiments of the present description, the database connection pool may include a Druid component.
In some embodiments of the present description, the financial database sub-base may comprise a gaussian database.
In some embodiments of the present description, the online component identification is a SPU processor identification.
In some embodiments of the present description, the financial database connection processing apparatus may further include: and operating the execution module. Which may be used to invoke a Druid component to execute the sql statement that is banked against the financial database.
In some embodiments of the present description, the invoking the Druid component to execute the sql statement that is banked to the financial database may include:
calling an sql session factory class of a Mybatis framework to create an sql session object;
calling the sql session object to obtain a Mapper interface;
and executing the sql sentences for the banking of the financial database according to the Mapper interface.
In some embodiments of the present specification, the invoking the sql session object to obtain the Mapper interface may include:
calling the sql session object to confirm whether a Mapper interface of a target version exists under a specified path;
and if so, acquiring the Mapper interface of the target version.
In some embodiments of the present specification, the invoking the sql session object acquisition Mapper interface may further include:
and if the Mapper interface of the target version does not exist in the specified path, acquiring the original Mapper interface of the Mybatis framework.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functions of the various elements may be implemented in the same one or more software and/or hardware implementations of the present description.
Embodiments of the present description also provide a computer device. As shown in FIG. 4, in some embodiments of the present description, the computer device 402 may include one or more processors 404, such as one or more Central Processing Units (CPUs) or Graphics Processors (GPUs), each of which may implement one or more hardware threads. The computer device 402 may also comprise any memory 406 for storing any kind of information, such as code, settings, data, etc., and in a particular embodiment a computer program running on the memory 406 and on the processor 404, which computer program, when executed by the processor 404, may perform the instructions according to the above-described method. For example, and without limitation, memory 406 may include any one or more of the following in combination: any type of RAM, any type of ROM, flash memory devices, hard disks, optical disks, etc. More generally, any memory may use any technology to store information. Further, any memory may provide volatile or non-volatile retention of information. Further, any memory may represent fixed or removable components of computer device 402. In one case, when the processor 404 executes the associated instructions, which are stored in any memory or combination of memories, the computer device 402 can perform any of the operations of the associated instructions. The computer device 402 also includes one or more drive mechanisms 408, such as a hard disk drive mechanism, an optical disk drive mechanism, etc., for interacting with any memory.
Computer device 402 may also include an input/output module 410(I/O) for receiving various inputs (via input device 412) and for providing various outputs (via output device 414). One particular output mechanism may include a presentation device 416 and an associated graphical user interface 418 (GUI). In other embodiments, input/output module 410(I/O), input device 412, and output device 414 may also be excluded, as just one computer device in a network. Computer device 402 can also include one or more network interfaces 420 for exchanging data with other devices via one or more communication links 422. One or more communication buses 424 couple the above-described components together.
Communication link 422 may be implemented in any manner, such as over a local area network, a wide area network (e.g., the Internet), a point-to-point connection, etc., or any combination thereof. Communication link 422 may include any combination of hardwired links, wireless links, routers, gateway functions, name servers, etc., governed by any protocol or combination of protocols.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products of some embodiments of the specification. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processor to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processor, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processor to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processor to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computer device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, 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 disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium which can be used to store information that can be accessed by a computer device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
As will be appreciated by one skilled in the art, embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein.
The embodiments of this specification may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The described embodiments may also be practiced in distributed computing environments where tasks are performed by remote processors that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment. In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of an embodiment of the specification. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (15)

1. A financial database connection processing method is characterized by comprising the following steps:
performing global routing interception on the connection request;
acquiring an online component identifier to which the connection request belongs from a configuration center;
routing the connection request to an online component corresponding to the online component identifier;
enabling the online component to acquire a sub-library identifier corresponding to the connection request from the configuration center;
and enabling the online component to route the connection request to the financial database sub-base corresponding to the sub-base identification.
2. The financial database connection processing method according to claim 1, wherein said performing global route interception on the connection request includes:
and performing global routing interception on the connection request through a preset Spring interceptor.
3. The financial database connection processing method according to claim 1, wherein the obtaining the online component identifier to which the connection request belongs from the configuration center includes:
inquiring an online component identifier to which a transaction type identifier carried by the connection request belongs from a configuration file of the configuration center; and the configuration file is configured with a mapping relation between the transaction type identifier and the online component.
4. The method for processing connection of financial database according to claim 1, wherein enabling the online component to obtain the sub-repository identification corresponding to the connection request from the configuration center comprises:
enabling the online component to initiate a financial database sub-database distribution request carrying the connection request to the configuration center;
causing the online component to receive a sublibrary identification; the database partitioning identifier is a financial database partitioning identifier dynamically allocated by the configuration center according to the financial database partitioning allocation request.
5. The financial database connection processing method of claim 1, wherein causing the online component to route the connection request to a financial database sublibrary corresponding to the sublibrary identifier comprises:
and allocating a connection for the connection request from the database connection pool corresponding to the sub-library identification.
6. The financial database connection processing method of claim 5, wherein the database connection pool includes a Druid component.
7. The financial database connection processing method of claim 1, wherein the financial database sub-base comprises a gaussian database.
8. The financial database connection processing method as recited in claim 1, wherein said online component identifier is a SPU processor identifier.
9. The financial database connection processing method according to claim 1, wherein after causing the online component to route the connection request to the financial database vault corresponding to the vault identification, further comprising:
invoking a Druid component to execute the sql statement banked against the financial database.
10. The financial database connection processing method as claimed in claim 9, wherein said invoking the Druid component to execute the sql statement banked for the financial database comprises:
calling an sql session factory class of a Mybatis framework to create an sql session object;
calling the sql session object to obtain a Mapper interface;
and executing the sql sentences for the banking of the financial database according to the Mapper interface.
11. The financial database connection processing method of claim 10, wherein the invoking the sql session object to obtain the Mapper interface comprises:
calling the sql session object to confirm whether a Mapper interface of a target version exists under a specified path;
and if so, acquiring the Mapper interface of the target version.
12. The financial database connection processing method of claim 11, further comprising:
and if the Mapper interface of the target version does not exist in the specified path, acquiring the original Mapper interface of the Mybatis framework.
13. A financial database connection processing apparatus, comprising:
the request interception module is used for carrying out global routing interception on the connection request;
the first acquisition module is used for acquiring the online component identifier to which the connection request belongs from a configuration center;
the first routing module is used for routing the connection request to the online component corresponding to the online component identifier;
a second obtaining module, configured to enable the online component to obtain, from the configuration center, a sublibrary identifier corresponding to the connection request;
and the second routing module is used for enabling the online component to route the connection request to the sub-database of the financial database corresponding to the sub-database identification.
14. A computer device comprising a memory, a processor, and a computer program stored on the memory, wherein the computer program, when executed by the processor, performs the instructions of the method of any one of claims 1-12.
15. A computer storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor of a computer device, executes instructions of a method according to any one of claims 1-12.
CN202011492400.0A 2020-12-16 2020-12-16 Financial database connection processing method, device, equipment and storage medium Pending CN112597222A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011492400.0A CN112597222A (en) 2020-12-16 2020-12-16 Financial database connection processing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011492400.0A CN112597222A (en) 2020-12-16 2020-12-16 Financial database connection processing method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112597222A true CN112597222A (en) 2021-04-02

Family

ID=75196864

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011492400.0A Pending CN112597222A (en) 2020-12-16 2020-12-16 Financial database connection processing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112597222A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113127102A (en) * 2021-05-18 2021-07-16 中国农业银行股份有限公司 Method, device, equipment, storage medium and program for processing service data

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100132024A1 (en) * 2006-12-20 2010-05-27 Ron Ben-Natan Identifying attribute propagation for multi-tier processing
CN110222064A (en) * 2019-06-19 2019-09-10 北京字节跳动网络技术有限公司 Data processing method, device, electronic equipment and readable storage medium storing program for executing
CN110278284A (en) * 2019-07-10 2019-09-24 中国民航信息网络股份有限公司 A kind of service calling method and device
CN110324403A (en) * 2019-05-23 2019-10-11 平安科技(深圳)有限公司 Dynamic divides library method for routing, device, server and storage medium
CN110764700A (en) * 2019-10-12 2020-02-07 上海陆家嘴国际金融资产交易市场股份有限公司 Data storage method and device, computer equipment and storage medium
CN111949693A (en) * 2020-08-12 2020-11-17 北京锐安科技有限公司 Data processing device, data processing method, storage medium and electronic equipment
CN112052256A (en) * 2020-09-02 2020-12-08 平安资产管理有限责任公司 Multi-version request returning method and device, computer equipment and readable storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100132024A1 (en) * 2006-12-20 2010-05-27 Ron Ben-Natan Identifying attribute propagation for multi-tier processing
CN110324403A (en) * 2019-05-23 2019-10-11 平安科技(深圳)有限公司 Dynamic divides library method for routing, device, server and storage medium
CN110222064A (en) * 2019-06-19 2019-09-10 北京字节跳动网络技术有限公司 Data processing method, device, electronic equipment and readable storage medium storing program for executing
CN110278284A (en) * 2019-07-10 2019-09-24 中国民航信息网络股份有限公司 A kind of service calling method and device
CN110764700A (en) * 2019-10-12 2020-02-07 上海陆家嘴国际金融资产交易市场股份有限公司 Data storage method and device, computer equipment and storage medium
CN111949693A (en) * 2020-08-12 2020-11-17 北京锐安科技有限公司 Data processing device, data processing method, storage medium and electronic equipment
CN112052256A (en) * 2020-09-02 2020-12-08 平安资产管理有限责任公司 Multi-version request returning method and device, computer equipment and readable storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113127102A (en) * 2021-05-18 2021-07-16 中国农业银行股份有限公司 Method, device, equipment, storage medium and program for processing service data

Similar Documents

Publication Publication Date Title
US11340893B2 (en) Mobile application update preserving changes to the application made by a client
Petcu et al. Portable cloud applications—from theory to practice
TWI579769B (en) Virtual machine migration tool
US9672140B1 (en) Processing special requests at dedicated application containers
CN105094799A (en) Hybrid applications operating between on-premise and cloud platforms
US20220188170A1 (en) Multi-Tenant Control Plane Management on Computing Platform
US10318273B2 (en) Updating software components through online stores
CN109213568A (en) A kind of block chain network service platform and its dispositions method, storage medium
WO2022016848A1 (en) Method and apparatus for performing application deployment according to service role
US20130326487A1 (en) Emulating cloud functioning of applications locally
Martí et al. Dataclay: A distributed data store for effective inter-player data sharing
US10379914B2 (en) System and method for achieving specific behaviors by intercepting file access calls in a mainframe rehosting platform
US10785129B2 (en) Computerized methods and systems for maintaining and modifying cloud computer services
CN113220669B (en) Service data processing method and device and electronic equipment
US10725795B2 (en) Systems, methods, and apparatuses for dynamic creation of an external code segment within a cloud based computing environment
CN112596762A (en) Rolling upgrading method and device
KR20220103490A (en) Microservice development platform and deployment-execution method for power system
CN106484458B (en) Open type software warehouse management system and management method thereof
CN112597222A (en) Financial database connection processing method, device, equipment and storage medium
CN112463251A (en) Method and device for configuring hot publishing by uliweb framework
Orosz et al. Software as a Service operation model in cloud based ERP systems
US8683475B2 (en) Method and apparatus for grid enabling standard applications
CN115033290A (en) Instruction set-based micro-service splitting method and device and terminal equipment
CN113867776A (en) Method and device for publishing middle station application, electronic equipment and storage medium
US11907176B2 (en) Container-based virtualization for testing database system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination