WO2017071337A1 - Database table data management method, apparatus and system - Google Patents
Database table data management method, apparatus and system Download PDFInfo
- Publication number
- WO2017071337A1 WO2017071337A1 PCT/CN2016/091749 CN2016091749W WO2017071337A1 WO 2017071337 A1 WO2017071337 A1 WO 2017071337A1 CN 2016091749 W CN2016091749 W CN 2016091749W WO 2017071337 A1 WO2017071337 A1 WO 2017071337A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- data
- database table
- verified
- sig
- value
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
- G06F16/2365—Ensuring data consistency and integrity
Definitions
- This document relates to, but is not limited to, the field of network function virtualization technology, and in particular, a method, device and system for managing database table data.
- a VNF Virtualized Network Function
- VMs Virtual Machines
- SLB Service Load Balancer
- MGCF Media Gateway Control Function
- OMC Operaation and Maintenance Centre
- the SLB needs to evenly distribute these coupling resources.
- Multiple signaling processing virtual machines (referred to as VM SIG for short) are recorded in the database table (we assume the table name is table_sctp).
- the SLB needs to migrate the coupled resources in the VM SIG to other working VM SIGs .
- the corresponding database tables also need to be adjusted synchronously.
- the VM SIG has a database table table_sctp, whose content is maintained by the VM SLB and synchronized to other VMSIGs in real time. It can be seen that the database table table_sctp exists in multiple independent virtual machines at the same time. How to ensure the consistency of the database table data in different virtual machines becomes a problem that must be considered. Therefore, there is a need for a method, apparatus, and system for verifying data consistency of a virtual machine database table to solve the above-mentioned technical problems in the related art.
- Embodiments of the present invention provide a method, device, and system for managing database table data, which can provide The consistency of database table data in high virtual machines is easy to implement and has a wide range of applications.
- the embodiment of the present invention provides a method for verifying data consistency of a virtual machine database table, and the process executed by the service load balancing function virtual machine VM SLB side includes:
- Checking table contains summary information of the data transmission request to the signaling handling virtual machine VM SIG, the VM SIG for checking the database of stored VM SIG database table corresponding to the initial data to be verified according to the digest information database Whether the table needs to check whether the data is consistent;
- the initial database table After the data to be verified is inconsistent with the data to be verified, after receiving the synchronization table data request sent by the VMSIG, sending the initial database table to the VM SIG for the VM SIG to perform according to the The initial database table updates the corresponding database table.
- performing the digest calculation on the required verification data of the initial database table in the local database to obtain the digest information including: calculating, by using the message digest algorithm, the fifth version MD5, the MD5 value of the required verification data, The MD5 value is included as the summary information including the MD5 value.
- the synchronization table data request includes a name of the corresponding database table; and the sending the initial database table to the VM SIG includes: after obtaining the initial database table according to the name of the corresponding database table, The initial database table is sent to the VM SIG .
- the sending the checklist data request including the summary information to the signaling processing virtual machine VM SIG includes: directly sending the checklist data request to all VM SIGs ; or sending the checklist The data request is sent to any of the VM SIGs such that the checklist data request is forwarded by the any VMSIG to the remaining VM SIGs until all VM SIGs receive the checklist data request.
- the embodiment of the present invention further provides a method for managing database table data, where the flow executed by the signaling processing virtual machine VM SIG side includes: receiving a checklist data request including summary information sent by the VM SLB ; The summary information is checked whether the data to be verified of the corresponding database table in the database stored by itself is consistent with the required verification data of the initial database table; if the data to be verified is inconsistent with the data to be verified, the synchronization table data is sent. Requesting to the VM SLB for the VM SLB to send the initial database table to the VM SIG ; receiving and updating the corresponding database table based on the initial database table sent by the VM SIG .
- the checklist data request includes a name of an initial database table and a total number of records requiring the check data, and the summary information includes an MD5 value;
- the checking, according to the summary information, whether the data to be verified of the corresponding database table in the database stored by itself is consistent with the required verification data of the initial database table includes:
- sending a synchronization table data request to the VM SLB includes:
- the checklist data request includes a name of an initial database table, where the summary information includes an MD5 value;
- the checking, according to the summary information, whether the data to be verified of the corresponding database table in the database stored by itself is consistent with the required verification data of the initial database table includes:
- sending a synchronization table data request to the VM SLB includes:
- the synchronization table data request is sent to the VM SLB .
- the embodiment of the present invention further provides an apparatus for managing database table data, which is disposed on the VM SLB side, and the apparatus includes:
- the summary calculation module is configured to perform a summary calculation on the required verification data of the initial database table in the local database to obtain summary information;
- Checking table data request sending module data transmission is provided comprising a calibration table of summary information request to the virtual machine VM SIG signaling processing, the collation for the VM SIG VM SIG digest information based on said database stored in a corresponding database Whether the data to be verified of the table is consistent with the required verification data of the initial database table;
- the initial database table sending module is configured to send the initial database table to the VM SIG after receiving the synchronization table data request sent by the VM SIG under the condition that the to-be-verified data and the required verification data are inconsistent And for the VM SIG to update the corresponding database table according to the initial database table.
- the digest calculation module is configured to calculate an MD5 value of the required verification data by using a message digest algorithm fifth version MD5, and use the MD5 value as the digest information.
- the checklist data request sending module is configured to: directly send the checklist data request to all VM SIGs ; or send the checklist data request to the any VM SIG So that the checklist data request is forwarded by the any VM SIG to the remaining VM SIGs until all VM SIGs receive the checklist data request.
- the embodiment of the present invention further provides an apparatus for managing database table data, which is disposed on the VM SIG side, and includes:
- a receiving module configured to receive a checklist data request that is sent by the VM SLB and includes summary information
- a verification module configured to check, according to the summary information, whether the data to be verified of the corresponding database table in the database stored by itself is consistent with the required verification data of the initial database table;
- a sending module configured to send a synchronization table data request to the VM SLB if the data to be verified is inconsistent with the required verification data, so that the VM SLB sends the initial database table to the VM SIG ;
- An update module configured to receive and update the corresponding database table based on the initial database table sent by the VM SIG .
- the checklist data request includes a name of an initial database table and a total number of records required to check data
- the summary information includes an MD5 value
- the verification module is configured to: Name of the initial database table, find a corresponding database table in the self-storage database; check whether the total number of records of the data to be verified of the corresponding database table is consistent with the total number of records of the data to be verified, if the record of the data to be verified If the total number is consistent with the total number of records requiring the check data, check whether the MD5 value of the data to be verified is the same as the MD5 value of the required check data; correspondingly, the sending module is set to: And the total number of records of the data to be verified is inconsistent with the total number of records of the data to be verified, or the MD5 value of the data to be verified is different from the MD5 value of the data to be verified, and the data request of the synchronization table is sent to the Said VMSLB.
- the checklist data request includes a name of the initial database table
- the summary information includes an MD5 value
- the check module is set to:
- the sending module is configured to: if the MD5 value of the to-be-verified data is different from the MD5 value of the required verification data, send the synchronization table data request to the VM SLB .
- an embodiment of the present invention further provides a virtual network communication system, including the apparatus disposed on the VM SLB side according to the foregoing.
- an embodiment of the present invention further provides a virtual network communication system including an apparatus disposed on the VM SIG side according to the foregoing.
- the embodiment of the present invention has at least the following effects:
- the method for managing database table data improves the consistency of database table data in different virtual machines, and has wide application range.
- This method can be used to manage database table data between multiple virtual machines.
- the verification data needs to be not limited to the full table of the coupled data table, or may be a partial field in the table.
- the method is easy to implement, and the abstract information used in particular includes the MD5 value, which is only 16 bytes, which greatly reduces the load impact on the messages transmitted between the virtual machines.
- FIG. 1 is a flowchart of a method for managing database table data according to a first embodiment of the present invention
- FIG. 2 is a flowchart of a method for managing database table data according to a second embodiment of the present invention
- FIG. 3 is a flow chart of an alternative embodiment of the verification method shown in FIG. 2;
- FIG. 4 is a flow chart of another alternative embodiment of the verification method shown in FIG. 2;
- FIG. 5 is a flowchart of a method for managing database table data according to a third embodiment of the present invention.
- FIG. 6 is a flowchart of a method for managing database table data according to a fourth embodiment of the present invention.
- FIG. 7 is a schematic diagram of an apparatus for managing database table data according to a fifth embodiment of the present invention.
- FIG. 8 is a schematic diagram of an apparatus for managing database table data according to a sixth embodiment of the present invention.
- the method for managing database table data provided by the embodiment of the present invention can implement consistency of database table data between different virtual machines.
- the method for managing database table data and each step of the embodiment of the present invention will be described in detail below.
- data management database table performs a method of balancing traffic load in a virtual machine VM SLB side Scheme 1, comprising:
- Step S10 Perform digest calculation on the required verification data of the initial database table in the local database to obtain summary information.
- Step S20 Send a checklist data request including summary information to the signaling processing virtual machine VM SIG for the VM SIG to check the required data of the corresponding database table in the database stored by the VM SIG and the initial database table according to the summary information. Whether the data is consistent.
- the checklist data request further includes: a name of the initial database table, optionally, and a total number of records that need to check the data.
- Step S30 After verifying the data to be inconsistent with the need to verify the data conditions, the received VM SIG synchronization table sent data request to send an initial VM SIG database table, for VM SIG updates the corresponding database table according to the initial database tables .
- the VM SLB side may use the timer interval setting period T check to perform digest calculation on the required check data of the initial database table, and then send a check table data request to the VM SIG to This ensures the consistency of the database table data of the VM SIG and the database table data of the VM SLB , and improves the high reliability and self-recovery capability of the virtual network communication system.
- step S10 performing digest calculation on the required verification data of the initial database table in the local database, to obtain the digest information, including: calculating by Message Digest Algorithm 5 (MD5) The MD5 value of the data to be checked is used, and the MD5 value is used as the summary information.
- MD5 Message Digest Algorithm 5
- the MD5 algorithm ensures the integrity and consistency of information transfer between virtual machines. Because the summary information of the two pieces of the same data after the digest calculation is inevitably the same, even if the two pieces of different data are only one bit different, the summary information after the general digest calculation, especially the summary information after the MD5 calculation will be very different. If the data at both ends are different, the probability that the summary information obtained after MD5 is the same is very low. More importantly, the MD5 calculation is simple, and the obtained summary information has a fixed length, which is suitable for a virtual network communication system with high efficiency requirements.
- the verification data needs to be the full table data of the database table table_sctp, or one of the fields (the specific verification data can be pre-defined in the service load balancing function virtual machine VM SLB and the signaling processing virtual machine VM SIG . ), based on the importance of the data.
- the steps to calculate the MD5 value include:
- the synchronization table data request mentioned above includes a name of the corresponding database table, so after sending the initial database table to the VM SIG , the initial database table is sent to the VM after obtaining the initial database table according to the name of the corresponding database table. SIG .
- the obtained initial database table has the same name as the corresponding database table.
- step S10: transmitting a checklist data request including digest information to the signaling processing virtual machine VM SIG includes:
- Step 200 Send the checklist data request directly to all VM SIGs , which is the first type of transmission. Alternatively, sending a checklist data request to any VM SIG such that the checklist data request is forwarded by the any VM SIG to the remaining VM SIG until all VM SIGs receive the checklist data request, which Is the second way to send.
- the VM SLB sets a timer T Check to periodically check the consistency of the database table data, and the duration of the timer can be set to 30 seconds.
- the VM SLB uses MD5 to calculate the MD5 value of the check data and sends a checklist data request 101 to all VM SIGs .
- the checklist data request needs to carry both the name of the initial database table and the total number of records that need to be verified.
- the VM SIG locates the corresponding database table, and first checks whether the verified data and the total number of records that need to be verified are the same. If the total number of records is different, it is necessary to reacquire from the VM SLB . Synchronized table data. If the total number of records is the same, the MD5 values of the two are further checked. If they are the same, the table data of the two is consistent, and no response is returned to the VM SLB , and the verification ends.
- the VM SIG actively sends the synchronization table data request 102 to the VM SLB to request to resynchronize all data of the database table data, and synchronize The name of the database table needs to be carried in the table data request.
- the VM SLB After receiving the synchronization table data request 102, the VM SLB resends the entire contents of the initial database table table_sctp to the VM SIG through the synchronization table data message 103.
- the VM SIG After receiving the synchronization table data message 103, the VM SIG first clears the data in the corresponding database table, and then replaces the entire content of the initial database table with the corresponding coupling information, and the verification ends.
- the second method of verification, validation we call chain the chain verification feature is the VM SLB checking table data request transmitted to only one of the VM SIG, then down a VM SIG forwarded by the VM SIG The checklist data request is received until all VM SIGs receive the checklist data request.
- the following is a detailed description of the entire flow of the chain check in conjunction with FIG.
- the VM SLB sets a timer T Check to periodically check the consistency of the database table data, and the duration of the timer can be set to 30 seconds.
- T Check a timer
- VM SLB desired value using the MD5 checksum MD5 calculation data and transmits the data request checking table 101 to which a VM SIG, may be all stored VM SLB VM SLB smallest number, FIG. First sent to VM SIG 1. It should be noted that the checklist data request also needs to carry the name of the initial database table and the total number of records that need to be verified.
- the VM SIG 1 After receiving the checklist data request 101, the VM SIG 1 first sends the checklist data request to the VM SIG 2, which is the second smallest. Then perform verification of the virtual machine: locate and find the corresponding database table, and check whether the total number of records and the MD5 value of the verification data and the data to be verified are the same. If they are the same, the table data is consistent, and the VM SLB is not required. Reply to any response, this verification is over.
- VM SIG If the data to be verified stored in a VM SIG is different from the total number of records or MD5 values that need to be verified, such as VM SIG 2 in FIG. 4, it is necessary to actively send the synchronization table data request 102 to the VM SLB to request resynchronization of the database.
- the content of the table data similarly, the name of the corresponding database table needs to be carried in the synchronization table data request 102.
- the VM SLB receives the synchronization table data request 102, and resends the entire contents of the initial database table table_sctp to the corresponding VM SIG 2 through the synchronization table data message 103.
- the VM SIG 2 receives the synchronization table data message 103, first clears the data in the corresponding database table, and then replaces the entire contents of the received initial database table into the corresponding database table, and the verification ends.
- the chain check is that each VM SIG sends a checklist data request to the next VM SIG instead of being uniformly sent by the VM SLB to all VM SIGs , so when the number of VM SIGs is large, Chain verification can reduce the load on the VM SLB to send and receive messages.
- the method for managing database table data provided by this embodiment is performed on the VM SIG side, and includes:
- Step S40 Receive a checklist data request including summary information sent by the VM SLB .
- Step S50 Check whether the data to be verified of the corresponding database table in the database stored by itself is consistent with the required verification data of the initial database table according to the summary information.
- Step S60 If the data to be verified is inconsistent with the data to be verified, send a synchronization table data request to the VM SLB to cause the VM SLB to send the initial database table to the VM SIG .
- Step S70 Receive and update the corresponding database table according to the initial database table sent by the VM SIG .
- the checklist data request includes the name of the initial database table, and the summary information includes the MD5 value.
- the checklist data request further includes the total number of records that need to be verified.
- step S50 checking, according to the summary information, whether the data to be verified of the corresponding database table in the database stored by itself is consistent with the required verification data of the initial database table, including:
- Step S500 Find a corresponding database table in the storage database according to the name of the initial database table. Includes:
- Step S501 Check whether the total number of records of the data to be verified corresponding to the database table is consistent with the total number of records requiring the verification data. If the total number of records of the data to be verified is consistent with the total number of records requiring the verification data, the MD5 value of the verification data is verified. Whether it is the same as the MD5 value that needs to be verified.
- step S60 if the data to be verified is inconsistent with the data to be verified, sending the synchronization table data request to the VM SLB includes:
- Step S600 If the total number of records of the data to be verified is inconsistent with the total number of records requiring the verification data, or the MD5 value of the data to be verified is not the same as the MD5 value of the data to be verified, the synchronization table data request is sent to the VM SLB .
- step S50 checking, according to the summary information, whether the data to be verified of the corresponding database table in the database stored by itself is consistent with the required verification data of the initial database table, including:
- the name of the initial database table find the corresponding database table in the own storage database; check whether the MD5 value of the verification data is the same as the MD5 value of the verification data.
- finding the corresponding database table in the own storage database includes: finding a corresponding database table whose name in the storage database is the same as the name of the initial database table.
- Step S60 If need be confirmed with data inconsistency check data, table data synchronization request is then sent to the VM SLB comprising:
- a synchronization table data request is sent to the VM SLB .
- Embodiments of the present invention also provide a computer readable storage medium storing computer executable instructions for performing any of the methods described above.
- the apparatus for managing database table data provided in this embodiment is disposed on the VM SLB side, and the apparatus includes:
- the summary calculation module 10 is configured to perform a summary calculation on the required verification data of the initial database table in the local database to obtain summary information.
- Checking table data request sending module 20 is provided to request the signaling processing for the virtual machine VM SIG transmits data checking table contains summary information for the data to be verified VM SIG VM SIG verification database stored in the database table according to the digest information Whether it is consistent with the need to verify the data of the initial database table.
- the initial database table sending module 30 is configured to: after receiving the synchronization table data request sent by the VM SIG under the condition that the data to be verified is inconsistent with the data to be verified, send the initial database table to the VM SIG for the VM SIG to initialize according to the VM SIG The database table updates the corresponding database table.
- the digest calculation module 10 is configured to: use the message digest algorithm fifth version MD5 to calculate an MD5 value that needs to be verified data, and the digest information includes an MD5 value.
- the checklist data request sending module 20 is configured to directly send the checklist data request to all VM SIGs .
- a checklist data request is sent to any of the VM SIGs such that the checklist data request is forwarded by the any VM SIG to the remaining VM SIGs until all VM SIGs receive the checklist data request.
- the apparatus for managing database table data provided in this embodiment is disposed on the VM SIG side, and the apparatus includes:
- the receiving module 40 is configured to receive a checklist data request including summary information sent by the VM SLB .
- the verification module 50 is configured to check, according to the summary information, whether the data to be verified of the corresponding database table in the database stored by itself is consistent with the required verification data of the initial database table.
- the sending module 60 is configured to send the synchronization table data request to the VM SLB if the data to be verified is inconsistent with the data to be verified, so that the VM SLB sends the initial database table to the VM SIG .
- the update module 70 is configured to receive and update the corresponding database table according to the initial database table sent by the VM SIG .
- the checklist data request includes a name of the initial database table and a total number of records that need to be verified, and the summary information includes an MD5 value, wherein the verification module 50 is configured to:
- the sending module 60 is further configured to: if the total number of records of the data to be verified and the data to be verified The total number of records is inconsistent, or the MD5 value of the data to be verified is not the same as the MD5 value of the data to be verified, and the synchronization table data request is sent to the VM SLB .
- the checklist data request includes a name of the initial database table
- the summary information includes an MD5 value
- the check module is set to:
- the sending module is configured to: if the MD5 value of the to-be-verified data is different from the MD5 value of the required verification data, send the synchronization table data request to the VM SLB .
- an embodiment of the present invention further provides a virtual network communication system, including the apparatus disposed on the VMSLB side according to the foregoing.
- an embodiment of the present invention further provides a virtual network communication system, including the apparatus disposed on the VMSIG side according to the foregoing.
- each module/unit in the foregoing embodiment may be implemented in the form of hardware, for example, by implementing an integrated circuit to implement its corresponding function, or may be implemented in the form of a software function module, for example, executing a program in a storage and a memory by a processor. / instruction to achieve its corresponding function.
- the invention is not limited to any specific form of combination of hardware and software.
- the above technical solution improves the consistency of database table data in different virtual machines, and is easy to implement, and has wide application range.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
A database table data management method, apparatus and system. A flow executed by the database table data management method at a VMSLB side comprises: performing an abstract calculation on data needing to be checked in an initial database table in a local database, so as to obtain abstract information; sending a check request containing the abstract information to a signalling processing virtual machine VMSIG for the VMSIG to verify, according to the abstract information, whether data to be verified in a corresponding database table of a database stored in the VMSIG is consistent with the data needing to be checked in the initial database table; and where the data to be verified is inconsistent with the data needing to be checked, sending the initial database table to the VMSIG, after receiving a table data synchronization request sent by the VMSIG, for the VMSIG to update the corresponding database table according to the initial database table.
Description
本文涉及但不限于网络功能虚拟化技术领域,尤指一种管理数据库表数据的方法、装置及系统。This document relates to, but is not limited to, the field of network function virtualization technology, and in particular, a method, device and system for managing database table data.
网络功能虚拟化后,一个VNF(Virtualized Network Function,虚拟化网络功能)中一般都包含多个VM(Virtual Machine,虚拟机),以提供传统的网络服务。VNF中有一个最为重要和核心的功能是SLB(Service Load Balancer,业务负荷均衡功能),该功能实时监控VNF内每一个虚拟机的负荷情况,及时调整分配到每一个虚拟机的信令连接数和业务量,并在必要的情况下进行VNF的弹性缩扩容(即增加或者减少虚拟机的数量)。After the network function is virtualized, a VNF (Virtualized Network Function) generally includes multiple VMs (Virtual Machines) to provide traditional network services. One of the most important and core functions of the VNF is the Service Load Balancer (SLB), which monitors the load of each virtual machine in the VNF in real time and adjusts the number of signaling connections assigned to each virtual machine in a timely manner. And the volume of traffic, and if necessary, the flexible expansion of the VNF (ie increase or decrease the number of virtual machines).
以MGCF(Media Gateway Control Function,媒体网关控制功能)为例,当用户在OMC(Operation and Maintenance Centre,操作维护中心)配置了一系列偶联资源后,SLB需要将这些偶联资源均匀地分担到多个信令处理虚拟机(我们简称为VMSIG)中,并记录在数据库表中(我们假定表名为table_sctp)。当个别VMSIG发生宕机、停机时,SLB还需要将该VMSIG中的偶联资源再迁移到其它正常工作的VMSIG中,对应的数据库表也需要同步调整。也就是说在SLB虚拟机(我们简称为VMSLB)、VMSIG中均存在数据库表table_sctp,它的内容由VMSLB进行维护,并实时同步到其它VMSIG上。可以看出数据库表table_sctp同时存在于多个独立的虚拟机中,如何保证不同虚拟机中数据库表数据的一致性就成为必须要考虑的问题。因此,需要一种虚拟机数据库表数据一致性的校验方法、装置及系统,以解决相关技术中存在的上述技术问题。Take the MGCF (Media Gateway Control Function) as an example. After the user configures a series of coupling resources in the OMC (Operation and Maintenance Centre), the SLB needs to evenly distribute these coupling resources. Multiple signaling processing virtual machines (referred to as VM SIG for short) are recorded in the database table (we assume the table name is table_sctp). When the individual VMSIG is down and down, the SLB needs to migrate the coupled resources in the VM SIG to other working VM SIGs . The corresponding database tables also need to be adjusted synchronously. That is to say, in the SLB virtual machine (we are referred to as VM SLB for short), the VM SIG has a database table table_sctp, whose content is maintained by the VM SLB and synchronized to other VMSIGs in real time. It can be seen that the database table table_sctp exists in multiple independent virtual machines at the same time. How to ensure the consistency of the database table data in different virtual machines becomes a problem that must be considered. Therefore, there is a need for a method, apparatus, and system for verifying data consistency of a virtual machine database table to solve the above-mentioned technical problems in the related art.
发明内容Summary of the invention
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。The following is an overview of the topics detailed in this document. This Summary is not intended to limit the scope of the claims.
本发明实施例提供一种管理数据库表数据的方法、装置及系统,能够提
高不同虚拟机中数据库表数据的一致性,且易于实现,适用范围广。Embodiments of the present invention provide a method, device, and system for managing database table data, which can provide
The consistency of database table data in high virtual machines is easy to implement and has a wide range of applications.
本发明实施例提出了一种虚拟机数据库表数据一致性的校验方法,其在业务负荷均衡功能虚拟机VMSLB侧执行的流程,包括:The embodiment of the present invention provides a method for verifying data consistency of a virtual machine database table, and the process executed by the service load balancing function virtual machine VM SLB side includes:
对本地数据库中初始数据库表的需要校验数据进行摘要计算,以得出摘要信息;Performing a summary calculation on the required verification data of the initial database table in the local database to obtain summary information;
发送包含摘要信息的校验表数据请求至信令处理虚拟机VMSIG,供所述VMSIG根据所述摘要信息核对所述VMSIG存储的数据库中对应数据库表的待核实数据与所述初始数据库表的需要校验数据是否一致;Checking table contains summary information of the data transmission request to the signaling handling virtual machine VM SIG, the VM SIG for checking the database of stored VM SIG database table corresponding to the initial data to be verified according to the digest information database Whether the table needs to check whether the data is consistent;
在所述待核实数据与所述需要校验数据不一致的条件下,接收到所述VMSIG发来的同步表数据请求后,发送所述初始数据库表至VMSIG,以供所述VMSIG根据所述初始数据库表更新所述对应数据库表。After the data to be verified is inconsistent with the data to be verified, after receiving the synchronization table data request sent by the VMSIG, sending the initial database table to the VM SIG for the VM SIG to perform according to the The initial database table updates the corresponding database table.
可选地,所述对本地数据库中初始数据库表的需要校验数据进行摘要计算,以得出摘要信息,包括:采用消息摘要算法第五版MD5计算出所述需要校验数据的MD5值,将所述MD5值作为所述摘要信息包括所述MD5值。Optionally, performing the digest calculation on the required verification data of the initial database table in the local database to obtain the digest information, including: calculating, by using the message digest algorithm, the fifth version MD5, the MD5 value of the required verification data, The MD5 value is included as the summary information including the MD5 value.
可选地,所述同步表数据请求包括所述对应数据库表的名称;所述发送所述初始数据库表至VMSIG包括:根据所述对应数据库表的名称获取所述初始数据库表后,将所述初始数据库表发送至所述VMSIG。Optionally, the synchronization table data request includes a name of the corresponding database table; and the sending the initial database table to the VM SIG includes: after obtaining the initial database table according to the name of the corresponding database table, The initial database table is sent to the VM SIG .
可选地,所述发送包含摘要信息的校验表数据请求至信令处理虚拟机VMSIG,包括:直接发送所述校验表数据请求至所有VMSIG中;或者,发送所述校验表数据请求至任一VMSIG中,以使所述校验表数据请求由所述任一VMSIG开始转发至其余VMSIG中,直至所有VMSIG接收到所述校验表数据请求。Optionally, the sending the checklist data request including the summary information to the signaling processing virtual machine VM SIG includes: directly sending the checklist data request to all VM SIGs ; or sending the checklist The data request is sent to any of the VM SIGs such that the checklist data request is forwarded by the any VMSIG to the remaining VM SIGs until all VM SIGs receive the checklist data request.
本发明实施例还提供了一种管理数据库表数据的方法,其在信令处理虚拟机VMSIG侧执行的流程,包括:接收VMSLB发来的包含摘要信息的校验表数据请求;根据所述摘要信息核对自身存储的数据库中对应数据库表的待核实数据与所述初始数据库表的需要校验数据是否一致;若所述待核实数据与所述需要校验数据不一致,则发送同步表数据请求至所述VMSLB,以使所述VMSLB发送所述初始数据库表至所述VMSIG;接收并且根据所述VMSIG发来
的所述初始数据库表更新所述对应数据库表。The embodiment of the present invention further provides a method for managing database table data, where the flow executed by the signaling processing virtual machine VM SIG side includes: receiving a checklist data request including summary information sent by the VM SLB ; The summary information is checked whether the data to be verified of the corresponding database table in the database stored by itself is consistent with the required verification data of the initial database table; if the data to be verified is inconsistent with the data to be verified, the synchronization table data is sent. Requesting to the VM SLB for the VM SLB to send the initial database table to the VM SIG ; receiving and updating the corresponding database table based on the initial database table sent by the VM SIG .
可选地,所述校验表数据请求包括初始数据库表的名称和所述需要校验数据的记录总数,所述摘要信息包括MD5值;Optionally, the checklist data request includes a name of an initial database table and a total number of records requiring the check data, and the summary information includes an MD5 value;
所述根据所述摘要信息核对自身存储的数据库中对应数据库表的待核实数据与所述初始数据库表的需要校验数据是否一致包括:The checking, according to the summary information, whether the data to be verified of the corresponding database table in the database stored by itself is consistent with the required verification data of the initial database table includes:
根据初始数据库表的名称,找到自身存储数据库中的对应数据库表;核对所述对应数据库表的待核实数据的记录总数是否与所述需要校验数据的记录总数一致,若所述待核实数据的记录总数与所述需要校验数据的记录总数一致,则核对所述待核实数据的MD5值是否与所述需要校验数据的MD5值相同;对应地,Finding a corresponding database table in the self-storage database according to the name of the initial database table; checking whether the total number of records of the data to be verified of the corresponding database table is consistent with the total number of records of the data to be verified, if the data to be verified is If the total number of records is consistent with the total number of records requiring the check data, check whether the MD5 value of the data to be verified is the same as the MD5 value of the required check data; correspondingly,
若所述待核实数据与所述需要校验数据不一致,则发送同步表数据请求至所述VMSLB包括:If the to-be-verified data is inconsistent with the required verification data, sending a synchronization table data request to the VM SLB includes:
若所述待核实数据的记录总数与所述需要校验数据的记录总数不一致,或所述待核实数据的MD5值与所述需要校验数据的MD5值不相同,则发送所述同步表数据请求至所述VMSLB。Sending the synchronization table data if the total number of records of the data to be verified is inconsistent with the total number of records of the data to be verified, or the MD5 value of the data to be verified is different from the MD5 value of the data to be verified. Request to the VM SLB .
可选的,校验表数据请求包括初始数据库表的名称,所述摘要信息包括MD5值;Optionally, the checklist data request includes a name of an initial database table, where the summary information includes an MD5 value;
所述根据所述摘要信息核对自身存储的数据库中对应数据库表的待核实数据与所述初始数据库表的需要校验数据是否一致包括:The checking, according to the summary information, whether the data to be verified of the corresponding database table in the database stored by itself is consistent with the required verification data of the initial database table includes:
根据所述初始数据库表的名称,找到自身存储数据库中的对应数据库表;Find a corresponding database table in the storage database according to the name of the initial database table;
核对所述待核实数据的MD5值是否与所述需要校验数据的MD5值相同;Checking whether the MD5 value of the data to be verified is the same as the MD5 value of the required verification data;
对应地,若所述待核实数据与所述需要校验数据不一致,则发送同步表数据请求至所述VMSLB包括:Correspondingly, if the to-be-verified data is inconsistent with the required verification data, sending a synchronization table data request to the VM SLB includes:
若所述待核实数据的MD5值与所述需要校验数据的MD5值不相同,则发送所述同步表数据请求至所述VMSLB。If the MD5 value of the data to be verified is different from the MD5 value of the data to be checked, the synchronization table data request is sent to the VM SLB .
本发明实施例还提供了一种管理数据库表数据的装置,其设置于VMSLB侧,所述装置包括:
The embodiment of the present invention further provides an apparatus for managing database table data, which is disposed on the VM SLB side, and the apparatus includes:
摘要计算模块,设置为对本地数据库中初始数据库表的需要校验数据进行摘要计算,以得出摘要信息;The summary calculation module is configured to perform a summary calculation on the required verification data of the initial database table in the local database to obtain summary information;
校验表数据请求发送模块,设置为发送包含摘要信息的校验表数据请求至信令处理虚拟机VMSIG,供所述VMSIG根据所述摘要信息核对所述VMSIG存储的数据库中对应数据库表的待核实数据与所述初始数据库表的需要校验数据是否一致;Checking table data request sending module, data transmission is provided comprising a calibration table of summary information request to the virtual machine VM SIG signaling processing, the collation for the VM SIG VM SIG digest information based on said database stored in a corresponding database Whether the data to be verified of the table is consistent with the required verification data of the initial database table;
初始数据库表发送模块,设置为在所述待核实数据与所述需要校验数据不一致的条件下,接收到所述VMSIG发来的同步表数据请求后,发送所述初始数据库表至VMSIG,以供所述VMSIG根据所述初始数据库表更新所述对应数据库表。The initial database table sending module is configured to send the initial database table to the VM SIG after receiving the synchronization table data request sent by the VM SIG under the condition that the to-be-verified data and the required verification data are inconsistent And for the VM SIG to update the corresponding database table according to the initial database table.
可选地,所述摘要计算模块是设置为:采用消息摘要算法第五版MD5计算出所述需要校验数据的MD5值,将所述MD5值作为所述摘要信息。Optionally, the digest calculation module is configured to calculate an MD5 value of the required verification data by using a message digest algorithm fifth version MD5, and use the MD5 value as the digest information.
可选地,所述校验表数据请求发送模块是设置为:直接发送所述校验表数据请求至所有VMSIG中;或者,发送所述校验表数据请求至所述任一VMSIG中,以使所述校验表数据请求由所述任一VMSIG开始转发至其余VMSIG中,直至所有VMSIG接收到所述校验表数据请求。Optionally, the checklist data request sending module is configured to: directly send the checklist data request to all VM SIGs ; or send the checklist data request to the any VM SIG So that the checklist data request is forwarded by the any VM SIG to the remaining VM SIGs until all VM SIGs receive the checklist data request.
本发明实施例还提供了一种管理数据库表数据的装置,其设置于VMSIG侧,包括:The embodiment of the present invention further provides an apparatus for managing database table data, which is disposed on the VM SIG side, and includes:
接收模块,设置为接收VMSLB发来的包含摘要信息的校验表数据请求;a receiving module, configured to receive a checklist data request that is sent by the VM SLB and includes summary information;
核对模块,设置为根据所述摘要信息核对自身存储的数据库中对应数据库表的待核实数据与所述初始数据库表的需要校验数据是否一致;a verification module, configured to check, according to the summary information, whether the data to be verified of the corresponding database table in the database stored by itself is consistent with the required verification data of the initial database table;
发送模块,设置为若所述待核实数据与所述需要校验数据不一致,则发送同步表数据请求至所述VMSLB,以使所述VMSLB发送所述初始数据库表至所述VMSIG;a sending module, configured to send a synchronization table data request to the VM SLB if the data to be verified is inconsistent with the required verification data, so that the VM SLB sends the initial database table to the VM SIG ;
更新模块,设置为接收并且根据所述VMSIG发来的所述初始数据库表更新所述对应数据库表。An update module configured to receive and update the corresponding database table based on the initial database table sent by the VM SIG .
可选地,所述校验表数据请求包括初始数据库表的名称和所述需要校验数据的记录总数,所述摘要信息包括MD5值,所述核对模块是设置为:根据
初始数据库表的名称,找到自身存储数据库中的对应数据库表;核对所述对应数据库表的待核实数据的记录总数是否与所述需要校验数据的记录总数一致,若所述待核实数据的记录总数与所述需要校验数据的记录总数一致,则核对所述待核实数据的MD5值是否与所述需要校验数据的MD5值相同;对应地,所述发送模块是设置为:若所述待核实数据的记录总数与所述需要校验数据的记录总数不一致,或所述待核实数据的MD5值与所述需要校验数据的MD5值不相同,则发送所述同步表数据请求至所述VMSLB。Optionally, the checklist data request includes a name of an initial database table and a total number of records required to check data, the summary information includes an MD5 value, and the verification module is configured to:
Name of the initial database table, find a corresponding database table in the self-storage database; check whether the total number of records of the data to be verified of the corresponding database table is consistent with the total number of records of the data to be verified, if the record of the data to be verified If the total number is consistent with the total number of records requiring the check data, check whether the MD5 value of the data to be verified is the same as the MD5 value of the required check data; correspondingly, the sending module is set to: And the total number of records of the data to be verified is inconsistent with the total number of records of the data to be verified, or the MD5 value of the data to be verified is different from the MD5 value of the data to be verified, and the data request of the synchronization table is sent to the Said VMSLB.
可选的,校验表数据请求包括初始数据库表的名称,所述摘要信息包括MD5值,所述核对模块是设置为:Optionally, the checklist data request includes a name of the initial database table, the summary information includes an MD5 value, and the check module is set to:
根据初始数据库表的名称,找到自身存储数据库中的对应数据库表;Find the corresponding database table in the own storage database according to the name of the initial database table;
核对所述待核实数据的MD5值是否与所述需要校验数据的MD5值相同;Checking whether the MD5 value of the data to be verified is the same as the MD5 value of the required verification data;
对应地,所述发送模块是设置为:若所述待核实数据的MD5值与所述需要校验数据的MD5值不相同,则发送所述同步表数据请求至所述VMSLB。Correspondingly, the sending module is configured to: if the MD5 value of the to-be-verified data is different from the MD5 value of the required verification data, send the synchronization table data request to the VM SLB .
另外,本发明实施例还提供了一种虚拟网络通信系统,其包括根据上文所述的设置于所述VMSLB侧的装置。In addition, an embodiment of the present invention further provides a virtual network communication system, including the apparatus disposed on the VM SLB side according to the foregoing.
此外,本发明实施例还提供了一种虚拟网络通信系统,其包括根据上文所述的设置于所述VMSIG侧的装置。In addition, an embodiment of the present invention further provides a virtual network communication system including an apparatus disposed on the VM SIG side according to the foregoing.
采用上述技术方案,本发明实施例至少具有下列效果:With the above technical solution, the embodiment of the present invention has at least the following effects:
本发明实施例提供的管理数据库表数据的方法提高了不同虚拟机中数据库表数据的一致性,且适用范围广,多种虚拟机之间都可以采用这种方法来完成数据库表数据的管理,并且需要校验数据不限于偶联数据表的全表,也可以是表中的部分字段。并且该方法易于实现,特别地采用的摘要信息包括MD5值,该值只有16个字节,极大地减少对虚拟机之间传递消息带来的负荷影响。The method for managing database table data provided by the embodiment of the invention improves the consistency of database table data in different virtual machines, and has wide application range. This method can be used to manage database table data between multiple virtual machines. And the verification data needs to be not limited to the full table of the coupled data table, or may be a partial field in the table. And the method is easy to implement, and the abstract information used in particular includes the MD5 value, which is only 16 bytes, which greatly reduces the load impact on the messages transmitted between the virtual machines.
在阅读并理解了附图和详细描述后,可以明白其他方面。Other aspects will be apparent upon reading and understanding the drawings and detailed description.
附图概述
BRIEF abstract
图1为本发明第一实施例管理数据库表数据的方法的流程图;1 is a flowchart of a method for managing database table data according to a first embodiment of the present invention;
图2为本发明第二实施例管理数据库表数据的方法的流程图;2 is a flowchart of a method for managing database table data according to a second embodiment of the present invention;
图3为图2所示校验方法的一个可选实施方式的流程图;3 is a flow chart of an alternative embodiment of the verification method shown in FIG. 2;
图4为图2所示校验方法的另一个可选实施方式的流程图;4 is a flow chart of another alternative embodiment of the verification method shown in FIG. 2;
图5为本发明第三实施例管理数据库表数据的方法的流程图;FIG. 5 is a flowchart of a method for managing database table data according to a third embodiment of the present invention; FIG.
图6为本发明第四实施例管理数据库表数据的方法的流程图;6 is a flowchart of a method for managing database table data according to a fourth embodiment of the present invention;
图7为本发明第五实施例管理数据库表数据的装置的示意图;FIG. 7 is a schematic diagram of an apparatus for managing database table data according to a fifth embodiment of the present invention; FIG.
图8为本发明第六实施例管理数据库表数据的装置的示意图。FIG. 8 is a schematic diagram of an apparatus for managing database table data according to a sixth embodiment of the present invention.
以下结合附图及较佳实施例,对本发明进行详细说明如后。The present invention will be described in detail below with reference to the accompanying drawings and preferred embodiments.
本发明实施例提供的管理数据库表数据的方法可以实现不同虚拟机之间数据库表数据的一致性,下面将详细地描述本发明实施例的管理数据库表数据的方法及其每一个步骤。The method for managing database table data provided by the embodiment of the present invention can implement consistency of database table data between different virtual machines. The method for managing database table data and each step of the embodiment of the present invention will be described in detail below.
第一实施例First embodiment
如图1所示,本实施例的管理数据库表数据的方法在业务负荷均衡功能虚拟机VMSLB侧执行的流程,包括:As illustrated, data management database table according to the present embodiment performs a method of balancing traffic load in a virtual machine VM SLB side Scheme 1, comprising:
步骤S10:对本地数据库中初始数据库表的需要校验数据进行摘要计算,以得出摘要信息。Step S10: Perform digest calculation on the required verification data of the initial database table in the local database to obtain summary information.
步骤S20:发送包含摘要信息的校验表数据请求至信令处理虚拟机VMSIG,供VMSIG根据摘要信息核对VMSIG存储的数据库中对应数据库表的待核实数据与初始数据库表的需要校验数据是否一致。Step S20: Send a checklist data request including summary information to the signaling processing virtual machine VM SIG for the VM SIG to check the required data of the corresponding database table in the database stored by the VM SIG and the initial database table according to the summary information. Whether the data is consistent.
可选地,校验表数据请求还包括:初始数据库表的名称,可选的,还包括:需要校验数据的记录总数。Optionally, the checklist data request further includes: a name of the initial database table, optionally, and a total number of records that need to check the data.
步骤S30:在待核实数据与需要校验数据不一致的条件下,接收到VMSIG发来的同步表数据请求后,发送初始数据库表至VMSIG,以供VMSIG根据初始数据库表更新对应数据库表。
Step S30: After verifying the data to be inconsistent with the need to verify the data conditions, the received VM SIG synchronization table sent data request to send an initial VM SIG database table, for VM SIG updates the corresponding database table according to the initial database tables .
由此可以实现VMSIG所存储的对应数据库表同步于VMSLB所存储的初始数据库表。如图3和图4所示,在VMSLB侧可以利用定时器间隔设定时间段Tcheck来对初始数据库表的需要校验数据进行摘要计算后,向VMSIG发送校验表数据请求,以此确保VMSIG的数据库表数据与VMSLB的数据库表数据的一致性,提高了虚拟网络通信系统的高可靠性和自恢复能力。This makes it possible to synchronize the corresponding database table stored by the VM SIG with the initial database table stored by the VM SLB . As shown in FIG. 3 and FIG. 4, the VM SLB side may use the timer interval setting period T check to perform digest calculation on the required check data of the initial database table, and then send a check table data request to the VM SIG to This ensures the consistency of the database table data of the VM SIG and the database table data of the VM SLB , and improves the high reliability and self-recovery capability of the virtual network communication system.
作为可选的实施例,在步骤S10:对本地数据库中初始数据库表的需要校验数据进行摘要计算,以得出摘要信息包括:采用消息摘要算法第五版(MD5,Message Digest Algorithm 5)计算出需要校验数据的MD5值,将所述MD5值作为所述摘要信息。As an optional embodiment, in step S10: performing digest calculation on the required verification data of the initial database table in the local database, to obtain the digest information, including: calculating by Message Digest Algorithm 5 (MD5) The MD5 value of the data to be checked is used, and the MD5 value is used as the summary information.
采用MD5算法确保了虚拟机之间信息传输的完整性和一致性。因为两段相同的数据在摘要计算后的摘要信息必然相同,两段不同的数据即使只相差一个比特,一般摘要计算后的摘要信息后,特别是MD5计算后的摘要信息会相差很大。如果两端数据不同,MD5计算后得到的摘要信息相同的概率非常低。更重要的是,采用MD5计算简便,得到的摘要信息的长度固定,适用于效率要求比较高的虚拟网络通信系统。The MD5 algorithm ensures the integrity and consistency of information transfer between virtual machines. Because the summary information of the two pieces of the same data after the digest calculation is inevitably the same, even if the two pieces of different data are only one bit different, the summary information after the general digest calculation, especially the summary information after the MD5 calculation will be very different. If the data at both ends are different, the probability that the summary information obtained after MD5 is the same is very low. More importantly, the MD5 calculation is simple, and the obtained summary information has a fixed length, which is suitable for a virtual network communication system with high efficiency requirements.
另外,需要校验数据可以是数据库表table_sctp的全表数据,也可以是其中的一个字段(具体需要校验数据可以预先在业务负荷均衡功能虚拟机VMSLB和信令处理虚拟机VMSIG约定好),根据数据的重要性来确定。计算MD5值的步骤包括:In addition, the verification data needs to be the full table data of the database table table_sctp, or one of the fields (the specific verification data can be pre-defined in the service load balancing function virtual machine VM SLB and the signaling processing virtual machine VM SIG . ), based on the importance of the data. The steps to calculate the MD5 value include:
1)将数据库表table_sctp中所有记录进行排序,排序的依据是数据库表的唯一关键字,例如记录号等。1) Sort all the records in the database table table_sctp, the basis of the sort is the unique keyword of the database table, such as the record number.
2)从数据库表中取出需要校验数据,将该需要校验数据的串行存放到unsigned char类型的数组needCheck[]中,下表是需要校验数据的串行以int类型为例,给出了存放的示意表。
2) From the database table, you need to check the data, and store the serial of the data to be checked into the array NeedCheck[] of the unsigned char type. The following table is the serial type of the data to be checked. A schematic table of the deposit was made.
表一Table I
3)对于数组needCheck[]中的有效字节进行MD5计算,得出包含16字节的MD5值作为摘要信息。3) Perform MD5 calculation on the valid bytes in the array needCheck[], and obtain the MD5 value containing 16 bytes as summary information.
可选地,上文提到的同步表数据请求包括对应数据库表的名称,因此在发送初始数据库表至VMSIG包括:根据对应数据库表的名称获取初始数据库表后,将初始数据库表发送至VMSIG。Optionally, the synchronization table data request mentioned above includes a name of the corresponding database table, so after sending the initial database table to the VM SIG , the initial database table is sent to the VM after obtaining the initial database table according to the name of the corresponding database table. SIG .
其中,获得的初始数据库表的名称与对应数据库表的名称相同。The obtained initial database table has the same name as the corresponding database table.
第二实施例Second embodiment
如图2所示,本实施例在第一实施例的基础上,步骤S10:发送包含摘要信息的校验表数据请求至信令处理虚拟机VMSIG包括:As shown in FIG. 2, in this embodiment, based on the first embodiment, step S10: transmitting a checklist data request including digest information to the signaling processing virtual machine VM SIG includes:
步骤200:直接发送校验表数据请求至所有VMSIG中,这是第一种发送方式。或者,发送校验表数据请求至任一VMSIG中,以使校验表数据请求由所述任一VMSIG开始转发至其余VMSIG中,直至所有VMSIG接收到校验表数据请求,这是第二种发送方式。Step 200: Send the checklist data request directly to all VM SIGs , which is the first type of transmission. Alternatively, sending a checklist data request to any VM SIG such that the checklist data request is forwarded by the any VM SIG to the remaining VM SIG until all VM SIGs receive the checklist data request, which Is the second way to send.
对于采用第一种发送方式的校验方法,我们称为星状校验,这种形状校验的特点是由VMSLB同时向所有的VMSIG发送校验表数据请求,下面是结合图3对星状校验的完整说明。For the verification method using the first transmission method, we call it the star check. This shape check is characterized by the VM SLB sending the check table data request to all VM SIGs at the same time. A complete description of the star verification.
如图3所示,VMSLB设置了定时器TCheck进行周期性地校验数据库表数据的一致性,定时器的时长可设置为30秒。当定时器超时后,VMSLB使用MD5计算需要校验数据的MD5值,并发送校验表数据请求101给所有VMSIG。作为可选地,校验表数据请求中需要同时携带初始数据库表的名称和需要校验
数据的记录总数。As shown in FIG. 3, the VM SLB sets a timer T Check to periodically check the consistency of the database table data, and the duration of the timer can be set to 30 seconds. When the timer expires, the VM SLB uses MD5 to calculate the MD5 value of the check data and sends a checklist data request 101 to all VM SIGs . Optionally, the checklist data request needs to carry both the name of the initial database table and the total number of records that need to be verified.
接着,VMSIG收到校验表数据请求101后,定位查找到对应数据库表,首先核对待核实数据和需要校验数据的记录总数是否相同,如果记录总数不同则肯定需要再从VMSLB重新获取同步的表数据。如果记录总数相同,则进一步核对两者的MD5值,如果相同,则代表两者的表数据一致,不用给VMSLB回复任何响应,本次校验结束。Then, after receiving the checklist data request 101, the VM SIG locates the corresponding database table, and first checks whether the verified data and the total number of records that need to be verified are the same. If the total number of records is different, it is necessary to reacquire from the VM SLB . Synchronized table data. If the total number of records is the same, the MD5 values of the two are further checked. If they are the same, the table data of the two is consistent, and no response is returned to the VM SLB , and the verification ends.
如果某个VMSIG中待核实数据与需要校验数据的记录总数或者MD5值不同,则该VMSIG主动发送同步表数据请求102至VMSLB,以请求重新同步该数据库表数据的全部数据,同步表数据请求中需要携带数据库表的名称。If the data to be verified in a VM SIG is different from the total number of records or MD5 values that need to be verified, the VM SIG actively sends the synchronization table data request 102 to the VM SLB to request to resynchronize all data of the database table data, and synchronize The name of the database table needs to be carried in the table data request.
VMSLB收到同步表数据请求102后,通过同步表数据消息103重新向该VMSIG发送初始数据库表table_sctp的全部内容。After receiving the synchronization table data request 102, the VM SLB resends the entire contents of the initial database table table_sctp to the VM SIG through the synchronization table data message 103.
VMSIG收到同步表数据消息103后,首先清除对应数据库表中的数据,然后将收到初始数据库表的全部内容替换到对应偶联信息中,本次校验结束。After receiving the synchronization table data message 103, the VM SIG first clears the data in the corresponding database table, and then replaces the entire content of the initial database table with the corresponding coupling information, and the verification ends.
第二种校验方法,我们称为链状校验,该链状校验的特点是VMSLB只向其中的一个VMSIG发送校验表数据请求,由该VMSIG再向下一个VMSIG转发校验表数据请求,直到所有VMSIG接收到该校验表数据请求,下面是结合图4对链状校验的整个流程的详细说明。The second method of verification, validation we call chain, the chain verification feature is the VM SLB checking table data request transmitted to only one of the VM SIG, then down a VM SIG forwarded by the VM SIG The checklist data request is received until all VM SIGs receive the checklist data request. The following is a detailed description of the entire flow of the chain check in conjunction with FIG.
如图4所示,VMSLB设置定时器TCheck来周期地校验数据库表数据的一致性,定时器的时长可设置为30秒。当定时器超时后,VMSLB使用MD5计算需要校验数据的MD5值,并发送校验表数据请求101给其中的一个VMSIG,可以是在VMSLB存储的所有VMSLB中编号最小的,图中首先发送给了VMSIG1。需要说明的是,校验表数据请求中同样需要携带初始数据库表的名称和需要校验数据的记录总数。As shown in FIG. 4, the VM SLB sets a timer T Check to periodically check the consistency of the database table data, and the duration of the timer can be set to 30 seconds. When the timer expires, VM SLB desired value using the MD5 checksum MD5 calculation data, and transmits the data request checking table 101 to which a VM SIG, may be all stored VM SLB VM SLB smallest number, FIG. First sent to VM SIG 1. It should be noted that the checklist data request also needs to carry the name of the initial database table and the total number of records that need to be verified.
VMSIG1收到校验表数据请求101后,首先将该校验表数据请求发送给编号次小的VMSIG2。然后再进行本虚拟机的校验:定位查找到对应数据库表,分别核对待核实数据和需要校验数据的记录总数和MD5值是否相同,如果都相同,则代表表数据一致,不用给VMSLB回复任何响应,本次校验结束。After receiving the checklist data request 101, the VM SIG 1 first sends the checklist data request to the VM SIG 2, which is the second smallest. Then perform verification of the virtual machine: locate and find the corresponding database table, and check whether the total number of records and the MD5 value of the verification data and the data to be verified are the same. If they are the same, the table data is consistent, and the VM SLB is not required. Reply to any response, this verification is over.
如果某个VMSIG中存储的待核实数据与需要校验数据的记录总数或者
MD5值存在不同,如图4中的VMSIG2,需要主动发送同步表数据请求102至VMSLB请求重新同步该数据库表数据的内容,同样地,该同步表数据请求102中需要携带对应数据库表的名称。If the data to be verified stored in a VM SIG is different from the total number of records or MD5 values that need to be verified, such as VM SIG 2 in FIG. 4, it is necessary to actively send the synchronization table data request 102 to the VM SLB to request resynchronization of the database. The content of the table data, similarly, the name of the corresponding database table needs to be carried in the synchronization table data request 102.
VMSLB收到同步表数据请求102,通过同步表数据消息103重新向对应的VMSIG2发送初始数据库表table_sctp的全部内容。The VM SLB receives the synchronization table data request 102, and resends the entire contents of the initial database table table_sctp to the corresponding VM SIG 2 through the synchronization table data message 103.
VMSIG2收到同步表数据消息103,首先清除对应数据库表中的数据,然后将收到的初始数据库表的全部内容替换到对应数据库表中,本次校验结束。The VM SIG 2 receives the synchronization table data message 103, first clears the data in the corresponding database table, and then replaces the entire contents of the received initial database table into the corresponding database table, and the verification ends.
相比星式校验,链式校验是每个VMSIG向下一个VMSIG发送校验表数据请求,而不是由VMSLB统一发送给所有的VMSIG,因此当VMSIG数量较大时,链式校验可以降低VMSLB收发消息的负荷。Compared to the star check, the chain check is that each VM SIG sends a checklist data request to the next VM SIG instead of being uniformly sent by the VM SLB to all VM SIGs , so when the number of VM SIGs is large, Chain verification can reduce the load on the VM SLB to send and receive messages.
第三实施例Third embodiment
如图5所示,本实施提供的管理数据库表数据的方法在VMSIG侧执行的流程,包括:As shown in FIG. 5, the method for managing database table data provided by this embodiment is performed on the VM SIG side, and includes:
步骤S40:接收VMSLB发来的包含摘要信息的校验表数据请求。Step S40: Receive a checklist data request including summary information sent by the VM SLB .
步骤S50:根据摘要信息核对自身存储的数据库中对应数据库表的待核实数据与初始数据库表的需要校验数据是否一致。Step S50: Check whether the data to be verified of the corresponding database table in the database stored by itself is consistent with the required verification data of the initial database table according to the summary information.
步骤S60:若待核实数据与需要校验数据不一致,则发送同步表数据请求至VMSLB,以使VMSLB发送初始数据库表至VMSIG。Step S60: If the data to be verified is inconsistent with the data to be verified, send a synchronization table data request to the VM SLB to cause the VM SLB to send the initial database table to the VM SIG .
步骤S70:接收并且根据VMSIG发来的初始数据库表更新对应数据库表。Step S70: Receive and update the corresponding database table according to the initial database table sent by the VM SIG .
第四实施例Fourth embodiment
如图6所示,本实施例在第三实施例的基础上,校验表数据请求包括初始数据库表的名称,摘要信息包括MD5值。As shown in FIG. 6, on the basis of the third embodiment, the checklist data request includes the name of the initial database table, and the summary information includes the MD5 value.
可选的,校验表数据请求还包括需要校验数据的记录总数。Optionally, the checklist data request further includes the total number of records that need to be verified.
可选地,步骤S50:根据摘要信息核对自身存储的数据库中对应数据库表的待核实数据与初始数据库表的需要校验数据是否一致包括:Optionally, step S50: checking, according to the summary information, whether the data to be verified of the corresponding database table in the database stored by itself is consistent with the required verification data of the initial database table, including:
步骤S500:根据初始数据库表的名称,找到自身存储数据库中的对应数据库表。包括:
Step S500: Find a corresponding database table in the storage database according to the name of the initial database table. Includes:
查找到自身存储数据库中的名称与初始数据库表的名称相同的对应数据库表。Find the corresponding database table with the same name as the initial database table in its own storage database.
步骤S501:核对对应数据库表的待核实数据的记录总数是否与需要校验数据的记录总数一致,若待核实数据的记录总数与需要校验数据的记录总数一致,则核对待核实数据的MD5值是否与需要校验数据的MD5值相同。Step S501: Check whether the total number of records of the data to be verified corresponding to the database table is consistent with the total number of records requiring the verification data. If the total number of records of the data to be verified is consistent with the total number of records requiring the verification data, the MD5 value of the verification data is verified. Whether it is the same as the MD5 value that needs to be verified.
对应地,步骤S60:若待核实数据与需要校验数据不一致,则发送同步表数据请求至VMSLB包括:Correspondingly, step S60: if the data to be verified is inconsistent with the data to be verified, sending the synchronization table data request to the VM SLB includes:
步骤S600:若待核实数据的记录总数与需要校验数据的记录总数不一致,或待核实数据的MD5值与需要校验数据的MD5值不相同,则发送同步表数据请求至VMSLB。Step S600: If the total number of records of the data to be verified is inconsistent with the total number of records requiring the verification data, or the MD5 value of the data to be verified is not the same as the MD5 value of the data to be verified, the synchronization table data request is sent to the VM SLB .
可选地,步骤S50:根据摘要信息核对自身存储的数据库中对应数据库表的待核实数据与初始数据库表的需要校验数据是否一致包括:Optionally, step S50: checking, according to the summary information, whether the data to be verified of the corresponding database table in the database stored by itself is consistent with the required verification data of the initial database table, including:
根据初始数据库表的名称,找到自身存储数据库中的对应数据库表;核对待核实数据的MD5值是否与需要校验数据的MD5值相同。According to the name of the initial database table, find the corresponding database table in the own storage database; check whether the MD5 value of the verification data is the same as the MD5 value of the verification data.
其中,根据初始数据库表的名称,找到自身存储数据库中的对应数据库表包括:查找到自身存储数据库中的名称与初始数据库表的名称相同的对应数据库表。Wherein, according to the name of the initial database table, finding the corresponding database table in the own storage database includes: finding a corresponding database table whose name in the storage database is the same as the name of the initial database table.
对应地,步骤S60:若待核实数据与需要校验数据不一致,则发送同步表数据请求至VMSLB包括:Correspondingly, Step S60: If need be confirmed with data inconsistency check data, table data synchronization request is then sent to the VM SLB comprising:
若待核实数据的MD5值与需要校验数据的MD5值不相同,则发送同步表数据请求至VMSLB。If the MD5 value of the data to be verified is not the same as the MD5 value of the data to be verified, a synchronization table data request is sent to the VM SLB .
本发明实施例还提出了一种计算机可读存储介质,存储有计算机可执行指令,计算机可执行指令用于执行上述描述的任意一个方法。Embodiments of the present invention also provide a computer readable storage medium storing computer executable instructions for performing any of the methods described above.
第五实施例Fifth embodiment
如图7所示,本实施例提供的管理数据库表数据的装置设置于VMSLB侧,该装置包括:As shown in FIG. 7, the apparatus for managing database table data provided in this embodiment is disposed on the VM SLB side, and the apparatus includes:
摘要计算模块10,设置为对本地数据库中初始数据库表的需要校验数据进行摘要计算,以得出摘要信息。
The summary calculation module 10 is configured to perform a summary calculation on the required verification data of the initial database table in the local database to obtain summary information.
校验表数据请求发送模块20,设置为发送包含摘要信息的校验表数据请求至信令处理虚拟机VMSIG,供VMSIG根据摘要信息核对VMSIG存储的数据库中对应数据库表的待核实数据与初始数据库表的需要校验数据是否一致。Checking table data request sending module 20 is provided to request the signaling processing for the virtual machine VM SIG transmits data checking table contains summary information for the data to be verified VM SIG VM SIG verification database stored in the database table according to the digest information Whether it is consistent with the need to verify the data of the initial database table.
初始数据库表发送模块30,设置为在待核实数据与需要校验数据不一致的条件下,接收到VMSIG发来的同步表数据请求后,发送初始数据库表至VMSIG,以供VMSIG根据初始数据库表更新对应数据库表。The initial database table sending module 30 is configured to: after receiving the synchronization table data request sent by the VM SIG under the condition that the data to be verified is inconsistent with the data to be verified, send the initial database table to the VM SIG for the VM SIG to initialize according to the VM SIG The database table updates the corresponding database table.
作为可选地,摘要计算模块10是设置为:采用消息摘要算法第五版MD5计算出需要校验数据的MD5值,摘要信息包括MD5值。Optionally, the digest calculation module 10 is configured to: use the message digest algorithm fifth version MD5 to calculate an MD5 value that needs to be verified data, and the digest information includes an MD5 value.
可选地,校验表数据请求发送模块20是设置为:直接发送校验表数据请求至所有VMSIG中。或者,发送校验表数据请求至任一VMSIG中,以使校验表数据请求由该任一VMSIG开始转发至其余VMSIG中,直至所有VMSIG接收到校验表数据请求。Optionally, the checklist data request sending module 20 is configured to directly send the checklist data request to all VM SIGs . Alternatively, a checklist data request is sent to any of the VM SIGs such that the checklist data request is forwarded by the any VM SIG to the remaining VM SIGs until all VM SIGs receive the checklist data request.
第六实施例Sixth embodiment
如图8所示,本实施例提供的管理数据库表数据的装置设置于VMSIG侧,该装置包括:As shown in FIG. 8, the apparatus for managing database table data provided in this embodiment is disposed on the VM SIG side, and the apparatus includes:
接收模块40,设置为接收VMSLB发来的包含摘要信息的校验表数据请求。The receiving module 40 is configured to receive a checklist data request including summary information sent by the VM SLB .
核对模块50,设置为根据摘要信息核对自身存储的数据库中对应数据库表的待核实数据与初始数据库表的需要校验数据是否一致。The verification module 50 is configured to check, according to the summary information, whether the data to be verified of the corresponding database table in the database stored by itself is consistent with the required verification data of the initial database table.
发送模块60,设置为若待核实数据与需要校验数据不一致,则发送同步表数据请求至VMSLB,以使VMSLB发送初始数据库表至VMSIG。The sending module 60 is configured to send the synchronization table data request to the VM SLB if the data to be verified is inconsistent with the data to be verified, so that the VM SLB sends the initial database table to the VM SIG .
更新模块70,设置为接收并且根据VMSIG发来的初始数据库表更新对应数据库表。The update module 70 is configured to receive and update the corresponding database table according to the initial database table sent by the VM SIG .
可选地,校验表数据请求包括初始数据库表的名称和需要校验数据的记录总数,摘要信息包括MD5值,其中核对模块50是设置为:Optionally, the checklist data request includes a name of the initial database table and a total number of records that need to be verified, and the summary information includes an MD5 value, wherein the verification module 50 is configured to:
根据初始数据库表的名称,找到自身存储数据库中的对应数据库表;核对对应数据库表的待核实数据的记录总数是否与需要校验数据的记录总数一致,若待核实数据的记录总数与需要校验数据的记录总数一致,则核对待核实数据的MD5值是否与需要校验数据的MD5值相同;对应地,所述发送模
块60,还设置为:若待核实数据的记录总数与需要校验数据的记录总数不一致,或待核实数据的MD5值与需要校验数据的MD5值不相同,则发送同步表数据请求至VMSLB。According to the name of the initial database table, find the corresponding database table in the self-storage database; check whether the total number of records of the data to be verified corresponding to the database table is consistent with the total number of records that need to be verified data, if the total number of records of the data to be verified and the need to verify If the total number of records of the data is the same, the MD5 value of the verification data is the same as the MD5 value of the data to be verified; correspondingly, the sending module 60 is further configured to: if the total number of records of the data to be verified and the data to be verified The total number of records is inconsistent, or the MD5 value of the data to be verified is not the same as the MD5 value of the data to be verified, and the synchronization table data request is sent to the VM SLB .
可选的,校验表数据请求包括初始数据库表的名称,所述摘要信息包括MD5值,所述核对模块是设置为:Optionally, the checklist data request includes a name of the initial database table, the summary information includes an MD5 value, and the check module is set to:
根据初始数据库表的名称,找到自身存储数据库中的对应数据库表;Find the corresponding database table in the own storage database according to the name of the initial database table;
核对所述待核实数据的MD5值是否与所述需要校验数据的MD5值相同;Checking whether the MD5 value of the data to be verified is the same as the MD5 value of the required verification data;
对应地,所述发送模块是设置为:若所述待核实数据的MD5值与所述需要校验数据的MD5值不相同,则发送所述同步表数据请求至所述VMSLB。Correspondingly, the sending module is configured to: if the MD5 value of the to-be-verified data is different from the MD5 value of the required verification data, send the synchronization table data request to the VM SLB .
第七实施例Seventh embodiment
另外,本发明实施例还提供了一种虚拟网络通信系统,其包括根据上文所述的设置于所述VMSLB侧的装置。In addition, an embodiment of the present invention further provides a virtual network communication system, including the apparatus disposed on the VMSLB side according to the foregoing.
第八实施例Eighth embodiment
此外,本发明实施例还提供了一种虚拟网络通信系统,其包括根据上文所述的设置于所述VMSIG侧的装置。In addition, an embodiment of the present invention further provides a virtual network communication system, including the apparatus disposed on the VMSIG side according to the foregoing.
本领域普通技术人员可以理解上述方法中的全部或部分步骤可通过程序来指令相关硬件(例如处理器)完成,所述程序可以存储于计算机可读存储介质中,如只读存储器、磁盘或光盘等。可选地,上述实施例的全部或部分步骤也可以使用一个或多个集成电路来实现。相应地,上述实施例中的各模块/单元可以采用硬件的形式实现,例如通过集成电路来实现其相应功能,也可以采用软件功能模块的形式实现,例如通过处理器执行存储与存储器中的程序/指令来实现其相应功能。本发明不限于任何特定形式的硬件和软件的结合。One of ordinary skill in the art will appreciate that all or a portion of the above steps may be performed by a program to instruct related hardware, such as a processor, which may be stored in a computer readable storage medium, such as a read only memory, disk or optical disk. Wait. Alternatively, all or part of the steps of the above embodiments may also be implemented using one or more integrated circuits. Correspondingly, each module/unit in the foregoing embodiment may be implemented in the form of hardware, for example, by implementing an integrated circuit to implement its corresponding function, or may be implemented in the form of a software function module, for example, executing a program in a storage and a memory by a processor. / instruction to achieve its corresponding function. The invention is not limited to any specific form of combination of hardware and software.
通过具体实施方式的说明,应当可对本发明为达成预定目的所采取的技术手段及功效得以更加深入且具体的了解,然而所附图示仅是提供参考与说明之用,并非用来对本发明加以限制。
The technical means and functions of the present invention for achieving the intended purpose can be more deeply and specifically understood by the description of the specific embodiments. However, the accompanying drawings are only for the purpose of illustration and description, and are not intended to limit.
上述技术方案提高了不同虚拟机中数据库表数据的一致性,且易于实现,适用范围广。
The above technical solution improves the consistency of database table data in different virtual machines, and is easy to implement, and has wide application range.
Claims (15)
- 一种管理数据库表数据的方法,在业务负荷均衡功能虚拟机VMSLB侧执行的流程,包括:Database data table for managing methods, procedures performed in traffic load balancing virtual machine VM SLB side, comprising:对本地数据库中初始数据库表的需要校验数据进行摘要计算,以得出摘要信息;Performing a summary calculation on the required verification data of the initial database table in the local database to obtain summary information;发送包含摘要信息的校验表数据请求至信令处理虚拟机VMSIG,供所述VMSIG根据所述摘要信息核对所述VMSIG存储的数据库中对应数据库表的待核实数据与所述初始数据库表的需要校验数据是否一致;Checking table contains summary information of the data transmission request to the signaling handling virtual machine VM SIG, the VM SIG for checking the database of stored VM SIG database table corresponding to the initial data to be verified according to the digest information database Whether the table needs to check whether the data is consistent;在所述待核实数据与所述需要校验数据不一致的条件下,接收到所述VMSIG发来的同步表数据请求后,发送所述初始数据库表至VMSIG,以供所述VMSIG根据所述初始数据库表更新所述对应数据库表。Under the condition to be verified with the need to verify the data inconsistent data, after receiving the VM SIG synchronization table sent data request, sending the initial database tables to VM SIG, for use according to the VM SIG The initial database table updates the corresponding database table.
- 根据权利要求1所述的校验方法,其中,所述对本地数据库中初始数据库表的需要校验数据进行摘要计算,以得出摘要信息包括:The verification method according to claim 1, wherein the performing the summary calculation on the required verification data of the initial database table in the local database to obtain the summary information comprises:采用消息摘要算法第五版MD5计算出所述需要校验数据的MD5值,将所述MD5值作为所述摘要信息。The MD5 value of the required check data is calculated by using the message digest algorithm fifth version MD5, and the MD5 value is used as the summary information.
- 根据权利要求1或2所述的校验方法,其中,所述同步表数据请求包括所述对应数据库表的名称;The verification method according to claim 1 or 2, wherein the synchronization table data request includes a name of the corresponding database table;所述发送所述初始数据库表至VMSIG包括:The sending the initial database table to the VM SIG includes:根据所述对应数据库表的名称获取所述初始数据库表后,将所述初始数据库表发送至所述VMSIG。After obtaining the initial database table according to the name of the corresponding database table, the initial database table is sent to the VM SIG .
- 根据权利要求1至3中任一项所述的校验方法,其中,所述发送包含摘要信息的校验表数据请求至信令处理虚拟机VMSIG包括:The verification method according to any one of claims 1 to 3, wherein the transmitting the checklist data request including the digest information to the signaling processing virtual machine VM SIG comprises:直接发送所述校验表数据请求至所有VMSIG中;或者,Sending the checklist data request directly to all VM SIGs ; or,发送所述校验表数据请求至任一VMSIG中,以使所述校验表数据请求由所述任一VMSIG开始转发至其余VMSIG中,直至所有VMSIG接收到所述校验表数据请求。Sending the checklist data request to any VM SIG such that the checklist data request is forwarded by the any VM SIG to the remaining VM SIG until all VM SIGs receive the checklist Data request.
- 一种管理数据库表数据的方法,在信令处理虚拟机VMSIG侧执行的流 程,包括:A method for managing database table data, which is executed on the side of the signaling processing virtual machine VM SIG , including:接收VMSLB发来的包含摘要信息的校验表数据请求;Receiving a checklist data request including summary information sent by the VM SLB ;根据所述摘要信息核对自身存储的数据库中对应数据库表的待核实数据与所述初始数据库表的需要校验数据是否一致;Checking, according to the summary information, whether the data to be verified of the corresponding database table in the database stored by itself is consistent with the required verification data of the initial database table;若所述待核实数据与所述需要校验数据不一致,则发送同步表数据请求至所述VMSLB,以使所述VMSLB发送所述初始数据库表至所述VMSIG;If the to-be-verified data is inconsistent with the required verification data, send a synchronization table data request to the VM SLB , so that the VM SLB sends the initial database table to the VM SIG ;接收并且根据所述VMSIG发来的所述初始数据库表更新所述对应数据库表。Receiving and updating the corresponding database table according to the initial database table sent by the VM SIG .
- 根据权利要求5所述的校验方法,其中,所述校验表数据请求包括初始数据库表的名称和需要校验数据的记录总数,所述摘要信息包括MD5值;The verification method according to claim 5, wherein the check list data request includes a name of an initial database table and a total number of records requiring check data, and the summary information includes an MD5 value;所述根据所述摘要信息核对自身存储的数据库中对应数据库表的待核实数据与所述初始数据库表的需要校验数据是否一致包括:The checking, according to the summary information, whether the data to be verified of the corresponding database table in the database stored by itself is consistent with the required verification data of the initial database table includes:根据所述初始数据库表的名称,找到自身存储数据库中的对应数据库表;Find a corresponding database table in the storage database according to the name of the initial database table;核对所述对应数据库表的待核实数据的记录总数是否与所述需要校验数据的记录总数一致,若所述待核实数据的记录总数与所述需要校验数据的记录总数一致,则核对所述待核实数据的MD5值是否与所述需要校验数据的MD5值相同;Checking whether the total number of records of the data to be verified of the corresponding database table is consistent with the total number of records of the data to be verified, and if the total number of records of the data to be verified is consistent with the total number of records of the data to be verified, the check Whether the MD5 value of the verification data is the same as the MD5 value of the verification data required;对应地,若所述待核实数据与所述需要校验数据不一致,则发送同步表数据请求至所述VMSLB包括:Correspondingly, if the to-be-verified data is inconsistent with the required verification data, sending a synchronization table data request to the VM SLB includes:若所述待核实数据的记录总数与所述需要校验数据的记录总数不一致,或所述待核实数据的MD5值与所述需要校验数据的MD5值不相同,则发送所述同步表数据请求至所述VMSLB。Sending the synchronization table data if the total number of records of the data to be verified is inconsistent with the total number of records of the data to be verified, or the MD5 value of the data to be verified is different from the MD5 value of the data to be verified. Request to the VM SLB .
- 根据权利要求5所述的校验方法,其中,所述校验表数据请求包括初始数据库表的名称,所述摘要信息包括MD5值;The verification method according to claim 5, wherein the check list data request includes a name of an initial database table, and the summary information includes an MD5 value;所述根据所述摘要信息核对自身存储的数据库中对应数据库表的待核实数据与所述初始数据库表的需要校验数据是否一致包括:The checking, according to the summary information, whether the data to be verified of the corresponding database table in the database stored by itself is consistent with the required verification data of the initial database table includes:根据所述初始数据库表的名称,找到自身存储数据库中的对应数据库表; 核对所述待核实数据的MD5值是否与所述需要校验数据的MD5值相同;Find a corresponding database table in the storage database according to the name of the initial database table; Checking whether the MD5 value of the data to be verified is the same as the MD5 value of the required verification data;对应地,若所述待核实数据与所述需要校验数据不一致,则发送同步表数据请求至所述VMSLB包括:Correspondingly, if the to-be-verified data is inconsistent with the required verification data, sending a synchronization table data request to the VM SLB includes:若所述待核实数据的MD5值与所述需要校验数据的MD5值不相同,则发送所述同步表数据请求至所述VMSLB。If the MD5 value of the data to be verified is different from the MD5 value of the data to be checked, the synchronization table data request is sent to the VM SLB .
- 一种管理数据库表数据的装置,设置于VMSLB侧,所述装置包括:An apparatus for managing database table data is disposed on a VM SLB side, and the apparatus includes:摘要计算模块,设置为对本地数据库中初始数据库表的需要校验数据进行摘要计算,以得出摘要信息;The summary calculation module is configured to perform a summary calculation on the required verification data of the initial database table in the local database to obtain summary information;校验表数据请求发送模块,设置为发送包含摘要信息的校验表数据请求至信令处理虚拟机VMSIG,供所述VMSIG根据所述摘要信息核对所述VMSIG存储的数据库中对应数据库表的待核实数据与所述初始数据库表的需要校验数据是否一致;Checking table data request sending module is provided to transmit data checking table contains summary information request to a virtual machine VM SIG signaling processing, the collation for the VM SIG VM SIG digest information based on said database stored in a corresponding database Whether the data to be verified of the table is consistent with the required verification data of the initial database table;初始数据库表发送模块,设置为在所述待核实数据与所述需要校验数据不一致的条件下,接收到所述VMSIG发来的同步表数据请求后,发送所述初始数据库表至VMSIG,以供所述VMSIG根据所述初始数据库表更新所述对应数据库表。The initial database table sending module is configured to send the initial database table to the VM SIG after receiving the synchronization table data request sent by the VM SIG under the condition that the to-be-verified data and the required verification data are inconsistent And for the VM SIG to update the corresponding database table according to the initial database table.
- 根据权利要求8所述的校验装置,其中,所述摘要计算模块是设置为:The verification device according to claim 8, wherein said summary calculation module is configured to:采用消息摘要算法第五版MD5计算出所述需要校验数据的MD5值,将所述MD5值作为所述摘要信息。The MD5 value of the required check data is calculated by using the message digest algorithm fifth version MD5, and the MD5 value is used as the summary information.
- 根据权利要求8或9所述的校验装置,其中,所述校验表数据请求发送模块是设置为:The verification device according to claim 8 or 9, wherein the check list data request sending module is set to:直接发送所述校验表数据请求至所有VMSIG中;或者,Sending the checklist data request directly to all VM SIGs ; or,发送所述校验表数据请求至任一VMSIG中,以使所述校验表数据请求由所述任一VMSIG开始转发至其余VMSIG中,直至所有VMSIG接收到所述校验表数据请求。Sending the checklist data request to any VM SIG such that the checklist data request is forwarded by the any VM SIG to the remaining VM SIG until all VM SIGs receive the checklist Data request.
- 一种管理数据库表数据的装置,设置于VMSIG侧,所述装置包括: An apparatus for managing database table data is disposed on a VMSIG side, and the apparatus includes:接收模块,设置为接收VMSLB发来的包含摘要信息的校验表数据请求;a receiving module, configured to receive a checklist data request that is sent by the VMSLB and includes summary information;核对模块,设置为根据所述摘要信息核对自身存储的数据库中对应数据库表的待核实数据与所述初始数据库表的需要校验数据是否一致;a verification module, configured to check, according to the summary information, whether the data to be verified of the corresponding database table in the database stored by itself is consistent with the required verification data of the initial database table;发送模块,设置为若所述待核实数据与所述需要校验数据不一致,则发送同步表数据请求至所述VMSLB,以使所述VMSLB发送所述初始数据库表至所述VMSIG;a sending module, configured to send a synchronization table data request to the VM SLB if the data to be verified is inconsistent with the required verification data, so that the VM SLB sends the initial database table to the VM SIG ;更新模块,设置为接收并且根据所述VMSIG发来的所述初始数据库表更新所述对应数据库表。An update module configured to receive and update the corresponding database table based on the initial database table sent by the VM SIG .
- 根据权利要求11所述的校验装置,其中,所述校验表数据请求包括初始数据库表的名称和所述需要校验数据的记录总数,所述摘要信息包括MD5值,所述核对模块是设置为:The verification apparatus according to claim 11, wherein said check list data request includes a name of an initial database table and said total number of records requiring verification data, said summary information includes an MD5 value, and said verification module is Set as:根据初始数据库表的名称,找到自身存储数据库中的对应数据库表;Find the corresponding database table in the own storage database according to the name of the initial database table;核对所述对应数据库表的待核实数据的记录总数是否与所述需要校验数据的记录总数一致,若所述待核实数据的记录总数与所述需要校验数据的记录总数一致,则核对所述待核实数据的MD5值是否与所述需要校验数据的MD5值相同;Checking whether the total number of records of the data to be verified of the corresponding database table is consistent with the total number of records of the data to be verified, and if the total number of records of the data to be verified is consistent with the total number of records of the data to be verified, the check Whether the MD5 value of the verification data is the same as the MD5 value of the verification data required;对应地,所述发送模块是设置为:若所述待核实数据的记录总数与所述需要校验数据的记录总数不一致,或所述待核实数据的MD5值与所述需要校验数据的MD5值不相同,则发送所述同步表数据请求至所述VMSLB。Correspondingly, the sending module is configured to: if the total number of records of the data to be verified is inconsistent with the total number of records of the data to be verified, or the MD5 value of the data to be verified and the MD5 of the data to be verified If the values are not the same, the synchronization table data request is sent to the VM SLB .
- 根据权利要求11所述的校验装置,其中,所述校验表数据请求包括初始数据库表的名称,所述摘要信息包括MD5值,所述核对模块是设置为:The verification apparatus according to claim 11, wherein said check list data request includes a name of an initial database table, said summary information includes an MD5 value, and said verification module is configured to:根据初始数据库表的名称,找到自身存储数据库中的对应数据库表;Find the corresponding database table in the own storage database according to the name of the initial database table;核对所述待核实数据的MD5值是否与所述需要校验数据的MD5值相同;Checking whether the MD5 value of the data to be verified is the same as the MD5 value of the required verification data;对应地,所述发送模块是设置为:若所述待核实数据的MD5值与所述需要校验数据的MD5值不相同,则发送所述同步表数据请求至所述VMSLB。Correspondingly, the sending module is configured to: if the MD5 value of the to-be-verified data is different from the MD5 value of the required verification data, send the synchronization table data request to the VM SLB .
- 一种虚拟网络通信系统,包括根据权利要求8至10中任一项所述的设置于所述VMSLB侧的装置。 A virtual network communication system comprising the apparatus disposed on the VM SLB side according to any one of claims 8 to 10.
- 一种虚拟网络通信系统,包括根据权利要求11或12或13所述的设置于所述VMSIG侧的装置。 A virtual network communication system comprising the apparatus disposed on the VM SIG side according to claim 11 or 12 or 13.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510702295.1A CN106611001A (en) | 2015-10-26 | 2015-10-26 | Method, device and system for checking consistency of data in database tables in virtual machines |
CN201510702295.1 | 2015-10-26 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2017071337A1 true WO2017071337A1 (en) | 2017-05-04 |
Family
ID=58613850
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2016/091749 WO2017071337A1 (en) | 2015-10-26 | 2016-07-26 | Database table data management method, apparatus and system |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN106611001A (en) |
WO (1) | WO2017071337A1 (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110162461A (en) * | 2019-04-16 | 2019-08-23 | 平安科技(深圳)有限公司 | Data synchronize verification method, device and computer equipment |
CN111125063A (en) * | 2019-12-20 | 2020-05-08 | 无线生活(杭州)信息科技有限公司 | Method and device for rapidly verifying data migration among clusters |
CN116069775A (en) * | 2023-04-06 | 2023-05-05 | 上海二三四五网络科技有限公司 | Data quality verification system and method for data warehouse |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108804561B (en) * | 2018-05-22 | 2021-10-15 | 北京科东电力控制系统有限责任公司 | Data synchronization method and device |
CN109582683A (en) * | 2018-11-14 | 2019-04-05 | 泰康保险集团股份有限公司 | Data consistency checking method, device and equipment |
CN114339765B (en) * | 2021-11-25 | 2024-01-19 | 国网河南省电力公司电力科学研究院 | Differential protection data interactive chain type verification method and system based on 5G communication |
CN117251460B (en) * | 2023-08-10 | 2024-04-05 | 上海栈略数据技术有限公司 | Data consistency check system for graph database and relational database |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5758355A (en) * | 1996-08-07 | 1998-05-26 | Aurum Software, Inc. | Synchronization of server database with client database using distribution tables |
CN101009516A (en) * | 2006-01-26 | 2007-08-01 | 华为技术有限公司 | A method and system for data synchronization |
CN103312669A (en) * | 2012-03-09 | 2013-09-18 | 广州从兴电子开发有限公司 | ddata consistence protection |
CN104021132A (en) * | 2013-12-08 | 2014-09-03 | 郑州正信科技发展股份有限公司 | Method and system for verification of consistency of backup data of host database and backup database |
-
2015
- 2015-10-26 CN CN201510702295.1A patent/CN106611001A/en active Pending
-
2016
- 2016-07-26 WO PCT/CN2016/091749 patent/WO2017071337A1/en active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5758355A (en) * | 1996-08-07 | 1998-05-26 | Aurum Software, Inc. | Synchronization of server database with client database using distribution tables |
CN101009516A (en) * | 2006-01-26 | 2007-08-01 | 华为技术有限公司 | A method and system for data synchronization |
CN103312669A (en) * | 2012-03-09 | 2013-09-18 | 广州从兴电子开发有限公司 | ddata consistence protection |
CN104021132A (en) * | 2013-12-08 | 2014-09-03 | 郑州正信科技发展股份有限公司 | Method and system for verification of consistency of backup data of host database and backup database |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110162461A (en) * | 2019-04-16 | 2019-08-23 | 平安科技(深圳)有限公司 | Data synchronize verification method, device and computer equipment |
CN110162461B (en) * | 2019-04-16 | 2023-08-15 | 平安科技(深圳)有限公司 | Data synchronization verification method and device and computer equipment |
CN111125063A (en) * | 2019-12-20 | 2020-05-08 | 无线生活(杭州)信息科技有限公司 | Method and device for rapidly verifying data migration among clusters |
CN111125063B (en) * | 2019-12-20 | 2023-09-26 | 无线生活(杭州)信息科技有限公司 | Method and device for rapidly checking data migration among clusters |
CN116069775A (en) * | 2023-04-06 | 2023-05-05 | 上海二三四五网络科技有限公司 | Data quality verification system and method for data warehouse |
CN116069775B (en) * | 2023-04-06 | 2023-08-22 | 上海二三四五网络科技有限公司 | Data quality verification system and method for data warehouse |
Also Published As
Publication number | Publication date |
---|---|
CN106611001A (en) | 2017-05-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2017071337A1 (en) | Database table data management method, apparatus and system | |
WO2022188831A1 (en) | Block consensus method based on blockchain, and related device | |
US12093247B2 (en) | Blockchain system and method | |
US20240179212A1 (en) | Hosted file sync with stateless sync nodes | |
TW201943250A (en) | Cross-blockchain authentication method and apparatus, and electronic device | |
CN102012944B (en) | Distributed NOSQL (not only structured query language) database capable of providing replication property | |
US11182403B2 (en) | Systems and methods of launching new nodes in a blockchain network | |
CN110995513B (en) | Data sending and receiving method in Internet of things system, internet of things equipment and platform | |
US20170124021A1 (en) | Methods for enabling direct memory access (dma) capable devices for remote dma (rdma) usage and devices thereof | |
WO2014094468A1 (en) | System, method and browser client for enabling browser data synchronization | |
CN107634984A (en) | A kind of file synchronisation method based on one-way transmission path | |
US20160134695A1 (en) | Method and apparatus for data synchronization | |
US9596304B2 (en) | Distributed server election with imperfect clock synchronization | |
CN110727738B (en) | Global routing system based on data fragmentation, electronic equipment and storage medium | |
WO2021147793A1 (en) | Data processing method, apparatus and system, electronic device and computer storage medium | |
CN108989430A (en) | Load-balancing method, device and storage medium | |
WO2021136233A1 (en) | Service upgrading method, device and system | |
WO2016070651A1 (en) | Software centre system | |
WO2017097181A1 (en) | Data pushing method and apparatus | |
CN110032547A (en) | File stores improved method under a kind of distributed environment | |
US20170187800A1 (en) | File synchronization method, electronic device | |
US11030220B2 (en) | Global table management operations for multi-region replicated tables | |
WO2016074412A1 (en) | Compatibility administration method based on network configuration protocol, storage medium and device | |
CN106897316B (en) | Method and device for processing signaling data | |
CN112351106B (en) | Service grid platform containing event grid and communication method thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 16858776 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 16858776 Country of ref document: EP Kind code of ref document: A1 |