TW202217641A - Data checking method, device, equipment and system and storage medium - Google Patents

Data checking method, device, equipment and system and storage medium Download PDF

Info

Publication number
TW202217641A
TW202217641A TW110139362A TW110139362A TW202217641A TW 202217641 A TW202217641 A TW 202217641A TW 110139362 A TW110139362 A TW 110139362A TW 110139362 A TW110139362 A TW 110139362A TW 202217641 A TW202217641 A TW 202217641A
Authority
TW
Taiwan
Prior art keywords
data
data flow
flow
key value
primary key
Prior art date
Application number
TW110139362A
Other languages
Chinese (zh)
Other versions
TWI802056B (en
Inventor
陳超
柳韜
邵廣輝
馬永松
王炫召
Original Assignee
大陸商中國銀聯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 大陸商中國銀聯股份有限公司 filed Critical 大陸商中國銀聯股份有限公司
Publication of TW202217641A publication Critical patent/TW202217641A/en
Application granted granted Critical
Publication of TWI802056B publication Critical patent/TWI802056B/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/51Discovery or management thereof, e.g. service location protocol [SLP] or web services

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Debugging And Monitoring (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)

Abstract

The invention discloses a data checking method, device, equipment and system and a storage medium, and relates to the field of data processing. The method comprises the steps: under the condition that write operation occurs in all system data pools, generating and transmitting a data stream comprising data associated with the write operation, wherein the data stream comprises the main key value of the data; dividing the data stream into at least one data region based on the field of the data stream and a preset region division rule, wherein data region comprises the data stream corresponding to at least two system data pools; and in each data region, checking the data stream corresponding to the at least two system data pools in the data region according to the main key value corresponding to the data stream so as to determine whether the data of the at least two system data pools in the data region is consistent or not. According to the embodiment of the invention, the problem of cross-system data inconsistency can be discovered in time.

Description

資料核對方法、裝置、設備、系統及存儲介質 Data verification method, device, equipment, system and storage medium

本發明涉及資料核對技術領域,特別是涉及一種資料核對方法、裝置、設備、系統及存儲介質。 The present invention relates to the technical field of data verification, and in particular, to a data verification method, device, equipment, system and storage medium.

隨著業務複雜程度的增加,一項業務會涉及多個系統。對應地,在多個系統之間,需要跨系統核對業務資料,以發現跨系統間的業務資料的不一致,便於對各系統採取措施,保證各系統的平穩運行。 As the complexity of the business increases, a business will involve multiple systems. Correspondingly, among multiple systems, it is necessary to check business data across systems to find inconsistencies in business data across systems, so that measures can be taken for each system to ensure smooth operation of each system.

現階段,可從參與資料核對的兩個系統中分別獲取業務資料。例如,從系統A和系統B中分別獲取已經結束的1天內的業務資料,逐條對比系統A和系統B中的業務資料是否一致,即是否存在跨系統的資料不平問題。但該種資料核對方法無法及時發現跨系統的資料不平問題。 At this stage, business data can be obtained from the two systems involved in data verification. For example, obtain business data for the past 1 day from system A and system B, respectively, and compare the business data in system A and system B one by one to see if the business data in system A and system B are consistent, that is, whether there is a cross-system data inequity problem. However, this kind of data checking method cannot detect the data inequity across the system in time.

本發明實施例提供一種資料核對方法、裝置、設備、系統及存儲介質,能夠及時發現跨系統的資料不平問題。 Embodiments of the present invention provide a data verification method, apparatus, device, system, and storage medium, which can timely discover the problem of data inequity across systems.

第一方面,本發明實施例提供一種資料核對方法,包括:在各系統資料池發生寫操作的情況下,生成包括與寫操作關聯的資料的資料流程並傳輸,資料流程包括資料的主鍵值;基於資料流程的欄位以及預設的區域劃分規則,將資料流程劃分為至少一個資料區域,每個資料區域包括至少兩個系統資料池對應的資料流程;在每個資料區域中,根據資料流程對應的主鍵值,核對資料區域中的至少兩個系統資料池對應的資料流程,以確定資料區域中的至少兩個系統資料池的資料是否一致。 In a first aspect, an embodiment of the present invention provides a data verification method, including: when a write operation occurs in each system data pool, generating and transmitting a data flow including data associated with the write operation, where the data flow includes a primary key value of the data ; Based on the fields of the data flow and the preset area division rules, the data flow is divided into at least one data area, and each data area includes the data flows corresponding to at least two system data pools; in each data area, according to the data The primary key value corresponding to the process is checked against the data processes corresponding to at least two system data pools in the data area to determine whether the data of at least two system data pools in the data area are consistent.

第二方面,本發明實施例提供一種資料核對裝置,包括:資料流程生成模組,用於在各系統資料池發生寫操作的情況下,生成包括 與寫操作關聯的資料的資料流程並傳輸,資料流程包括資料的主鍵值;區域劃分模組,用於基於資料流程的欄位以及預設的區域劃分規則,將資料流程劃分為至少一個資料區域,每個資料區域包括至少兩個系統資料池對應的資料流程;核對模組,用於在每個資料區域中,根據資料流程對應的主鍵值,核對資料區域中的至少兩個系統資料池對應的資料流程,以確定資料區域中的至少兩個系統資料池的資料是否一致。 In a second aspect, an embodiment of the present invention provides a data verification device, including: a data flow generation module, configured to generate a data flow including The data flow of the data associated with the write operation is transmitted and transmitted. The data flow includes the primary key value of the data; the area division module is used to divide the data flow into at least one data flow based on the fields of the data flow and the preset area division rules. area, each data area includes data processes corresponding to at least two system data pools; the check module is used to check at least two system data in the data area according to the primary key value corresponding to the data process in each data area The data flow corresponding to the pool is used to determine whether the data of at least two system data pools in the data area are consistent.

第三方面,本發明實施例提供一種資料核對設備,包括:處理器以及存儲有電腦程式指令的記憶體;處理器執行電腦程式指令時實現第一方面的資料核對方法。 In a third aspect, an embodiment of the present invention provides a data verification device, including: a processor and a memory storing computer program instructions; the processor implements the data verification method of the first aspect when the processor executes the computer program instructions.

第四方面,本發明實施例提供一種資料核對系統,包括:資料流程裝置,用於在各系統資料池發生寫操作的情況下,生成包括與寫操作關聯的資料的資料流程並傳輸,資料流程包括資料的主鍵值;分流裝置,用於基於資料流程的欄位以及預設的區域劃分規則,將資料流程劃分為至少一個資料區域,每個資料區域包括至少兩個系統資料池對應的資料流程;核對裝置,用於在每個資料區域中,根據資料流程對應的主鍵值,核對資料區域中的至少兩個系統資料池對應的資料流程,以確定資料區域中的至少兩個系統資料池的資料是否一致。 In a fourth aspect, an embodiment of the present invention provides a data verification system, including: a data flow device for generating and transmitting a data flow including data associated with the write operation when a write operation occurs in each system data pool, and the data flow Including the primary key value of the data; the diversion device is used to divide the data process into at least one data area based on the fields of the data process and the preset area division rules, and each data area includes the data corresponding to at least two system data pools Process; a checking device for checking the data processes corresponding to at least two system data pools in the data area according to the primary key value corresponding to the data process in each data area, so as to determine at least two system data in the data area Whether the pool data is consistent.

第五方面,本發明實施例提供一種電腦存儲介質,電腦存儲介質上存儲有電腦程式指令,電腦程式指令被處理器執行時實現第一方面的資料核對方法。 In a fifth aspect, an embodiment of the present invention provides a computer storage medium, where computer program instructions are stored thereon, and when the computer program instructions are executed by a processor, the data verification method of the first aspect is implemented.

本發明實施例提供一種資料核對方法、裝置、設備、系統及存儲介質,在各系統資料池發生寫操作的情況下,生成包括與寫操作關聯的資料的資料流程。將資料流程劃分為至少一個資料區域,每個資料區域包括至少兩個系統資料池對應的資料流程。在資料區域中核對至少兩個系統資料池對應的資料流程,從而確定至少兩個系統資料池的資料是否一致。不需要設置獲取資料的時間段,通過寫操作觸發生成資料流程,從而進行資料流程的劃分及核對。寫操作不受時間長度的限制,能夠在資料 發生變化的情況下,即時進行資料的核對,從而能夠及時發現跨系統的資料不平問題。 Embodiments of the present invention provide a data verification method, apparatus, device, system, and storage medium, which generate a data flow including data associated with the write operation when a write operation occurs in each system data pool. The data process is divided into at least one data area, and each data area includes data processes corresponding to at least two system data pools. The data flow corresponding to the at least two system data pools is checked in the data area, so as to determine whether the data of the at least two system data pools are consistent. There is no need to set the time period for data acquisition, and the data process is triggered by the write operation, so as to divide and check the data process. Write operations are not limited by the length of time and can In the case of changes, the data is checked in real time, so that data inequities across the system can be found in time.

00,01,0001,0002,0003,0004,000792,000982,000991,000993:值 00,01,0001,0002,0003,0004,000792,000982,000991,000993: value

200:資料核對裝置 200: Data verification device

201:資料流程生成模組 201: Data flow generation module

202:區域劃分模組 202: Regional division module

203:核對模組 203: Check Module

2031:視窗劃分單元 2031: Window division unit

2032:核對單元 2032: Checking Unit

204:篩選模組 204: Screening Module

205:處理模組 205: Processing modules

2008:入口 2008: Entrance

300:資料核對設備 300: Data verification equipment

301:記憶體 301: Memory

302:處理器 302: Processor

303:通信介面 303: Communication interface

304:匯流排 304: Busbar

41:資料流程裝置 41: Data flow device

42:分流裝置 42: shunt device

43:核對裝置 43: Checking device

A1,A2,A3:系統 A1,A2,A3: System

B1,B2,B3:系統資料池 B1,B2,B3: system data pool

bussTp:交易類型 bussTp: transaction type

D1,D2,D3,D4:核對視窗 D1, D2, D3, D4: Check window

F3:欄位 F3: Field

C1,C2,C3,C4:資料區域 C1,C2,C3,C4: Data area

E1,E2,,L1,L2:資料流程 E1,E2,,L1,L2: Data flow

S101,S1011,S1012,S1013,S102,S103,S1031,S1032,S104,S105,S106:步驟 S101, S1011, S1012, S1013, S102, S103, S1031, S1032, S104, S105, S106: Steps

seqNo,traceId:主鍵值 seqNo, traceId: primary key value

seqSt:業務狀態 seqSt: business status

sysId:系統標識 sysId: System ID

為了更清楚地說明本發明實施例的技術方案,下面將對本發明實施例中所需要使用的圖式作簡單的介紹,對於本領域普通技術人員來講,在不付出創造性勞動的前提下,還可以根據這些圖式獲得其他的圖式。 In order to illustrate the technical solutions of the embodiments of the present invention more clearly, the following will briefly introduce the drawings that need to be used in the embodiments of the present invention. For those of ordinary skill in the art, without creative work, the Other schemas can be obtained from these schemas.

圖1為本發明第一方面提供的資料核對方法的一實施例的流程圖; 1 is a flowchart of an embodiment of a data verification method provided by the first aspect of the present invention;

圖2為本發明第一方面提供的資料核對方法的另一實施例的流程圖 FIG. 2 is a flowchart of another embodiment of the data verification method provided by the first aspect of the present invention

圖3為本發明第一方面提供的資料核對方法的又一實施例的流程圖; 3 is a flowchart of another embodiment of the data verification method provided by the first aspect of the present invention;

圖4為本發明實施例中一資料區域的核對視窗的一示例的示意圖 FIG. 4 is a schematic diagram of an example of a check window of a data area according to an embodiment of the present invention

圖5為本發明第一方面提供的資料核對方法的再一實施例的流程圖; 5 is a flowchart of still another embodiment of the data verification method provided by the first aspect of the present invention;

圖6為本發明第二方面提供的資料核對裝置的一實施例的結構示意圖; FIG. 6 is a schematic structural diagram of an embodiment of the data verification apparatus provided by the second aspect of the present invention;

圖7為本發明第二方面提供的資料核對裝置的另一實施例的結構示意圖; 7 is a schematic structural diagram of another embodiment of the data verification device provided by the second aspect of the present invention;

圖8為本發明第二方面提供的資料核對裝置的又一實施例的結構示意圖; 8 is a schematic structural diagram of another embodiment of the data verification device provided by the second aspect of the present invention;

圖9為本發明第二方面提供的資料核對裝置的再一實施例的結構示意圖; FIG. 9 is a schematic structural diagram of still another embodiment of the data verification device provided by the second aspect of the present invention;

圖10為本發明第三方面提供的資料核對設備的一實施例的結構示意圖; FIG. 10 is a schematic structural diagram of an embodiment of the data verification device provided by the third aspect of the present invention;

圖11為本發明第四方面提供的資料核對系統的一實施例的結構示意圖。 FIG. 11 is a schematic structural diagram of an embodiment of a data verification system according to a fourth aspect of the present invention.

下面將詳細描述本發明的各個方面的特徵和示例性實施例,為了使本發明的目的、技術方案及優點更加清楚明白,以下結合圖式及具體實施例,對本發明進行進一步詳細描述。應理解,此處所描述的具體實施例僅意在解釋本發明,而不是限定本發明。對於本領域技術人員來說,本發明可以在不需要這些具體細節中的一些細節的情況下實施。下面 對實施例的描述僅僅是為了通過示出本發明的示例來提供對本發明更好的理解。 The features and exemplary embodiments of various aspects of the present invention will be described in detail below. In order to make the objectives, technical solutions and advantages of the present invention more clear, the present invention will be further described in detail below with reference to the drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present invention, but not to limit the present invention. It will be apparent to those skilled in the art that the present invention may be practiced without some of these specific details. under The embodiments are described only to provide a better understanding of the present invention by illustrating examples of the invention.

隨著業務複雜程度的增加,一項業務可能會涉及到多個系統,例如,一項業務由多個系統協作完成。為了保證業務正常執行,該業務涉及到的系統均會存儲該業務的資料,並在多個系統之間進行資料的核對,以便能夠發現多個系統之間資料不一致的情況,即發現跨系統間的資料不平問題,從而能夠採取措施,為各系統的平穩運行提供保障。 As the complexity of the business increases, a business may involve multiple systems, for example, a business is completed by the cooperation of multiple systems. In order to ensure the normal execution of the business, the systems involved in the business will store the data of the business, and check the data between multiple systems, so as to be able to find the inconsistency of the data between the multiple systems Therefore, measures can be taken to ensure the smooth operation of each system.

跨系統需要核對的資料的量非常龐大,由於多個系統的時鐘可能會存在差異,為了避免遺漏核對的資料,一般會獲取一個較長的時間段內的業務的資料,如獲取已經結束的一天內的多個系統各自的業務的資料,將不同系統的業務的資料一一核對,以確定跨系統間是否存在資料不平問題,但在這種情況下,如果存在資料不平問題,資料不平問題只能延後發現,而不能及時發現。 The amount of data that needs to be checked across systems is very large. Since the clocks of multiple systems may be different, in order to avoid missing the checked data, generally obtain business data within a long period of time, such as obtaining the completed day. The data of the respective businesses of multiple systems within the system are checked one by one to determine whether there is a data inequity problem between the systems. However, in this case, if there is a data inequity problem, the data inequity problem is only It can be found late, but not in time.

本發明提供了一種資料核對方法、裝置、設備、系統及存儲介質,能夠在發生寫操作的情況下,以資料流程(即Stream Data)的方式傳輸資料,並利用資料流程的資料的主鍵值,對不同系統的資料進行核對,從而及時發現跨系統間的資料不平問題。 The present invention provides a data verification method, device, equipment, system and storage medium, which can transmit data in the form of data flow (ie Stream Data) when a write operation occurs, and utilize the primary key value of the data in the data flow , to check the data of different systems, so as to find the data inequity between the systems in time.

在此並不限定業務和資料的具體領域,例如,在交易領域中,業務具體可為交易業務,業務的資料具體可為交易流水資料;對資料的核對即為對相同的交易業務的交易流水資料的核對,可通過資料核對實現交易明細的勾對。但本發明實施例的應用場景並不限於交易場景,其他需要進行資料核對的應用場景也在本發明實施例的保護範圍內。 This does not limit the specific fields of business and data. For example, in the transaction field, the business may be transaction business, and the business data may be transaction flow data; the verification of the data is the transaction flow of the same transaction business. Data verification, the transaction details can be checked through data verification. However, the application scenarios of the embodiments of the present invention are not limited to transaction scenarios, and other application scenarios that require data verification are also within the protection scope of the embodiments of the present invention.

本發明第一方面提供一種資料核對方法,該資料核對方法可由資料核對裝置、資料核對設備或資料核對系統執行,即資料核對方法可由單個裝置或設備實現,也可由包括多個裝置或設備的系統實現,在此並不限定。 A first aspect of the present invention provides a data verification method. The data verification method can be performed by a data verification device, a data verification device or a data verification system. That is, the data verification method can be implemented by a single device or device, or by a system including multiple devices or devices. Implementation is not limited here.

圖1為本發明第一方面提供的資料核對方法的一實施例 的流程圖。如圖1所示,該資料核對方法可包括步驟S101至步驟S103。 FIG. 1 is an embodiment of the data verification method provided by the first aspect of the present invention flow chart. As shown in FIG. 1 , the data verification method may include steps S101 to S103 .

在步驟S101中,在各系統資料池發生寫操作的情況下,生成包括與寫操作關聯的資料的資料流程並傳輸。 In step S101, when a write operation occurs in each system data pool, a data flow including data associated with the write operation is generated and transmitted.

系統資料池用於存放系統的資料,具體可用於存放系統中業務的資料。例如,在交易領域中,系統資料池可用於存放該系統的交易業務的流水資料。系統資料池可設置於系統內,也可獨立於系統以資料庫的形式存在,在此並不限定。參與資料核對的系統可以有多個,每個系統可對應一個系統資料池,即參與資料核對的系統資料池可以有多個。 The system data pool is used to store the data of the system, and specifically can be used to store the data of the business in the system. For example, in the transaction field, the system data pool can be used to store the flow data of the transaction business of the system. The system data pool may be set in the system, or may exist in the form of a database independently of the system, which is not limited herein. There can be multiple systems participating in data verification, and each system can correspond to a system data pool, that is, there can be multiple system data pools participating in data verification.

寫操作為可能引發系統資料池中資料的變化的操作,例如,寫操作可包括但不限於插入操作如insert操作、更新操作如update操作、刪除操作如delete操作和drop操作、創建操作如create操作、修改操作如alter操作等,在此並不限定。 Write operations are operations that may cause changes to data in the system data pool. For example, write operations may include, but are not limited to, insert operations such as insert operations, update operations such as update operations, delete operations such as delete operations and drop operations, and create operations such as create operations. , modification operations such as alter operations, etc., are not limited here.

與寫操作關聯的資料包括寫操作起作用的資料。資料流程為在時間分佈和數量上並不限定的一系列的動態資料的集合體。在本發明實施例中,利用資料流程來承載資料。資料流程包括資料的主鍵值。資料的主鍵值的內容可根據資料的類型設定,在此並不限定。例如,資料包括交易流水資料,資料的主鍵值具體可包括交易流水號。 The data associated with the write operation includes the data on which the write operation was effected. A data flow is a collection of dynamic data that is not limited in time distribution and quantity. In the embodiment of the present invention, the data flow is used to carry the data. The data flow includes the primary key value of the data. The content of the primary key value of the data can be set according to the type of the data, which is not limited here. For example, the data includes transaction flow data, and the primary key value of the data may specifically include the transaction flow number.

在資料核對方法由資料核對裝置或資料核對設備執行的情況下,資料流程可在資料核對裝置或資料核對設備內部進行傳輸。在資料核對方法由包括多個裝置或設備的資料核對系統執行的情況下,資料流程可在資料核對系統中的裝置或設備之間傳輸。 In the case where the data check method is performed by the data check device or the data check device, the data flow may be transmitted within the data check device or the data check device. In the case where the data matching method is performed by a data matching system including a plurality of devices or devices, the data flow may be transferred between the devices or devices in the data matching system.

在步驟S102中,基於資料流程的欄位以及預設的區域劃分規則,將資料流程劃分為至少一個資料區域。 In step S102, the data flow is divided into at least one data region based on the fields of the data flow and a preset area division rule.

資料流程的欄位可根據資料的內容、類型等設定。例如,資料流程的欄位可包括系統標識欄位、主鍵值欄位、業務狀態欄位等,在此並不限定。系統標識欄位用於表徵系統資料池對應的系統的標識。主鍵值欄位用於表徵資料的主鍵值。業務狀態欄位用於表徵資料對應的業務的 狀態。 The fields of the data flow can be set according to the content and type of the data. For example, the fields of the data process may include a system identification field, a primary key value field, a business status field, etc., which are not limited herein. The system ID field is used to represent the ID of the system corresponding to the system data pool. The primary key value field is used to characterize the primary key value of the data. The business status field is used to represent the status of the business corresponding to the data. state.

可根據資料核對的目的,通過區域劃分規則,將各系統資料池對應的資料流程劃分為多組,即劃分為至少一個資料區域。每個資料區域包括至少兩個系統資料池對應的資料流程。在每個資料區域中可對資料流程包含的資料進行核對。各資料區域可對應有資料流程的入口,通過設置區域劃分規則,實現資料流程的劃分。 According to the purpose of data verification, the data flow corresponding to each system data pool can be divided into multiple groups, that is, divided into at least one data area, according to the area division rules. Each data area includes data flows corresponding to at least two system data pools. The data included in the data flow can be checked in each data area. Each data area can correspond to the entry of the data process, and the division of the data process can be realized by setting the area division rules.

區域劃分規則可根據工作場景和工作需求設定,在此並不限定。資料區域可視為資料流程分組後形成的資料流程集合。同一資料區域的資料流程的欄位滿足相同的區域劃分規則。在一些示例中,系統之間兩兩進行資料核對,即系統資料池之間兩兩進行資料核對,對應地,每個資料區域可包括兩個系統資料池對應的資料流程。 The area division rules can be set according to work scenarios and work requirements, and are not limited here. The data area can be regarded as a data process collection formed after the data process is grouped. The fields of the data flow of the same data area satisfy the same area division rule. In some examples, data checking is performed between systems, that is, data checking is performed between system data pools. Correspondingly, each data area may include data flows corresponding to two system data pools.

例如,一筆業務涉及三個系統,三個系統分別為系統A1、系統A2和系統A3,系統A1的資料存儲於系統資料池B1,系統A2的資料存儲於系統資料池B2,系統A3的資料存儲於系統資料池B3。在同一筆業務的資料發生變化的情況下,正常情況下,系統資料池B1、系統資料池B2和系統資料池B3中這一筆業務的資料均應發生變化;但也有可能出現其中一個或兩個系統資料池中這一筆業務的資料未發生變化的情況,在此並不限定。資料流程的欄位可體現系統標識、資料的主鍵值、業務狀態等,可通過區域劃分規則,將系統資料池B1對應的資料流程和系統資料池B2對應的資料流程劃分為資料區域C1,將系統資料池B2對應的資料流程和系統資料池B3對應的資料流程劃分為資料區域C2。在資料區域C1中可進行系統資料池B1對應的資料流程和系統資料池B2對應的資料流程的資料核對,在資料區域C2中可進行系統資料池B2對應的資料流程和系統資料池B3對應的資料流程的資料核對。 For example, a business involves three systems. The three systems are system A1, system A2, and system A3. The data of system A1 is stored in system data pool B1, the data of system A2 is stored in system data pool B2, and the data of system A3 is stored in the system data pool B3. When the data of the same business changes, under normal circumstances, the data of this business in the system data pool B1, system data pool B2 and system data pool B3 should all change; but there may be one or two of them. The situation that the data of this business in the system data pool has not changed is not limited here. The fields of the data flow can reflect the system identification, the primary key value of the data, the business status, etc. The data flow corresponding to the system data pool B1 and the data flow corresponding to the system data pool B2 can be divided into the data area C1 through the area division rules. The data flow corresponding to the system data pool B2 and the data flow corresponding to the system data pool B3 are divided into data areas C2. In the data area C1, the data check of the data process corresponding to the system data pool B1 and the data process corresponding to the system data pool B2 can be performed, and in the data area C2, the data process corresponding to the system data pool B2 and the system data pool B3 can be performed. Data verification of the data flow.

一個系統資料池對應的一筆業務的資料流程可劃分至多個資料區域,也可劃分至一個資料區域,在此並不限定。例如,區域劃分規則可限定資料流程的欄位F3的值為0001、0002、0003中的一項的情況 下,資料流通過入口2008劃分為資料區域C3。區域劃分規則可限定資料流程的欄位F3的值為0003、0004中的一項的情況下,資料流通過入口2009劃分為資料區域C4。欄位F3的值為0003的資料流程會劃分為資料區域C3和資料區域C4;欄位F3的值為0001的資料流程會劃分為資料區域C3。資料區域C3的資料流程的欄位F3的值滿足資料流程的欄位F3的值為0001、0002、0003中的一項這一區域劃分規則。資料區域C4的資料流程的欄位F3的值滿足資料流程的欄位F3的值為0003、0004中的一項這一區域劃分規則。 The data flow of a business corresponding to one system data pool may be divided into multiple data areas, or may be divided into one data area, which is not limited herein. For example, the zoning rule may limit the case where the value of field F3 of the data flow is one of 0001, 0002, and 0003 Next, the data flow is divided into the data area C3 through the entry 2008 . The area division rule can define that when the value of the field F3 of the data flow is one of 0003 and 0004, the data flow is divided into the data area C4 through the entry 2009 . The data flow with the value of 0003 in the field F3 will be divided into data area C3 and the data area C4; the data flow with the value of 0001 in the field F3 will be divided into the data area C3. The value of the field F3 of the data flow of the data area C3 satisfies the area division rule that the value of the field F3 of the data flow is one of 0001, 0002, and 0003. The value of the field F3 of the data flow of the data area C4 satisfies the area division rule that the value of the field F3 of the data flow is one of 0003 and 0004.

在步驟S103中,在每個資料區域中,根據資料流程對應的主鍵值,核對資料區域中的至少兩個系統資料池對應的資料流程,以確定資料區域中的至少兩個系統資料池的資料是否一致。 In step S103, in each data area, according to the primary key value corresponding to the data process, the data processes corresponding to at least two system data pools in the data area are checked to determine the data processes of the at least two system data pools in the data area. Are the data consistent.

具體地,在每個資料區域中,核對該資料區域中主鍵值相同的至少兩個系統資料池對應的資料流程。在資料區域中存在主鍵值為某一值的一個系統資料池對應的資料流程,但並不存在主鍵值為該某一值的另一個系統資料池對應的資料流程,可確定資料區域中至少兩個系統資料池的資料不一致,即確定發生了跨系統的資料不平問題。在資料區域中,核對主鍵值相同的至少兩個系統資料池對應的資料流程的資料,若資料主鍵值相同的至少兩個系統資料池對應的資料流程的資料相同,可確定資料區域中至少兩個系統資料池的資料一致,即確定未發生跨系統的資料不平問題;若資料主鍵值相同的至少兩個系統資料池對應的資料流程的資料不同,可確定資料區域中至少兩個系統資料池的資料不一致,即確定發生了跨系統的資料不平問題。 Specifically, in each data area, the data flows corresponding to at least two system data pools with the same primary key value in the data area are checked. In the data area, there is a data flow corresponding to a system data pool whose primary key value is a certain value, but there is no data flow corresponding to another system data pool whose primary key value is a certain value. The data of at least two system data pools are inconsistent, that is, it is determined that a cross-system data inequity problem has occurred. In the data area, check the data of the data processes corresponding to at least two system data pools with the same primary key value. The data of at least two system data pools are consistent, that is, it is determined that there is no cross-system data inequity; The data in the system data pool is inconsistent, that is, it is determined that a cross-system data inequity problem has occurred.

在一些示例中,多個資料區域中資料流程的核對並存執行。例如,經過劃分後,具有3個資料區域,分別為資料區域C1、資料區域C2和資料區域C3。資料區域C1中的資料流程的核對、資料區域C2中的資料流程的核對和資料區域C3中的資料流程的核對可並存執行。多個資料區域中資料流程的核對並存執行,可加快資料核對速度,提高資料核 對效率。不同的資料區域中資料流程的核對可由不同的裝置、設備或模組進行,在此並不限定。可根據具體需求,增加或減少資料區域,提高了資料核對的靈活性和可擴展性。 In some examples, the checking of data flows in multiple data areas is performed concurrently. For example, after division, there are three data areas, namely, data area C1, data area C2, and data area C3. The verification of the data flow in the data area C1, the verification of the data flow in the data area C2, and the verification of the data flow in the data area C3 may be performed concurrently. The verification of data processes in multiple data areas is executed concurrently, which can speed up data verification and improve data verification. to efficiency. The verification of data flow in different data areas can be performed by different devices, equipment or modules, which is not limited herein. The data area can be increased or decreased according to specific needs, which improves the flexibility and scalability of data verification.

在一些示例中,各資料區域中資料流程的核對可在記憶體中進行,以進一步提高資料核對速度,提高資料核對效率,減少資料核對佔用資源。 In some examples, the data flow check in each data area can be performed in the memory, so as to further improve the data check speed, improve the data check efficiency, and reduce the resource occupied by the data check.

在本發明實施例中,在各系統資料池發生寫操作的情況下,生成包括與寫操作關聯的資料的資料流程。將資料流程劃分為至少一個資料區域,每個資料區域包括至少兩個系統資料池對應的資料流程。在資料區域中核對至少兩個系統資料池對應的資料流程,從而確定至少兩個系統資料池的資料是否一致。不需要設置獲取資料的時間段,通過寫操作觸發生成資料流程,從而進行資料流程的劃分及核對。寫操作不受時間長度的限制,能夠在資料發生變化的情況下,即時進行資料的核對,從而能夠及時發現跨系統的資料不平問題。與現階段需要一天時間或更長時間發現跨系統的資料不平問題的方法相比,本發明實施例提供的資料核對方法可將發現跨系統的資料不平問題所需的時間縮短到1分鐘甚至更短。 In this embodiment of the present invention, when a write operation occurs in each system data pool, a data flow including data associated with the write operation is generated. The data process is divided into at least one data area, and each data area includes data processes corresponding to at least two system data pools. The data flow corresponding to the at least two system data pools is checked in the data area, so as to determine whether the data of the at least two system data pools are consistent. There is no need to set the time period for data acquisition, and the data process is triggered by the write operation, so as to divide and check the data process. The write operation is not limited by the length of time, and can check the data in real time when the data changes, so that the data inequity across the system can be found in time. Compared with the current method that takes a day or more to discover data inequities across systems, the data verification method provided by the embodiments of the present invention can shorten the time required to discover data inequities across systems to 1 minute or more. short.

在資料的量較大的情況下,由於通過寫操作觸發生成資料流程,即時進行資料的核對,與採用累積大量資料再進行核對的方式相比,能夠滿足更高的資料核對的性能要求。 In the case of a large amount of data, since the data generation process is triggered by the write operation, the data is checked in real time. Compared with the method of accumulating a large amount of data and then checking, it can meet higher performance requirements for data checking.

圖2為本發明第一方面提供的資料核對方法的另一實施例的流程圖。圖2與圖1的不同之處在於,圖1中的步驟S101可細化為圖2中的步驟S1011至步驟S1013,圖2所示的資料核對方法還可包括步驟S104。 FIG. 2 is a flowchart of another embodiment of the data verification method provided by the first aspect of the present invention. The difference between FIG. 2 and FIG. 1 is that step S101 in FIG. 1 may be refined into steps S1011 to S1013 in FIG. 2 , and the data verification method shown in FIG. 2 may further include step S104 .

在步驟S1011中,讀取各系統資料池的二進位日誌,根據二進位日誌,確定各系統資料池的寫操作。 In step S1011, the binary log of each system data pool is read, and the write operation of each system data pool is determined according to the binary log.

二進位日誌即BINLOG檔,用於記錄資料庫表結構的變更以及表資料的修改。例如,二進位日誌會記載資料庫表結構的變更以及 表資料的修改的動作陳述式。根據二進位日誌的內容,可確定系統資料池發生的寫操作。 The binary log is the BINLOG file, which is used to record the changes of the database table structure and the modification of table data. For example, the binary log records changes to the database table structure and Action statement for modification of table data. According to the contents of the binary log, the write operations that occurred in the system data pool can be determined.

在步驟S1012中,基於寫操作,生成資料流程報文。 In step S1012, based on the write operation, a data flow message is generated.

資料流程報文用於承載資料流程,在此並不限定資料流程報文的具體格式。在一些示例中,資料流程報文具體可為(JSON程式語言,JavaScript object notation)JSON報文。利用資料流程報文承載資料流程,便於傳輸資料流程。例如,一條承載資料流程的JSON報文的輸出格式如下: The data flow message is used to carry the data flow, and the specific format of the data flow message is not limited here. In some examples, the data flow message may specifically be a (JSON programming language, JavaScript object notation) JSON message. Use the data process message to carry the data process to facilitate the transmission of the data process. For example, the output format of a JSON message carrying a data flow is as follows:

Figure 110139362-A0101-12-0009-1
Figure 110139362-A0101-12-0009-1

其中,sysId可表徵系統標識,seqNo和traceId可表徵資料在不同階段的主鍵值,bussTp可表徵交易類型,seqSt可表徵資料對應的業務狀態。 Among them, sysId can represent the system ID, seqNo and traceId can represent the primary key value of the data at different stages, bussTp can represent the transaction type, and seqSt can represent the business status corresponding to the data.

由於同一筆業務對應的資料可能會發生變化,為了使資料流程能夠體現資料的變化情況,在一些示例中,資料流程報文可包括主 鍵值相同的本次寫操作關聯的資料和上次寫操作關聯的資料。主鍵值相同的資料即為同一筆業務對應的資料。通過資料流程報文中本次寫操作關聯的資料和上次寫操作關聯的資料,能夠體現資料的變化情況,確保在後續過程中可判斷前後資料的關聯性,以及根據資料的變化情況,確定是否需要對該資料進行核對。例如,如上述承載資料流程的JSON報文的輸出格式中,利用_before作為上次寫操作關聯的資料和本次寫操作關聯的資料的節點標注。 Since the data corresponding to the same business may change, in order to enable the data flow to reflect the changes in the data, in some examples, the data flow message may include the main The data associated with the current write operation and the data associated with the last write operation with the same key value. Data with the same primary key value is the data corresponding to the same business. The data associated with the current write operation and the data associated with the previous write operation in the data flow message can reflect the change of the data, ensure that the correlation between the previous and previous data can be judged in the subsequent process, and according to the change of the data, determine whether to This data needs to be checked. For example, in the output format of the JSON message carrying the data flow described above, _before is used as the node label of the data associated with the last write operation and the data associated with the current write operation.

在步驟S1013中,通過資料流程式元件傳輸資料流程報文。 In step S1013, the data flow message is transmitted through the data flow element.

可通過資料流程式元件將資料流程報文逐條傳輸。資料流程式元件可包括Kafka等元件,在此並不限定。 Data flow messages can be transmitted one by one through the data flow element. The data flow elements may include elements such as Kafka, which are not limited herein.

在一些示例中,在執行步驟S102之前,還可將資料流程報文轉換為更加便於進行資料核對的格式,例如,將資料流程報文轉換為Map映射格式,利用轉換為Map映射格式的資料參與後續步驟的執行,便於通過配置實現資料核對。 In some examples, before step S102 is performed, the data flow message may also be converted into a format that is more convenient for data verification. The execution of subsequent steps is convenient for data verification through configuration.

在步驟S104中,在一個系統資料池對應有主鍵值相同的多個資料流程的情況下,保留其中欄位符合預設的篩選條件的一個資料流程。 In step S104, in the case that a system data pool corresponds to a plurality of data flows with the same primary key value, a data flow in which a field meets a preset filter condition is reserved.

在基於系統資料池獲得的資料流程中,一筆業務可能會對應出現多個資料流程,需要對一筆業務對應的多個資料流程進行篩選,使這一筆業務對應的一個資料流程參與資料核對,避免造成資料核對混亂。資料流程對應的主鍵值相同,表示資料流程對應的業務為同一筆業務。具體地,可利用資料流程各欄位的意義以及資料核對的要求設置篩選條件,通過篩選條件在主鍵值相同的多個資料流程中,篩選保留其中的一個資料流程。保留的欄位符合篩選條件的一個資料流程可參與後續的資料核對流程。 In the data process obtained based on the system data pool, there may be multiple data processes corresponding to one business, and it is necessary to filter the multiple data processes corresponding to one business, so that one data process corresponding to this business can participate in the data verification to avoid causing Data verification is confusing. The primary key value corresponding to the data process is the same, indicating that the business corresponding to the data process is the same business. Specifically, filter conditions can be set based on the meaning of each field of the data flow and the requirements for data verification, and one data flow can be selected and retained among multiple data flows with the same primary key value through the filter conditions. A data process whose reserved fields meet the filtering conditions can participate in the subsequent data verification process.

在一些示例中,資料流程包括業務狀態欄位。業務狀態 欄位用於表徵資料流程的資料對應的業務的狀態。上述篩選條件可包括業務狀態欄位包括預設值集合中的目標值,且資料流程的業務狀態欄位與上一次寫操作對應的資料流程的業務狀態欄位不同。預設值集合包括至少一個目標值。預設值集合可根據工作場景和工作需求設定,在此並不限定。 In some examples, the data flow includes a business status field. business status The field is used to represent the status of the business corresponding to the data of the data process. The above filtering conditions may include that the business status field includes the target value in the preset value set, and the business status field of the data flow is different from the business status field of the data flow corresponding to the last write operation. The preset value set includes at least one target value. The preset value set can be set according to work scenarios and work requirements, and is not limited herein.

例如,業務狀態狀態欄位的值為01,表示資料流程的資料暫時不需核對;業務狀態狀態欄位的值為00,表示資料流程的資料暫時需要核對。預設值集合包括目標值00。在資料流程L1的業務狀態欄位包括目標值00,且上一次寫操作對應的資料流程的業務狀態欄位為01的情況下,該資料流程L1被保留。在資料流程L1的業務狀態欄位包括目標值00,但上一次寫操作對應的資料流程的業務狀態欄位為00的情況下,該資料流程L2被捨棄。 For example, the value of the business status status column is 01, indicating that the data of the data flow does not need to be checked temporarily; the value of the business status status column is 00, indicating that the data of the data flow needs to be checked temporarily. The preset value set includes a target value of 00. When the business status field of the data flow L1 includes the target value of 00, and the business status field of the data flow corresponding to the last write operation is 01, the data flow L1 is reserved. When the business status field of the data flow L1 includes the target value of 00, but the business status field of the data flow corresponding to the last write operation is 00, the data flow L2 is discarded.

篩選條件並不限於上述內容,能夠實現對主鍵值相同的多個資料流程的篩選的篩選條件均在本發明實施例的保護範圍內,在此不一一舉例說明。 The filtering conditions are not limited to the above-mentioned contents, and the filtering conditions that can realize the filtering of multiple data processes with the same primary key value are all within the protection scope of the embodiments of the present invention, and will not be illustrated here one by one.

圖3為本發明第一方面提供的資料核對方法的又一實施例的流程圖。圖3與圖1的不同之處在於,圖1中的步驟S103可具體細化為圖3中的步驟S1031和步驟S1032。 FIG. 3 is a flowchart of another embodiment of the data verification method provided by the first aspect of the present invention. The difference between FIG. 3 and FIG. 1 is that step S103 in FIG. 1 can be specifically refined into step S1031 and step S1032 in FIG. 3 .

在步驟S1031中,在每個資料區域中,根據資料流程對應的主鍵值,將資料流程劃分至核對視窗內。 In step S1031, in each data area, the data flow is divided into the check window according to the primary key value corresponding to the data flow.

其中,不同的核對視窗內的資料流程的主鍵值不同,即主鍵值相同的資料流程不會劃分到不同的核對視窗,主鍵值相同的資料流程劃分至同一核對視窗。將資料流程劃分至核對視窗,可實現對資料流程的散列。在一些示例中,某個資料區域的某個核對視窗內包括該資料區域對應的各系統資料池對應的主鍵值相同的資料流程。例如,資料區域C1中包括系統資料池B1對應的資料流程和系統資料池B2對應的資料流程,資料區域C1中的一個核對視窗可包括主鍵值相同的系統資料池B1對應的一個資料流程和系統資料池B2對應的一個資料流程,即資料區域C1中每個 核對視窗中進行一對主鍵值相同的系統資料池B1和系統資料池B2的資料流程的核對。 The data flows in different check windows have different primary key values, that is, data flows with the same primary key value are not divided into different check windows, and data flows with the same primary key value are divided into the same check window. Dividing the data flow into check windows enables hashing of the data flow. In some examples, a certain check window of a certain data area includes data flows with the same primary key value corresponding to each system data pool corresponding to the data area. For example, the data area C1 includes the data flow corresponding to the system data pool B1 and the data flow corresponding to the system data pool B2, and a check window in the data area C1 may include a data flow corresponding to the system data pool B1 with the same primary key value and A data flow corresponding to the system data pool B2, that is, each data flow in the data area C1 In the check window, check the data flow of a pair of system data pool B1 and system data pool B2 with the same primary key value.

在步驟S1032中,核對核對視窗內的資料流程。 In step S1032, the data flow in the check window is checked.

具體地,核對核對視窗內的資料流程所承載的資料是否一致。核對視窗的細微性要小於資料區域的細微性,在一些情況下,在核對視窗記憶體在資料流程的時長超過預設觸發時長的情況下,觸發核對核對視窗內的資料流程。在另一些情況下,在核對視窗內的資料流程的數量達到預設觸發數量的情況下,觸發核對核對視窗內的資料流程。由於本發明實施例中的資料流程是通過寫操作觸發生成,不受時間長度的限制,因此核對視窗的細微性從時間上或從資料流程數量上可以劃分得非常細,從而加快資料核對速度,提高資料核對效率。而且,由於資料流程的匹配已經在將資料流程劃分至核對視窗的過程中完成,核對視窗內的資料流程的核對不需要進行匹配,可標準化、外掛程式化實現,提高了資料核對開發設計的靈活性,核對視窗的增加和減少也相對靈活,便於擴展。 Specifically, it is checked whether the data carried by the data flow in the check window are consistent. The fineness of the check window is smaller than that of the data area. In some cases, the data flow in the check window is triggered when the duration of the data flow in the check window memory exceeds the preset trigger time. In other cases, when the number of data flows in the verification window reaches a preset trigger number, the verification of the data flows in the verification window is triggered. Since the data flow in the embodiment of the present invention is triggered and generated by a write operation, and is not limited by the time length, the fineness of the check window can be very finely divided in terms of time or the number of data flows, thereby speeding up the data check speed. Improve data verification efficiency. Moreover, since the matching of the data flow has been completed in the process of dividing the data flow into the check window, the check of the data flow in the check window does not need to be matched, and can be implemented in a standardized and external program, which improves the flexibility of data check development and design The increase and decrease of the check window is relatively flexible and easy to expand.

在一些示例中,在已存在的核對視窗內的資料流程的主鍵值與未劃分的資料流程對應的主鍵值不同的情況下,生成新的核對視窗,將未劃分的資料流程劃分至新的核對視窗內。在未劃分的資料流程劃分至新的核對視窗內的時長超過預設觸發時長的情況下,觸發核對新的核對視窗內的資料流程。 In some examples, when the primary key value of the data flow in the existing check window is different from the primary key value corresponding to the undivided data flow, a new check window is generated, and the undivided data flow is divided into a new check window. in the check window. In the case that the time period of dividing the undivided data flow into the new check window exceeds the preset triggering time period, the check of the data flow in the new check window is triggered.

在未劃分的資料流程劃分至新的核對視窗內的時長超過預設觸發時長,且該資料區域內沒有能夠與劃分至新的核對視窗內的資料流程進行核對的資料流程的情況下,可能發生了資料不平問題。預設觸發時長可根據工作場景和工作需求設定,在此並不限定。預設觸發時長的設定可通過計時器實現,例如,計時器計時時長達到預設觸發時長,則觸發該新的核對視窗內的資料流程的核對。 When the duration of the undivided data flow being divided into the new check window exceeds the preset trigger duration, and there is no data flow in the data area that can be checked with the data flow divided into the new check window, A data inconsistency problem may have occurred. The preset trigger duration can be set according to the work scenario and work requirements, and is not limited here. The preset trigger duration can be set by a timer. For example, when the timer count reaches the preset trigger duration, the verification of the data flow in the new verification window is triggered.

例如,圖4為本發明實施例中一資料區域的核對視窗的一示例的示意圖。如圖4所示,資料區域C1已存在的核對視窗包括核對視 窗D1、核對視窗D2和核對視窗D3。核對視窗D1中資料流程對應的主鍵值為000792,核對視窗D2中資料流程對應的主鍵值為000982,核對視窗D3中資料流程對應的主鍵值為000991。若資料區域C1中的資料流程E1還未劃分至核對視窗內,且資料流程E1對應的主鍵值為000993,資料區域C1已存在的核對視窗內的資料流程的主鍵值與資料流程E1對應的主鍵值均不同,因此,需要為資料流程E1生成新的核對視窗D4,並將資料流程E1劃分至核對視窗D4。設預設觸發時長為3分鐘,對應地,在資料流程E1劃分至核對視窗D4起3分鐘後,觸發該核對視窗D4中的資料流程的核對。 For example, FIG. 4 is a schematic diagram of an example of a check window of a data area according to an embodiment of the present invention. As shown in FIG. 4 , the existing check window in the data area C1 includes the check window Window D1, check window D2, and check window D3. The primary key value corresponding to the data process in the verification window D1 is 000792, the primary key value corresponding to the data process in the verification window D2 is 000982, and the primary key value corresponding to the data process in the verification window D3 is 000991. If the data flow E1 in the data area C1 has not been divided into the check window, and the primary key value corresponding to the data flow E1 is 000993, the primary key value of the data flow in the check window that already exists in the data area C1 corresponds to the data flow E1 The primary key values of , therefore, need to generate a new check window D4 for the data flow E1, and divide the data flow E1 into the check window D4. The preset trigger duration is set to 3 minutes. Correspondingly, 3 minutes after the data flow E1 is divided into the check window D4, the check of the data flow in the check window D4 is triggered.

在另一些示例中,在已存在的核對視窗內的資料流程的主鍵值與未劃分的資料流程對應的主鍵值相同的情況下,將未劃分的資料流程劃分至已存在的核對視窗內。在已存在的核對視窗內的資料流程的數量達到預設觸發數量的情況下,觸發核對已存在的核對視窗內的資料流程。在已存在的核對視窗內的資料流程的數量未達到預設觸發數量的情況下,繼續等待。 In other examples, when the primary key value of the data flow in the existing check window is the same as the primary key value corresponding to the undivided data flow, the undivided data flow is divided into the existing check window. . When the number of data flows in the existing check window reaches the preset trigger quantity, the check of the data flows in the existing check window is triggered. Continue to wait when the number of data flows in the existing check window has not reached the preset trigger number.

預設觸發數量可根據工作場景和工作需求設定,在此並不限定。 The number of preset triggers can be set according to the work scenario and work requirements, and is not limited here.

例如,如圖4所示,資料區域C1已存在的核對視窗包括核對視窗D1、核對視窗D2和核對視窗D3。核對視窗D1中資料流程對應的主鍵值為000792,核對視窗D2中資料流程對應的主鍵值為000982,核對視窗D3中資料流程對應的主鍵值為000991。若資料區域C1中的資料流程E2還未劃分至核對視窗內,且資料流程E2對應的主鍵值為000991,將資料流程E2劃分至核對視窗D3內。設預設觸發數量為2,對應地,在核對視窗D3內的資料流程的數量達到2的情況下,觸發該核對視窗內的資料流程的核對。 For example, as shown in FIG. 4 , the existing check windows in the data area C1 include a check window D1 , a check window D2 and a check window D3 . The primary key value corresponding to the data process in the verification window D1 is 000792, the primary key value corresponding to the data process in the verification window D2 is 000982, and the primary key value corresponding to the data process in the verification window D3 is 000991. If the data flow E2 in the data area C1 has not been divided into the check window, and the primary key value corresponding to the data flow E2 is 000991, the data flow E2 is divided into the check window D3. The preset trigger number is set to 2. Correspondingly, when the number of data flows in the verification window D3 reaches 2, the verification of the data flows in the verification window D3 is triggered.

上述實施例中的資料流程的核對,具體可核對資料流程承載的資料的欄位的值、核對視窗內資料流程的數量等,在此並不限定。 The verification of the data flow in the above embodiment can specifically check the value of the field of the data carried by the data flow, the number of the data flow in the verification window, etc., which are not limited herein.

圖5為本發明第一方面提供的資料核對方法的再一實施例的流程圖。圖5與圖1的不同之處在於,圖5所示的資料核對方法還可包括步驟S105或步驟S106。 FIG. 5 is a flowchart of still another embodiment of the data verification method provided by the first aspect of the present invention. The difference between FIG. 5 and FIG. 1 is that the data verification method shown in FIG. 5 may further include step S105 or step S106.

在步驟S105中,在確定資料區域中的至少兩個系統資料池的資料一致的情況下,增大資料核對成功指標的值。 In step S105, when it is determined that the data of at least two system data pools in the data area are consistent, the value of the data verification success indicator is increased.

資料區域中至少兩個系統資料池的資料一致,即未發生跨系統的資料不平問題,可增大資料核對成功指標的值。資料核對成功指標用於表徵資料核對的成功率,資料核對成功指標的值越大,表示資料核對的成功率越高。資料核對成功指標可為跨系統資料不平、告警、風險預判等提供依據,擴大資料核對的應用範疇。 The data of at least two system data pools in the data area are consistent, that is, there is no cross-system data inequity problem, and the value of the data verification success indicator can be increased. The data verification success index is used to characterize the success rate of data verification. The larger the value of the data verification success indicator is, the higher the success rate of data verification is. The success index of data verification can provide a basis for cross-system data inequity, alarm, risk prediction, etc., and expand the application scope of data verification.

在步驟S106中,在確定資料區域中的至少兩個系統資料池的資料不一致的情況下,輸出資料區域中的至少兩個系統資料池中不一致的資料。 In step S106, when it is determined that the data of the at least two system data pools in the data area are inconsistent, the inconsistent data in the at least two system data pools in the data area is output.

資料區域中的至少兩個系統資料池的資料不一致,即發生了跨系統的資料不平問題,資料區域中的至少兩個系統資料池中不一致的資料即為引發跨系統的資料不平問題的資料。資料區域中的至少兩個系統資料池中不一致的資料可為跨系統資料不平、告警、風險預判等提供依據,擴大資料核對的應用範疇。 The data of at least two system data pools in the data area are inconsistent, that is, a cross-system data inequity problem occurs, and the inconsistent data in at least two system data pools in the data area is the data that causes the cross-system data inequity problem. Inconsistent data in at least two system data pools in the data area can provide a basis for cross-system data inequity, alarms, risk prediction, etc., and expand the application scope of data verification.

需要說明的是,上述實施例中的資料核對方法在由資料核對裝置或資料核對設備執行的情況下,生成資料流程、劃分資料區域、劃分核對視窗、資料核對等功能可通過不同的模組或單元實現。上述實施例中的資料核對方法在由資料核對系統執行的情況下,生成資料流程、劃分資料區域、劃分核對視窗、資料核對等功能可通過不同的裝置實現。在此並不限定執行資料核對方法的主體的具體形式。 It should be noted that, when the data verification method in the above-mentioned embodiment is executed by a data verification device or a data verification device, functions such as generating a data flow, dividing data areas, dividing a verification window, and data verification can be performed through different modules or unit implementation. When the data checking method in the above embodiment is executed by a data checking system, functions such as generating a data flow, dividing data regions, dividing checking windows, and checking data can be implemented by different devices. The specific form of the main body for executing the data verification method is not limited herein.

本發明第二方面還提供了一種資料核對裝置。圖6為本發明第二方面提供的資料核對裝置的一實施例的結構示意圖。如圖6所示,資料核對裝置200可包括資料流程生成模組201、區域劃分模組202和核對 模組203。 A second aspect of the present invention also provides a data verification device. FIG. 6 is a schematic structural diagram of an embodiment of the data verification apparatus provided in the second aspect of the present invention. As shown in FIG. 6 , the data verification device 200 may include a data flow generation module 201 , an area division module 202 and a verification module 202 . Module 203.

資料流程生成模組201可用於在各系統資料池發生寫操作的情況下,生成包括與寫操作關聯的資料的資料流程並傳輸。 The data flow generation module 201 can be used to generate and transmit a data flow including data associated with the write operation when a write operation occurs in each system data pool.

其中,資料流程包括資料的主鍵值。 Among them, the data flow includes the primary key value of the data.

區域劃分模組202可用於基於資料流程的欄位以及預設的區域劃分規則,將資料流程劃分為至少一個資料區域。 The area division module 202 can be used to divide the data flow into at least one data area based on the fields of the data flow and the preset area division rule.

其中,每個資料區域包括至少兩個系統資料池對應的資料流程。 Wherein, each data area includes data processes corresponding to at least two system data pools.

在一些示例中,同一資料區域的資料流程的欄位滿足相同的區域劃分規則。 In some examples, fields of data flows of the same data region satisfy the same region partitioning rules.

核對模組203可用於在每個資料區域中,根據資料流程對應的主鍵值,核對資料區域中的至少兩個系統資料池對應的資料流程,以確定資料區域中的至少兩個系統資料池的資料是否一致。 The checking module 203 can be used to check the data flows corresponding to at least two system data pools in the data region according to the primary key value corresponding to the data flow in each data region, so as to determine at least two system data pools in the data region are the data consistent.

在一些示例中,多個資料區域中資料流程的核對並存執行。 In some examples, the checking of data flows in multiple data areas is performed concurrently.

在本發明實施例中,在各系統資料池發生寫操作的情況下,生成包括與寫操作關聯的資料的資料流程。將資料流程劃分為至少一個資料區域,每個資料區域包括至少兩個系統資料池對應的資料流程。在資料區域中核對至少兩個系統資料池對應的資料流程,從而確定至少兩個系統資料池的資料是否一致。不需要設置獲取資料的時間段,通過寫操作觸發生成資料流程,從而進行資料流程的劃分及核對。寫操作不受時間長度的限制,能夠在資料發生變化的情況下,即時進行資料的核對,從而能夠及時發現跨系統的資料不平問題。 In this embodiment of the present invention, when a write operation occurs in each system data pool, a data flow including data associated with the write operation is generated. The data process is divided into at least one data area, and each data area includes data processes corresponding to at least two system data pools. The data flow corresponding to the at least two system data pools is checked in the data area, so as to determine whether the data of the at least two system data pools are consistent. There is no need to set the time period for data acquisition, and the data process is triggered by the write operation, so as to divide and check the data process. The write operation is not limited by the length of time, and can check the data in real time when the data changes, so that the data inequity across the system can be found in time.

在一些示例中,資料流程生成模組201可用於:讀取各系統資料池的二進位日誌,根據二進位日誌,確定各系統資料池的寫操作;基於寫操作,生成資料流程報文,資料流程報文用於承載資料流程;通過資料流程式元件傳輸資料流程報文。 In some examples, the data flow generation module 201 can be used to: read the binary log of each system data pool, and determine the write operation of each system data pool according to the binary log; based on the write operation, generate a data flow message, data The process message is used to carry the data process; the data process message is transmitted through the data process element.

在一些示例中,資料流程報文包括主鍵值相同的本次寫操作關聯的資料和上次寫操作關聯的資料。 In some examples, the data flow message includes data associated with the current write operation and data associated with the previous write operation with the same primary key value.

圖7為本發明第二方面提供的資料核對裝置的另一實施例的結構示意圖。圖7與圖6的不同之處在於,圖7所示的資料核對裝置200還可包括篩選模組204。 FIG. 7 is a schematic structural diagram of another embodiment of the data verification apparatus according to the second aspect of the present invention. The difference between FIG. 7 and FIG. 6 is that the data verification apparatus 200 shown in FIG. 7 may further include a screening module 204 .

篩選模組204可用於在一個系統資料池對應有主鍵值相同的多個資料流程的情況下,保留其中欄位符合預設的篩選條件的一個資料流程。 The filtering module 204 can be used for retaining a data process whose fields meet the preset filtering conditions when a system data pool corresponds to a plurality of data processes with the same primary key value.

在一些示例中,資料流程包括業務狀態欄位,業務狀態欄位用於表徵資料流程的資料對應的業務的狀態。篩選條件包括:業務狀態欄位包括預設值集合中的目標值,且資料流程的業務狀態欄位與上一次寫操作對應的資料流程的業務狀態欄位不同。 In some examples, the data flow includes a business status field, and the business status field is used to represent the status of the business corresponding to the data of the data flow. The filtering conditions include: the business status field includes the target value in the preset value set, and the business status field of the data flow is different from the business status field of the data flow corresponding to the last write operation.

圖8為本發明第二方面提供的資料核對裝置的又一實施例的結構示意圖。圖8與圖6的不同之處在於,核對模組203可包括視窗劃分單元2031和核對單元2032。 FIG. 8 is a schematic structural diagram of another embodiment of the data verification apparatus provided by the second aspect of the present invention. The difference between FIG. 8 and FIG. 6 is that the checking module 203 may include a window dividing unit 2031 and a checking unit 2032 .

視窗劃分單元2031可用於在每個資料區域中,根據資料流程對應的主鍵值,將資料流程劃分至核對視窗內。 The window dividing unit 2031 can be configured to divide the data flow into the check window according to the primary key value corresponding to the data flow in each data area.

不同的核對視窗內的資料流程的主鍵值不同。 The primary key value of the data flow in different check windows is different.

核對單元2032可用於核對核對視窗內的資料流程。 The checking unit 2032 can be used to check the data flow in the checking window.

在一些示例中,具體地,視窗劃分單元2031可用於在已存在的核對視窗內的資料流程的主鍵值與未劃分的資料流程對應的主鍵值不同的情況下,生成新的核對視窗,將未劃分的資料流程劃分至新的核對視窗內。 In some examples, specifically, the window dividing unit 2031 can be configured to generate a new check window when the primary key value of the data flow in the existing check window is different from the primary key value corresponding to the undivided data flow, Divide undivided data flows into new check windows.

核對單元2032可用於在未劃分的資料流程劃分至新的核對視窗內的時長超過預設觸發時長的情況下,觸發核對新的核對視窗內的資料流程。 The checking unit 2032 can be configured to trigger checking of the data flow in the new checking window when the time period for which the undivided data flow is divided into the new checking window exceeds the preset triggering time period.

在另一些示例中,具體地,視窗劃分單元2031可用於在 已存在的核對視窗內的資料流程的主鍵值與未劃分的資料流程對應的主鍵值相同的情況下,將未劃分的資料流程劃分至已存在的核對視窗內 In other examples, specifically, the window dividing unit 2031 can be used to If the primary key value of the data flow in the existing check window is the same as the primary key value corresponding to the undivided data flow, divide the undivided data flow into the existing check window

核對單元2032可用於在已存在的核對視窗內的資料流程的數量達到預設觸發數量的情況下,觸發核對已存在的核對視窗內的資料流程。 The checking unit 2032 can be configured to trigger checking of the data flows in the existing checking window when the number of the data flows in the existing checking window reaches a preset trigger quantity.

圖9為本發明第二方面提供的資料核對裝置的再一實施例的結構示意圖。圖9與圖6的不同之處在於,圖9所示的資料核對裝置200還可包括處理模組205。 FIG. 9 is a schematic structural diagram of still another embodiment of the data verification apparatus provided by the second aspect of the present invention. The difference between FIG. 9 and FIG. 6 is that the data verification apparatus 200 shown in FIG. 9 may further include a processing module 205 .

處理模組205可用於:在確定資料區域中的至少兩個系統資料池的資料一致的情況下,增大資料核對成功指標的值;在確定資料區域中的至少兩個系統資料池的資料不一致的情況下,輸出資料區域中的至少兩個系統資料池中不一致的資料。 The processing module 205 can be configured to: in the case of determining that the data of at least two system data pools in the data area are consistent, increase the value of the data verification success indicator; when determining that the data of at least two system data pools in the data area are inconsistent In the case of at least two system data pools in the output data area that are inconsistent.

本發明第三方面還提供了一種資料核對設備。圖10為本發明第三方面提供的資料核對設備的一實施例的結構示意圖。如圖10所示,資料核對設備300包括記憶體301、處理器302及存儲在記憶體301上並可在處理器302上運行的電腦程式。 A third aspect of the present invention also provides a data verification device. FIG. 10 is a schematic structural diagram of an embodiment of the data verification device provided by the third aspect of the present invention. As shown in FIG. 10 , the data verification apparatus 300 includes a memory 301 , a processor 302 , and a computer program stored in the memory 301 and running on the processor 302 .

在一個示例中,上述處理器302可以包括中央處理器(Central Processing Unit,CPU),或者特殊應用積體電路(Application Specific Integrated Circuit,ASIC),或者可以被配置成實施本發明實施例的一個或多個積體電路。 In one example, the above-mentioned processor 302 may include a central processing unit (Central Processing Unit, CPU), or an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or may be configured to implement one or more of the embodiments of the present invention. multiple integrated circuits.

記憶體可包括唯讀記憶體(Read-Only Memory,ROM),隨機存取記憶體(Random Access Memory,RAM),磁片存儲介質設備,光存儲介質設備,快閃記憶體設備,電氣、光學或其他物理/有形的記憶體存放裝置。因此,通常,記憶體包括一個或多個編碼有包括電腦可執行指令的軟體的有形(非暫態)電腦可讀存儲介質(例如,記憶體設備),並且當該軟體被執行(例如,由一個或多個處理器)時,其可操作來執行參考根據本發明的資料核對方法所描述的操作。 Memory may include Read-Only Memory (ROM), Random Access Memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical or other physical/tangible memory storage device. Thus, generally, memory includes one or more tangible (non-transitory) computer-readable storage media (eg, memory devices) encoded with software including computer-executable instructions, and when the software is executed (eg, by one or more processors), it is operable to perform the operations described with reference to the data collation method according to the present invention.

處理器302通過讀取記憶體301中存儲的可執行程式碼來運行與可執行程式碼對應的電腦程式,以用於實現上述實施例中的資料核對方法。 The processor 302 runs a computer program corresponding to the executable code by reading the executable code stored in the memory 301, so as to implement the data checking method in the above-mentioned embodiment.

在一個示例中,資料核對設備300還可包括通信介面303和匯流排304。其中,如圖10所示,記憶體301、處理器302、通信介面303通過匯流排304連接並完成相互間的通信。 In one example, the data collation apparatus 300 may further include a communication interface 303 and a bus bar 304 . Among them, as shown in FIG. 10 , the memory 301 , the processor 302 , and the communication interface 303 are connected through the bus bar 304 to complete the communication with each other.

通信介面303,主要用於實現本發明實施例中各模組、裝置、單元和/或設備之間的通信。也可通過通信介面303接入輸入裝置和/或輸出設備。 The communication interface 303 is mainly used to implement communication between modules, devices, units, and/or devices in the embodiments of the present invention. Input devices and/or output devices may also be accessed through the communication interface 303 .

匯流排304包括硬體、軟體或兩者,將資料核對設備300的部件彼此耦接在一起。舉例來說而非限制,匯流排304可包括加速圖形埠(Accelerated Graphics Port,AGP)或其他圖形匯流排、增強工業標準架構(Enhanced Industry Standard Architecture,EISA)匯流排、前側匯流排(Front Side Bus,FSB)、超傳送標準(Hyper Transport,HT)互連、工業標準架構(Industry Standard Architecture,ISA)匯流排、無限頻寬互連、低引腳數(Low pin count,LPC)匯流排、記憶體匯流排、微通道架構(Micro Channel Architecture,MCA)匯流排、週邊組件互連(Peripheral Component Interconnect,PCI)匯流排、週邊組件互連延伸(Peripheral Component Interconnect Extended,PCI-X)匯流排、序列先進技術附件(Serial Advanced Technology Attachment,SATA)匯流排、視訊電子標準協會區域匯流排(Video Electronics Standards Association Local Bus,VLB)匯流排或其他合適的匯流排或者兩個或更多個以上這些的組合。在合適的情況下,匯流排304可包括一個或多個匯流排。儘管本發明實施例描述和示出了特定的匯流排,但本發明考慮任何合適的匯流排或互連。 The bus bar 304 includes hardware, software, or both, coupling the components of the data collation apparatus 300 to each other. By way of example and not limitation, the bus 304 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus , FSB), Hyper Transport (HT) interconnect, Industry Standard Architecture (ISA) bus, Infinite Bandwidth interconnect, Low pin count (LPC) bus, memory Body bus, Micro Channel Architecture (MCA) bus, Peripheral Component Interconnect (PCI) bus, Peripheral Component Interconnect Extended (PCI-X) bus, serial Serial Advanced Technology Attachment (SATA) bus, Video Electronics Standards Association Local Bus (VLB) bus or other suitable bus or a combination of two or more of these . Busbars 304 may include one or more busbars, where appropriate. Although embodiments of the present invention describe and illustrate specific busbars, the present invention contemplates any suitable busbars or interconnects.

