Business Processing System and Method Based on In-Memory Database

By seamlessly switching and upgrading the in-memory database and automating the scheduling, the problem of service interruption for new version releases was solved, the high availability and stability of the in-memory database were improved, and operational efficiency and user experience were enhanced.

CN118820332BActive Publication Date: 2025-10-31CHINA MOBILE GROUP ZHEJIANG +3
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311140417.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-05
Publication Date
2025-10-31
Estimated Expiration
2043-09-05

AI Technical Summary

Technical Problem

When a new version of a service is released, the in-memory database cannot be hot-upgraded, resulting in long service interruptions, impacting service performance and user experience, and the operation is complex and uncontrollable.

Method used

The business processing system based on an in-memory database is adopted, including a service adaptation module, a communication protocol layer, a data adaptation module, and a release control module, to achieve seamless switching and upgrading of the in-memory database and automated scheduling of primary and backup databases, ensuring uninterrupted business operations.

Benefits of technology

It achieves high availability and stability for in-memory databases, shortens deployment time, improves operational efficiency and user experience, and reduces the risk of business interruption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118820332B_ABST
    Figure CN118820332B_ABST
Patent Text Reader

Abstract

This application relates to the field of computer science and provides a business processing system and method based on an in-memory database. The system includes: a service adaptation module, used to transmit the release data packet of the target business to the communication protocol layer according to the interface corresponding to the release version of the target business; a communication protocol layer, used to transmit the release data packet to the data adaptation module according to the communication protocol corresponding to the release version; a data adaptation module, used to determine the database mirror pair corresponding to the target business in the data management library according to the release version; a release control module, used to perform hot upgrades on the primary and backup in-memory data in the database mirror pair according to the release data packet; and a data management library, used to automatically connect to the corresponding in-memory database to process the target business requests based on the primary / backup upgrade status and data backup status. The business processing system provided by this application can improve the high availability and stability of the in-memory database.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, specifically to a business processing system and method based on an in-memory database. Background Technology

[0002] In the current IT (Information Technology) system support field, when a new version of a service is released and launched, the in-memory database cannot be hot-upgraded. Therefore, the launch requirements involving modifications to the in-memory database need to be carried out in the following order: "Stop the service application -> Export in-memory database data -> Stop the in-memory database -> Upgrade the in-memory database -> Start the in-memory database -> Import in-memory database data -> Start the service application".

[0003] Using the above method for business deployment results in in-memory database outages lasting up to several hours during the deployment period. This leads to prolonged business service interruptions, poor controllability, an inability to provide stable services to users, and negatively impacts the service performance of the in-memory database. Summary of the Invention

[0004] This application provides a business processing system and method based on an in-memory database to solve the technical problem that business deployment requires starting and stopping equipment, causing business interruption and affecting the service performance of the in-memory database.

[0005] In a first aspect, embodiments of this application provide a business processing system based on an in-memory database, including a service adaptation module, a communication protocol layer, a data adaptation module, a data management library, and a publishing control module;

[0006] The service adaptation module is used to transmit the release data packet of the target service to the communication protocol layer according to the interface corresponding to the release version of the target service.

[0007] The communication protocol layer is used to transmit the release data packet to the data adaptation module according to the communication protocol corresponding to the release version;

[0008] The data adaptation module is used to determine the database mirror pair corresponding to the target business in the data management library according to the release version; the database mirror pair includes a first main memory database and a first backup memory database.

[0009] The publishing control module is used to upgrade the first backup memory database according to the publishing data packet, and synchronize the data of the first main memory database to the upgraded first backup memory database. When the upgraded first backup memory database completes data synchronization, the upgraded first backup memory database is switched to the second main memory database, the first main memory database is switched to the second backup memory database, the second backup memory database is upgraded according to the publishing data packet, and the data of the second main memory database is synchronized to the upgraded second backup memory database.

[0010] The data management library is used to process the target service request of the target service according to the second main memory database when the upgrade step and / or the data synchronization step are performed in the second backup memory database, and to process the target service request according to the upgraded second backup memory database when the upgrade and data synchronization steps are completed in the second backup memory database; the target service request includes the service request corresponding to the released version and / or the service request corresponding to the historical version of the target service.

[0011] In some embodiments, the publishing control module is specifically used for:

[0012] Based on the release data packet, determine at least one of the following: business application configuration, data management library configuration, application process configuration, release content configuration, and scheduling strategy configuration corresponding to the release version;

[0013] The upgrade process corresponding to the database mirror pair is determined based on at least one of the business application configuration, the data management library configuration, the application process configuration, the published content configuration, and the scheduling strategy configuration.

[0014] According to the upgrade process, the first backup memory database and the second backup memory database are upgraded.

[0015] In some embodiments, the upgrade includes adding data tables and / or updating the business database;

[0016] The updated business library includes adding business logic corresponding to the released version.

[0017] In some embodiments, the communication protocol layer includes a parameter data structure language module and a database access plugin;

[0018] The parameter data structure language module is used to provide interface data models for multiple versions of control protocols;

[0019] The database access plugin is configured to determine a first interface data model in the interface data model of the control protocol of the multiple versions according to the release version, and serialize and generate the communication protocol corresponding to the release version according to the first interface data model; and / or, determine a second interface data model in the interface data model of the control protocol of the multiple versions according to the historical version, and serialize and generate the communication protocol corresponding to the historical version according to the second interface data model.

[0020] In some embodiments, the database access plugin is further configured to:

[0021] Upon receiving the target response information of the target service request transmitted by the data management library, it is determined whether the first service version is consistent with the second service version; the first service version is the service version corresponding to the communication protocol of the target response information, and the second service version is the service version corresponding to the communication protocol of the target service request;

[0022] In the case where the first service version and the second service version are inconsistent, the communication protocol corresponding to the second service version is generated by deserializing the communication protocol of the target response information.

