Method and system for dynamically maintaining access of digital RMB operating mechanism
By dynamically injecting business processing classes and storing configuration information using databases, the automation problems of operational organization access and service management in digital RMB business are solved, and flexible management and efficient processing of operational organization interfaces are realized.
Patent Information
- Application Number
- CN202411432303.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-14
- Publication Date
- 2025-02-21
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the processing of existing digital RMB business, operating institutions that cannot be added or decreased at any time for cooperative banks are less automated, the service interface upgrade of operating institutions is cumbersome, and the access and service management of multiple operating institutions lacks uniformity and automation.
By grouping the business services of the operating organization by name, dynamically injecting the business processing class, and using the database to store business service configuration information, dynamic call and management of the operating organization interface is realized.
The operation institutions that automatically increase and decrease the access of cooperative banks at any time have not affected the services of other operating institutions, simplified the upgrade process of operating institutions' service interfaces, and improved the processing efficiency of digital RMB business.
Smart Images

Figure CN119494713A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of digital RMB business, and in particular, relates to a method and system for dynamically maintaining access to digital RMB operating institutions. Background Art
[0002] Nowadays, cooperative banks generally need to connect with multiple operating institutions at the same time. In the business scenario of digital RMB access, the release of new operating institutions cannot affect the services of the original operating institutions, and it is necessary to be able to dynamically call the interfaces of different operating institutions directly according to the names of the operating institutions. With the changes in the business of cooperative banks, the existing digital RMB business processing mainly has the following problems: (1) The operating institutions that cooperate with the bank cannot be increased or decreased at any time, or the process automation level is low; (2) Upgrading the service interface of the operating organization is cumbersome and there is no automated procedure to achieve this; (3) There is a lack of unified and more automated processing procedures for access and services provided by multiple operating organizations.
[0003] Therefore, we need to develop a method to dynamically maintain the access of digital RMB operating institutions, configure the business package information of the operating institutions in the database, dynamically read the configuration information from the database during the project operation period, and dynamically load the business implementation class of the operating institution according to the name of the operating institution. The business services of the operating institution can be dynamically injected and managed to improve the processing efficiency of digital RMB business. Summary of the invention
[0004] The purpose of the present invention is to provide a method and system for dynamically maintaining the access of digital RMB operating institutions, so as to solve the problems mentioned in the above background technology that the existing digital RMB business cannot increase or decrease the operating institutions connected to the cooperative banks at any time, and the degree of automated processing of the business of multiple operating institutions is low.
[0005] To achieve the above purpose, the present invention provides a method for dynamically maintaining access to digital RMB operating institutions, and the method is specifically as follows: The business services provided by the operating organizations are grouped by the system according to the names of the operating organizations, and different operating organizations implement the same business interface; When a business request reaches the channel business service, the channel business service dynamically injects the business service to obtain the business processing class; The business processing class may be obtained from a local cache according to the group name of the operator and the name of the business interface; Based on the business processing class, the business processing of the business request is completed.
[0006] Based on the above solution, if the business processing class cannot be obtained from the local cache, the database is called to query the configuration information of the business service in the database; The channel business service dynamically injects the business service through the configuration information queried from the database to complete the initialization of the business implementation class.
[0007] Based on the business implementation class, the business processing of the business request is completed.
[0008] Based on the above solution, after the business service is dynamically injected, the system will delay the release of the old business service.
[0009] Based on the above solution, the business interface is placed in the channel business public package, and the channel business service calls the business interface to complete business processing.
[0010] Based on the above solution, the configuration information of the business service in the database includes: service group name, interface full class name, interface implementation class full class name, and configuration information update time.
[0011] Based on the above solution, when a new operating institution is connected, a business implementation package of the new operating institution is developed to convert the institutional business interface of the new operating institution into the business interface defined by the cooperative bank.
[0012] Based on the above solution, the initialization of the business implementation class specifically includes: Define a tool class, which can obtain the business implementation class by passing the full class name of the interface and the service group name of the extension class; Acquire configuration information of the business service from the database; Obtaining configuration information of the business service from the local cache and comparing the service initialization time; If the service initialization time in the local cache is later than the service initialization time in the database, the business processing class in the local cache is returned to the channel business service.
[0013] Based on the above solution, the initialization of the business implementation class also includes: If the local cache does not contain the configuration information of the business service or the service initialization time in the local cache is earlier than the service initialization time in the database, the business implementation class is obtained from the database and returned to the channel business service.
[0014] Based on the above solution, after the business implementation class is initialized, other attributes that need to be injected are obtained, and the other attributes are injected into the business implementation class; the acquisition and injection of the other attributes are completed through the reflection mechanism.
[0015] In addition, the present invention also provides a system for dynamically maintaining access to digital RMB operating institutions, including: An operating organization grouping module is used to group the business services provided by the operating organizations according to the names of the operating organizations, and different operating organizations implement the same business interface; A dynamic injection module, when a business request reaches a channel business service, the channel business service performs dynamic injection of the business service to obtain a business processing class; The business processing module is used to obtain the business processing class from the local cache according to the group name of the operating organization and the name of the business interface, and complete the business processing of the business request based on the business processing class.
[0016] Based on the above solution, the dynamic injection module specifically includes: A configuration information acquisition unit, used to acquire the configuration information of the business service; A business processing class acquisition unit, used to acquire the business processing class from the local cache and return it to the channel business service; The business service class acquisition unit is used to obtain the business implementation class from the database and return it to the channel business service.
[0017] Compared with the prior art, the present invention has the following advantages and effects: (1) By dynamically injecting business services, obtaining the configuration information of business services from the database, and obtaining the corresponding business processing class to complete the business request, it is possible to automatically increase or decrease the operating institutions connected to the cooperative bank at any time without affecting the normal services and original businesses of other operating institutions; (2) When it is necessary to upgrade the service interface of the operating organization, there is no need to stop the service operation. The dynamic injection method in this solution can be used to adjust the service interface of the operating organization directly, which is relatively simple to handle; (3) For multiple operating institutions connected to the cooperative banks, channel business services are designed to manage the services of different operating institutions, so as to centrally manage the interfaces of different operating institutions, making the access and management of operating institutions more convenient, thereby significantly improving the processing efficiency of digital RMB business. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 It is a flow chart of a method for dynamically maintaining access to digital RMB operating institutions provided by an embodiment of the present invention; Figure 2 is a flow chart of a method for obtaining a business processing class provided by an embodiment of the present invention; Figure 3 is a flow chart of dynamic injection of business services provided by an embodiment of the present invention; Figure 4 It is a flow chart of a solution for obtaining a business implementation package of an operating organization provided in an embodiment of the present invention; Figure 5 It is a schematic diagram of the structure of the operating organization service implementation package provided by an embodiment of the present invention; Figure 6 This is a system structure diagram for dynamically maintaining access to digital RMB operating institutions provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0019] In order to more clearly explain the purpose, technical solutions and advantages of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. The example implementation methods can be implemented in various forms and should not be understood as being limited to the examples described herein. On the contrary, these implementation methods are provided to make the present invention more comprehensive and complete, and to fully convey the concepts of the example implementation methods to those skilled in the art.
[0020] In addition, the described features, structures or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present invention. However, those skilled in the art will appreciate that the technical solution of the present invention can be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known methods, devices, implementations or operations are not shown or described in detail to avoid blurring various aspects of the present invention.
[0021] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0022] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0023] The present invention is described in detail below in conjunction with specific embodiments: Example
[0024] Use the getExtension(Class clazz, String name) method provided by the ExtensionLoader class, pass in the interface name "Recharge.class" and the service group "icbc" to obtain the ICBC recharge implementation class "ICBCRecharge"; Use ICBC recharge implementation class "ICBCRecharge" to call the "recharge" method of the implementation class to complete the business processing; When ICBC's business has a new implementation class, for example, a new implementation class is "ICBCRecharge2", then there is no need to modify the caller's business code. You only need to modify the value of the field "interface_impl_name" in the database to "ICBCRecharge2" to dynamically inject new services during application runtime.
[0025] In this embodiment, a method for dynamically maintaining the access of digital RMB operating institutions is provided, in which the business services provided by the operating institutions are grouped according to the names of the operating institutions to ensure the standardization of service interfaces of different operating institutions; once a business request is received, the channel business service can dynamically obtain the optimal business processing class, thereby achieving rapid response to the request; by dynamically injecting business services, the business processing classes required for different service requests are obtained, and the processing classes are obtained from the local cache first to ensure system performance optimization; if the local cache lacks the latest information, updates are dynamically obtained from the database; after the new service is dynamically injected, the old service will be delayed in release to ensure stability during service switching, and all business interfaces are uniformly placed in a public package for easy calling and management, which can better realize the increase, decrease, upgrade, and adjustment of services of the operating institutions accessed by the cooperative banks at any time, thereby enhancing the flexibility and efficiency of the access of digital RMB operating institutions. Example
[0026] As attached Figure 4 As shown, an embodiment of the present invention provides a solution for obtaining a service implementation package of an operating organization, which includes: Get the business implementation package based on the configuration information, and call the specific implementation class based on the business grouping to complete the business.
[0027] It should be noted that when a cooperative bank has a new operating institution, it is necessary to develop a business implementation package for the operating institution. The main function of the business implementation package is to convert the business interface of the operating institution into the business interface defined by the cooperative bank, so that the business of the operating institution can run smoothly in the digital RMB service of the cooperative bank.
[0028] Specifically, as attached Figure 5The structure diagram of the operating agency service implementation package 500 is shown, including the following parts: Interface conversion module 501: responsible for converting the business interface of the operating institution into the business interface defined by the cooperative bank, ensuring that the business data of the operating institution can be correctly transferred to the cooperative bank system; Business logic adaptation module 502: responsible for adapting the business logic of the operating institution to the business logic of the cooperative bank. Since the business processes and rules of different operating institutions may be different, this module needs to be adjusted and adapted accordingly according to the requirements of the cooperative bank to ensure that the business of the operating institution can be correctly executed in the cooperative bank system; Data processing module 503: responsible for processing and converting the data provided by the operating institution to meet the requirements of the cooperative bank on data format and processing method; Error handling and exception management module 504: responsible for handling errors and exceptions that may occur during interface conversion and business logic adaptation. It needs to provide corresponding error handling mechanisms, including error logging, error prompts and exception handling, to ensure the stability and reliability of the system; By developing the business implementation package for operating institutions, cooperative banks can quickly and efficiently connect new operating institutions to their own systems to expand and improve their businesses. At the same time, the business implementation package can also provide flexible adaptation capabilities to cope with the business needs of different operating institutions and the changes in the requirements of cooperative banks, ensuring that there are no errors in business processing when the digital RMB service is dynamically injected later.
[0029] Preferably, after developing the business implementation package of the operating organization, the business implementation package of the operating organization is automatically uploaded and configured, as follows: After the business implementation package of the operating organization is built into a complete JAR package, Jenkins is used to automatically upload and configure the business implementation package of the operating organization to avoid the impact on the business caused by manual uploading and configuration errors, including: 1. Upload the JAR package through Jenkins: a) Obtain the IP and port information of all servers that deploy the digital RMB service through Jenkins configuration; b) Use the SSH command to push the JAR package to the specified directory in all digital RMB servers, such as / opt / extend. When pushing, you need to add a random suffix name to the JAR package to avoid the JAR package being overwritten when pushing multiple times; 2. Get configuration information through Maven: a) Obtain the Maven configuration information in the current JAR package in Jenkin. The fields obtained are service grouping information and business interface implementation class information; b) Obtain the name of the business interface implemented by the current business implementation class through the business interface implementation class information; 3. Push configuration information to the database: a) Use Jenkins to connect to the database; b) Assembling a database insertion script based on the data obtained in the above steps, where the update time is set to the current time; c) Execute the database insert script.
[0030] Specifically, assuming that the operating institution currently accessed by the cooperative bank is Industrial and Commercial Bank of China, and the cooperative bank defines its group as icbc, the specific configuration example is as follows: Preferably, when releasing a new operating agency business implementation package, it is taken into consideration that the old operating agency business implementation package may still be providing business services and cannot be deactivated immediately. In order to avoid affecting the operation of business services, the present invention proposes to intelligently delay the release of the old business implementation package according to the current business processing status. In this way, new business requests can be seamlessly switched to the new business implementation package for processing, while the old business implementation package will continue to process business requests before the new package is released. The old business implementation package will not be safely released until all business requests that were in progress when the old business implementation package was released are properly processed. This mechanism ensures business continuity and stability, avoids service interruptions, and improves user experience. The specific steps are as follows: 1. Business request tag: a) Mark all business requests before the new business implementation package is released, that is, each time a business is called, the business service package will accumulate the value of the data with the key "BUSINESS_HANDLER_Business Implementation Package Version Number" in the local cache. When the call is completed, the value recorded in the local cache with the key "BUSINESS_HANDLER_Business Implementation Package Version Number" will be reduced by one amount until it reaches 0; b) The business implementation package version number in the above steps is obtained from the Maven description file of the business implementation package; c) Based on the above mark, when the old business implementation package has no business processing, the value of the key "BUSINESS_HANDLER_Business Implementation Package Version Number" in the local cache is 0; 2. The old business implementation package no longer accepts new requests: a) After the new business implementation package is released, the old business implementation package will no longer process new requests because the business service has been replaced; b) New service requests are processed by the new service implementation package, while service requests that have been processed by the old service implementation package continue to be processed by the old service implementation package; c) Continuously check whether all marked business requests have been processed; d) The detection logic is: accumulate all the data in the local cache with the key "BUSINESS_HANDLER_Business Implementation Package Version Number", exclude the record data of the current business implementation package version number, if the data is 0, it means that the old version of the business implementation package has no business processing, that is, enter the old business implementation package release process; 3. Old business implementation package release process: a) Ensure that all old business requests are processed and release the resources occupied by the old business implementation package; b) Delete all data in the local cache with the record key "BUSINESS_HANDLER_Business Implementation Package Version Number".
[0031] Embodiment 3: As attached Figure 6 As shown, the embodiment of the present invention provides a system 600 for dynamically maintaining the access of digital RMB operating institutions to support the implementation of the methods in Example 1 and Example 2, as follows: An operating organization grouping module 601 is used to group the business services provided by the operating organizations according to the names of the operating organizations, and different operating organizations implement the same business interface; Dynamic injection module 602, when a business request arrives at a channel business service, the channel business service performs dynamic injection of the business service to obtain a business processing class; The business processing module 603 is used to obtain a business processing class from the local cache according to the group name of the operating organization and the name of the business interface, and complete the business processing of the business request based on the business processing class.
[0032] Based on the above solution, the dynamic injection module 602 specifically includes: The configuration information acquisition unit 6021 is used to acquire the configuration information of the business service; The business processing class acquisition unit 6022 is used to acquire the business processing class from the local cache and return it to the channel business service; The business service class acquisition unit 6023 is used to acquire the business implementation class from the database and return it to the channel business service.
[0033] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any modification, use or adaptation of the present invention, which follows the general principles of the present invention and includes common knowledge or customary techniques in the art that are not disclosed by the present invention. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present invention are indicated by the claims. It should be understood that the present invention is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. A method for dynamically maintaining access to digital RMB operating institutions, characterized in that: include: The business services provided by the operating organizations are grouped by the system according to the names of the operating organizations, and different operating organizations implement the same business interface; When a business request reaches the channel business service, the channel business service dynamically injects the business service to obtain the business processing class; The business processing class may be obtained from a local cache according to the group name of the operator and the name of the business interface; Based on the business processing class, the business processing of the business request is completed.
2. A method for dynamically maintaining access to digital RMB operating institutions according to claim 1, characterized in that: If the business processing class cannot be obtained from the local cache, calling the database to query the configuration information of the business service in the database; The channel business service dynamically injects the business service through the configuration information queried from the database to complete the initialization of the business implementation class; Based on the business implementation class, the business processing of the business request is completed.
3. A method for dynamically maintaining access to digital RMB operating institutions according to claim 1, characterized in that: After the business service is dynamically injected, the system will delay the release of the old business service.
4. A method for dynamically maintaining access to digital RMB operating institutions according to claim 1, characterized in that: The business interface is placed in the channel business public package, and the channel business service calls the business interface to complete business processing.
5. A method for dynamically maintaining access to digital RMB operating institutions according to claim 2, characterized in that: The configuration information of the business service in the database includes: service group name, interface full class name, interface implementation class full class name, and configuration information update time.
6. A method for dynamically maintaining access to digital RMB operating institutions according to claim 1, characterized in that: When a new operating institution is connected, a business implementation package of the new operating institution is developed to convert the institutional business interface of the new operating institution into the business interface defined by the cooperative bank.
7. A method for dynamically maintaining access to digital RMB operating institutions according to claim 5, characterized in that: The initialization of the business implementation class specifically includes: Define a tool class, which can obtain the business implementation class by passing the full class name of the interface and the service group name of the extension class; Acquire configuration information of the business service from the database; Obtaining configuration information of the business service from the local cache and comparing the service initialization time; If the service initialization time in the local cache is later than the service initialization time in the database, returning the business processing class in the local cache to the channel business service; If the local cache does not contain the configuration information of the business service or the service initialization time in the local cache is earlier than the service initialization time in the database, the business implementation class is obtained from the database and returned to the channel business service.
8. A method for dynamically maintaining access to digital RMB operating institutions according to claim 7, characterized in that: After the business implementation class is initialized, other attributes that need to be injected are obtained, and the other attributes are injected into the business implementation class; The acquisition and injection of the other properties are completed through the reflection mechanism.
9. A system for dynamically maintaining access to digital RMB operating institutions, characterized in that: include: An operating organization grouping module is used to group the business services provided by the operating organizations according to the names of the operating organizations, and different operating organizations implement the same business interface; A dynamic injection module, when a business request reaches a channel business service, the channel business service performs dynamic injection of the business service to obtain a business processing class; The business processing module is used to obtain the business processing class from the local cache according to the group name of the operating organization and the name of the business interface, and complete the business processing of the business request based on the business processing class.
10. A system for dynamically maintaining access to digital RMB operating institutions according to claim 9, characterized in that: The dynamic injection module specifically includes: A configuration information acquisition unit, used to acquire the configuration information of the business service; A business processing class acquisition unit, used to acquire the business processing class from the local cache and return it to the channel business service; The business service class acquisition unit is used to obtain the business implementation class from the database and return it to the channel business service.
Citation Information
Patent Citations
Business processing method and device based on rule engine
CN108920222A
System for quickly accessing digital RMB business
CN115423608A
Digital currency transaction management method, system, medium and equipment
CN116843458A
Method for dynamically exchange for busineses on intellectural network
CN1226772A