本發明第四方面還提供了一種資料核對系統。圖11為本發明第四方面提供的資料核對系統的一實施例的結構示意圖。如圖11所示,該資料核對系統可包括資料流程裝置41、分流裝置42和核對裝置43。在 此並不限定資料核對系統中資料流程裝置41、分流裝置42和核對裝置43各自的數量。 A fourth aspect of the present invention also provides a data verification system. FIG. 11 is a schematic structural diagram of an embodiment of a data verification system according to a fourth aspect of the present invention. As shown in FIG. 11 , the data verification system may include a data flow device 41 , a distribution device 42 and a verification device 43 . exist This does not limit the respective numbers of the data flow devices 41 , the distribution devices 42 and the verification devices 43 in the data verification system.

資料流程裝置41可用於在各系統資料池發生寫操作的情況下,生成包括與寫操作關聯的資料的資料流程並傳輸。 The data flow device 41 can be used to generate and transmit a data flow including data associated with the write operation when a write operation occurs in each system data pool.

資料流程包括資料的主鍵值。 The data flow includes the primary key value of the data.

分流裝置42可用於基於資料流程的欄位以及預設的區域劃分規則,將資料流程劃分為至少一個資料區域。 The distribution device 42 can be used to divide the data flow into at least one data region based on the fields of the data flow and the preset region division rules.