[0023] According to the communication protocol corresponding to the second service version, the target response information is returned to the client corresponding to the target service request through the interface corresponding to the second service version.

[0024] In some embodiments, the data management library is further configured to:

[0025] When the upgrade step and / or the data synchronization step are performed in the first backup memory database, the business requests corresponding to the historical version are processed based on the first main memory database.

[0026] Secondly, embodiments of this application provide a business processing method based on an in-memory database, applied to the in-memory database-based business processing system as described in any of the above claims, the method comprising:

[0027] Based on the service adaptation module, the release data packet of the target service is transmitted to the communication protocol layer according to the interface corresponding to the release version of the target service;

[0028] Based on the communication protocol layer, the release data packet is transmitted to the data adaptation module according to the communication protocol corresponding to the release version;

[0029] Based on the data adaptation module, according to the release version, the database mirror pair corresponding to the target business is determined in the data management library; the database mirror pair includes a first main memory database and a first backup memory database;

[0030] Based on the release control module, the first backup memory database is upgraded according to the release data packet, and the data of the first main memory database is synchronized to the upgraded first backup memory database. When the upgraded first backup memory database completes data synchronization, the upgraded first backup memory database is switched to the second main memory database, the first main memory database is switched to the second backup memory database, the second backup memory database is upgraded according to the release data packet, and the data of the second main memory database is synchronized to the upgraded second backup memory database.

[0031] Based on the data management library, when the upgrade step and / or the data synchronization step are performed in the second backup memory database, the target service request of the target service is processed according to the second main memory database. When the upgrade and data synchronization steps are completed in the second backup memory database, the target service request is processed according to the upgraded second backup memory database. The target service request includes the service request corresponding to the released version and / or the service request corresponding to the historical version of the target service.

[0032] In some embodiments, upgrading the first backup in-memory database based on the release control module according to the release data packet includes:

[0033] Based on the release control module, and according to the release data packet, at least one of the following is determined: the business application configuration, data management library configuration, application process configuration, release content configuration, and scheduling strategy configuration corresponding to the release version; based on at least one of the following: the business application configuration, the data management library configuration, the application process configuration, the release content configuration, and the scheduling strategy configuration, the upgrade process corresponding to the database mirror pair is determined; and according to the upgrade process, the first backup memory database and the second backup memory database are upgraded.

[0034] In some embodiments, the method further includes:

[0035] Based on the communication protocol layer, according to the release version, a first interface data model is determined from the interface data models of multiple versions of the control protocol, and the communication protocol corresponding to the release version is generated by serialization according to the first interface data model.

[0036] And / or, based on the historical version, determine a second interface data model in the interface data model of the control protocol of the multiple versions, and serialize and generate the communication protocol corresponding to the historical version based on the second interface data model.

[0037] Thirdly, embodiments of this application provide an electronic device, including a memory and a processor;

[0038] Memory, used to store computer programs;

[0039] A processor for executing the computer program to implement the steps of the business processing method based on a memory database as described in the second aspect.

[0040] Fourthly, embodiments of this application provide an electronic device, including a processor and a memory storing a computer program, wherein the processor executes the program to implement the steps of the business processing method based on a memory database as described in the second aspect.

[0041] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the steps of the business processing method based on a memory database as described in the second aspect.

[0042] The business processing system and method based on in-memory database provided in this application embodiment can transmit the release data packet to the communication protocol layer according to the interface corresponding to the release version of the target business through the service adaptation module. The communication protocol layer can transmit the release data packet to the data adaptation module according to the communication protocol corresponding to the release version. The data adaptation module can determine the database mirror pair corresponding to the target business in the data management library. The release control module can automatically perform seamless switching and upgrading of the in-memory database according to the release data packet. During the seamless switching and upgrading of the in-memory database, the data management library can automatically switch the client to the corresponding in-memory database according to the primary and backup status, thereby realizing uninterrupted business that depends on the in-memory database and improving the high availability and stability of the in-memory database. Attached Figure Description

[0043] To more clearly illustrate the technical solutions in this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0044] Figure 1 This is one of the structural diagrams of a business processing system based on an in-memory database provided in the embodiments of this application;

[0045] Figure 2 This is one of the schematic diagrams of the database upgrade and switching process provided in the embodiments of this application;

[0046] Figure 3 This is the second schematic diagram of the database upgrade and switching process provided in the embodiments of this application;

[0047] Figure 4 This is a schematic diagram illustrating the functional structure of the release control module provided in an embodiment of this application;

[0048] Figure 5 This is the second schematic diagram of the structure of the business processing system based on the in-memory database provided in the embodiments of this application;

[0049] Figure 6 This is a flowchart illustrating the business processing method based on an in-memory database provided in an embodiment of this application;

[0050] Figure 7 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0051] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0052] In the current IT system support field, when a new version of a service is released and launched, the in-memory database cannot be hot-upgraded. Therefore, the launch requirements involving modifications to the in-memory database need to be carried out in the following order: "Stop the service application -> Export the in-memory database data -> Stop the in-memory database -> Upgrade the in-memory database -> Start the in-memory database -> Import the in-memory database data -> Start the service application".

[0053] This method has the following drawbacks: First, the business interruption during the upgrade of the in-memory database lasts for several hours. During the interruption, customers cannot perform business transactions or inquiries, which greatly affects the customer experience. Second, the business service interruption can last for several hours. If the online verification fails, the rollback requires all business applications to be restarted and stopped again. The time window is insufficient, the business service interruption time is longer and uncontrollable, and the risk is very high. It cannot provide users with stable services and affects the service performance of the in-memory database.

[0054] In summary, current IT support systems require a full start-up and shutdown of all applications and the in-memory database when deploying applications involving in-memory databases. This operation is complex and results in long business interruptions.

