A data checking method, device, apparatus and storage medium

CN122948624APending Publication Date: 2026-10-20SHENZHEN COOCAA NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610990257.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-03
Publication Date
2026-10-20

AI Technical Summary

Technical Problem

对账操作普遍依赖于每日批量方式进行,数据同步存在明显的时间窗口,当业务端已产生交易记录而财务端尚未完成凭证生成时,系统无法及时发现两端之间的数据差异,问题发现严重滞后

Benefits of technology

[0014]上述数据核对方法、装置、计算机设备及存储介质所实现的方案中,通过为业务事件及对应的财务事件分配同一唯一全局追踪标识,建立了业务数据与财务数据之间的精准映射关系,从根本上解决了传统方式中业务与财务数据难以精准匹配的问题;通过消息队列可靠保存携带唯一全局追踪标识的数据,既能有效应对数据量突增的场景,又能使不同系统之间互不干扰独立运行,提升了整体架构的稳定性与数据安全性;通过流式计算引擎实时处理数据并按照唯一全局追踪标识对所述业务事件数据和所述财务事件数据进行分组比对,将传统批量处理升级为准实时处理,在海量并发场景下能够准确地将属于同一事件的数据归入同一分组,确保处理逻辑的精确性。以此,本发明通过唯一全局追踪标识实现了业务与财务数据的精准关联,结合消息队列的可靠暂存能力与流式计算引擎的实时处理能力,相较于传统批量核对方式,能够提升数据处理的时效性、准确性与系统稳定性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

This application relates to the field of data analysis technology, and discloses a data verification method, apparatus, device, and storage medium, comprising: receiving business events and corresponding financial events; assigning the same unique global tracking identifier to both business events and financial events; writing and persisting business event data and financial event data carrying different unique global tracking identifiers through a message queue; consuming the business event data and financial event data from the message queue through a streaming computing engine; grouping and comparing the business event data and financial event data according to the unique global tracking identifier to obtain the comparison result. This method achieves accurate association between business and financial events through global tracking identifiers, combines message queues to achieve reliable temporary storage of event data and system decoupling, and completes real-time group comparison through a streaming computing engine, thereby improving the timeliness, accuracy, and system stability of data verification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data analysis technology, and in particular to a data verification method, apparatus, device, and storage medium. Background Technology

[0002] In traditional enterprise information systems, business systems and financial systems typically employ heterogeneous databases and independent processing workflows. Reconciliation operations generally rely on daily batch processing, resulting in a clear time window for data synchronization. When transaction records have been generated on the business side but vouchers have not yet been generated on the financial side, the system cannot promptly detect data discrepancies between the two ends, leading to significant delays in problem detection. Furthermore, when errors occur, the lack of a unified data tracking mechanism makes error localization cumbersome and time-consuming. It requires manual searching and comparison of log files from different systems, which can take hours or even longer during peak business periods when log volumes are enormous, severely impacting operational efficiency and compliance. Simultaneously, reconciliation rules are usually embedded in the system code. When business rules change due to adjustments in business strategy or the launch of new businesses, code modifications and system redeployment are necessary, a lengthy process that hinders rapid adaptation to changing business needs. Summary of the Invention

[0003] This invention provides a data verification method, a data verification device, a computer device, and a computer-readable storage medium, which can improve the timeliness and accuracy of data verification.

[0004] Firstly, a data verification method is provided, including: Receive business events and corresponding financial events, and assign the same unique global tracking identifier to both business events and financial events; Business event data and financial event data, each carrying a unique global tracking identifier, are written and persisted via message queues. The business event data and financial event data in the message queue are consumed by the streaming computing engine. The business event data and financial event data are grouped and compared according to the unique global tracking identifier to obtain the comparison results.

[0005] Optionally, in one embodiment, business event data and financial event data in the message queue are consumed by a streaming computing engine, and the business event data and financial event data are grouped and compared according to a unique global tracking identifier to obtain a comparison result, including: Verification rules are dynamically loaded using a streaming computing engine; According to the verification rules, the business event data and the financial event data are grouped and compared according to the unique global tracking identifier to obtain the comparison results.

[0006] Optionally, in one embodiment, the data verification method further includes: Based on preset association rules, sub-business events associated with business events are determined; among them, sub-business events inherit the unique global tracking identifier of business events.