每個資料區域包括至少兩個系統資料池對應的資料流程。 Each data area includes data flows corresponding to at least two system data pools.

核對裝置43可用於在每個資料區域中,根據資料流程對應的主鍵值,核對資料區域中的至少兩個系統資料池對應的資料流程,以確定資料區域中的至少兩個系統資料池的資料是否一致。 The checking device 43 can be used to check the data flow corresponding to at least two system data pools in the data region according to the primary key value corresponding to the data flow in each data region, so as to determine the data flow of the at least two system data pools in the data region. Are the data consistent.

資料流程裝置41、分流裝置42和核對裝置43還可執行上述實施例中資料核對方法中的其他步驟,具體可參見上述實施例中資料核對方法的相關說明,在此不再贅述。 The data flow device 41 , the distribution device 42 and the verification device 43 may also perform other steps in the data verification method in the above-mentioned embodiment. For details, please refer to the relevant description of the data verification method in the above-mentioned embodiment, which will not be repeated here.

本發明第五方面還提供一種電腦可讀存儲介質,該電腦可讀存儲介質上存儲有電腦程式,該電腦程式被處理器執行時可實現上述實施例中的資料核對方法,且能達到相同的技術效果,為避免重複,這裡不再贅述。其中,上述電腦可讀存儲介質可包括非暫態電腦可讀存儲介質,如唯讀記憶體(Read-Only Memory,ROM)、隨機存取記憶體(Random Access Memory,RAM)、磁碟或者光碟等,在此並不限定。 A fifth aspect of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium. When the computer program is executed by a processor, the data verification method in the above-mentioned embodiment can be implemented, and the same can be achieved. The technical effect, in order to avoid repetition, will not be repeated here. The above-mentioned computer-readable storage medium may include a non-transitory computer-readable storage medium, such as a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk etc., are not limited here.