[0055] To address the aforementioned issues, this system proposes a business processing system that supports uninterrupted external business services during business application code updates. By adding a service adaptation module for compatibility between the in-memory database and business applications, a new inter-layer communication protocol layer, and a data adaptation module, it enables hot upgrades and seamless master-slave database switching when deploying applications based on the in-memory database. The application deployment process is completed through automated system scheduling, ensuring uninterrupted external business services, significantly reducing deployment time, improving operational efficiency, providing stable services to users, and enhancing the service performance of the in-memory database.

[0056] The following is based on Figure 1-5 The present application provides a description of a business processing system based on an in-memory database.

[0057] Figure 1 This is one of the structural diagrams of a business processing system based on an in-memory database provided in an embodiment of this application. For example... Figure 1 As shown, the system includes a service adaptation module 101, a communication protocol layer 102, a data adaptation module 103, a data management library, and a release control module 104. Through the cooperation of the service adaptation module 101, the communication protocol layer 102, the data adaptation module 103, the data management library, and the release control module 104, the system can achieve automated release of external business services without interruption when the application code is updated (i.e., the business version is updated).

[0058] The service adaptation module 101 is located in the service layer; the upper layer of the service layer is the interaction layer, and the lower layer of the service layer is the communication protocol layer 102; the interaction layer consists of various business systems that need to access and use the in-memory database service. The service layer includes multiple business services and the service adaptation module 101. Business systems call various business services and interact with the communication protocol layer 102 through the service adaptation module 101.

[0059] The service adaptation module 101 can perform capability convergence and adaptation for client services, and support the parallel operation of new and old versions of the same business client. During program initialization, it obtains all interface versions of the corresponding server through the communication protocol layer, and compares them with the interface version of the local client to realize the interaction of call information.

[0060] Specifically, during client initialization, it interacts with the in-memory database server through the communication protocol layer to obtain all interface version information provided by the server. Then, the client compares and determines the obtained server interface versions with its local client interface versions. Through this comparison, the client can determine which interface version to use for exchanging call information with the server. In this way, even if the client's interface version and the server's interface version do not perfectly match, the correct transmission of call information is guaranteed.

[0061] The implementation of service adaptation module 101 can be designed according to specific requirements and technology selection. A common approach is to use the adapter pattern to adapt different versions of the server interface to a unified interface form, thereby achieving seamless connection between the client and different server interface versions.

[0062] The communication protocol layer 102 is used for message interaction and protocol control between the service adaptation module 101 and the protocol adaptation module. Specifically, it can support functions such as multi-version protocol control, transport stream control, and SDL (Simple DirectMedia Layer, an open-source cross-platform multimedia development library) data structure compatibility.

[0063] The lower layer of the communication protocol layer 102 includes a data layer; this data layer interacts with the communication protocol layer 102 through a protocol adaptation module to provide in-memory database services to external systems (i.e., business systems or clients). This data layer includes at least a data adaptation module 103 and a data management library.

[0064] The data adaptation module 103 adapts to external systems accessing the in-memory database. It interfaces with the communication protocol layer 102 at the top and the data management library at the bottom, supporting the matching of accurate in-memory database server instances in the data management library for business instances of different versions, scenarios, and applications. It also provides the ability to add tables to the in-memory database in advance without stopping it, and supports automatic connection to the in-memory database server instance.

[0065] The data management library includes a business library and a basic library. The business library consists of database mirror pairs composed of multiple sets of primary and backup in-memory databases, which are used to implement business request processing. The basic library is used for basic management, including but not limited to basic data management, index management, performance statistics tool management, in-memory database lock management, operation and maintenance toolset management, high availability management, and development toolkit management. This embodiment does not specifically limit these aspects.

[0066] In addition, the data management library may also include a disk database, which is used for storing business data and providing a platform management library for business processing systems.

[0067] The release control module 104 can provide management such as automated release and policy configuration to realize the automated scheduling capability when releasing in-memory databases.

[0068] The service adaptation module 101 is used to transmit the release data packet of the target service to the communication protocol layer 102 according to the interface corresponding to the release version of the target service.

[0069] The communication protocol layer 102 is used to transmit the release data packet to the data adaptation module 103 according to the communication protocol corresponding to the release version.

[0070] The data adaptation module 103 is used to determine the database mirror pair corresponding to the target service in the data management library according to the release version; the database mirror pair includes a first main memory database and a first backup memory database.

[0071] The publishing control module 104 is used to upgrade the first backup memory database according to the publishing data packet, and synchronize the data of the first main memory database to the upgraded first backup memory database. When the upgraded first backup memory database completes data synchronization, the upgraded first backup memory database is switched to the second main memory database, the first main memory database is switched to the second backup memory database, the second backup memory database is upgraded according to the publishing data packet, and the data of the second main memory database is synchronized to the upgraded second backup memory database.

[0072] The data management library is used to process the target service request of the target service according to the second main memory database when the upgrade step and / or the data synchronization step are performed in the second backup memory database, and to process the target service request according to the upgraded second backup memory database when the upgrade and data synchronization steps are completed in the second backup memory database; the target service request includes the service request corresponding to the released version and / or the service request corresponding to the historical version of the target service.

[0073] Optionally, when publishing a target service, the publishing control module 104 needs to update the service adaptation module 101 in advance according to the scheduling update strategy corresponding to the publishing version, so as to provide an interface compatible with multiple service versions. Further, when the service adaptation module 101 receives the publishing data packet of the target service from the upper-layer business system, it can determine the interface corresponding to the publishing version of the target service among the interfaces of multiple service versions, so as to transmit the publishing data packet of the target service to the communication protocol layer 102 through the interface corresponding to the publishing version. The interface can be a unified interface compatible with both the publishing version and other publishing versions, or an independent interface compatible only with the publishing version. This embodiment does not specifically limit this.

[0074] The communication protocol layer 102, upon receiving the release data packet, generates in real time the communication protocol corresponding to the release version of the target service. Alternatively, it can determine the communication protocol corresponding to the release version of the target service from among multiple communication protocols, so that the release data packet can be transmitted to the data adaptation module 103 through the communication protocol corresponding to the release version of the target service.