[0007] Optionally, in one embodiment, the data verification method further includes: Based on a unique global tracking identifier, business events, financial events, and sub-business events are constructed into corresponding directed graphs.

[0008] Optionally, in one embodiment, after grouping and comparing the business event data and the financial event data according to the unique global tracking identifier to obtain the comparison result, the method further includes: If the comparison results indicate an anomaly between business event data and financial event data, the target event causing the anomaly will be identified based on the directed graph corresponding to the unique global tracking identifier.

[0009] Optionally, in one embodiment, if the comparison result indicates an anomaly between business event data and financial event data, the target event causing the anomaly is identified based on the directed graph corresponding to the unique global tracking identifier, including: Obtain the directed graph corresponding to the unique global tracking identifier, and traverse the event data of all event nodes in the directed graph; Event nodes with abnormal event data are identified as the target events causing the abnormalities.

[0010] Optionally, in one embodiment, after identifying the target event causing the anomaly, the process includes: Trigger an anomaly alarm and generate an anomaly path to characterize the cause of the anomaly based on the target event that caused the anomaly.

[0011] Secondly, a data verification device is provided, comprising: The event access and identifier allocation module is used to receive business events and corresponding financial events, and to assign the same unique global tracking identifier to the business events and the financial events. The message queue persistence module is used to write and persist business event data and financial event data carrying different unique global tracking identifiers through message queues; The streaming verification engine module is used to consume the business event data and financial event data in the message queue through the streaming computing engine, and to group and compare the business event data and financial event data according to the unique global tracking identifier to obtain the comparison result.

[0012] Thirdly, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described data verification method.

[0013] Fourthly, a computer-readable storage medium is provided, which stores a computer program that, when executed by a processor, implements the steps of the above-described data verification method.

[0014] The aforementioned data verification method, apparatus, computer equipment, and storage medium establish a precise mapping relationship between business data and financial data by assigning the same unique global tracking identifier to both business events and their corresponding financial events. This fundamentally solves the problem of inaccurate matching between business and financial data in traditional methods. By reliably storing data carrying unique global tracking identifiers through message queues, it effectively handles scenarios with sudden increases in data volume and allows different systems to operate independently without interference, improving the overall architecture's stability and data security. The streaming computing engine processes data in real time and groups and compares the business event data and financial event data according to the unique global tracking identifier, upgrading traditional batch processing to near real-time processing. In scenarios with massive concurrency, it can accurately group data belonging to the same event into the same group, ensuring the accuracy of the processing logic. Therefore, this invention achieves precise association between business and financial data through unique global tracking identifiers. Combining the reliable temporary storage capability of message queues with the real-time processing capability of streaming computing engines, it improves the timeliness, accuracy, and system stability of data processing compared to traditional batch verification methods. Attached Figure Description

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

[0016] Figure 1 This is a schematic diagram of a data verification process provided in an embodiment of this application; Figure 2 yes Figure 1 A schematic diagram of a specific implementation method for step S103; Figure 3 This is another schematic diagram of the data verification process provided in the embodiments of this application; Figure 4 This is another schematic diagram of the data verification process provided in the embodiments of this application; Figure 5This is another schematic diagram of the data verification process provided in the embodiments of this application; Figure 6 yes Figure 5 A schematic diagram of a specific implementation of step S106; Figure 7 This is another schematic diagram of the data verification process provided in the embodiments of this application; Figure 8 This is a schematic diagram of the data verification device provided in an embodiment of this application; Figure 9 This is a schematic diagram of the structure of a computer device according to one embodiment of this application; Detailed Implementation To make the technical problems solved, the technical solutions, and the beneficial effects of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0017] It should be understood that, when used in this specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.

[0018] It should also be understood that the term “and / or” as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0019] As used in this specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if [the described condition or event] is detected" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once [the described condition or event] is detected," or "in response to detection of [the described condition or event]."

[0020] Furthermore, in the description of this invention and the appended claims, the terms "first," "second," "third," etc., are used only for distinguishing descriptions and should not be construed as indicating or implying relative importance.