需要明確的是,本說明書中的各個實施例均採用遞進的方式描述,各個實施例之間相同或相似的部分互相參見即可,每個實施例重點說明的都是與其他實施例的不同之處。對於裝置實施例、設備實施例、系統實施例、電腦可讀存儲介質實施例而言,相關之處可以參見方法實施例的說明部分。本發明並不局限於上文所描述並在圖中示出的特定步驟和結構。本領域的技術人員可以在領會本發明的精神之後,作出各種改變、修改和添加,或者改變步驟之間的順序。並且,為了簡明起見,這裡省略 對已知方法技術的詳細描述。 It should be clear that each embodiment in this specification is described in a progressive manner, and the same or similar parts of each embodiment may be referred to each other, and each embodiment focuses on the differences from other embodiments. place. For the apparatus embodiments, device embodiments, system embodiments, and computer-readable storage medium embodiments, reference may be made to the description part of the method embodiments for related parts. The invention is not limited to the specific steps and structures described above and shown in the drawings. Those skilled in the art may make various changes, modifications and additions, or change the order between steps, after appreciating the spirit of the present invention. Also, for the sake of brevity, it is omitted here Detailed description of known method techniques.

上面參考根據本發明的實施例的方法、裝置(系統)和電腦程式產品的流程圖和/或框圖描述了本發明的各方面。應當理解,流程圖和/或框圖中的每個方框以及流程圖和/或框圖中各方框的組合可以由電腦程式指令實現。這些電腦程式指令可被提供給通用電腦、專用電腦、或其它可程式設計資料處理裝置的處理器,以產生一種機器,使得經由電腦或其它可程式設計資料處理裝置的處理器執行的這些指令使能對流程圖和/或框圖的一個或多個方框中指定的功能/動作的實現。這種處理器可以是但不限於是通用處理器、專用處理器、特殊應用處理器或者現場可程式設計邏輯電路。還可理解,框圖和/或流程圖中的每個方框以及框圖和/或流程圖中的方框的組合,也可以由執行指定的功能或動作的專用硬體來實現,或可由專用硬體和電腦指令的組合來實現。 Aspects of the present invention are described above with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to the processor of a general purpose computer, special purpose computer, or other programmable data processing device to produce a machine in which the instructions executed by the processor of the computer or other programmable data processing device cause the Implementations of the functions/acts specified in one or more blocks of the flowchart and/or block diagrams can be performed. Such processors may be, but are not limited to, general purpose processors, special purpose processors, application specific processors, or field programmable logic circuits. It will also be understood that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can also be implemented by dedicated hardware for performing the specified functions or actions, or A combination of dedicated hardware and computer instructions is implemented.