[0075] Upon receiving the release data packet, the data adaptation module 103 automatically matches and connects to the database mirror pair corresponding to the target business in the data management library according to the release version.

[0076] The release control module 104 can call the corresponding release strategy configuration information according to the release data packet to generate the upgrade process corresponding to the database mirror pair, and then seamlessly switch and upgrade the in-memory database in the database mirror pair according to the upgrade process corresponding to the database mirror pair.

[0077] like Figure 2 and Figure 3 As shown, during the seamless switchover and upgrade of the in-memory database, the standby in-memory database is stopped and started for upgrade first; after the standby in-memory database upgrade is completed, the primary in-memory database is upgraded. The specific steps are as follows:

[0078] First, stop the service of the first backup in-memory database, that is, stop accessing and writing to the in-memory database to ensure data consistency.

[0079] Next, the first backup in-memory database was upgraded according to the upgrade process.

[0080] In some embodiments, the upgrade includes adding data tables and / or updating the business database;

[0081] The updated business library includes adding business logic corresponding to the released version.

[0082] Optionally, the upgrade includes adding business logic corresponding to the release version to the business interface, and / or adding a new data table structure corresponding to the release version, including table name, fields, data types, constraints, etc., to realize the management and processing of business data corresponding to the release version.

[0083] Next, after the first backup in-memory database upgrade is complete, the data in the first main in-memory database is synchronized to the upgraded first backup in-memory database to ensure data consistency between the old and new in-memory databases. This data synchronization can be implemented based on REDO transaction synchronization.

[0084] In some embodiments, the data management library is also used for:

[0085] When the upgrade step and / or the data synchronization step are performed in the first backup memory database, the business requests corresponding to the historical version are processed based on the first main memory database.

[0086] Optionally, during the upgrade and data synchronization of the first backup memory database, if a service request corresponding to a historical version of the target service is received via the service adaptation module 101, the communication protocol layer 102, and the data adaptation module 103, the first main memory database processes the service request corresponding to the historical version of the target service (i.e., the old version before the released version).

[0087] Next, after the upgraded first backup memory database completes data synchronization, the upgraded first backup memory database is switched to the second primary memory database, the first primary memory database is switched to the second backup memory database, and the second primary memory database service is started so that it can accept business processing requests corresponding to historical versions or release versions. That is, during the second backup memory database image upgrade and data synchronization, the second primary memory database processes business requests corresponding to release versions and / or business requests corresponding to historical versions.

[0088] Synchronize and stop the second backup in-memory database service. Upgrade the second backup in-memory database according to the upgrade process. The upgrade includes adding business logic corresponding to the release version to the business interface and / or adding a new data table structure corresponding to the release version.

[0089] Next, after the second backup memory database is upgraded, the data of the second primary memory database is synchronized to the upgraded second backup memory database to ensure data consistency between the primary and backup memory databases. Once the upgraded second backup memory database has completed data synchronization, service switching can be performed to switch the upgraded second backup memory database back to the primary memory database to provide database services and process business requests corresponding to the released version and / or historical versions; and switch the second primary memory database back to the backup memory database to provide redundant backup for the primary memory database.

[0090] In summary, IT support systems require in-memory databases in many business domains with high real-time and high concurrency requirements. When applications involving in-memory databases are deployed in these business domains, the business processing system provided in this application allows for seamless switching and upgrades of the in-memory database during the target business deployment process. This is achieved through the collaboration of the service adaptation module 101, communication protocol layer 102, data adaptation module 103, data management library, and deployment control module 104, following the process of "stop old backup upgrade -> synchronize old master with new backup -> master-slave switch -> start new backup -> stop old master upgrade -> start old master -> master-slave synchronization -> stop new backup and let the original master take over -> start original master." Throughout the entire switching and upgrade process, clients are automatically switched to the corresponding in-memory database based on the master-slave status. This ensures uninterrupted business operations that rely on the in-memory database, improves the high availability and stability of the in-memory database, significantly reduces the maintenance manpower required for deployment operations, and solves the problem of prolonged unavailability of business processing and queries during deployment, reducing user complaints and improving user experience.

[0091] The so-called old backup is the first backup memory database, the so-called old master is the first master memory database, the so-called new backup is the second master memory data block, and the so-called original master is the upgraded second backup memory data block (that is, the upgraded old master).

[0092] The business processing system based on an in-memory database provided in this embodiment can have the following features: the service adaptation module can transmit the release data packet to the communication protocol layer according to the interface corresponding to the release version of the target business; the communication protocol layer can transmit the release data packet to the data adaptation module according to the communication protocol corresponding to the release version; the data adaptation module can determine the database mirror pair corresponding to the target business in the data management library; the release control module can automatically perform seamless switching and upgrading of the in-memory database according to the release data packet; and the data management library can automatically switch the client to the corresponding in-memory database according to the primary / backup status during the seamless switching and upgrading process of the in-memory database, thereby ensuring uninterrupted business that depends on the in-memory database and improving the high availability and stability of the in-memory database.

[0093] In some embodiments, the publishing control module 104 is specifically used for:

[0094] Based on the release data packet, determine at least one of the following: business application configuration, data management library configuration, application process configuration, release content configuration, and scheduling strategy configuration corresponding to the release version;

[0095] The upgrade process corresponding to the database mirror pair is determined based on at least one of the business application configuration, the data management library configuration, the application process configuration, the published content configuration, and the scheduling strategy configuration.

[0096] According to the upgrade process, the first backup memory database and the second backup memory database are upgraded.

[0097] like Figure 4 As shown, the publishing control module 104 has built-in a variety of configuration information available for scheduling, including but not limited to at least one of the following: business application configuration, data management library configuration, application process configuration, published content configuration, and scheduling strategy configuration.

[0098] Among them, the business application configuration is used to provide the process configuration of business applications, as well as the configuration of various application interfaces and services based on in-memory databases.