[0021] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of the invention include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0022] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0023] This application provides a data verification method. Taking the application of this data verification method in a control device (hereinafter referred to as "device") as an example, the control device is connected to the business system and the financial system. When a business event and a financial event occur, it assigns the same unique global tracking identifier to both. It also uses a message queue and a streaming computing engine to achieve real-time comparison of business event data and financial event data to ensure the consistency of business and financial data.

[0024] Please see Figure 1 As shown, Figure 1 A flowchart illustrating a data verification method provided in an embodiment of the present invention includes the following steps: S101: Receive business events and corresponding financial events, and assign the same unique global tracking identifier to both business events and financial events; S102: Write and persist business event data and financial event data carrying different unique global tracking identifiers through message queues; S103: Consume business event data and financial event data from the message queue through the streaming computing engine, group and compare the business event data and financial event data according to the unique global tracking identifier, and obtain the comparison results.

[0025] Business events are data records generated in the business system that reflect business activities, including but not limited to the following parameters: a unique global trace ID (TraceID), a globally unique identifier that is the core field for linking all subsequent events and full-chain traceability, and is a mandatory parameter; event type, used to mark the business category to which the event belongs (such as sales order creation, purchase order generation, shipment confirmation, etc.) to distinguish different business actions; timestamp, used to record the precise time of event generation for time window verification and time-series traceability; business parameters, corresponding to all core fields of the original business documents, which are the core data source for business and financial reconciliation, typically including document number, business quantity, transaction amount, business subject / classification, customer / supplier information, inventory information, etc.; source system identifier, used to mark the business system to which the event belongs (such as sales system, purchasing system, inventory system, etc.); operation subject, used to record the operation user, system account or terminal device information; and data snapshot, i.e., a complete snapshot of the current business data, used for discrepancy verification and backtracking.

[0026] Financial events are data records generated in the financial system that reflect changes in funds or accounting processing, including but not limited to the following parameters: a unique global tracking identifier (TraceID), which inherits the unique global tracking identifier of business events and is the core field for business-finance event association and full-chain traceability, and is a mandatory parameter; event type, used to mark the category of financial events (such as voucher generation, reversal, adjustment, etc.); timestamp, used to record the precise time of voucher generation for time window reconciliation and time-series traceability; core accounting voucher data, which is the core comparison basis for business-finance reconciliation and includes at least key financial fields such as voucher number, voucher amount, accounting quantity, accounting subject, and counterparty; source system identifier, used to mark the financial subsystem to which it belongs (such as accounts receivable system, accounts payable system, general ledger system, inventory accounting system, etc.); operation subject, used to record operation information such as the preparer, reviewer, and system account; and data snapshot, i.e., a complete data snapshot of the current financial voucher, used for discrepancy verification and backtracking.

[0027] A unique global tracking identifier is a globally unique number used to uniquely identify a business event and its corresponding financial event. The unique global tracking identifier is assigned when a business event occurs, and the financial event inherits this identifier, establishing a one-to-one mapping relationship between business events and financial events belonging to the same transaction or business activity.

[0028] As an example, in step S101, when the business system generates business data, a business event is triggered. The device receives the business event pushed by the business system through a preset standardized interface and assigns a unique global tracking identifier to the business event. When the financial system generates financial vouchers based on the corresponding business data, a financial event is triggered. The device receives the financial event pushed by the financial system through a preset standardized interface, and the financial event reuses the unique global tracking identifier. The unique global tracking identifier is used to group the business event data and financial event data of the same transaction into the same group for comparison in the message queue and streaming computing engine. It should be noted that the preset standardized interfaces include RESTful API interfaces, database change data capture interfaces, file transfer interfaces, etc., which can be selected and used according to the actual situation.

[0029] As an example, in step S102, the device, acting as a message queue producer, writes business event data and financial event data, each assigned a unique global tracking identifier, into the message queue. It's important to understand that the message queue aggregates event data from multiple transactions; events within the same transaction carry the same unique global tracking identifier, while events from different transactions carry different identifiers. The device ensures data reliability through the message queue's persistence mechanism, enabling the streaming computing engine to subsequently group and consume data according to the unique global tracking identifier. The message queue can use distributed message middleware such as Apache Kafka, RocketMQ, or Pulsar. When using a distributed message queue that supports partitioning, the device configures a partitioning routing strategy based on the unique global tracking identifier. The message queue then distributes all events with the same identifier to the same partition, ensuring the order of events within a single partition.

