Business platform control method, device and electronic equipment
By verifying the server to obtain and update the database role information of the business platform, the problem of database role mismatch is solved and the stability and responsiveness of the business platform are improved.
Patent Information
- Application Number
- CN202210638340.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-07
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2042-06-07
AI Technical Summary
When the business platform calls the database, the database role does not match the role required to process the business, resulting in the business platform being unable to respond to business services in a timely manner, affecting stability.
The verification server obtains the database arbitration configuration file from the database arbitration service of the distributed database, parses the master and slave role information, and updates the database role information of the business platform to ensure that it matches business requirements.
This improves the stability of the business platform in providing business services and avoids response delays and service interruptions caused by database role mismatch.
Smart Images

Figure CN117235033B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information processing technology, and in particular to a service platform control method, device and electronic equipment. Background Art
[0002] With the advent of the big data era, building business platforms has become an essential part of internet development, responding to diverse data management requirements and providing diverse data services. While providing data services, business platforms often need to call corresponding databases to complete the response. In related technologies, when receiving data service requests, business platforms may be unable to respond to the corresponding service requests in a timely manner due to the mismatch between the role of the database being called and the database required for processing the service. This can affect the stability of the service provided by the business platform. Summary of the Invention
[0003] In view of this, embodiments of the present invention provide a service platform control method, device, and electronic device to address the defect of poor stability of service services provided by service platforms in the prior art.
[0004] According to the first aspect, an embodiment of the present invention provides a business platform control method, wherein the business platform relies on a distributed database, and the distributed database includes multiple database sets, each database set corresponding to a database arbitration service; the method is executed by a verification server, and includes the following steps: obtaining a database arbitration configuration file from each database arbitration service; parsing the database master and backup role information from the database arbitration configuration file; and updating the database role information in the business platform according to the database master and backup role information, so that the business platform performs database operations according to the database role information.
[0005] Optionally, the method further includes: receiving a database role change request proactively sent by a target database arbitration service, the database role change request corresponding to a database arbitration operation performed by the target database arbitration service; and updating the database role information in the business platform according to the database role change request.
[0006] Optionally, updating the database role information in the business platform according to the database role change request includes: verifying the database role change request according to a preset change verification logic; and updating the database role information in the business platform if the database role change request passes the verification.
[0007] Optionally, obtaining the database arbitration configuration file from each database arbitration service includes: obtaining the database arbitration configuration file from each database arbitration service at regular intervals; and / or,
[0008] When a new connection or reconnection is established with the target database arbitration service, the database arbitration configuration file is obtained from the target database arbitration service.
[0009] Optionally, the method further includes: sending a fault prompt message in any of the following situations: failure to connect to the database arbitration service, failure to obtain the database arbitration configuration file, failure to parse the database arbitration configuration file, and failure to update the database role information in the business platform.
[0010] Optionally, obtaining the database arbitration configuration file from each database arbitration service includes: obtaining a virtual IP address of each database arbitration service; connecting to each database arbitration service according to the virtual IP address, and obtaining the database arbitration configuration file based on a secure shell protocol.
[0011] Optionally, updating the database role information in the business platform according to the database master-slave role information includes: encapsulating the database master-slave role information into an interface request according to the database resource pool interface rules of the business platform, and sending the interface request to the business platform, so that the business platform updates the database role information in the business platform according to the interface request.
[0012] According to the second aspect, an embodiment of the present invention provides a business platform control device, wherein the business platform relies on a distributed database, and the distributed database includes multiple database sets, each database set corresponding to a database arbitration service; the device is used to implement the method described in any embodiment of the first aspect.
[0013] According to a third aspect, an embodiment of the present invention provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method described in any one of the embodiments of the first aspect is implemented.
[0014] According to a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the method described in any embodiment of the first aspect.
[0015] The technical solution of the present invention has the following advantages:
[0016] The business platform control method provided in this embodiment verifies that a server obtains a database arbitration configuration file from each database arbitration service, parses the database arbitration configuration file to obtain database master / slave role information, and updates the database role information in the business platform based on the database master / slave role information, so that the business platform performs database operations based on the database role information. This avoids the problem that, when the business platform calls the database, the called database role does not match the database role required for processing the business, resulting in the business platform being unable to respond to the corresponding business service in a timely manner, thereby improving the stability of the business platform in providing business services. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0018] Figure 1 This is a schematic diagram of an application scenario of the service platform control method according to an embodiment of the present invention;
[0019] Figure 2 This is a flowchart of a specific example of the service platform control method according to an embodiment of the present invention;
[0020] Figure 3 This is a specific example principle block diagram of a service platform control device in an embodiment of the present invention;
[0021] Figure 4 This is a principle block diagram of a specific example of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION
[0022] The technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0023] In the description of the present invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings and are intended solely to facilitate and simplify the description of the present invention. They are not intended to indicate or imply that the devices or components referred to must have, be constructed, or operate in a specific orientation, and therefore should not be construed as limitations on the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0024] In the description of the present invention, it should be noted that, unless otherwise expressly specified or limited, the terms "installed," "connected," and "connected" should be understood in a broad sense. For example, they can refer to fixed connections, detachable connections, or integral connections; mechanical connections or electrical connections; direct connections or indirect connections through an intermediate medium; internal connections between two components; wireless connections or wired connections. Those skilled in the art will understand the specific meanings of the above terms in the present invention based on specific circumstances.
[0025] In addition, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0026] This embodiment provides a service platform control method, which is executed by a verification server and its application scenarios are as follows: Figure 1 As shown, the business platform relies on a distributed database, which includes multiple database sets 101. A database set can represent the databases in the same computer room. Each database set is correspondingly provided with a database arbitration service 102. The arbitration service is used to arbitrate the roles of the databases and generate a database arbitration configuration file. The verification server 103 can obtain the database arbitration configuration file by accessing the arbitration service interface and report the database role information parsed from the file to the business platform 104.
[0027] Verify the service platform control method executed by the server such as Figure 2 As shown, the following steps are included:
[0028] S201, obtaining a database arbitration configuration file from each database arbitration service;
[0029] For example, the arbitration service primarily implements failover between the primary and standby databases when a database failure occurs, while also updating the database arbitration configuration file. The arbitration service provides high availability, a service designed to improve program performance. The database arbitration configuration file is typically in XML format and contains fewer than 1,000 lines. It can be provided by the arbitration service for each database in the database management system.
[0030] The verification server can obtain the database arbitration configuration file from each database arbitration service by connecting to the virtual IP address of the multi-computer room arbitration service to establish a communication connection, thereby periodically or in real time obtaining the database arbitration configuration file. This embodiment does not limit the time interval for obtaining the database arbitration configuration file from each database arbitration service; those skilled in the art can adjust the time interval as needed.
[0031] S202, parse the database arbitration configuration file to obtain database master and backup role information;
[0032] Exemplarily, the database master / slave role information may include the master / slave identification, address information (such as IP address, port number), and availability status of each database. This embodiment does not limit the information type of the database master / slave role information, and this embodiment may determine it as needed. The method of parsing the database arbitration configuration file may be implemented by a pre-written program to read and parse the configuration file in XML format line by line, thereby obtaining the database role information of whether the database used under each network address in the configuration file is the master database or the backup database.
[0033] S203: Update the database role information in the business platform according to the database master / slave role information, so that the business platform performs database operations according to the database role information.
[0034] Exemplarily, the business platform can be any business platform, such as an online payment clearing platform, a nucleic acid testing platform, a park management platform, etc. This embodiment does not limit the specific business platform, and those skilled in the art can determine it as needed.
[0035] As an optional implementation method, the method for updating the database role information in the business platform based on the database master-slave role information can be to encapsulate the database master-slave role information into an interface request according to the database resource pool interface rules of the business platform, and send the interface request to the business platform, so that the business platform updates the database role information in the business platform according to the interface request, wherein the database resource pool interface rules can be general standard encapsulation rules, which are not elaborated here; or they can be interface rules set by technical personnel in this field according to actual needs.
[0036] When the database master-slave role information only includes the master-slave identification and address information of each database, updating the database role information in the business platform includes updating the corresponding master-slave identification and address information of each database. The business platform can understand the role and address of each database based on the database role information, which facilitates the business platform to call, store, delete and other operations based on the database role and address.
[0037] When the database master-slave role information also includes the available status, updating the database role information in the business platform also includes updating the available status of the current database. The available status is used to indicate whether the current database has failed or is disabled. When the status is available, it means that the current database is operating normally. When the status is unavailable, it means that the current database is in a failed state or a disabled state. This further facilitates the business platform to fully understand the current role, address and current available status of each database, and can effectively exclude unavailable databases based on the database role information, thereby further ensuring the stability of the business services provided by the business platform.
[0038] The method provided in this embodiment is that the verification server obtains the database arbitration configuration file from each database arbitration service, parses the database arbitration configuration file to obtain the database master and backup role information, and updates the database role information in the business platform based on the database master and backup role information, so that the business platform can perform database operations based on the database role information. This avoids the problem that when the business platform calls the database, the called database role does not match the database role required for processing the business, resulting in the business platform being unable to respond to the corresponding business service in a timely manner, thereby improving the stability of the business platform in providing business services.
[0039] Optionally, it also includes: receiving a database role change request actively sent by the target database arbitration service, the database role change request corresponds to a database arbitration operation performed by the target database arbitration service; and updating the database role information in the business platform according to the database role change request.
[0040] Exemplarily, the target database arbitration service represents any database that performs a database arbitration operation. A database role change request can be issued in response to a database arbitration service being initiated due to maintenance or restoration of service. Alternatively, the database arbitration service can initiate a database arbitration in response to detecting a database failure or detecting a fault repair. For example, if a primary database detects a failure, the database arbitration service will invoke its standby database as a replacement for the primary database, thereby changing the standby database's role to a temporary primary database.
[0041] The database role change request at least includes the database information that initiates the request and the type of request, for example, database 1: standby to primary; database 2: primary to standby. According to the database role change request, the database role information of the business platform can be updated according to the database name in the request and the type of request. For example, when the information in the database failure request includes database 1: standby to primary, then it can be checked based on the information in the database failure request whether database 2 is not displayed as the currently running database in the resource pool of the business platform. If so, database 2 will be used as the primary database to support the business of the current business platform, thereby achieving the purpose of changing the database role information in the business platform.
[0042] The service platform control method provided by the embodiment of the present invention updates the database role information of the service platform by receiving a database role change request, so that the role information of the service platform database is updated more timely and accurately.
[0043] Optionally, updating the database role information in the business platform according to the database role change request includes: verifying the database role change request according to a preset change verification logic; and updating the database role information in the business platform if the database role change request passes the verification.
[0044] Exemplarily, the preset change verification logic may be to compare the database information in the database role change request with the pre-stored database configuration information. When the comparison result meets the target condition, the database role change request passes the verification. The pre-stored database configuration information may be stored in a configuration management database (CMDB), including the IP address, database name, database master / slave information (that is, which database is the primary database and which database is the backup database for the primary database), database cluster information, database health status, business status, etc. of each database associated with the business platform. It should be noted that when the configuration file needs to be updated, the configuration file can be changed in the configuration management database according to the received configuration update instruction. This embodiment does not limit the information content contained in the pre-written configuration information and the method of changing the configuration file, and those skilled in the art can determine it as needed.
[0045] The target condition can be that the database information in the database role change request is consistent with the shared information in the configuration information, and that the database corresponding to the database role change request meets the requirements for triggering a database role information update. For example, the database information in the database role information change is: Database A, Cluster B, Primary Database, IP Address: 191.168.2.254, Active to Standby. The database information for Database A in the configuration file is: IP Address: 191.168.2.254, Cluster B, Primary Database, Service Status: Deprecated. Clearly, the basic information in the database information in the database failure request, including the database name, cluster information, primary / standby information, and address, is consistent with the information in the configuration file. However, if the service status for Database A in the configuration file is Deprecated, indicating that Database A is no longer in use, then triggering a database role information update is not necessary. Therefore, the comparison result can be determined to not meet the target condition. If the service status for Database A in the configuration file is In Use, then the comparison result can be determined to meet the target condition, and a database role information update is required. This embodiment does not limit the target condition, and those skilled in the art can determine it as needed.
[0046] The business platform control method provided by the embodiment of the present invention compares the database information in the database role change request with the pre-written configuration information. The database role is updated only when the target conditions are met, thereby preventing erroneous updates and improving the accuracy of database role updates.
[0047] Optionally, obtaining a database arbitration configuration file from each database arbitration service includes: periodically obtaining a database arbitration configuration file from each database arbitration service; and / or,
[0048] When a new connection or reconnection is established with the target database arbitration service, the database arbitration configuration file is obtained from the target database arbitration service.
[0049] Exemplarily, the database arbitration configuration file can be obtained from the database arbitration service on a regular basis every two hours, or every 24 hours. This embodiment does not limit the acquisition period, which can be determined based on the usage of the business platform. For example, when the business platform is frequently used, it can be obtained every two hours. When the business platform is not used frequently, it can be obtained once every 24 hours.
[0050] The target database arbitration service represents the arbitration service in the database collection to which any database to which a new connection is being established or reconnected resides. When a database is newly added to a database collection, it needs to establish a new connection with the database arbitration service in that collection. This triggers the verification server to obtain the database arbitration configuration file from that database arbitration service. If a database in a database collection experiences a connection failure due to a fault, upon recovery, it needs to reconnect to the database arbitration service in that collection. This also triggers the verification server to obtain the database arbitration configuration file from that database arbitration service.
[0051] The service platform control method provided in this embodiment ensures that the service platform periodically obtains the database arbitration configuration file by periodically acquiring the configuration file. This avoids database role errors caused by untimely configuration file updates, thereby improving the stability of the service platform during service delivery. Furthermore, by acquiring the database arbitration configuration file from the target database arbitration service when establishing a new connection or reconnecting to the target database arbitration service, configuration file updates are made more real-time. Combining periodic and real-time configuration file acquisition further improves the stability of the service platform during service delivery.
[0052] Optionally, the method further includes: sending a fault prompt message in any of the following situations: failure to connect to the database arbitration service, failure to obtain the database arbitration configuration file, failure to parse the database arbitration configuration file, and failure to update the database role information in the business platform.
[0053] For example, determining whether a connection to the database arbitration service has failed may include determining whether the connection has been disconnected, whether the connection has timed out, whether the connection has been rejected, or whether there is no response. Determining whether obtaining the database arbitration configuration file has failed may include determining whether the acquisition process has timed out, whether the acquired configuration file is complete, etc. Determining whether parsing the database arbitration configuration file has failed may include determining whether the configuration file has been parsed within a preset timeframe, whether an error warning appears during the parsing process, etc. Determining whether updating database role information in the business platform has failed may include determining whether the updated database role information has changed or whether the updated database role information has fully satisfied the database role change request. Fault prompt information may be issued by displaying an error warning on the business platform, which may include the error type, or by sending the error warning to the administrator terminal via text message, phone call, email, or the like, to notify staff to manually correct the error in a timely manner.
[0054] Furthermore, if the interface for obtaining the database arbitration configuration file is determined to have timed out, a reconnection is initiated to obtain the database arbitration configuration file. Determining whether the interface for obtaining the database arbitration configuration file has timed out can be performed by determining whether the database arbitration configuration file has been obtained within a preset time period. If the database arbitration configuration file has not been obtained within the preset time period, the connection is deemed to have timed out. If the connection times out, a reconnection is initiated to obtain the database arbitration configuration file. The service platform control method provided in this embodiment of the present invention ensures the stability of database role information updates through a reconnection mechanism.
[0055] Optionally, obtaining the database arbitration configuration file from each database arbitration service includes: obtaining a virtual IP address of each database arbitration service; connecting to each database arbitration service according to the virtual IP address, and obtaining the database arbitration configuration file based on a secure shell protocol.
[0056] For example, a virtual IP address (VIP) is an IP address not associated with a specific computer or a network interface card within a computer and is primarily used for switching between different hosts. The Secure Shell Protocol (SSH) provides support for secure remote login, secure file transfer, and secure TCP / IP and X Windows System traffic forwarding, enabling automatic encryption, authentication, and compression of transmitted data. The verification server can obtain the virtual IP addresses of each database arbitration service using a pre-stored address mapping table, connect to each database arbitration service based on the virtual IP address, and obtain the database arbitration configuration file via the SSH protocol, thereby ensuring the security of obtaining the database arbitration configuration file.
[0057] It should be noted that the method in this embodiment can be run on the arbitration server, with the arbitration server determining database role information to update the business platform database role information. Alternatively, the method can be run on the business platform, obtaining the arbitration server's arbitration configuration file and determining the database master / slave role information based on the configuration file to update the role information. When the method in this embodiment is run on the arbitration server, multiple arbitration deployment scripts are required across multiple computer rooms, increasing operational and maintenance costs. Furthermore, installing new scripts consumes resources on the arbitration server, such as increasing CPU, memory, and I / O consumption. If an exception occurs during the execution of this method, the arbitration service functionality may be impacted. Therefore, running the method on the arbitration server is not currently the preferred approach.
[0058] This embodiment provides a service platform control device, such as Figure 3 As shown, the business platform relies on a distributed database, which includes multiple database sets, each of which is provided with a corresponding database arbitration service; the device can be built into the verification server, including:
[0059] The configuration file acquisition module 301 is used to obtain the database arbitration configuration file from each database arbitration service; the specific content can be found in the corresponding part of the above method embodiment, which will not be repeated here.
[0060] The configuration file parsing module 302 is used to parse the database arbitration configuration file to obtain the database master and backup role information; the specific content can be found in the corresponding part of the above method embodiment, which will not be repeated here.
[0061] The first role information updating module 303 is used to update the database role information in the service platform according to the database master / slave role information, so that the service platform can perform database operations according to the database role information.
[0062] Optionally, the service platform control device further includes:
[0063] The role change request receiving module is used to receive a database role change request actively sent by the target database arbitration service. The database role change request corresponds to a database arbitration operation made by the target database arbitration service. For specific content, please refer to the corresponding part of the above method embodiment and will not be repeated here.
[0064] The second role information updating module is used to update the database role information in the business platform according to the database role change request. Detailed content can be found in the corresponding part of the above method embodiment, which will not be repeated here.
[0065] Optionally, the second role information updating module includes:
[0066] The verification module is used to verify the database role change request according to the preset change verification logic; the specific content can be found in the corresponding part of the above method embodiment, which will not be repeated here.
[0067] The second role information updating submodule is used to update the database role information in the business platform if the database role change request passes the verification. Detailed content can be found in the corresponding part of the above method embodiment, which will not be repeated here.
[0068] Optionally, the configuration file acquisition module 301 includes:
[0069] The timing acquisition module is used to obtain the database arbitration configuration file from each database arbitration service at a regular interval. For details, please refer to the corresponding part of the above method embodiment, which will not be repeated here.
[0070] and / or,
[0071] The real-time acquisition module is used to acquire the database arbitration configuration file from the target database arbitration service when a new connection or reconnection is established with the target database arbitration service.
[0072] Optionally, the service platform control device further includes:
[0073] The fault notification module is configured to send a fault notification message in the event of any of the following situations: a failure to connect to the database arbitration service, a failure to obtain the database arbitration configuration file, a failure to parse the database arbitration configuration file, or a failure to update the database role information in the business platform. For details, please refer to the corresponding section of the above method embodiment and will not be repeated here.
[0074] Optionally, the configuration file acquisition module 301,
[0075] The virtual address acquisition module is used to obtain the virtual IP address of each database arbitration service; the specific content can be found in the corresponding part of the above method embodiment, which will not be repeated here.
[0076] The configuration file acquisition submodule is used to connect to each database arbitration service according to the virtual IP address and obtain the database arbitration configuration file based on the secure shell protocol. For details, please refer to the corresponding part of the above method embodiment and will not be repeated here.
[0077] Optionally, the first role information updating module includes:
[0078] The first role information update submodule is configured to encapsulate the database master / slave role information into an interface request according to the database resource pool interface rules of the service platform, and send the interface request to the service platform, so that the service platform updates the database role information in the service platform according to the interface request. For details, please refer to the corresponding section of the above method embodiment and will not be repeated here.
[0079] The present application also provides an electronic device, such as Figure 4 As shown, a processor 410 and a memory 420, wherein the processor 410 and the memory 420 may be connected via a bus or other means.
[0080] The processor 410 may be a central processing unit (CPU). The processor 410 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above chips.
[0081] Memory 420, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as the program instructions / modules corresponding to the service platform control method in the embodiments of the present invention. The processor executes the non-transitory software programs, instructions, and modules stored in the memory to perform various processor functions and data processing.
[0082] The memory 420 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the processor, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 420 may optionally include a memory remotely located relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0083] The one or more modules are stored in the memory 420 and when executed by the processor 410, perform the following steps: Figure 2 The service platform control method in the illustrated embodiment.
[0084] For details of the above electronic equipment, please refer to Figure 2 The corresponding descriptions and effects in the embodiments shown can be understood and will not be repeated here.
[0085] This embodiment further provides a computer storage medium storing computer-executable instructions capable of executing the service platform control method of any of the above-mentioned method embodiments 1. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk drive (HDD), or a solid-state drive (SSD); the storage medium may also include a combination of the above-mentioned types of memory.
[0086] Obviously, the above embodiments are merely examples for clarity of explanation and are not intended to limit the implementation methods. Those skilled in the art will readily appreciate that other variations or modifications based on the above descriptions are possible. It is not necessary and impossible to enumerate all implementation methods here. Obvious variations or modifications arising therefrom remain within the scope of protection of the present invention.
Claims
1. A service platform control method, characterized in that: The business platform relies on a distributed database, which includes multiple database sets, each of which is provided with a corresponding database arbitration service. The method is executed by a verification server and includes the following steps: Obtain database arbitration configuration files from each database arbitration service; Parse the database arbitration configuration file to obtain the database master and backup role information; The database role information in the service platform is updated according to the database master / slave role information, so that the service platform performs database operations according to the database role information.
2. The method according to claim 1, characterized in that Also includes: receiving a database role change request proactively sent by a target database arbitration service, wherein the database role change request corresponds to a database arbitration operation performed by the target database arbitration service; According to the database role change request, the database role information in the business platform is updated.
3. The method according to claim 2, characterized in that Updating database role information in the business platform according to the database role change request includes: Verify the database role change request according to the preset change verification logic; If the database role change request passes verification, the database role information in the business platform is updated.
4. The method according to claim 1, wherein The step of obtaining a database arbitration configuration file from each database arbitration service includes: Regularly obtain database arbitration configuration files from each database arbitration service; and / or, When a new connection or reconnection is established with the target database arbitration service, the database arbitration configuration file is obtained from the target database arbitration service.
5. The method according to claim 1, wherein The method further comprises: In any of the following cases: failure to connect to the database arbitration service, failure to obtain the database arbitration configuration file, failure to parse the database arbitration configuration file, and failure to update the database role information in the business platform, a fault prompt message is sent.
6. The method according to claim 1, wherein The obtaining of database arbitration configuration files from each database arbitration service includes: Obtain the virtual IP address of each database arbitration service; Each database arbitration service is connected according to the virtual IP address, and a database arbitration configuration file is obtained based on a secure shell protocol.
7. The method according to claim 1, characterized in that The updating of the database role information in the business platform according to the database master / slave role information includes: According to the database resource pool interface rule of the business platform, the database master / slave role information is encapsulated into an interface request, and the interface request is sent to the business platform, so that the business platform updates the database role information in the business platform according to the interface request.
8. A service platform control device, characterized in that: The business platform relies on a distributed database, which includes multiple database sets, each of which is correspondingly provided with a database arbitration service; the device is used to implement the method according to any one of claims 1 to 7.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the instruction is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Distributed-type database access method and system
CN102033912A
High availability method for distributed software of spaceflight ground system
CN114564340A