[0099] The data management library configuration provides common and general configurations to support the system. The data management library configuration includes data management library enumeration configuration, data management library parameter configuration, general data management library configuration, in-memory database configuration, and disk database configuration.

[0100] Application process configuration provides orchestration configuration for publishing tasks. When a publishing task is executed, the business process is automatically executed in the orchestration order. Application process configuration includes start process configuration, stop process configuration, restart process configuration, and refresh cache configuration.

[0101] Content configuration allows you to manage the configuration of content required for business deployment and launch, and can upload content configurations for deployment items such as database scripts, images, and software packages.

[0102] The scheduling strategy configuration provides orchestration configuration for the application release process, management of process start and stop during application release, and management of exception logs during the release process.

[0103] Optionally, the release control module 104 upgrades the first backup memory database and the second backup memory database using the following steps:

[0104] When the target service release version is launched, the system reads the corresponding business application configuration, data management database configuration, application process configuration, release content configuration, and scheduling strategy configuration based on the release data package. This allows the system to orchestrate the previously manual planning and execution of the launch steps into an automated upgrade process. Based on this upgrade process, the system automatically upgrades the first and second backup in-memory databases. Furthermore, it provides configurable and automated scheduling capabilities for the release process based on application and scheduling strategy configurations, simplifying the operational complexity for maintenance personnel. The launch process becomes visible and controllable, mitigating the inefficiencies, error-proneness, and high maintenance costs associated with manually executing release and launch procedures.

[0105] In some embodiments, the communication protocol layer 102 includes a parameter data structure language module and a database access plugin;

[0106] The parameter data structure language module is used to provide interface data models for multiple versions of control protocols;

[0107] The database access plugin is configured to determine a first interface data model in the interface data model of the control protocol of the multiple versions according to the release version, and serialize and generate the communication protocol corresponding to the release version according to the first interface data model; and / or, determine a second interface data model in the interface data model of the control protocol of the multiple versions according to the historical version, and serialize and generate the communication protocol corresponding to the historical version according to the second interface data model.

[0108] like Figure 5 As shown, in some embodiments, the database access plugin is also used for:

[0109] Upon receiving the target response information of the target service request transmitted by the data management library, it is determined whether the first service version is consistent with the second service version; the first service version is the service version corresponding to the communication protocol of the target response information, and the second service version is the service version corresponding to the communication protocol of the target service request;

[0110] In the case where the first service version and the second service version are inconsistent, the communication protocol corresponding to the second service version is generated by deserializing the communication protocol of the target response information.

[0111] According to the communication protocol corresponding to the second service version, the target response information is returned to the client corresponding to the target service request through the interface corresponding to the second service version.

[0112] Optionally, the communication protocol layer provides centralized communication and interaction capabilities between the client-facing business service layer and data layer. The Parameter Data Structure Language (SDL) enables backward compatibility with older versions of the server interface, providing underlying interface data model support for two services of a single server interface. The database access plugin (SAL) introduces version control classes, provides a version control mechanism, adopts different communication protocols for different server interface versions, and provides multiple versions of serialization and deserialization templates for client use.

[0113] Optionally, upon receiving the target service release data packet transmitted by the upper-layer business system, the communication protocol layer 102 can determine the first interface data model corresponding to the release version from the interface data model of the multi-version control protocol, so as to serialize and generate the communication protocol corresponding to the release version according to the first interface data model, and then transmit the release data packet to the corresponding memory database for upgrade based on the communication protocol.

[0114] Alternatively, upon receiving a service request corresponding to the release version of the target service transmitted from the upper-layer business system, the communication protocol layer 102 can determine the first interface data model corresponding to the release version from the interface data model of the multi-version control protocol, and serialize and generate the communication protocol corresponding to the release version according to the first interface data model. Then, based on the communication protocol, the service request corresponding to the release version is transmitted to the corresponding in-memory database for service processing.

[0115] Alternatively, upon receiving a business request corresponding to a historical version of the target business transmitted from the upper-layer business system, the interface data model corresponding to the historical version can be determined from the interface data model of the multi-version control protocol according to the historical version. The corresponding communication protocol can then be serialized and generated based on the interface data model corresponding to the historical version. Based on this communication protocol, the business request corresponding to the historical version can be transmitted to the corresponding in-memory database for business processing.

[0116] Optionally, the communication protocol layer 102 is also used for:

[0117] Upon receiving the target response information corresponding to the target service request transmitted from the data management library, the first service version corresponding to the communication protocol of the response information is compared with the second service version corresponding to the communication protocol of the target service request. If the two are inconsistent, the communication protocol corresponding to the second service version is generated by deserializing the communication protocol of the response information. Based on the communication protocol corresponding to the second service version, the target response information is returned to the client corresponding to the target service through the interface corresponding to the second service version.

[0118] The system provided in this embodiment introduces a multi-version control mechanism in the protocol layer and protocol adaptation module, supporting two logical processing methods for one interface, enabling the server to provide two services through one interface. This achieves multi-version business data communication adaptation, allowing external business services to adaptively switch between multiple versions of business data communication when an application based on an in-memory database is deployed, ensuring uninterrupted business operations, significantly reducing deployment time, and improving operational efficiency.

[0119] The following describes the business processing method based on an in-memory database provided in the embodiments of this application. The business processing method based on an in-memory database described below can be referred to in correspondence with the business processing system based on an in-memory database described above.

[0120] Figure 6 This is a flowchart illustrating a business processing method based on an in-memory database provided in this embodiment, as follows: Figure 6 As shown, the method includes the following steps:

[0121] Step 601: Based on the service adaptation module, the release data packet of the target service is transmitted to the communication protocol layer according to the interface corresponding to the release version of the target service.

[0122] Step 602: Based on the communication protocol layer, the release data packet is transmitted to the data adaptation module according to the communication protocol corresponding to the release version;