[0030] As an example, in step S103, the streaming computing engine consumes business event data and financial event data from the message queue. Specifically, the engine groups data according to a unique global tracking identifier, aggregating business events and financial events with the same identifier into the same computing window. Within the computing window, the engine dynamically loads verification rules and compares the aggregated business event data and financial event data under the same unique global tracking identifier based on these rules. Verification rules include parameters such as reconciliation dimensions, comparison methods, and tolerance thresholds. Comparison methods include exact matching, difference calculation, and range judgment, which can be configured according to the field type. If all reconciliation dimensions meet the verification rules, the comparison result is considered normal; if any reconciliation dimension does not meet the verification rules, the comparison result is considered abnormal. It should be noted that the streaming computing engine can use Apache Flink, Apache Spark Streaming, Apache Storm, or similar real-time computing frameworks. This embodiment does not limit the specific selection of the streaming computing engine; it can be selected based on the actual business scenario and technology stack.

[0031] In this embodiment, by assigning the same unique global tracking identifier to both business events and their corresponding financial events, a precise mapping relationship between business data and financial data is established, fundamentally solving the problem of inaccurate matching of business and financial data in traditional methods. By reliably storing data carrying unique global tracking identifiers through a message queue, it effectively handles scenarios with sudden increases in data volume and allows different systems to operate independently without interference, improving the overall architecture's stability and data security. The streaming computing engine processes data in real time and groups and compares business event data and financial event data according to the unique global tracking identifier, upgrading traditional batch processing to near real-time processing. In scenarios with massive concurrency, it can accurately group data belonging to the same event into the same group, ensuring the accuracy of the processing logic. Therefore, this invention achieves precise association between business and financial data through unique global tracking identifiers. Combining the reliable temporary storage capability of the message queue with the real-time processing capability of the streaming computing engine, compared to traditional batch verification methods, it can improve the timeliness, accuracy, and system stability of data processing.

[0032] In one embodiment, such as Figure 2 As shown, in step S103, the business event data and financial event data in the message queue are consumed by the streaming computing engine. The business event data and financial event data are grouped and compared according to the unique global tracking identifier to obtain the comparison results, including: S1031: Dynamically load verification rules via the streaming computing engine; S1032: According to the verification rules, business event data and financial event data are grouped and compared according to the unique global tracking identifier to obtain the comparison results.

[0033] Among them, the verification rules refer to the rule configuration used to guide the comparison and verification of business event data and financial event data, including but not limited to reconciliation dimensions, comparison methods, tolerance thresholds, and time windows. Dynamic loading refers to the ability to update the verification rule configuration in real time without restarting the service during the operation of the streaming computing engine.

[0034] As an example, when dynamically loading verification rules, the streaming engine loads the initial verification rules from the rule configuration center upon startup. During operation, the streaming engine continuously monitors rule change events in the rule configuration center. When a change is detected, it retrieves the updated verification rules from the rule configuration center and loads them into the streaming engine to replace the original rules for subsequent group comparisons. The rule configuration center also supports version management of verification rules, generating a new version number each time a rule changes. The streaming engine carries this current version number when loading rules to ensure that the loaded verification rules are the latest versions.

[0035] As an example, when performing grouped comparisons according to verification rules, the streaming engine consumes business event data and financial event data carrying different unique global tracking identifiers from the message queue, and groups business event data and financial event data with the same unique global tracking identifier together. For each group of data, the streaming engine calls the currently loaded verification rules, and compares and verifies the business event data and financial event data in the group according to the reconciliation dimensions and comparison methods defined in the verification rules. Based on the comparison and verification results, it determines whether the business event data corresponding to the unique global tracking identifier is consistent with the financial event data, and obtains the comparison result.

[0036] Taking a sales order scenario as an example, the streaming computing engine loads initial verification rules upon startup. These rules are configured to compare data based on document number and total amount. When a company adjusts its business strategy and needs to add verification for discount amounts, operations personnel update the verification rules in the rule configuration center, adding a discount amount field to the existing comparison fields. Upon detecting this change, the streaming computing engine retrieves the updated verification rules from the rule configuration center and loads them dynamically. For newly consumed business event data and financial event data from the message queue after loading, the streaming computing engine performs grouped comparisons according to the updated verification rules. Business event data and financial event data with the same unique global tracking identifier are grouped together, and each group is compared and verified based on the document number, total amount, and discount amount fields to obtain the comparison results.