本領域技術人員應能理解,上述實施例均是示例性而非限制性的。在不同實施例中出現的不同技術特徵可以進行組合,以取得有益效果。本領域技術人員在研究圖式、說明書及申請專利範圍的基礎上,應能理解並實現所揭示的實施例的其他變化的實施例。在申請專利範圍中,術語“包括”並不排除其他裝置或步驟;數量詞“一個”不排除多個;術語“第一”、“第二”用於標示名稱而非用於表示任何特定的順序。請求項中的任何圖式標記均不應被理解為對保護範圍的限制。請求項中出現的多個部分的功能可以由一個單獨的硬體或軟體模組來實現。某些技術特徵出現在不同的從屬請求項中並不意味著不能將這些技術特徵進行組合以取得有益效果。 Those skilled in the art should understand that the above-mentioned embodiments are all illustrative and not restrictive. Different technical features appearing in different embodiments can be combined to achieve beneficial effects. Those skilled in the art should be able to understand and implement other modified embodiments of the disclosed embodiments on the basis of studying the drawings, the description and the scope of the patent application. In the scope of the patent application, the term "comprising" does not exclude other devices or steps; the quantitative word "a" does not exclude a plurality of; the terms "first" and "second" are used to indicate names rather than any specific order. . Any drawing signs in the claims should not be construed as limiting the scope of protection. The functions of the multiple parts appearing in the request item may be implemented by a single hardware or software module. The presence of certain technical features in different dependent claims does not mean that these technical features cannot be combined to achieve beneficial effects.

