【技术领域】【Technical field】
本发明涉及计算机技术领域,尤其涉及一种数据同步方法及装置、电子设备和计算机可读存储介质。The present invention relates to the field of computer technology, in particular to a data synchronization method and device, electronic equipment, and a computer-readable storage medium.
【背景技术】【Background technique】
随着铁路建设的发展和铁路服务改革的深入,铁路信息化得到广泛应用,随着12306等系统的运营,中国铁路信息化技术与中国高铁技术一样,已经进入到技术的前沿领域。With the development of railway construction and the deepening of railway service reform, railway informatization has been widely used. With the operation of 12306 and other systems, China's railway information technology, like China's high-speed rail technology, has entered the forefront of technology.
其中,铁路客票系统并基于PostgreSQL优化和定制化形成自主化的数据库,PostgreSQL是一个免费的对象-关系数据库服务器(数据库管理系统),它提供了相对其他开放源代码数据库系统和专有系统之外的另一种选择。由于餐饮系统、积分系统、人脸服务系统、二维码服务系统、候补系统等多个系统的应用均依赖于铁路客票系统的数据库,因此,铁路客票系统的数据库的可用与否关系到整个铁路信息化系统的正常运转。Among them, the railway ticket system is based on PostgreSQL optimization and customization to form an independent database. PostgreSQL is a free object-relational database server (database management system), which provides Another option for . Since the application of multiple systems such as catering system, point system, face service system, QR code service system, and standby system all rely on the database of the railway ticket system, the availability of the database of the railway ticket system is related to the entire railway The normal operation of the information system.
然而,和其他数据库一样,铁路客票系统的数据库也会遇到硬件故障、数据文件缺失等故障,一旦发生这些故障,铁路客票系统的数据库就变得不可用,进而,依赖此数据库的餐饮系统、积分系统等大量其他系统无法再同步获取到此数据库的数据,从而影响到整个铁路信息化系统的数据有效性及正常运转。However, like other databases, the database of the railway ticket system will also encounter failures such as hardware failure and missing data files. Once these failures occur, the database of the railway ticket system will become unavailable. In turn, the catering system, A large number of other systems such as the point system can no longer obtain the data of this database synchronously, which affects the data validity and normal operation of the entire railway information system.
因此,如何在铁路客票系统发生数据库故障时保障整个铁路信息化系统的数据有效性,成为目前亟待解决的技术问题。Therefore, how to ensure the data validity of the entire railway information system when a database failure occurs in the railway ticket system has become an urgent technical problem to be solved.
【发明内容】【Content of invention】
本发明实施例提供了一种数据同步方法及装置、电子设备和计算机可读存储介质,旨在解决相关技术中因铁路客票系统的数据库故障而影响整个铁路信息化系统中的数据同步的技术问题,能够在铁路客票系统的数据库发生故障的情况下实时为铁路客票系统切换备用数据库,并为备用数据库建立数据复制服务。The embodiment of the present invention provides a data synchronization method and device, electronic equipment, and a computer-readable storage medium, aiming to solve the technical problem in the related art that the data synchronization in the entire railway information system is affected by the failure of the database of the railway ticket system , it can switch the standby database for the railway ticket system in real time when the database of the railway ticket system fails, and establish a data replication service for the standby database.
第一方面,本发明实施例提供了一种数据同步方法,包括:获取当前数据库的工作状态;根据所述当前数据库的工作状态,确定所述当前数据库是否发生故障;在所述当前数据库发生故障的情况下,从若干个备用数据库中选举目标备用数据库;将所述当前数据库设置为备用数据库,以及将所述目标备用数据库设置为新的当前数据库;为所述新的当前数据库创建数据库同步复制服务和对外复制服务。In the first aspect, the embodiment of the present invention provides a data synchronization method, including: obtaining the working status of the current database; determining whether the current database is faulty according to the working status of the current database; In the case of , select a target standby database from several standby databases; set the current database as a standby database, and set the target standby database as a new current database; create database synchronous replication for the new current database service and external replication service.
在本发明上述实施例中,可选地,在所述当前数据库发生故障的情况下,在所述从若干个备用数据库中选举目标备用数据库的步骤之前,还包括:对所述当前数据库进行重启;判断所述当前数据库是否重启成功,其中,在所述当前数据库未重启成功的情况下,进入所述从若干个备用数据库中选举目标备用数据库的步骤。In the above embodiments of the present invention, optionally, in the case that the current database fails, before the step of electing a target standby database from several standby databases, further comprising: restarting the current database ; Judging whether the current database is restarted successfully, wherein, if the current database is not restarted successfully, enter the step of selecting a target standby database from several standby databases.
在本发明上述实施例中,可选地,所述将所述当前数据库设置为备用数据库,以及将所述目标备用数据库设置为新的当前数据库的步骤,具体包括:将所述当前数据库的数据传输节点设置为备用节点;将所述目标备用数据库的数据传输节点设置为主节点,与数据库访问中间件连接,以接收来自所述数据库访问中间件的数据库访问请求。In the above embodiments of the present invention, optionally, the step of setting the current database as a standby database and setting the target standby database as a new current database specifically includes: setting the data of the current database The transmission node is set as a standby node; the data transmission node of the target standby database is set as a master node, connected with the database access middleware, to receive the database access request from the database access middleware.
在本发明上述实施例中,可选地,所述为所述新的当前数据库创建数据库同步复制服务和对外复制服务的步骤,具体包括:将所述数据库同步复制服务和所述对外复制服务切换至所述新的当前数据库对应的所述主节点。In the above embodiments of the present invention, optionally, the step of creating a database synchronous replication service and an external replication service for the new current database specifically includes: switching the database synchronous replication service and the external replication service to the master node corresponding to the new current database.
在本发明上述实施例中,可选地,还包括:在将所述目标备用数据库设置为所述新的当前数据库时,从若干个备用数据库访问中间件中选择目标数据库访问中间件;将所述目标数据库访问中间件连接至所述新的当前数据库的所述主节点,以供所述新的当前数据库通过所述目标数据库访问中间件接收所述数据库访问请求。In the above embodiments of the present invention, optionally, further comprising: when setting the target standby database as the new current database, selecting the target database access middleware from several standby database access middleware; The target database access middleware is connected to the master node of the new current database, so that the new current database can receive the database access request through the target database access middleware.
第二方面,本发明实施例提供了一种数据同步装置,包括:工作状态获取单元,用于获取当前数据库的工作状态;故障检测单元,用于根据所述当前数据库的工作状态,确定所述当前数据库是否发生故障;数据库选举单元,用于在所述当前数据库发生故障的情况下,从若干个备用数据库中选举目标备用数据库;数据库切换单元,用于将所述当前数据库设置为备用数据库,以及将所述目标备用数据库设置为新的当前数据库;复制服务切换单元,用于为所述新的当前数据库创建数据库同步复制服务和对外复制服务。In the second aspect, the embodiment of the present invention provides a data synchronization device, including: a working state acquisition unit, used to obtain the working state of the current database; a fault detection unit, used to determine the Whether the current database fails; the database election unit is used to elect the target standby database from several standby databases in the case of the current database failure; the database switching unit is used to set the current database as the standby database, And setting the target standby database as a new current database; a copy service switching unit, configured to create a database synchronization copy service and an external copy service for the new current database.
在本发明上述实施例中,可选地,在所述当前数据库发生故障的情况下,还包括:数据库重启单元,用于在所述数据库选举单元选举所述目标备用数据库之前,对所述当前数据库进行重启;判断单元,用于判断所述当前数据库是否重启成功,其中,在所述当前数据库未重启成功的情况下,通过所述数据库选举单元从所述若干个备用数据库中选举所述目标备用数据库。In the above-mentioned embodiments of the present invention, optionally, in the case that the current database fails, it further includes: a database restart unit, configured to reset the current database before the database election unit elects the target standby database The database is restarted; the judging unit is used to judge whether the current database is restarted successfully, wherein, in the case that the current database is not restarted successfully, the target is selected from the plurality of standby databases through the database election unit standby database.
在本发明上述实施例中,可选地,所述数据库切换单元用于:将所述当前数据库的数据传输节点设置为备用节点,以及,将所述目标备用数据库的数据传输节点设置为主节点,与数据库访问中间件连接,以接收来自所述数据库访问中间件的数据库访问请求。In the above embodiments of the present invention, optionally, the database switching unit is configured to: set the data transmission node of the current database as a standby node, and set the data transmission node of the target standby database as a master node , to connect with the database access middleware to receive the database access request from the database access middleware.
在本发明上述实施例中,可选地,所述复制服务切换单元具体用于:将所述数据库同步复制服务和所述对外复制服务切换至所述新的当前数据库对应的所述主节点。In the above embodiments of the present invention, optionally, the replication service switching unit is specifically configured to: switch the database synchronous replication service and the external replication service to the primary node corresponding to the new current database.
在本发明上述实施例中,可选地,还包括:中间件选择单元,用于在将所述目标备用数据库设置为所述新的当前数据库时,从若干个备用数据库访问中间件中选择目标数据库访问中间件;中间件切换单元,用于将所述目标数据库访问中间件连接至所述新的当前数据库的所述主节点,以供所述新的当前数据库通过所述目标数据库访问中间件接收所述数据库访问请求。In the above embodiments of the present invention, optionally, further comprising: a middleware selection unit, configured to select a target from several standby database access middlewares when setting the target standby database as the new current database Database access middleware; a middleware switching unit, configured to connect the target database access middleware to the master node of the new current database, so that the new current database can access the middleware through the target database The database access request is received.
第三方面,本发明实施例提供了一种电子设备,包括:至少一个处理器;以及,与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被设置为用于执行上述第一方面中任一项所述的方法。In a third aspect, an embodiment of the present invention provides an electronic device, including: at least one processor; and a memory connected in communication with the at least one processor; wherein, the memory stores information that can be processed by the at least one processor. An instruction executed by a device, the instruction being configured to execute the method described in any one of the above first aspects.
第四方面,本发明实施例提供了一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令用于执行上述第一方面中任一项所述的方法流程。In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, which stores computer-executable instructions, and the computer-executable instructions are used to execute the method procedure described in any one of the above-mentioned first aspects.
以上技术方案,针对相关技术中因铁路客票系统的数据库故障而影响整个铁路信息化系统中的数据同步的技术问题,可根据铁路客票系统的数据库(以下统称当前数据库)的工作状态,来判断其是否发生故障,其工作状态包括硬件运行信息、权限设置信息、数据文件变更等,若当前数据库的工作状态发生异常,则很可能发生相应的故障,比如硬件损坏、访问权限被篡改和数据文件缺失等。The above technical solutions, aiming at the technical problem of affecting the data synchronization in the entire railway information system due to the failure of the database of the railway ticket system in related technologies, can be judged according to the working status of the database of the railway ticket system (hereinafter collectively referred to as the current database). Whether there is a failure, its working status includes hardware running information, permission setting information, data file changes, etc. If the current working status of the database is abnormal, corresponding failures are likely to occur, such as hardware damage, access rights being tampered with, and data files missing Wait.
为铁路客票系统在发生数据库故障时仍能顺利运行,可设置若干个备用数据库,并在当前数据库与若干个备用数据库之间建立复制服务,使得当前数据库与若干个备用数据库数据同步。因此,当检测到当前数据库发生硬件损坏、访问权限被篡改和数据文件缺失等导致当前数据库无法正常工作的故障时,可在已有的若干个备用数据库中,选择一个目标备用数据库,作为当前数据库的替代者。换句话说,将该目标备用数据库设置为新的当前数据库,并将原当前数据库设置为备用数据库。In order that the railway ticket system can still run smoothly in the event of a database failure, several standby databases can be set up, and a replication service can be established between the current database and several standby databases, so that the data of the current database and several standby databases can be synchronized. Therefore, when it is detected that the current database has hardware damage, tampered access rights, and missing data files, etc., which cause the current database to fail to work normally, a target standby database can be selected from several existing standby databases as the current database. substitute for . In other words, set the target standby database as the new current database, and set the original current database as the standby database.
这样一来,在发生故障的同时进行了数据库的切换,由于备用数据库与原当前数据库始终数据同步,当发生数据库切换后,目标备用数据库也就是新的当前数据库与未发生故障前的原当前数据库的数据完全一致,故不影响铁路客票系统的运行,并使得铁路客票系统的业务应用完全不受后台发生的数据库故障的影响,即对数据库切换无感知。In this way, when a failure occurs, the database is switched. Since the standby database and the original current database are always synchronized, when the database switch occurs, the target standby database is the new current database and the original current database before the failure. The data is completely consistent, so it does not affect the operation of the railway ticket system, and makes the business application of the railway ticket system completely unaffected by database failures in the background, that is, there is no perception of database switching.
另外,在完成数据库的切换后,需要为新的当前数据库创建与若干个备用数据库的数据库同步复制服务以及对外复制服务。新的当前数据库进入运行状态后,仍需将数据变化等情况同步到对应的备用数据库中去,以保证新的当前数据库与备用数据库的数据一致性,从而可在新的当前数据库发生故障时仍能够实时切换至数据完全同步的备用数据库。而建立对外复制服务,则用于继续将数据变化等情况同步到同在整个铁路信息化系统内的餐饮系统、积分系统等其他系统中去,保证了整个铁路信息化系统的数据同步性能,维护了整个铁路信息化系统的稳定性与安全性。In addition, after the database switch is completed, it is necessary to create a database synchronization replication service and external replication service for the new current database and several standby databases. After the new current database enters the running state, it is still necessary to synchronize data changes and other conditions to the corresponding standby database to ensure the data consistency between the new current database and the standby database, so that the new current database can still be saved when the new current database fails. Ability to switch to a standby database with fully synchronized data in real time. The establishment of external replication services is used to continue to synchronize data changes and other situations to other systems such as the catering system and point system within the entire railway information system, ensuring the data synchronization performance of the entire railway information system and maintaining This ensures the stability and security of the entire railway information system.
通过以上技术方案,能够在铁路客票系统的数据库发生故障时实时切换至备用数据库,使得铁路客票系统的业务应用完全不受后台发生的数据库故障的影响,提升了用户体验,同时,还能够在数据库切换的同时为新的当前数据库建立数据库同步复制服务以及对外复制服务,保证了数据变化等情况同步到用于应对数据库故障的备用数据库以及同在整个铁路信息化系统内的餐饮系统、积分系统等其他系统中去,实现了整个铁路信息化系统的数据同步性能,维护了整个铁路信息化系统的稳定性与安全性。Through the above technical solutions, it is possible to switch to the standby database in real time when the database of the railway ticket system fails, so that the business application of the railway ticket system is completely unaffected by the database failure in the background, which improves the user experience. At the same time of switching, establish database synchronous replication service and external replication service for the new current database, to ensure that data changes and other situations are synchronized to the standby database used to deal with database failures, as well as the catering system and point system in the entire railway information system. Among other systems, it realizes the data synchronization performance of the entire railway information system and maintains the stability and security of the entire railway information system.
【附图说明】【Description of drawings】
为了更清楚地说明本发明实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。In order to illustrate the technical solutions of the embodiments of the present invention more clearly, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. Those of ordinary skill in the art can also obtain other drawings based on these drawings without any creative effort.
图1示出了本发明的一个实施例的数据同步方法的流程图;Fig. 1 shows the flowchart of the data synchronization method of an embodiment of the present invention;
图2示出了本发明的另一个实施例的数据同步方法的流程图;Fig. 2 shows the flowchart of the data synchronization method of another embodiment of the present invention;
图3示出了本发明的一个实施例的数据同步装置的框图;Fig. 3 shows the block diagram of the data synchronizing device of an embodiment of the present invention;
图4示出了本发明的另一个实施例的数据同步装置的框图;Fig. 4 shows the block diagram of the data synchronizing device of another embodiment of the present invention;
图5示出了本发明的一个实施例的电子设备的框图。Fig. 5 shows a block diagram of an electronic device according to an embodiment of the present invention.
【具体实施方式】【Detailed ways】
为了更好的理解本发明的技术方案,下面结合附图对本发明实施例进行详细描述。In order to better understand the technical solutions of the present invention, the embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings.
应当明确,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其它实施例,都属于本发明保护的范围。It should be clear that the described embodiments are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.
在本发明实施例中使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本发明。在本发明实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。Terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. As used in the embodiments of the present invention and the appended claims, the singular forms "a", "said" and "the" are also intended to include the plural forms unless the context clearly indicates otherwise.
图1示出了本发明的一个实施例的数据同步方法的流程图。Fig. 1 shows a flowchart of a data synchronization method according to an embodiment of the present invention.
如图1所示,本发明的一个实施例的数据同步方法的流程包括:As shown in Figure 1, the process flow of the data synchronization method of an embodiment of the present invention includes:
步骤102,获取当前数据库的工作状态。Step 102, obtaining the working status of the current database.
步骤104,根据所述当前数据库的工作状态,确定所述当前数据库是否发生故障。Step 104: Determine whether the current database is faulty according to the working status of the current database.
针对相关技术中因铁路客票系统的数据库故障而影响整个铁路信息化系统中的数据同步的技术问题,可根据铁路客票系统的数据库(以下统称当前数据库)的工作状态,来判断其是否发生故障,其工作状态包括硬件运行信息、权限设置信息、数据文件变更等,若当前数据库的工作状态发生异常,则很可能发生相应的故障,比如硬件损坏、访问权限被篡改和数据文件缺失等。In view of the technical problem in the related art that the database failure of the railway ticket system affects the data synchronization in the entire railway information system, it can be judged whether there is a failure according to the working status of the database of the railway ticket system (hereinafter collectively referred to as the current database), Its working status includes hardware running information, permission setting information, data file changes, etc. If the current working status of the database is abnormal, corresponding failures are likely to occur, such as hardware damage, access rights tampered with, and data files missing.
步骤106,在所述当前数据库发生故障的情况下,从若干个备用数据库中选举目标备用数据库。Step 106, when the current database fails, elect a target standby database from several standby databases.
铁路客票系统具有数据同步的多个数据库,在铁路客票系统启动时,首先会在多个数据库中随机投票选举一个数据库作为当前数据库,将多个数据库剩余的其他数据库作为备用数据库。而本次选举,则是在当前数据库以外的所有备用数据库中随机投票选举目标备用数据库,作为当前数据库的替换者,接管当前数据库正在运行的业务。The railway ticket system has multiple databases for data synchronization. When the railway ticket system is started, it will randomly vote for one database as the current database among the multiple databases, and use the remaining databases as standby databases. In this election, the target standby database is randomly voted among all standby databases other than the current database, and as the replacement of the current database, it takes over the running business of the current database.
步骤108,将所述当前数据库设置为备用数据库,以及将所述目标备用数据库设置为新的当前数据库。Step 108, setting the current database as a standby database, and setting the target standby database as a new current database.
为铁路客票系统在发生数据库故障时仍能顺利运行,可设置若干个备用数据库,并在当前数据库与若干个备用数据库之间建立复制服务,使得当前数据库与若干个备用数据库数据同步。因此,当检测到当前数据库发生硬件损坏、访问权限被篡改和数据文件缺失等导致当前数据库无法正常工作的故障时,可在已有的若干个备用数据库中,选择一个目标备用数据库,作为当前数据库的替代者。换句话说,将该目标备用数据库设置为新的当前数据库,并将原当前数据库设置为备用数据库。In order that the railway ticket system can still run smoothly in the event of a database failure, several standby databases can be set up, and a replication service can be established between the current database and several standby databases, so that the data of the current database and several standby databases can be synchronized. Therefore, when it is detected that the current database has hardware damage, tampered access rights, and missing data files, etc., which cause the current database to fail to work normally, a target standby database can be selected from several existing standby databases as the current database. substitute for . In other words, set the target standby database as the new current database, and set the original current database as the standby database.
这样一来,在发生故障的同时进行了数据库的切换,由于备用数据库与原当前数据库始终数据同步,当发生数据库切换后,目标备用数据库也就是新的当前数据库与未发生故障前的原当前数据库的数据完全一致,故不影响铁路客票系统的运行,并使得铁路客票系统的业务应用完全不受后台发生的数据库故障的影响,即对数据库切换无感知。In this way, when a failure occurs, the database is switched. Since the standby database and the original current database are always synchronized, when the database switch occurs, the target standby database is the new current database and the original current database before the failure. The data is completely consistent, so it does not affect the operation of the railway ticket system, and makes the business application of the railway ticket system completely unaffected by database failures in the background, that is, there is no perception of database switching.
步骤110,为所述新的当前数据库创建数据库同步复制服务和对外复制服务。Step 110, create a database synchronization replication service and an external replication service for the new current database.
另外,在完成数据库的切换后,需要为新的当前数据库创建与若干个备用数据库的数据库同步复制服务以及对外复制服务。新的当前数据库进入运行状态后,仍需将数据变化等情况同步到对应的备用数据库中去,以保证新的当前数据库与备用数据库的数据一致性,从而可在新的当前数据库发生故障时仍能够实时切换至数据完全同步的备用数据库。而建立对外复制服务,则用于继续将数据变化等情况同步到同在整个铁路信息化系统内的餐饮系统、积分系统等其他系统中去,保证了整个铁路信息化系统的数据同步性能,维护了整个铁路信息化系统的稳定性与安全性。In addition, after the database switch is completed, it is necessary to create a database synchronization replication service and external replication service for the new current database and several standby databases. After the new current database enters the running state, it is still necessary to synchronize data changes and other conditions to the corresponding standby database to ensure the data consistency between the new current database and the standby database, so that the new current database can still be saved when the new current database fails. Ability to switch to a standby database with fully synchronized data in real time. The establishment of external replication services is used to continue to synchronize data changes and other situations to other systems such as the catering system and point system within the entire railway information system, ensuring the data synchronization performance of the entire railway information system and maintaining This ensures the stability and security of the entire railway information system.
通过以上技术方案,能够在铁路客票系统的数据库发生故障时实时切换至备用数据库,使得铁路客票系统的业务应用完全不受后台发生的数据库故障的影响,提升了用户体验,同时,还能够在数据库切换的同时为新的当前数据库建立数据库同步复制服务以及对外复制服务,保证了数据变化等情况同步到用于应对数据库故障的备用数据库以及同在整个铁路信息化系统内的餐饮系统、积分系统等其他系统中去,实现了整个铁路信息化系统的数据同步性能,维护了整个铁路信息化系统的稳定性与安全性。Through the above technical solutions, it is possible to switch to the standby database in real time when the database of the railway ticket system fails, so that the business application of the railway ticket system is completely unaffected by the database failure in the background, which improves the user experience. At the same time of switching, establish database synchronous replication service and external replication service for the new current database, to ensure that data changes and other situations are synchronized to the standby database used to deal with database failures, as well as the catering system and point system in the entire railway information system. Among other systems, it realizes the data synchronization performance of the entire railway information system and maintains the stability and security of the entire railway information system.
图2示出了本发明的另一个实施例的数据同步方法的流程图。Fig. 2 shows a flowchart of a data synchronization method according to another embodiment of the present invention.
如图2所示,本发明的另一个实施例的数据同步方法的流程包括:As shown in Figure 2, the process of the data synchronization method of another embodiment of the present invention includes:
步骤202,获取当前数据库的工作状态。Step 202, obtaining the working status of the current database.
步骤204,根据所述当前数据库的工作状态,确定所述当前数据库是否发生故障。Step 204: Determine whether the current database is faulty according to the working status of the current database.
当前数据库的工作状态包括硬件运行信息、权限设置信息、数据文件变更等,若当前数据库的工作状态发生异常,则很可能发生相应的故障,比如硬件损坏、访问权限被篡改和数据文件缺失等。The working status of the current database includes hardware running information, permission setting information, data file changes, etc. If the working status of the current database is abnormal, corresponding failures are likely to occur, such as hardware damage, access rights tampered with, and data files missing.
步骤206,对所述当前数据库进行重启。Step 206, restart the current database.
步骤208,判断所述当前数据库是否重启成功,当判断结果为在所述当前数据库未重启成功的情况下,进入步骤210,当判断结果为在所述当前数据库重启成功的情况下,结束进程。Step 208, judging whether the current database restarts successfully, if the judging result is that the current database is not restarting successfully, go to step 210, and when the judging result is in the case of the current database restarting successfully, end the process.
在当前数据库发生故障甚至宕机时,首先尝试重启拉起当前数据库,若当前数据库能够重启成功,再度进入正常运行状态,则可继续使用当前数据库。反之,若当前数据库未重启成功,则说明当前数据库确实无法继续正常工作了,此时,再进行数据库切换的步骤。需要知晓,重启以及判断重启成功的步骤所消耗的时间极短,对铁路客票系统乃至整个铁路信息化系统的运行的影响可以忽略不计。When the current database fails or even goes down, first try to restart the current database. If the current database can be restarted successfully and enters the normal operation state again, the current database can continue to be used. Conversely, if the current database does not restart successfully, it means that the current database cannot continue to work normally. At this time, the steps of database switching are performed. It needs to be known that the time consumed by restarting and the steps of judging the success of restarting is extremely short, and the impact on the operation of the railway ticket system and even the entire railway information system can be ignored.
步骤210,从若干个备用数据库中选举目标备用数据库。Step 210, electing a target standby database from several standby databases.
铁路客票系统具有数据同步的多个数据库,在铁路客票系统启动时,首先会在多个数据库中随机投票选举一个数据库作为当前数据库,将多个数据库剩余的其他数据库作为备用数据库。而本次选举,则是在当前数据库以外的所有备用数据库中随机投票选举目标备用数据库,作为当前数据库的替换者,接管当前数据库正在运行的业务。The railway ticket system has multiple databases for data synchronization. When the railway ticket system is started, it will randomly vote for one database as the current database among the multiple databases, and use the remaining databases as standby databases. In this election, the target standby database is randomly voted among all standby databases other than the current database, and as the replacement of the current database, it takes over the running business of the current database.
步骤212,将所述当前数据库的数据传输节点设置为备用节点,将所述目标备用数据库的数据传输节点设置为主节点,与数据库访问中间件连接,以接收来自所述数据库访问中间件的数据库访问请求。Step 212, setting the data transmission node of the current database as a standby node, setting the data transmission node of the target standby database as a master node, and connecting with the database access middleware to receive the database from the database access middleware access request.
铁路客票系统具有数据同步的多个数据库,每个数据库都具有一个数据访问节点,业务应用请求通过数据库访问中间件访问一个数据库的数据访问节点来实现对该数据库的访问。而当前数据库的数据访问节点即为所有业务应用请求可访问的主节点,而备用数据库的数据访问节点即为备用节点。因此,在将目标备用数据库与当前数据库进行切换后,二者节点的身份也需要切换,故需要将原当前数据库的数据传输节点设置为备用节点,再将目标备用数据库的数据传输节点设置为主节点,用以业务应用请求通过数据库访问中间件对新的主节点进行访问。The railway passenger ticket system has multiple databases for data synchronization, and each database has a data access node. The business application requests to access the data access node of a database through the database access middleware to realize the access to the database. The data access node of the current database is the primary node accessible to all business application requests, and the data access node of the standby database is the standby node. Therefore, after switching the target standby database and the current database, the identities of the two nodes also need to be switched, so it is necessary to set the data transmission node of the original current database as the standby node, and then set the data transmission node of the target standby database as the master The node is used for business application requests to access the new primary node through the database access middleware.
步骤214,将所述数据库同步复制服务和所述对外复制服务切换至所述新的当前数据库对应的所述主节点。Step 214, switch the database synchronous replication service and the external replication service to the primary node corresponding to the new current database.
在完成数据库的切换后,需要为新的当前数据库创建与若干个备用数据库的数据库同步复制服务以及对外复制服务,换句话说,就是将原当前数据的节点的数据库同步复制服务以及对外复制服务,切换到新的当前数据库对应的主节点进行执行。After the database switch is completed, it is necessary to create database synchronization replication services and external replication services for the new current database and several standby databases. Switch to the master node corresponding to the new current database for execution.
新的当前数据库进入运行状态后,仍需将数据变化等情况同步到对应的备用数据库中去,以保证新的当前数据库与备用数据库的数据一致性,从而可在新的当前数据库发生故障时仍能够实时切换至数据完全同步的备用数据库。而建立对外复制服务,则用于继续将数据变化等情况同步到同在整个铁路信息化系统内的餐饮系统、积分系统等其他系统中去,保证了整个铁路信息化系统的数据同步性能,维护了整个铁路信息化系统的稳定性与安全性。After the new current database enters the running state, it is still necessary to synchronize data changes and other conditions to the corresponding standby database to ensure the data consistency between the new current database and the standby database, so that the new current database can still be saved when the new current database fails. Ability to switch to a standby database with fully synchronized data in real time. The establishment of external replication services is used to continue to synchronize data changes and other situations to other systems such as the catering system and point system within the entire railway information system, ensuring the data synchronization performance of the entire railway information system and maintaining This ensures the stability and security of the entire railway information system.
图3示出了本发明的一个实施例的数据同步装置的框图。Fig. 3 shows a block diagram of a data synchronization device according to an embodiment of the present invention.
如图3所示,本发明的一个实施例的数据同步装置300包括:主数据库302、备用数据库304、数据库访问中间件306、备用数据库访问中间件308、数据库状态监测模块310、数据库切换模块312和选举模块314。As shown in Figure 3, the data synchronizing device 300 of an embodiment of the present invention comprises: primary database 302, standby database 304, database access middleware 306, standby database access middleware 308, database status monitoring module 310, database switching module 312 and an election module 314 .
在系统启动时,数据同步装置300开始工作,选举模块314在所有数据库中选举出主数据库302的数据传输节点作为主节点,将所有数据库中主数据库302以外的备用数据库304的数据传输节点作为从节点。When the system starts, the data synchronization device 300 starts to work, and the election module 314 elects the data transfer node of the master database 302 as the master node in all databases, and the data transfer node of the standby database 304 other than the master database 302 in all databases as the slave node.
选举成功后,数据库访问中间件306连接至主数据库302的主节点,以实现业务应用请求通过数据库访问中间件306对主数据库302的访问。同时,创建主节点与从节点之间的数据库同步复制服务,保证主数据库302与备用数据库304的数据一致性。如果用到对外复制的话,此时,也需要创建主节点的对外复制服务。After the election is successful, the database access middleware 306 is connected to the master node of the master database 302 to realize the business application request to access the master database 302 through the database access middleware 306 . At the same time, a database synchronous replication service between the master node and the slave node is created to ensure data consistency between the master database 302 and the standby database 304 . If external replication is used, at this time, the external replication service of the master node also needs to be created.
数据库状态监测模块310对主数据库302的工作状态进行监测,当数据库状态监测模块310监测到主数据库302发生故障或者宕机时,系统会首先尝试重启和拉起主数据库302。The database state monitoring module 310 monitors the working state of the main database 302. When the database state monitoring module 310 detects that the main database 302 fails or goes down, the system will first try to restart and pull up the main database 302.
若重启和拉起主数据库302失败,则将监测结果发送至数据库切换模块312和选举模块314,选举模块314根据接收到的监测结果在若干个备用数据库304中重新选举出目标备用数据库,数据库切换模块312则将该目标备用数据库的数据传输节点设置为新的主节点,并将数据库访问中间件306连接至新的主节点。If restarting and pulling up the main database 302 fails, then the monitoring result is sent to the database switching module 312 and the election module 314, and the election module 314 re-elects the target standby database in several standby databases 304 according to the monitoring result received, and the database switching Module 312 sets the data transfer node of the target standby database as a new primary node, and connects the database access middleware 306 to the new primary node.
另外,数据库切换模块312还会为新的主节点到剩余其他备用数据库304的数据传输节点建立数据库同步复制服务,如果新的主节点未启动,则将同步复制服务暂时改为异步复制服务,直至新的主节点启动为止,从而优先保障数据库节点的可用性。当然,数据库切换模块312还会为新的主节点建立对外复制服务,以实现新的主节点到外接设备的数据同步。In addition, the database switching module 312 will also set up a database synchronous replication service for the data transmission nodes from the new primary node to other remaining standby databases 304. If the new primary node is not started, the synchronous replication service will be temporarily changed to an asynchronous replication service until Until the new primary node is started, the availability of the database node is given priority. Of course, the database switching module 312 will also establish an external replication service for the new master node, so as to realize data synchronization from the new master node to the external device.
需要补充的是,在数据库访问失败的情形下,除了数据库故障或宕机,也有可能是数据库访问中间件306发生了故障,为排除数据库访问中间件306的故障,有效实现数据同步复制,可在切换数据库的同时,将当前使用的数据库访问中间件306切换至备用数据库访问中间件308,进一步保证了数据同步复制的稳定性。What needs to be added is that in the case of database access failure, in addition to database failure or downtime, it is also possible that the database access middleware 306 has failed. In order to eliminate the failure of the database access middleware 306 and effectively realize data synchronization replication, you can While switching the database, the currently used database access middleware 306 is switched to the standby database access middleware 308, which further ensures the stability of data synchronous replication.
上述技术方案,能够在铁路客票系统的数据库发生故障时实时切换至备用数据库,使得铁路客票系统的业务应用完全不受后台发生的数据库故障的影响,提升了用户体验,同时,还能够在数据库切换的同时为新的当前数据库建立数据库同步复制服务以及对外复制服务,保证了数据变化等情况同步到用于应对数据库故障的备用数据库以及同在整个铁路信息化系统内的餐饮系统、积分系统等其他系统中去,实现了整个铁路信息化系统的数据同步性能,维护了整个铁路信息化系统的稳定性与安全性。The above technical solution can switch to the standby database in real time when the database of the railway ticket system fails, so that the business application of the railway ticket system is completely unaffected by the database failure in the background, which improves the user experience. At the same time, the database synchronous replication service and external replication service are established for the new current database, which ensures that data changes and other situations are synchronized to the standby database used to deal with database failures, as well as the catering system, point system, etc. in the entire railway information system. In the system, the data synchronization performance of the entire railway information system is realized, and the stability and security of the entire railway information system are maintained.
图4示出了本发明的另一个实施例的数据同步装置的框图。Fig. 4 shows a block diagram of a data synchronization device according to another embodiment of the present invention.
如图4所示,本发明的另一个实施例的数据同步装置400,包括:工作状态获取单元402,用于获取当前数据库的工作状态;故障检测单元404,用于根据所述当前数据库的工作状态,确定所述当前数据库是否发生故障;数据库选举单元406,用于在所述当前数据库发生故障的情况下,从若干个备用数据库中选举目标备用数据库;数据库切换单元408,用于将所述当前数据库设置为备用数据库,以及将所述目标备用数据库设置为新的当前数据库;复制服务切换单元410,用于为所述新的当前数据库创建数据库同步复制服务和对外复制服务。As shown in Figure 4, a data synchronization device 400 according to another embodiment of the present invention includes: a working status acquisition unit 402, used to acquire the working status of the current database; a fault detection unit 404, used to state, to determine whether the current database fails; the database election unit 406 is used to select a target standby database from several standby databases when the current database fails; the database switching unit 408 is used to select the The current database is set as a standby database, and the target standby database is set as a new current database; the replication service switching unit 410 is configured to create a database synchronization replication service and an external replication service for the new current database.
该数据同步装置400使用图1至图3示出的实施例中任一项所述的方案,因此,具有上述所有技术效果,在此不再赘述。数据同步装置400还具有以下技术特征:The data synchronization device 400 uses the solution described in any one of the embodiments shown in FIG. 1 to FIG. 3 , so it has all the technical effects described above, which will not be repeated here. The data synchronization device 400 also has the following technical features:
在本发明上述实施例中,可选地,在所述当前数据库发生故障的情况下,还包括:数据库重启单元,用于在所述数据库选举单元406选举所述目标备用数据库之前,对所述当前数据库进行重启;判断单元,用于判断所述当前数据库是否重启成功,其中,在所述当前数据库未重启成功的情况下,通过所述数据库选举单元从所述若干个备用数据库中选举所述目标备用数据库。In the above-mentioned embodiments of the present invention, optionally, in the case that the current database fails, it further includes: a database restart unit, configured to, before the database election unit 406 elects the target standby database, The current database is restarted; the judging unit is used to judge whether the current database is restarted successfully, wherein, in the case that the current database is not restarted successfully, the database election unit is used to select the plurality of standby databases. Target standby database.
在本发明上述实施例中,可选地,所述数据库切换单元408用于:将所述当前数据库的数据传输节点设置为备用节点,以及,将所述目标备用数据库的数据传输节点设置为主节点,与数据库访问中间件连接,以接收来自所述数据库访问中间件的数据库访问请求。In the above embodiments of the present invention, optionally, the database switching unit 408 is configured to: set the data transmission node of the current database as the standby node, and set the data transmission node of the target standby database as the master The node is connected with the database access middleware to receive the database access request from the database access middleware.
在本发明上述实施例中,可选地,所述复制服务切换单元410具体用于:将所述数据库同步复制服务和所述对外复制服务切换至所述新的当前数据库对应的所述主节点。In the above embodiments of the present invention, optionally, the replication service switching unit 410 is specifically configured to: switch the database synchronous replication service and the external replication service to the master node corresponding to the new current database .
在本发明上述实施例中,可选地,还包括:中间件选择单元,用于在将所述目标备用数据库设置为所述新的当前数据库时,从若干个备用数据库访问中间件中选择目标数据库访问中间件;中间件切换单元,用于将所述目标数据库访问中间件连接至所述新的当前数据库的所述主节点,以供所述新的当前数据库通过所述目标数据库访问中间件接收所述数据库访问请求。In the above embodiments of the present invention, optionally, further comprising: a middleware selection unit, configured to select a target from several standby database access middlewares when setting the target standby database as the new current database Database access middleware; a middleware switching unit, configured to connect the target database access middleware to the master node of the new current database, so that the new current database can access the middleware through the target database The database access request is received.
图5示出了本发明的一个实施例的电子设备的框图。Fig. 5 shows a block diagram of an electronic device according to an embodiment of the present invention.
如图5所示,本发明的一个实施例的电子设备500,包括至少一个存储器502;以及,与所述至少一个存储器502通信连接的处理器504;其中,所述存储器存储有可被所述至少一个处理器504执行的指令,所述指令被设置为用于执行上述图1至图3实施例中任一项所述的方案。因此,该电子设备500具有和图1至图3实施例中任一项相同的技术效果,在此不再赘述。As shown in FIG. 5, an electronic device 500 according to an embodiment of the present invention includes at least one memory 502; and a processor 504 communicatively connected to the at least one memory 502; Instructions executed by at least one processor 504, where the instructions are configured to execute the solution described in any one of the above embodiments in FIG. 1 to FIG. 3 . Therefore, the electronic device 500 has the same technical effect as any one of the embodiments in FIG. 1 to FIG. 3 , which will not be repeated here.
本发明实施例的电子设备以多种形式存在,包括但不限于:The electronic equipment of the embodiment of the present invention exists in various forms, including but not limited to:
(1)移动通信设备:这类设备的特点是具备移动通信功能,并且以提供话音、数据通信为主要目标。这类终端包括:智能手机(例如iPhone)、多媒体手机、功能性手机,以及低端手机等。(1) Mobile communication equipment: This type of equipment is characterized by mobile communication functions, and its main goal is to provide voice and data communication. Such terminals include: smart phones (such as iPhone), multimedia phones, feature phones, and low-end phones.
(2)超移动个人计算机设备:这类设备属于个人计算机的范畴,有计算和处理功能,一般也具备移动上网特性。这类终端包括:PDA、MID和UMPC设备等,例如iPad。(2) Ultra-mobile personal computer equipment: This type of equipment belongs to the category of personal computers, has computing and processing functions, and generally has the characteristics of mobile Internet access. Such terminals include: PDA, MID and UMPC equipment, such as iPad.
(3)便携式娱乐设备:这类设备可以显示和播放多媒体内容。该类设备包括:音频、视频播放器(例如iPod),掌上游戏机,电子书,以及智能玩具和便携式车载导航设备。(3) Portable entertainment equipment: This type of equipment can display and play multimedia content. Such devices include: audio and video players (such as iPod), handheld game consoles, e-books, as well as smart toys and portable car navigation devices.
(4)服务器:提供计算服务的设备,服务器的构成包括处理器、硬盘、内存、系统总线等,服务器和通用的计算机架构类似,但是由于需要提供高可靠的服务,因此在处理能力、稳定性、可靠性、安全性、可扩展性、可管理性等方面要求较高。(4) Server: A device that provides computing services. The composition of a server includes a processor, hard disk, memory, system bus, etc. The server is similar to a general-purpose computer architecture, but due to the need to provide high-reliability services, it is important in terms of processing power and stability. , Reliability, security, scalability, manageability and other aspects have high requirements.
(5)其他具有数据交互功能的电子装置。(5) Other electronic devices with data interaction function.
另外,本发明实施例提供了一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令用于执行上述图1至图3实施例中任一项所述的方法流程。In addition, an embodiment of the present invention provides a computer-readable storage medium, which stores computer-executable instructions, and the computer-executable instructions are used to execute the method flow described in any one of the above-mentioned embodiments in FIG. 1 to FIG. 3 .
以上结合附图详细说明了本发明的技术方案,通过本发明的技术方案,能够在铁路客票系统的数据库发生故障时实时切换至备用数据库,使得铁路客票系统的业务应用完全不受后台发生的数据库故障的影响,提升了用户体验,同时,还能够在数据库切换的同时为新的当前数据库建立数据库同步复制服务以及对外复制服务,保证了数据变化等情况同步到用于应对数据库故障的备用数据库以及同在整个铁路信息化系统内的餐饮系统、积分系统等其他系统中去,实现了整个铁路信息化系统的数据同步性能,维护了整个铁路信息化系统的稳定性与安全性。The technical scheme of the present invention has been described in detail above in conjunction with the accompanying drawings. Through the technical scheme of the present invention, it is possible to switch to the standby database in real time when the database of the railway ticket system fails, so that the business application of the railway ticket system is completely free from the database that occurs in the background. The impact of the failure improves the user experience. At the same time, it can also establish a database synchronization replication service and an external replication service for the new current database while the database is switched, ensuring that data changes and other situations are synchronized to the standby database used to deal with database failures and Same as the catering system, point system and other systems in the entire railway information system, it realizes the data synchronization performance of the entire railway information system, and maintains the stability and security of the entire railway information system.
应当理解,本文中使用的术语“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。It should be understood that the term "and/or" used herein is only an association relationship describing associated objects, which means that there may be three relationships, for example, A and/or B, which may mean that A exists alone, and A and B exist simultaneously. B, there are three situations of B alone. In addition, the character "/" in this article generally indicates that the contextual objects are an "or" relationship.
取决于语境,如在此所使用的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”或“响应于检测”。类似地,取决于语境,短语“如果确定”或“如果检测(陈述的条件或事件)”可以被解释成为“当确定时”或“响应于确定”或“当检测(陈述的条件或事件)时”或“响应于检测(陈述的条件或事件)”。Depending on the context, the word "if" as used herein may be interpreted as "at" or "when" or "in response to determining" or "in response to detecting". Similarly, depending on the context, the phrases "if determined" or "if detected (the stated condition or event)" could be interpreted as "when determined" or "in response to the determination" or "when detected (the stated condition or event) )" or "in response to detection of (a stated condition or event)".
在本发明所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如,多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined Or it can be integrated into another system, or some features can be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware, or in the form of hardware plus software functional units.
上述以软件功能单元的形式实现的集成的单元,可以存储在一个计算机可读取存储介质中。上述软件功能单元存储在一个存储介质中,包括若干指令用以使得一台计算机装置(可以是个人计算机,服务器,或者网络装置等)或处理器(Processor)执行本发明各个实施例所述方法的部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The above-mentioned integrated units implemented in the form of software functional units may be stored in a computer-readable storage medium. The above-mentioned software functional units are stored in a storage medium, and include several instructions to make a computer device (which may be a personal computer, server, or network device, etc.) or a processor (Processor) execute the methods described in various embodiments of the present invention. partial steps. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other various media that can store program codes. .
以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本发明保护的范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included in the present invention. within the scope of protection.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910414686.1ACN110162428A (en) | 2019-05-17 | 2019-05-17 | Method of data synchronization and device, electronic equipment and computer readable storage medium |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910414686.1ACN110162428A (en) | 2019-05-17 | 2019-05-17 | Method of data synchronization and device, electronic equipment and computer readable storage medium |
| Publication Number | Publication Date |
|---|---|
| CN110162428Atrue CN110162428A (en) | 2019-08-23 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201910414686.1APendingCN110162428A (en) | 2019-05-17 | 2019-05-17 | Method of data synchronization and device, electronic equipment and computer readable storage medium |
| Country | Link |
|---|---|
| CN (1) | CN110162428A (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110955647A (en)* | 2019-12-04 | 2020-04-03 | 世纪龙信息网络有限责任公司 | Database assistance method, database assistance device, computer equipment and storage medium |
| CN111200532A (en)* | 2020-01-02 | 2020-05-26 | 广州虎牙科技有限公司 | Method, device, equipment and medium for master-slave switching of database cluster node |
| CN111291021A (en)* | 2020-01-21 | 2020-06-16 | 北京奇艺世纪科技有限公司 | Database management method and device, electronic equipment and storage medium |
| CN111552637A (en)* | 2020-04-20 | 2020-08-18 | 北京顺达同行科技有限公司 | Database state detection method and device, electronic equipment and storage medium thereof |
| CN112256707A (en)* | 2020-12-18 | 2021-01-22 | 上海爱可生信息技术股份有限公司 | Flow management method of database middleware and database middleware node |
| CN114020357A (en)* | 2021-11-04 | 2022-02-08 | 湖北美和易思教育科技有限公司 | Method, device, system and medium for starting namenode node |
| CN114168602A (en)* | 2020-08-20 | 2022-03-11 | 北京金山云网络技术有限公司 | Database access method, device, system, equipment and medium |
| CN114520809A (en)* | 2022-03-04 | 2022-05-20 | 浪潮云信息技术股份公司 | Method and device for realizing load balancing of back-end request |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101183377A (en)* | 2007-12-10 | 2008-05-21 | 华中科技大学 | A high-availability database cluster based on message middleware |
| US7440977B2 (en)* | 2005-05-11 | 2008-10-21 | Inha-Industry Partnership Institute | Recovery method using extendible hashing-based cluster logs in shared-nothing spatial database cluster |
| US9110851B2 (en)* | 2011-09-29 | 2015-08-18 | Oracle International Corporation | System and method for persisting transaction records in a transactional middleware machine environment |
| CN105224637A (en)* | 2015-09-24 | 2016-01-06 | 珠海许继芝电网自动化有限公司 | A kind of based on PostgreSQL database active and standby/the comprehensive method of cluster application |
| CN106130763A (en)* | 2016-06-24 | 2016-11-16 | 平安科技(深圳)有限公司 | Server cluster and be applicable to the database resource group method for handover control of this cluster |
| CN106156318A (en)* | 2016-07-05 | 2016-11-23 | 武汉斗鱼网络科技有限公司 | A kind of system and method realizing multinode data base's High Availabitity |
| CN106301938A (en)* | 2016-08-25 | 2017-01-04 | 成都索贝数码科技股份有限公司 | A kind of high availability and the data base cluster system of strong consistency and node administration method thereof |
| CN109471759A (en)* | 2018-11-21 | 2019-03-15 | 北京谷数科技有限公司 | A kind of database failure switching method and equipment based on SAS dual control equipment |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7440977B2 (en)* | 2005-05-11 | 2008-10-21 | Inha-Industry Partnership Institute | Recovery method using extendible hashing-based cluster logs in shared-nothing spatial database cluster |
| CN101183377A (en)* | 2007-12-10 | 2008-05-21 | 华中科技大学 | A high-availability database cluster based on message middleware |
| US9110851B2 (en)* | 2011-09-29 | 2015-08-18 | Oracle International Corporation | System and method for persisting transaction records in a transactional middleware machine environment |
| CN105224637A (en)* | 2015-09-24 | 2016-01-06 | 珠海许继芝电网自动化有限公司 | A kind of based on PostgreSQL database active and standby/the comprehensive method of cluster application |
| CN106130763A (en)* | 2016-06-24 | 2016-11-16 | 平安科技(深圳)有限公司 | Server cluster and be applicable to the database resource group method for handover control of this cluster |
| CN106156318A (en)* | 2016-07-05 | 2016-11-23 | 武汉斗鱼网络科技有限公司 | A kind of system and method realizing multinode data base's High Availabitity |
| CN106301938A (en)* | 2016-08-25 | 2017-01-04 | 成都索贝数码科技股份有限公司 | A kind of high availability and the data base cluster system of strong consistency and node administration method thereof |
| CN109471759A (en)* | 2018-11-21 | 2019-03-15 | 北京谷数科技有限公司 | A kind of database failure switching method and equipment based on SAS dual control equipment |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110955647A (en)* | 2019-12-04 | 2020-04-03 | 世纪龙信息网络有限责任公司 | Database assistance method, database assistance device, computer equipment and storage medium |
| CN111200532A (en)* | 2020-01-02 | 2020-05-26 | 广州虎牙科技有限公司 | Method, device, equipment and medium for master-slave switching of database cluster node |
| CN111291021A (en)* | 2020-01-21 | 2020-06-16 | 北京奇艺世纪科技有限公司 | Database management method and device, electronic equipment and storage medium |
| CN111291021B (en)* | 2020-01-21 | 2024-04-26 | 北京奇艺世纪科技有限公司 | Database management method and device, electronic equipment and storage medium |
| CN111552637A (en)* | 2020-04-20 | 2020-08-18 | 北京顺达同行科技有限公司 | Database state detection method and device, electronic equipment and storage medium thereof |
| CN114168602A (en)* | 2020-08-20 | 2022-03-11 | 北京金山云网络技术有限公司 | Database access method, device, system, equipment and medium |
| CN112256707A (en)* | 2020-12-18 | 2021-01-22 | 上海爱可生信息技术股份有限公司 | Flow management method of database middleware and database middleware node |
| CN112256707B (en)* | 2020-12-18 | 2021-04-09 | 上海爱可生信息技术股份有限公司 | Flow management method of database middleware and database middleware node |
| CN114020357A (en)* | 2021-11-04 | 2022-02-08 | 湖北美和易思教育科技有限公司 | Method, device, system and medium for starting namenode node |
| CN114020357B (en)* | 2021-11-04 | 2024-05-03 | 湖北美和易思教育科技有限公司 | Starting method, device, system and medium of naminode node |
| CN114520809A (en)* | 2022-03-04 | 2022-05-20 | 浪潮云信息技术股份公司 | Method and device for realizing load balancing of back-end request |
| Publication | Publication Date | Title |
|---|---|---|
| CN110162428A (en) | Method of data synchronization and device, electronic equipment and computer readable storage medium | |
| JP6602369B2 (en) | Secure data access after memory failure | |
| CN102142008B (en) | Method and system for implementing distributed memory database, token controller and memory database | |
| WO2018036148A1 (en) | Server cluster system | |
| CN113051110A (en) | Cluster switching method, device and equipment | |
| CN103294701B (en) | A kind of method that distributed file system and data process | |
| CN105338078A (en) | Data storage method and device used for storing system | |
| WO2021103499A1 (en) | Multi-active data center-based traffic switching method and device | |
| EP2902922A1 (en) | Distributed file system and data backup method for distributed file system | |
| CN107666493B (en) | Database configuration method and equipment thereof | |
| CN112291082B (en) | Computer room disaster recovery processing method, terminal and storage medium | |
| CN105069152B (en) | data processing method and device | |
| CN110019481A (en) | Memory database access method, device, equipment and medium | |
| CN116668269A (en) | Arbitration method, device and system for dual-activity data center | |
| CN105426213A (en) | Software update method and system | |
| CN115168322A (en) | Database system, main library election method and device | |
| CN113190385A (en) | Data synchronization method for master and standby machines of station application server | |
| CN105389231A (en) | Database dual-computer backup method and system | |
| CN107357800A (en) | A kind of database High Availabitity zero loses solution method | |
| CN118673078A (en) | A method for synchronizing a logical replication slot and a related device | |
| CN106325768A (en) | Dual storage system and method | |
| CN110083653B (en) | Order data operation method and device, computer equipment and storage medium | |
| CN112494931B (en) | Cloud game control method, system, server and computer-readable storage medium | |
| CN117480067A (en) | Electric vehicle charging management and client devices | |
| CN107526652A (en) | A kind of method of data synchronization and storage device |
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| RJ01 | Rejection of invention patent application after publication | Application publication date:20190823 | |
| RJ01 | Rejection of invention patent application after publication |