[0037] In this embodiment, the verification rules are dynamically loaded by the streaming computing engine, so that changes to the verification rules can take effect in real time without modifying the code or restarting the service. This overcomes the problem of slow business response caused by the fixed rules in traditional solutions and improves the flexibility and maintainability of the data verification system.

[0038] In one embodiment, such as Figure 3 As shown, the data verification method also includes: S104: Based on the preset association rules, determine the sub-business events associated with the business event; wherein, the sub-business events inherit the unique global tracking identifier of the business event.

[0039] Sub-business events are downstream business events derived from or triggered by business events, such as delivery note events and return note events triggered by sales order events. Pre-defined association rules define the mapping relationship between business events and sub-business events, and can be pre-configured based on the upstream and downstream dependencies between different business documents in the business system. For example, association rules can be field matching rules based on associated document numbers, or business logic rules based on the order-outbound relationship between sales order events and delivery note events. These can be selected or combined according to the actual business scenario.

[0040] As an example, when identifying sub-business events, the device continuously monitors event data pushed by the business system. When it identifies an event that matches preset association rules and has an upstream / downstream relationship with an existing business event, it determines that the event is a sub-business event and assigns the unique global tracking identifier of the associated business event to the sub-business event. For example, when the device receives an inventory deduction event, it extracts its associated document number, identifies an upstream / downstream relationship between the inventory deduction event and an existing sales order creation event based on preset association rules, determines that the inventory deduction event is a sub-business event, and assigns the unique global tracking identifier of the business event to the inventory deduction event.

[0041] In this embodiment, sub-business events associated with business events are determined by preset association rules, and the device uniformly assigns a unique global tracking identifier to the associated business event. This can automatically identify subordinate or derived events associated with business events, so that all events on the same business chain share the same unique global tracking identifier, providing a foundation for subsequent end-to-end tracing based on directed graphs.

[0042] In one embodiment, such as Figure 4 As shown, the data verification method also includes: S105: Based on the unique global tracking identifier, construct the business events, financial events, and sub-business events into corresponding directed graphs.

[0043] A directed graph is a graph data structure where events are nodes and the relationships between events are edges. Each node in a directed graph corresponds to an event. Events include business events, sub-business events, and financial events. Each edge in a directed graph connects two event nodes with upstream and downstream relationships, with the edge pointing from the upstream event to the downstream event. This represents the flow path and dependencies between events, thus forming a directed graph that represents the flow path of events on the same business chain.

[0044] As an example, when constructing a directed graph, all events with the same unique global tracking identifier are retrieved from the received event data, including business events, financial events, and sub-business events, based on the unique global tracking identifier. Then, the direction of the edges between event nodes is determined according to the upstream and downstream relationships between events. The event nodes are then connected sequentially according to the edge directions to generate a directed graph corresponding to the unique global tracking identifier. Taking a sales order scenario as an example, a sales order corresponds to one main business event and one main financial event. The business event is the sales order creation event, and the financial event is the accounts receivable voucher event uniformly generated based on the sales order. Both share the same unique global tracking identifier. Directed edges are constructed based on the flow relationship from the sales order creation event to the accounts receivable voucher event, forming the main business link. Furthermore, during the fulfillment of this sales order, sub-business events such as delivery note events and inventory deduction events may also arise. These sub-business events only serve as business process nodes, inheriting the same unique global tracking identifier. Directed edges are constructed separately based on the flow relationship from the sales order creation event to each sub-business event, forming sub-business links. Therefore, the main business link and the sub-business links are incorporated into the same directed graph, forming a directed graph that represents the complete flow path of this sales transaction.

[0045] In this embodiment, by constructing a directed graph of business events, sub-business events, and financial events on the same business chain according to a unique global tracking identifier, the isolated event data originally scattered in heterogeneous systems is organized into a structured graph data model, so that the causal relationship and flow path between events can be clearly represented, thereby providing a structured data foundation for the automatic location of abnormal events and the tracing of links, avoiding the tedious process of manually piecing together event chains from scattered logs.