S101,S102,S103:步驟 S101, S102, S103: Steps

Claims (15)

一種資料核對方法,其特徵在於,包括: A data verification method, comprising: 在各系統資料池發生寫操作的情況下,生成包括與所述寫操作關聯的資料的資料流程並傳輸,所述資料流程包括資料的主鍵值; When a write operation occurs in each system data pool, a data flow including data associated with the write operation is generated and transmitted, and the data flow includes the primary key value of the data; 基於所述資料流程的欄位以及預設的區域劃分規則,將所述資料流程劃分為至少一個資料區域,每個所述資料區域包括至少兩個系統資料池對應的所述資料流程; Divide the data process into at least one data area based on the fields of the data process and a preset area division rule, and each of the data areas includes the data processes corresponding to at least two system data pools; 在每個所述資料區域中,根據所述資料流程對應的主鍵值,核對所述資料區域中的至少兩個系統資料池對應的所述資料流程,以確定所述資料區域中的至少兩個系統資料池的資料是否一致。 In each of the data areas, according to the primary key value corresponding to the data process, the data processes corresponding to at least two system data pools in the data area are checked to determine at least two system data pools in the data area. Whether the data of each system data pool is consistent. 如請求項1所述的方法,其中,所述在各系統資料池發生寫操作的情況下,生成包括與所述寫操作關聯的資料的資料流程並傳輸,包括: The method according to claim 1, wherein, when a write operation occurs in each system data pool, generating and transmitting a data flow including data associated with the write operation includes: 讀取各系統資料池的二進位日誌,根據所述二進位日誌,確定各系統資料池的所述寫操作; Read the binary log of each system data pool, and determine the write operation of each system data pool according to the binary log; 基於所述寫操作,生成資料流程報文,所述資料流程報文用於承載所述資料流程; Based on the write operation, a data flow message is generated, and the data flow message is used to carry the data flow; 通過資料流程式元件傳輸所述資料流程報文。 The data flow message is transmitted via the data flow element. 如請求項2所述的方法,其中,所述資料流程報文包括主鍵值相同的本次寫操作關聯的資料和上次寫操作關聯的資料。 The method according to claim 2, wherein the data flow message includes the data associated with the current write operation and the data associated with the previous write operation with the same primary key value. 如請求項1所述的方法,其中,在所述基於所述資料流程的欄位以及預設的區域劃分規則,將所述資料流程劃分為至少一個資料區域之前,還包括: The method according to claim 1, wherein before dividing the data flow into at least one data region based on the fields of the data flow and a preset area division rule, the method further comprises: 在一個系統資料池對應有主鍵值相同的多個所述資料流程的情況下,保留其中欄位符合預設的篩選條件的一個所述資料流程。 In the case that a system data pool corresponds to a plurality of the data flows with the same primary key value, one of the data flows whose fields meet the preset filter conditions is reserved. 如請求項4所述的方法,其中,所述資料流程包括業務狀態欄位,所述業務狀態欄位用於表徵所述資料流程的資料對應的業務的 狀態, The method according to claim 4, wherein the data flow includes a business status field, and the business status field is used to represent the status of the business corresponding to the data of the data flow state, 所述篩選條件包括:所述業務狀態欄位包括預設值集合中的目標值,且所述資料流程的業務狀態欄位與上一次所述寫操作對應的資料流程的業務狀態欄位不同。 The screening conditions include: the business status field includes a target value in a preset value set, and the business status field of the data flow is different from the business status field of the data flow corresponding to the last write operation. 如請求項1所述的方法,其中,所述在每個所述資料區域中,根據所述資料流程對應的主鍵值,核對所述資料區域中的至少兩個系統資料池對應的所述資料流程,包括: The method according to claim 1, wherein, in each of the data areas, the data corresponding to at least two system data pools in the data area are checked according to the primary key value corresponding to the data process. Data flow, including: 在每個所述資料區域中,根據所述資料流程對應的主鍵值,將所述資料流程劃分至核對視窗內,不同的所述核對視窗內的所述資料流程的主鍵值不同; In each of the data regions, according to the primary key value corresponding to the data process, the data process is divided into a check window, and the primary key value of the data process in different check windows is different; 核對所述核對視窗內的所述資料流程。 Check the data flow in the check window. 如請求項6所述的方法,其中, The method of claim 6, wherein, 所述根據所述資料流程對應的主鍵值,將所述資料流程劃分至核對視窗內,包括: According to the primary key value corresponding to the data flow, the data flow is divided into the check window, including: 在已存在的所述核對視窗內的資料流程的主鍵值與未劃分的所述資料流程對應的主鍵值不同的情況下,生成新的所述核對視窗,將未劃分的所述資料流程劃分至新的所述核對視窗內; In the case where the primary key value of the data flow in the existing check window is different from the primary key value corresponding to the undivided data flow, a new check window is generated, and the undivided data flow is into a new said check window; 所述核對所述核對視窗內的所述資料流程,包括: The checking of the data flow in the checking window includes: 在未劃分的所述資料流程劃分至新的所述核對視窗內的時長超過預設觸發時長的情況下,觸發核對新的所述核對視窗內的所述資料流程。 In the case that the time period for which the undivided data flow is divided into the new check window exceeds a preset trigger time period, the data flow in the new check window is checked for checking. 如請求項6所述的方法,其中, The method of claim 6, wherein, 所述根據所述資料流程對應的主鍵值,將所述資料流程劃分至核對視窗內,包括: According to the primary key value corresponding to the data flow, the data flow is divided into the check window, including: 在已存在的所述核對視窗內的資料流程的主鍵值與未劃分的所述資料流程對應的主鍵值相同的情況下,將未劃分的所述資料流程劃分至已存在的所述核對視窗內; In the case that the primary key value of the existing data flow in the check window is the same as the primary key value corresponding to the undivided data flow, the undivided data flow is divided into the existing check in the window; 所述核對所述核對視窗內的所述資料流程,包括: The checking of the data flow in the checking window includes: 在已存在的所述核對視窗內的資料流程的數量達到預設觸發數量的情況下,觸發核對已存在的所述核對視窗內的所述資料流程。 When the number of the existing data flows in the verification window reaches a preset trigger number, triggering the verification of the existing data flows in the verification window. 如請求項1所述的方法,其中,在所述根據所述資料流程對應的主鍵值,核對所述資料區域中的至少兩個系統資料池對應的所述資料流程之後,還包括: The method according to claim 1, wherein after checking the data flows corresponding to at least two system data pools in the data area according to the primary key value corresponding to the data flow, the method further comprises: 在確定所述資料區域中的至少兩個系統資料池的資料一致的情況下,增大資料核對成功指標的值; In the case of determining that the data of at least two system data pools in the data area are consistent, increasing the value of the data verification success indicator; 在確定所述資料區域中的至少兩個系統資料池的資料不一致的情況下,輸出所述資料區域中的至少兩個系統資料池中不一致的資料。 If it is determined that the data of the at least two system data pools in the data area are inconsistent, the inconsistent data in the at least two system data pools in the data area is output. 如請求項1所述的方法,其中,同一所述資料區域的所述資料流程的欄位滿足相同的所述區域劃分規則。 The method of claim 1, wherein the fields of the data flow in the same data area satisfy the same area division rule. 如請求項1所述的方法,其中,多個所述資料區域中所述資料流程的核對並存執行。 The method of claim 1, wherein the checking of the data flows in a plurality of the data areas is performed concurrently. 一種資料核對裝置,其特徵在於,包括: A data verification device, characterized in that it includes: 資料流程生成模組,用於在各系統資料池發生寫操作的情況下,生成包括與所述寫操作關聯的資料的資料流程並傳輸,所述資料流程包括資料的主鍵值; a data flow generation module, configured to generate and transmit a data flow including data associated with the write operation when a write operation occurs in each system data pool, and the data flow includes the primary key value of the data; 區域劃分模組,用於基於所述資料流程的欄位以及預設的區域劃分規則,將所述資料流程劃分為至少一個資料區域,每個所述資料區域包括至少兩個系統資料池對應的所述資料流程; The area division module is used to divide the data flow into at least one data area based on the fields of the data flow and the preset area division rules, and each of the data areas includes at least two system data pools corresponding to the data flow; 核對模組,用於在每個所述資料區域中,根據所述資料流程對應的主鍵值,核對所述資料區域中的至少兩個系統資料池對應的所述資料流程,以確定所述資料區域中的至少兩個系統資料池的資料是否一致。 A checking module, configured to check the data flows corresponding to at least two system data pools in the data area according to the primary key value corresponding to the data flow in each of the data areas, to determine the Whether the data of at least two system data pools in the data area are consistent. 一種資料核對設備,其特徵在於,包括:處理器以及存儲有電腦程式指令的記憶體; A data verification device, characterized in that it comprises: a processor and a memory storing computer program instructions; 所述處理器執行所述電腦程式指令時實現如請求項1至11中任意一項所述的資料核對方法。 When the processor executes the computer program instructions, the data verification method as described in any one of claims 1 to 11 is implemented. 一種資料核對系統,其特徵在於,包括: A data verification system, characterized in that it includes: 資料流程裝置,用於在各系統資料池發生寫操作的情況下,生成包括與所述寫操作關聯的資料的資料流程並傳輸,所述資料流程包括資料的主鍵值; a data flow device, configured to generate and transmit a data flow including data associated with the write operation when a write operation occurs in each system data pool, and the data flow includes a primary key value of the data; 分流裝置,用於基於所述資料流程的欄位以及預設的區域劃分規則,將所述資料流程劃分為至少一個資料區域,每個所述資料區域包括至少兩個系統資料池對應的所述資料流程; A flow dividing device, configured to divide the data flow into at least one data region based on the fields of the data flow and a preset area division rule, and each of the data regions includes the data corresponding to at least two system data pools. data flow; 核對裝置,用於在每個所述資料區域中,根據所述資料流程對應的主鍵值,核對所述資料區域中的至少兩個系統資料池對應的所述資料流程,以確定所述資料區域中的至少兩個系統資料池的資料是否一致。 A checking device for checking the data flows corresponding to at least two system data pools in the data region according to the primary key value corresponding to the data flow in each of the data regions, so as to determine the data Whether the data of at least two system data pools in the region are consistent. 一種電腦存儲介質,其特徵在於,所述電腦存儲介質上存儲有電腦程式指令,所述電腦程式指令被處理器執行時實現如請求項1至11中任意一項所述的資料核對方法。 A computer storage medium, characterized in that, computer program instructions are stored on the computer storage medium, and when the computer program instructions are executed by a processor, the data verification method described in any one of claim items 1 to 11 is implemented.
TW110139362A 2020-10-27 2021-10-22 Data verification method, device, equipment, system and storage medium TWI802056B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011167710.5 2020-10-27
CN202011167710.5A CN112422635B (en) 2020-10-27 2020-10-27 Data checking method, device, equipment, system and storage medium