[0123] Step 603: Based on the data adaptation module, determine the database mirror pair corresponding to the target business in the data management library according to the release version; the database mirror pair includes a first main memory database and a first backup memory database;

[0124] Step 604: Based on the release control module, upgrade the first backup memory database according to the release data packet, and synchronize the data of the first main memory database to the upgraded first backup memory database. When the upgraded first backup memory database completes data synchronization, switch the upgraded first backup memory database to the second main memory database, switch the first main memory database to the second backup memory database, upgrade the second backup memory database according to the release data packet, and synchronize the data of the second main memory database to the upgraded second backup memory database.

[0125] Step 605: Based on the data management library, if the upgrade step and / or the data synchronization step are performed in the second backup memory database, the target service request of the target service is processed according to the second main memory database. If the upgrade and data synchronization steps are completed in the second backup memory database, the target service request is processed according to the upgraded second backup memory database. The target service request includes the service request corresponding to the released version and / or the service request corresponding to the historical version of the target service.

[0126] Optionally, when publishing a target service, the publishing control module needs to update the service adaptation module in advance according to the scheduling update strategy corresponding to the publishing version to provide an interface compatible with multiple service versions. Further, when the service adaptation module receives the publishing data packet of the target service from the upper-layer business system, it can determine the interface corresponding to the publishing version of the target service among the interfaces of multiple service versions. The publishing data packet of the target service can then be transmitted to the communication protocol layer through the interface corresponding to the publishing version. The interface can be a unified interface compatible with both the publishing version and other publishing versions, or an independent interface compatible only with the publishing version. This embodiment does not specifically limit this.

[0127] Upon receiving the release data packet, the communication protocol layer generates the communication protocol corresponding to the release version of the target service in real time. Alternatively, it can determine the communication protocol corresponding to the release version of the target service from among multiple communication protocols, and then transmit the release data packet to the data adaptation module through the communication protocol corresponding to the release version of the target service.

[0128] Upon receiving the release data packet, the data adaptation module automatically matches and connects to the database mirror pair corresponding to the target business in the data management library, based on the release version.

[0129] The release control module can call the corresponding release strategy configuration information according to the release data packet to generate the upgrade process corresponding to the database mirror pair, and then seamlessly switch and upgrade the in-memory database in the database mirror pair according to the upgrade process corresponding to the database mirror pair.

[0130] like Figure 2 and Figure 3 As shown, during the seamless switchover and upgrade of the in-memory database, the standby in-memory database is stopped and started for upgrade first; after the standby in-memory database upgrade is completed, the primary in-memory database is upgraded. The specific steps are as follows:

[0131] First, stop the service of the first backup in-memory database, that is, stop accessing and writing to the in-memory database to ensure data consistency.

[0132] In some embodiments, the data management library is also used for:

[0133] When the upgrade step and / or the data synchronization step are performed in the first backup memory database, the business requests corresponding to the historical version are processed based on the first main memory database.

[0134] Optionally, during the upgrade and data synchronization of the first backup memory database, if a service request corresponding to a historical version of the target service is received via the service adaptation module, the communication protocol layer, and the data adaptation module, the first main memory database will process the service request corresponding to the historical version of the target service (i.e., the old version before the released version).

[0135] Next, the first backup in-memory database was upgraded according to the upgrade process.

[0136] In some embodiments, the upgrade includes adding data tables and / or updating the business database;

[0137] The updated business library includes adding business logic corresponding to the released version.

[0138] Optionally, the upgrade includes adding business logic corresponding to the release version to the business interface, and / or adding a new data table structure corresponding to the release version, including table name, fields, data types, constraints, etc., to realize the management and processing of business data corresponding to the release version.

[0139] Next, after the first backup memory database upgrade is completed, the data of the first primary memory database is synchronized to the upgraded first backup memory database to ensure data consistency between the old and new memory databases. After the upgraded first backup memory database completes data synchronization, the upgraded first backup memory database is switched to the second primary memory database, the first primary memory database is switched to the second backup memory database, and the second primary memory database service is started so that it can accept business processing requests corresponding to historical versions or release versions. That is, during the second backup memory database image upgrade and data synchronization, the second primary memory database processes business requests corresponding to release versions and / or business requests corresponding to historical versions.

[0140] Synchronize and stop the second backup in-memory database service. Upgrade the second backup in-memory database according to the upgrade process. The upgrade includes adding business logic corresponding to the release version to the business interface and / or adding a new data table structure corresponding to the release version.

[0141] Next, after the second backup memory database is upgraded, the data of the second primary memory database is synchronized to the upgraded second backup memory database to ensure data consistency between the primary and backup memory databases. Once the upgraded second backup memory database has completed data synchronization, service switching can be performed to switch the upgraded second backup memory database back to the primary memory database to provide database services and process business requests corresponding to the released version and / or historical versions; and switch the second primary memory database back to the backup memory database to provide redundant backup for the primary memory database.

[0142] The business processing system based on an in-memory database provided in this embodiment can have the following features: the service adaptation module can transmit the release data packet to the communication protocol layer according to the interface corresponding to the release version of the target business; the communication protocol layer can transmit the release data packet to the data adaptation module according to the communication protocol corresponding to the release version; the data adaptation module can determine the database mirror pair corresponding to the target business in the data management library; the release control module can automatically perform seamless switching and upgrading of the in-memory database according to the release data packet; and the data management library can automatically switch the client to the corresponding in-memory database according to the primary / backup status during the seamless switching and upgrading process of the in-memory database, thereby ensuring uninterrupted business that depends on the in-memory database and improving the high availability and stability of the in-memory database.

[0143] In some embodiments, upgrading the first backup in-memory database based on the release control module according to the release data packet includes:

[0144] Based on the release control module, and according to the release data packet, at least one of the following is determined: the business application configuration, data management library configuration, application process configuration, release content configuration, and scheduling strategy configuration corresponding to the release version; based on at least one of the following: the business application configuration, the data management library configuration, the application process configuration, the release content configuration, and the scheduling strategy configuration, the upgrade process corresponding to the database mirror pair is determined; and according to the upgrade process, the first backup memory database and the second backup memory database are upgraded.

[0145] In some embodiments, the method further includes:

[0146] Based on the communication protocol layer, according to the release version, a first interface data model is determined from the interface data models of multiple versions of the control protocol, and the communication protocol corresponding to the release version is generated by serialization according to the first interface data model.

[0147] And / or, based on the historical version, determine a second interface data model in the interface data model of the control protocol of the multiple versions, and serialize and generate the communication protocol corresponding to the historical version based on the second interface data model.

[0148] It should be noted that the business processing method provided in this application embodiment can realize the functions of all modules implemented in the above method embodiment and can achieve the same technical effect. Here, the parts and beneficial effects that are the same as those in the system embodiment will not be described in detail.

[0149] Figure 7 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 7As shown, the electronic device may include: a processor 710, a communication interface 720, a memory 730, and a communication bus 740, wherein the processor 710, the communication interface 720, and the memory 730 communicate with each other through the communication bus 740. The processor 710 can call a computer program in the memory 730 to execute steps of a business processing method based on a memory database, such as: based on a service adaptation module, transmitting the release data packet of the target service to the communication protocol layer according to the interface corresponding to the release version of the target service; based on the communication protocol layer, transmitting the release data packet to a data adaptation module according to the communication protocol corresponding to the release version; based on the data adaptation module, determining a database mirror pair corresponding to the target service in a data management library according to the release version; the database mirror pair includes a first primary memory database and a first backup memory database; based on a release control module, upgrading the first backup memory database according to the release data packet, and synchronizing the data of the first primary memory database to the upgraded first backup memory database, and completing data processing in the upgraded first backup memory database. Under synchronization, the upgraded first backup memory database is switched to the second primary memory database, and the first primary memory database is switched to the second backup memory database. The second backup memory database is upgraded according to the release data packet, and the data in the second primary memory database is synchronized to the upgraded second backup memory database. Based on the data management library, when the upgrade step and / or the data synchronization step are performed in the second backup memory database, the target service request of the target service is processed according to the second primary memory database. When the upgrade and data synchronization steps are completed in the second backup memory database, the target service request is processed according to the upgraded second backup memory database. The target service request includes the service request corresponding to the release version and / or the service request corresponding to the historical version of the target service.

[0150] Furthermore, the logical instructions in the aforementioned memory 730 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or electronic device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0151] On the other hand, this application also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can perform the steps of the business processing method based on the memory database provided in the above embodiments, such as: based on the service adaptation module, transmitting the release data packet of the target service to the communication protocol layer according to the interface corresponding to the release version of the target service; based on the communication protocol layer, transmitting the release data packet to the data adaptation module according to the communication protocol corresponding to the release version; based on the data adaptation module, determining the database mirror pair corresponding to the target service in the data management library according to the release version; the database mirror pair includes a first main memory database and a first backup memory database; based on the release control module, upgrading the first backup memory database according to the release data packet, and upgrading the first main memory database. The data in the database is synchronized to the upgraded first backup memory database. Upon completion of data synchronization in the upgraded first backup memory database, the upgraded first backup memory database is switched to the second primary memory database, and the first primary memory database is switched to the second backup memory database. The second backup memory database is upgraded according to the release data packet, and the data in the second primary memory database is synchronized to the upgraded second backup memory database. Based on the data management database, when the upgrade and / or data synchronization steps are performed in the second backup memory database, the target service request for the target service is processed according to the second primary memory database. When the upgrade and data synchronization steps are completed in the second backup memory database, the target service request is processed according to the upgraded second backup memory database. The target service request includes the service request corresponding to the release version and / or the service request corresponding to a historical version of the target service.

[0152] On the other hand, embodiments of this application also provide a processor-readable storage medium storing a computer program. The computer program is used to cause a processor to execute the steps of the memory-based database-based business processing method provided in the above embodiments. For example, it includes: based on a service adaptation module, transmitting a release data packet of the target service to a communication protocol layer according to the interface corresponding to the release version of the target service; based on the communication protocol layer, transmitting the release data packet to a data adaptation module according to the communication protocol corresponding to the release version; based on the data adaptation module, determining a database mirror pair corresponding to the target service in a data management database according to the release version; the database mirror pair includes a first primary memory database and a first backup memory database; based on a release control module, upgrading the first backup memory database according to the release data packet, and synchronizing the data of the first primary memory database to the upgraded first backup memory database. According to the database, when the upgraded first backup memory database completes data synchronization, the upgraded first backup memory database is switched to the second primary memory database, and the first primary memory database is switched to the second backup memory database. The second backup memory database is upgraded according to the release data packet, and the data of the second primary memory database is synchronized to the upgraded second backup memory database. Based on the data management database, when the upgrade step and / or the data synchronization step are performed on the second backup memory database, the target service request of the target service is processed according to the second primary memory database. When the upgrade and data synchronization steps are completed on the second backup memory database, the target service request is processed according to the upgraded second backup memory database. The target service request includes the service request corresponding to the release version and / or the service request corresponding to the historical version of the target service.

[0153] The processor-readable storage medium can be any available medium or data storage device that the processor can access, including but not limited to magnetic memory (e.g., floppy disk, hard disk, magnetic tape, magneto-optical disk (MO)), optical memory (e.g., CD, DVD, BD, HVD), and semiconductor memory (e.g., ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid-state drive (SSD)).