[0046] In one embodiment, such as Figure 5 As shown, business event data and financial event data are grouped and compared according to a unique global tracking identifier. After obtaining the comparison results, the following are also included: S106: If the comparison results indicate that there is an anomaly between business event data and financial event data, the target event causing the anomaly will be identified based on the directed graph corresponding to the unique global tracking identifier.

[0047] The target event refers to the event corresponding to the event node in the directed graph where the event data is abnormal; that is, the root cause event that leads to inconsistency between business event data and financial event data.

[0048] As an example, when the comparison results indicate an anomaly, a directed graph corresponding to a unique global tracking identifier is obtained. This graph contains all event nodes with that unique global tracking identifier and the flow relationships between them. Based on the upstream and downstream relationships between event nodes in the directed graph and the event data of each node, the event node with abnormal event data is identified as the target event causing the anomaly, thereby determining the specific stage at which the anomaly occurred.

[0049] In this embodiment, when the comparison result indicates an anomaly, the node with the abnormal event data is automatically identified as the target event based on the directed graph, thereby determining the specific link in which the anomaly occurred. This achieves automatic location of the root cause of the anomaly, eliminating the need for manual comparison of logs one by one and improving the efficiency and accuracy of difference location.

[0050] In one embodiment, such as Figure 6 As shown, in step S106, if the comparison result indicates an anomaly between business event data and financial event data, then the target event causing the anomaly is identified based on the directed graph corresponding to the unique global tracking identifier, including: S1061: Obtain the directed graph corresponding to the unique global tracking identifier, and traverse the event data of all event nodes in the directed graph; S1062: Identify event nodes with abnormal event data as the target events causing the abnormalities.

[0051] Event data refers to the business data content carried by the event node, including but not limited to the snapshot of input data before the event node is executed and the snapshot of output data after the execution.

[0052] As an example, the device initiates a query request to the graph database using a unique global tracking identifier as the query condition to obtain the directed graph corresponding to that identifier. The directed graph contains all event nodes with that unique global tracking identifier and the flow relationships between each event node. The device traverses all event nodes in the directed graph, sequentially obtaining input data snapshots and output data snapshots for each event node, identifying nodes where the input and output data are inconsistent as the target events causing the anomalies. Furthermore, a shortest path algorithm can be introduced to assist in localization during traversal. For example, starting from a business event node and ending at a financial event node, a weighted path is calculated according to preset weights (such as historical anomaly frequency, number of manual interventions, etc.). The path with the lowest weighted cost is identified as the main link for difference propagation, thereby narrowing the traversal range and improving localization efficiency when the number of nodes is large.

[0053] As an example, the device compares the input data snapshots and output data snapshots of each event node; if the input data snapshots and output data snapshots of an event node are inconsistent, it is determined that the event data of that event node is abnormal, and the event node is identified as the target event causing the abnormality.

[0054] In this embodiment, by traversing the event data of all event nodes in the directed graph, nodes with abnormal event data are identified as target events, thus realizing automatic location of the root cause of the difference. This eliminates the need for manual comparison of logs one by one, improving the efficiency and accuracy of difference location.

[0055] In one embodiment, such as Figure 7 As shown, after identifying the target event that caused the anomaly, the process also includes: S107: Trigger an abnormal alarm and generate an abnormal path to characterize the cause of the abnormality based on the target event that caused the abnormality.

[0056] Among them, the abnormal path refers to the data flow path from the target event to the financial event, which is used to characterize the propagation trajectory of data differences from the root cause node to the final financial document.

[0057] As an example, after identifying the target event causing the anomaly, the device triggers an anomaly alarm, which may include at least one of SMS notifications, email notifications, or system message pushes. Starting from the target event, the device traverses downstream along the edges of the directed graph, acquiring all event nodes between the target event and the financial event, generating an anomaly path to characterize the cause of the anomaly. Graph algorithms can also be introduced to assist in localization during the traversal: using breadth-first search or depth-first search algorithms, starting from the target event node, the device traverses downstream layer by layer along the edges of the directed graph, marking all downstream event nodes affected by the anomaly node, thereby generating a complete anomaly propagation path to fully assess the scope of the anomaly's impact. Based on the event type, operating entity, timestamp, input data snapshot, and output data snapshot of the target event, combined with the anomaly path, the device generates a visual tracing report and outputs it to the front-end interface for display.