Publications (2)

Publication Number Publication Date
TW202217641A true TW202217641A (en) 2022-05-01
TWI802056B TWI802056B (en) 2023-05-11

Family

ID=74841834

Family Applications (1)

Application Number Title Priority Date Filing Date
TW110139362A TWI802056B (en) 2020-10-27 2021-10-22 Data verification method, device, equipment, system and storage medium

Country Status (3)

Country Link
CN (1) CN112422635B (en)
TW (1) TWI802056B (en)
WO (1) WO2022089063A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112422635B (en) * 2020-10-27 2023-05-23 中国银联股份有限公司 Data checking method, device, equipment, system and storage medium

Family Cites Families (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9063657B2 (en) * 2011-04-19 2015-06-23 International Business Machines Corporation Virtual tape systems using physical tape caching
CN103136276A (en) * 2011-12-02 2013-06-05 阿里巴巴集团控股有限公司 System, method and device of verification of data
CN102571617B (en) * 2012-03-22 2015-04-01 中国科学院上海高等研究院 Streaming data server, streaming media transmission method and data transmission system
CN103645963B (en) * 2013-12-26 2016-06-29 深圳市迪菲特科技股份有限公司 A kind of storage system and data consistency verification method thereof
US10191956B2 (en) * 2014-08-19 2019-01-29 New England Complex Systems Institute, Inc. Event detection and characterization in big data streams
TWI607340B (en) * 2015-01-09 2017-12-01 Chunghwa Telecom Co Ltd Privacy data flow security and storage protection method and system
CN106326219B (en) * 2015-06-16 2020-01-24 阿里巴巴集团控股有限公司 Method, device and system for checking business system data
CN106454767A (en) * 2015-08-05 2017-02-22 中兴通讯股份有限公司 Business data synchronization method, device and system
US11550632B2 (en) * 2015-12-24 2023-01-10 Intel Corporation Facilitating efficient communication and data processing across clusters of computing machines in heterogeneous computing environment
CN109840837B (en) * 2017-11-27 2022-09-20 财付通支付科技有限公司 Financial data processing method and device, computer readable medium and electronic equipment
CN110213071B (en) * 2018-04-16 2021-11-02 腾讯科技(深圳)有限公司 Data checking method, device, system, computer equipment and storage medium
CN110196844B (en) * 2018-04-16 2024-01-30 腾讯科技(深圳)有限公司 Data migration method, system and storage medium
TW201947492A (en) * 2018-05-14 2019-12-16 玉山商業銀行股份有限公司 System and method for operational data convergence
CN108647353A (en) * 2018-05-16 2018-10-12 口碑(上海)信息技术有限公司 A kind of method, apparatus of real-time core to data
CN113553313B (en) * 2018-07-10 2023-12-05 创新先进技术有限公司 Data migration method and system, storage medium and electronic equipment
US10795913B2 (en) * 2018-10-11 2020-10-06 Capital One Services, Llc Synching and reading arrangements for multi-regional active/active databases
CN109684350A (en) * 2018-12-15 2019-04-26 平安证券股份有限公司 Registration of securities verification of data method, apparatus, computer equipment and storage medium
CN110046202B (en) * 2019-03-07 2023-05-26 中国人民解放军海军工程大学 Real-time data management method for integrated power system based on memory key value database
CN110109824B (en) * 2019-04-09 2022-05-17 平安科技(深圳)有限公司 Big data autoregression test method and device, computer equipment and storage medium
CN110716813A (en) * 2019-09-17 2020-01-21 贝壳技术有限公司 Data stream processing method and device, readable storage medium and processor
CN112422635B (en) * 2020-10-27 2023-05-23 中国银联股份有限公司 Data checking method, device, equipment, system and storage medium

Also Published As

Publication number Publication date
CN112422635A (en) 2021-02-26
TWI802056B (en) 2023-05-11
CN112422635B (en) 2023-05-23
WO2022089063A1 (en) 2022-05-05

Similar Documents

Publication Publication Date Title
CN108415832B (en) Interface automation test method, device, equipment and storage medium
CN112181614B (en) Task timeout monitoring method, device, equipment, system and storage medium
CN108763071A (en) A kind of webpage test method and terminal device
CN108074033A (en) Processing method, system, electronic equipment and the storage medium of achievement data
CN109359109B (en) Data processing method and system based on distributed stream computing
US10073938B2 (en) Integrated circuit design verification
CN106909454B (en) Rule processing method and equipment
TWI802056B (en) Data verification method, device, equipment, system and storage medium
CN104376397B (en) A kind of data real-time analysis method and device
US20160063158A1 (en) Method and device for simulating a circuit design
CN107368500A (en) Data pick-up method and system
CN110704620B (en) Method and device for identifying same entity based on knowledge graph
CN113990068B (en) Traffic data processing method, device, equipment and storage medium
CN115470279A (en) Data source conversion method, device, equipment and medium based on enterprise data
CN105245380B (en) Message propagation mode identification method and device
CN110018844B (en) Management method and device of decision triggering scheme and electronic equipment
CN116340127A (en) Interface testing method and device
CN109325127B (en) Risk identification method and device
CN112711718A (en) Review information auditing method, device, medium and electronic equipment
CN111967767A (en) Business risk identification method, device, equipment and medium
CN111754238A (en) Suspicious transaction identification method and device
CN113901094B (en) Data processing method, device, equipment and storage medium
CN118331890B (en) Data batch generation method for defining large language model based on token training
CN111930704B (en) Service alarm equipment control method, device, equipment and computer readable medium
CN117370213A (en) Test data generation method and device, electronic equipment and storage medium