[0154] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0155] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or electronic device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0156] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A business processing system based on an in-memory database, characterized in that, This includes a service adaptation module, a communication protocol layer, a data adaptation module, a data management library, and a release control module; The service adaptation module is used to transmit the release data packet of the target service to the communication protocol layer according to the interface corresponding to the release version of the target service. The communication protocol layer is used to transmit the release data packet to the data adaptation module according to the communication protocol corresponding to the release version; The data adaptation module is used to determine the database mirror pair corresponding to the target business in the data management library according to the release version; the database mirror pair includes a first main memory database and a first backup memory database. The publishing control module is used to upgrade the first backup memory database according to the publishing data packet, and synchronize the data of the first main memory database to the upgraded first backup memory database. When the upgraded first backup memory database completes data synchronization, the upgraded first backup memory database is switched to the second main memory database, the first main memory database is switched to the second backup memory database, the second backup memory database is upgraded according to the publishing data packet, and the data of the second main memory database is synchronized to the upgraded second backup memory database. The data management database is used to process the target service request of the target service according to the second main memory database when the upgrade step and / or the data synchronization step are performed in the second backup memory database, and to process the target service request according to the upgraded second backup memory database when the upgrade and data synchronization steps are completed in the second backup memory database; the target service request includes the service request corresponding to the released version and / or the service request corresponding to the historical version of the target service.

2. The business processing system based on an in-memory database according to claim 1, characterized in that, The release control module is specifically used for: Based on the release data packet, determine at least one of the following: business application configuration, data management library configuration, application process configuration, release content configuration, and scheduling strategy configuration corresponding to the release version; The upgrade process corresponding to the database mirror pair is determined based on at least one of the business application configuration, the data management library configuration, the application process configuration, the published content configuration, and the scheduling strategy configuration. According to the upgrade process, the first backup memory database and the second backup memory database are upgraded.

3. The business processing system based on an in-memory database according to claim 1, characterized in that, The upgrade includes adding data tables and / or updating the business database; The updated business library includes adding business logic corresponding to the released version.

4. The business processing system based on an in-memory database according to any one of claims 1-3, characterized in that, The communication protocol layer includes a parameter data structure language module and a database access plugin; The parameter data structure language module is used to provide interface data models for multiple versions of control protocols; The database access plugin is used to determine a first interface data model in the interface data model of the control protocol of the multiple versions according to the release version, and to serialize and generate the communication protocol corresponding to the release version according to the first interface data model. And / or, based on the historical version, determine a second interface data model in the interface data model of the control protocol of the multiple versions, and serialize and generate the communication protocol corresponding to the historical version based on the second interface data model.

5. The business processing system based on an in-memory database according to claim 4, characterized in that, The database access plugin is also used for: Upon receiving the target response information of the target service request transmitted by the data management library, it is determined whether the first service version is consistent with the second service version; the first service version is the service version corresponding to the communication protocol of the target response information, and the second service version is the service version corresponding to the communication protocol of the target service request; In the case where the first service version and the second service version are inconsistent, the communication protocol corresponding to the second service version is generated by deserializing the communication protocol of the target response information. According to the communication protocol corresponding to the second service version, the target response information is returned to the client corresponding to the target service request through the interface corresponding to the second service version.

6. The business processing system based on an in-memory database according to any one of claims 1-3, characterized in that, The data management library is also used for: When the upgrade step and / or the data synchronization step are performed in the first backup memory database, the business requests corresponding to the historical version are processed based on the first main memory database.

7. A business processing method based on an in-memory database, characterized in that, Applied to the business processing system based on an in-memory database as described in any one of claims 1-6, the method includes: Based on the service adaptation module, the release data packet of the target service is transmitted to the communication protocol layer according to the interface corresponding to the release version of the target service; Based on the communication protocol layer, the release data packet is transmitted to the data adaptation module according to the communication protocol corresponding to the release version; Based on the data adaptation module, according to the release version, the database mirror pair corresponding to the target business is determined in the data management library; the database mirror pair includes a first main memory database and a first backup memory database; Based on the release control module, the first backup memory database is upgraded according to the release data packet, and the data of the first main memory database is synchronized to the upgraded first backup memory database. When the upgraded first backup memory database completes data synchronization, the upgraded first backup memory database is switched to the second main memory database, the first main memory database is switched to the second backup memory database, the second backup memory database is upgraded according to the release data packet, and the data of the second main memory database is synchronized to the upgraded second backup memory database. Based on the data management library, when the upgrade step and / or the data synchronization step are performed in the second backup memory database, the target service request of the target service is processed according to the second main memory database. When the upgrade and data synchronization steps are completed in the second backup memory database, the target service request is processed according to the upgraded second backup memory database. The target service request includes the service request corresponding to the released version and / or the service request corresponding to the historical version of the target service.

8. The business processing method based on an in-memory database according to claim 7, characterized in that, The upgrade of the first backup in-memory database based on the release control module and the release data packet includes: Based on the release control module, and according to the release data packet, at least one of the following is determined: the business application configuration, data management library configuration, application process configuration, release content configuration, and scheduling strategy configuration corresponding to the release version; based on at least one of the following: the business application configuration, the data management library configuration, the application process configuration, the release content configuration, and the scheduling strategy configuration, the upgrade process corresponding to the database mirror pair is determined; and according to the upgrade process, the first backup memory database and the second backup memory database are upgraded.

9. The business processing method based on an in-memory database according to claim 7, characterized in that, The method further includes: Based on the communication protocol layer, according to the release version, a first interface data model is determined from the interface data models of multiple versions of the control protocol, and the communication protocol corresponding to the release version is generated by serialization according to the first interface data model. And / or, based on the historical version, determine a second interface data model in the interface data model of the control protocol of the multiple versions, and serialize and generate the communication protocol corresponding to the historical version based on the second interface data model.

10. An electronic device, characterized in that, Including memory and processor; Memory, used to store computer programs; A processor, configured to implement the steps of the memory database-based business processing method as described in any one of claims 7 to 9 when executing the computer program.

Citation Information

Patent Citations

  • Data backup method and device, electronic equipment and medium

    CN111737059A

  • Implementation method and device of high-availability database system, equipment and storage medium

    CN113220784A