[0058] In this embodiment, by triggering an anomaly alarm and generating an anomaly path and a visual tracing report based on the target event, the results of the root cause location of the difference are presented to the user in an intuitive form. This allows the user to quickly understand the specific steps, the operating entity, the data change content, and the trajectory of the difference, without having to manually check each log, thus improving the efficiency of difference processing and the user experience.

[0059] As can be seen from the above, the data verification method provided in this embodiment establishes a precise mapping relationship between business and financial data by assigning the same unique global tracking identifier to business events and financial events. Combined with the reliable temporary storage of message queues and the real-time comparison capabilities of streaming computing engines, it upgrades traditional batch verification to near real-time verification, improving the timeliness and accuracy of data verification. Simultaneously, by constructing a directed graph containing business events, sub-business events, and financial events, the event data scattered across heterogeneous systems is organized into a structured graph data model. When a discrepancy is detected between business and financial data, the event data of all event nodes in the directed graph is traversed, and the node with abnormal event data is identified as the target event, achieving automatic location of the root cause of the discrepancy. Furthermore, the verification rules support dynamic loading and real-time effectiveness without requiring a system restart. Therefore, this embodiment improves the flexibility and timeliness of the verification system while achieving automatic location and visualization of the root cause of discrepancies, enhancing the efficiency of discrepancy processing and user experience.

[0060] In one embodiment, a data verification device 800 is provided, which corresponds one-to-one with the data verification method in the above embodiments. For example... Figure 8 As shown, the data verification device includes an event access and identifier allocation module 801, a message queue persistence module 802, and a streaming verification engine module 803.

[0061] The event access and identifier allocation module 801 is used to receive business events and corresponding financial events, and to assign the same unique global tracking identifier to both business events and financial events. The message queue persistence module 802 is used to write and persist business event data and financial event data carrying different unique global tracking identifiers through the message queue; The streaming verification engine module 803 is used to consume business event data and financial event data in the message queue through the streaming computing engine, and to group and compare the business event data and financial event data according to the unique global tracking identifier to obtain the comparison results.

[0062] In one embodiment, the streaming verification engine module 803 includes: The rule loading unit is used to dynamically load verification rules through the streaming computing engine; The group comparison unit is used to group and compare business event data and financial event data according to the verification rules and the unique global tracking identifier to obtain the comparison results.

[0063] In one embodiment, a data verification device further includes: The event association module is used to determine the sub-business events associated with the business event according to preset association rules; wherein, the sub-business events inherit the unique global tracking identifier of the business event.

[0064] In one embodiment, a data verification device further includes: The directed graph construction module is used to construct corresponding directed graphs from business events, financial events, and sub-business events according to a unique global tracking identifier.

[0065] In one embodiment, a data verification device further includes: The anomaly detection module is used to identify the target event causing the anomaly based on the directed graph corresponding to the unique global tracking identifier if the comparison results indicate that there is an anomaly between business event data and financial event data.

[0066] In one embodiment, the anomaly detection module includes: The node traversal unit is used to obtain the directed graph corresponding to the unique global tracking identifier and traverse the event data of all event nodes in the directed graph. The target event identification unit is used to identify event nodes with abnormal event data as target events that cause the abnormality.

[0067] In one embodiment, a data verification device further includes: The alarm tracing module is used to trigger abnormal alarms and generate abnormal paths to characterize the cause of the abnormality based on the target event that caused the abnormality.

[0068] As can be seen from the above, the data verification device provided in this embodiment assigns the same unique global tracking identifier to business events and corresponding financial events through the event access and identifier allocation module 801, establishing a precise mapping relationship between business data and financial data; the message queue persistence module 802 reliably saves data, improving the stability of the overall architecture and data security; the streaming verification engine module 803 processes data in real time and compares them in groups according to the unique global tracking identifier, upgrading traditional batch processing to near real-time processing, improving the timeliness and accuracy of data verification. Furthermore, the event association module and directed graph construction module construct a directed graph of events on the same business chain, providing a structured data foundation for anomaly root cause localization; the anomaly identification module and alarm tracing module automatically traverse the directed graph to identify abnormal nodes and generate abnormal paths when an anomaly is detected, realizing automatic localization and visualization of the root causes of discrepancies. Therefore, this solution improves the timeliness, accuracy, and system stability of data verification.

[0069] For specific limitations regarding the data verification device, please refer to the limitations on the data verification method above, which will not be repeated here. Each module in the aforementioned data verification device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0070] In one embodiment, a computer device is provided, the internal structure of which can be shown as follows: Figure 9 As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used for communication with external terminals via a network connection. When executed by the processor, the computer program implements the function or steps of a data verification method.

[0071] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps: Receive business events and corresponding financial events, and assign the same unique global tracking identifier to both business events and financial events; Business event data and financial event data, each carrying a unique global tracking identifier, are written and persisted via message queues. The business event data and financial event data in the message queue are consumed by the streaming computing engine. The business event data and financial event data are grouped and compared according to the unique global tracking identifier to obtain the comparison results.

[0072] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, performs the following steps: Receive business events and corresponding financial events, and assign the same unique global tracking identifier to both business events and financial events; Business event data and financial event data, each carrying a unique global tracking identifier, are written and persisted via message queues. The business event data and financial event data in the message queue are consumed by the streaming computing engine. The business event data and financial event data are grouped and compared according to the unique global tracking identifier to obtain the comparison results.

[0073] It should be noted that the functions or steps that can be implemented by the computer-readable storage medium or computer device described above can be referred to the relevant descriptions in the foregoing method embodiments. To avoid repetition, they will not be described one by one here.

[0074] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided by this invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0075] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0076] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.

[0077] It should be noted that when the above embodiments of the present invention are applied to specific products or technologies, and user-related data is involved, user permission or consent is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

Claims

1. A data verification method, characterized in that, include: Receive business events and corresponding financial events, and assign the same unique global tracking identifier to the business events and the financial events; Business event data and financial event data, each carrying a unique global tracking identifier, are written and persisted via message queues. The business event data and financial event data in the message queue are consumed by the streaming computing engine. The business event data and financial event data are grouped and compared according to the unique global tracking identifier to obtain the comparison results.

2. The data verification method as described in claim 1, characterized in that, The process involves consuming the business event data and financial event data from the message queue through a streaming computing engine, grouping and comparing the business event data and financial event data according to the unique global tracking identifier, and obtaining comparison results, including: Verification rules are dynamically loaded using a streaming computing engine; According to the verification rules, the business event data and the financial event data are grouped and compared according to the unique global tracking identifier to obtain the comparison results.

3. The data verification method as described in claim 1, characterized in that, Also includes: Based on preset association rules, sub-business events associated with the business event are determined; wherein, the sub-business events inherit the unique global tracking identifier of the business event.

4. The data verification method as described in claim 3, characterized in that, Also includes: Based on the unique global tracking identifier, the business events, the financial events, and the sub-business events are constructed into corresponding directed graphs.

5. The data verification method as described in claim 4, characterized in that, After grouping and comparing the business event data and the financial event data according to the unique global tracking identifier to obtain the comparison results, the method further includes: If the comparison result indicates an anomaly between the business event data and the financial event data, the target event causing the anomaly is identified based on the directed graph corresponding to the unique global tracking identifier.

6. The data verification method as described in claim 5, characterized in that, If the comparison result indicates an anomaly between the business event data and the financial event data, then based on the directed graph corresponding to the unique global tracking identifier, the target event causing the anomaly is identified, including: Obtain the directed graph corresponding to the unique global tracking identifier, and traverse the event data of all event nodes in the directed graph; Event nodes with abnormal event data are identified as the target events causing the abnormalities.

7. The data verification method as described in claim 6, characterized in that, After identifying the target event causing the anomaly, the method further includes: Trigger an anomaly alarm and generate an anomaly path to characterize the cause of the anomaly based on the target event that caused the anomaly.

8. A data verification device, characterized in that, include: The event access and identifier allocation module is used to receive business events and corresponding financial events, and to assign the same unique global tracking identifier to the business events and the financial events. The message queue persistence module is used to write and persist business event data and financial event data carrying different unique global tracking identifiers through message queues; The streaming verification engine module is used to consume the business event data and financial event data in the message queue through the streaming computing engine, and to group and compare the business event data and financial event data according to the unique global tracking identifier to obtain the comparison result.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the data verification method as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the data verification method as described in any one of claims 1 to 7.