Data consistency checking method and device, medium, electronic equipment and program product

By querying data metrics and verifying configuration information for consistency checks, the problem of data inconsistency was solved, achieving end-to-end data consistency verification and improving user experience.

CN120994677APending Publication Date: 2025-11-21BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202511235886.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-29
Publication Date
2025-11-21

AI Technical Summary

Technical Problem

During the data flow between different systems, platforms, and terminals, data inconsistencies can occur due to errors in product definition, data development, or engineering processing, thus affecting user experience.

Method used

By determining the query and verification configuration information for data metrics, data queries are performed for different data sources and consumer terminals. Consistency checks are conducted based on the verification results to identify data inconsistency issues.

Benefits of technology

It enables end-to-end data consistency verification from the data source to the consumer, accurately identifies and corrects data inconsistency issues, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120994677A_ABST
    Figure CN120994677A_ABST
Patent Text Reader

Abstract

A data consistency checking method and apparatus, a medium, an electronic device and a program product, the method comprising: determining query configuration information corresponding to each of at least two data indexes and checking configuration information of the at least two data indexes, the query configuration information at least comprising query parameters corresponding to the data indexes, and the checking configuration information of the at least two data indexes; the query parameters corresponding to different data indexes are used for obtaining index results from different data sources or different data consumption ends; for each data index in the at least two data indexes, performing data query according to the query parameter corresponding to the data index to obtain an index result of the data index; and performing consistency check on the index result of each data index based on the check configuration information to obtain a check result of the at least two data indexes. The problem of data inconsistency in each link of a data production link and a data consumption link can be accurately identified, and consistency checking of end-to-end data from a data source to a consumption end is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of data processing technology, and more specifically, to a data consistency verification method, apparatus, medium, electronic device, and program product. Background Technology

[0002] As data flows more frequently across different systems, platforms, and terminals, data consistency becomes crucial. In real-world business scenarios, at each stage from the data source to the consumer's display, various reasons such as incorrect product definition, data development errors, and engineering processing errors can lead to inconsistencies where end users see the same data metrics on different devices, resulting in unexplained and unexpected data discrepancies that severely impact user experience. Summary of the Invention

[0003] This summary section is provided to briefly introduce the concepts, which will be described in detail in the subsequent detailed description section. This summary section is not intended to identify key or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.

[0004] Firstly, this disclosure provides a data consistency verification method, the data consistency verification method comprising: Determine the query configuration information corresponding to each of the at least two data metrics and the verification configuration information of the at least two data metrics. The query configuration information includes at least the query parameters of the corresponding data metrics. The query parameters corresponding to different data metrics are used to obtain metric results from different data sources or different data consumers. For each of the at least two data indicators, perform a data query based on the query parameters corresponding to the data indicator to obtain the indicator result of the data indicator; Based on the verification configuration information, the consistency of the indicator results of each data indicator is verified to obtain the verification result of the at least two data indicators. The verification result is used to characterize whether the data between the at least two data indicators is consistent.

[0005] Secondly, this disclosure provides a data consistency verification device, the data consistency verification device comprising: The determination module is used to determine the query configuration information corresponding to each of the at least two data indicators and the verification configuration information of the at least two data indicators. The query configuration information includes at least the query parameters of the corresponding data indicators. The query parameters corresponding to different data indicators are used to obtain indicator results from different data sources or different data consumers. The query module is used to perform data query for each of the at least two data indicators according to the query parameters corresponding to the data indicator, and obtain the indicator result of the data indicator. The verification module is used to perform consistency verification on the indicator results of each data indicator based on the verification configuration information, and obtain the verification result for the at least two data indicators. The verification result is used to characterize whether the data between the at least two data indicators is consistent.

[0006] Thirdly, this disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the method described in the first aspect.

[0007] Fourthly, this disclosure provides an electronic device, comprising: A storage device on which computer programs are stored; A processing device for executing the computer program in the storage device to implement the steps of the method in the first aspect.

[0008] Fifthly, this disclosure provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the method described in the first aspect.

[0009] The above technical solution enables data querying for each data indicator based on its corresponding query parameters, yielding the indicator results. Consistency checks are then performed on these results based on verification configuration information, resulting in verification results for at least two data indicators. The query parameters for different data indicators are used to retrieve indicator results from different data sources or data consumers. This method allows for selective consistency verification of data indicator results from different data sources or consumers based on data verification needs. This enables accurate identification of data inconsistencies in each stage of the data production and consumption chain, achieving end-to-end data consistency verification from the data source to the consumer. This provides a basis for resolving data inconsistencies and ultimately significantly improves the user experience.

[0010] Other features and advantages of this disclosure will be described in detail in the following detailed description section. Attached Figure Description

[0011] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale. In the drawings: Figure 1This is a schematic diagram illustrating a data consistency problem according to an exemplary embodiment of the present disclosure; Figure 2 This is a flowchart illustrating a data consistency verification method according to an exemplary embodiment of the present disclosure; Figure 3 This is a schematic diagram illustrating a data consistency verification process according to an exemplary embodiment of the present disclosure; Figure 4 This is a schematic diagram illustrating a data consistency verification system according to an exemplary embodiment of the present disclosure; Figure 5 This is a structural block diagram of a data consistency verification device according to an exemplary embodiment of the present disclosure; Figure 6 This is a schematic diagram of the structure of an electronic device according to an exemplary embodiment of the present disclosure. Detailed Implementation

[0012] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0013] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.

[0014] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.

[0015] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.

[0016] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0017] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.

[0018] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.

[0019] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.

[0020] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0021] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.

[0022] Meanwhile, it is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and related provisions.

[0023] During business iterations, data development often faces the problem of data inconsistency across multiple platforms. This mainly stems from the highly customized nature of data consumption scenarios, leading to consistency issues that may involve data differences across multiple platforms, heterogeneous structures, and multiple sources. End-to-end data consistency problems typically arise from incorrect product definition, data development errors, or engineering processing errors. When end users see the same data metrics on different platforms, they may encounter inexplicable and unexpected data inconsistencies, severely impacting the user experience.

[0024] like Figure 1As shown, consistency issues can be categorized into those caused by the production chain and those caused by the consumption chain. For example, rapid business iterations can lead to data consistency problems in the production chain if changes to metric definitions on the data warehouse side are not synchronized to the data consumer side, or if the data processing chain is restructured. Conversely, asynchronous data iterations or differences in data processing across products or across pages within the same product can cause data consistency problems in the consumption chain.

[0025] Among them, the horizontal data consistency problem caused by the production chain means that different data tables produce the same data caliber, but their data results are inconsistent in the same or cross-dimensional, same or cross-domain. For example, the transaction amount after the aggregation of transaction details data in a certain business data table is inconsistent with the transaction amount data of the merchant multiplied by the transaction granularity, or the X indicator produced in the A-end business domain data table is inconsistent with the X indicator produced in the B-end business domain, and the caliber of the indicator cannot be explained.

[0026] The issue of horizontal data inconsistency caused by the consumption chain refers to the inconsistency of data results in the same dimension or across dimensions when consuming the same data caliber across different product forms, pages, and modules. For example, the aggregated indicators and list indicators with the same caliber under the same page of a certain business may be inconsistent after aggregation under the product definition conditions. Or, the same caliber indicator data revealed by the A-end business and the B-end business on their respective pages may not meet expectations under the product definition conditions.

[0027] like Figure 1 As shown, after a change in data caliber, horizontal data consistency issues may arise due to errors in the provision of requirement caliber, errors in caliber processing on the data warehouse side, errors in impact assessment and analysis during data backtracking, or errors in service caliber processing caused by changes in service processing logic, all of which may fail to be detected in the corresponding review or testing stages.

[0028] In addition, there is the issue of vertical data inconsistency caused by the consumption chain. This means that during the data consumption process, the mapping relationship between data table fields and data metrics is not realized in the way the product is expected. For example, users may find discrepancies in the data by manually recording transactions according to the product's defined criteria and reconciling them with the data product metrics, or users may find data in the detailed data that does not conform to the product's defined criteria.

[0029] like Figure 1 As shown, after the service caliber processing logic is changed, vertical data consistency issues may arise due to incorrect service caliber processing or misalignment of indicator consumption methods after adding new data consumption scenarios, and these issues are not detected in the corresponding review or testing stages.

[0030] Furthermore, the longer a business continues to iterate, the more consistency issues it will have and the more difficult it will be to build corresponding discovery methods and means.

[0031] In view of this, the present disclosure provides a data consistency verification method, apparatus, medium, electronic device and program product to solve the above-mentioned technical problems.

[0032] The embodiments of this disclosure will be further explained below with reference to the accompanying drawings.

[0033] Figure 2 This is a flowchart illustrating a data consistency verification method according to an exemplary embodiment of the present disclosure, with reference to... Figure 2 The data consistency verification method may include the following steps: S201: Determine the query configuration information corresponding to each of the at least two data metrics and the verification configuration information for the at least two data metrics. The query configuration information includes at least the query parameters for the corresponding data metrics. The query parameters for different data metrics are used to obtain metric results from different data sources or different data consumers.

[0034] In this embodiment, "different data consumption terminals" refers to the differences in data products in different forms, including internal data analysis dashboards, external data analysis websites, mobile pages, and web pages. "Different data sources" refers to the diversity of data sources, such as real-time data processing chains and offline data processing chains. Each chain may involve the same or different data sources. For example, data for a certain data indicator may come from different data tables. Taking the sales revenue indicator in an e-commerce business scenario as an example, an order sales revenue data table from the perspective of orders can be generated based on online order data, and a merchant sales revenue data table from the perspective of merchants can also be generated. The two data tables have a data consistency relationship in business logic. For example, the total sales revenue in the order sales revenue data table should be consistent with the total sales revenue in the merchant sales revenue data tables of all merchants.

[0035] It's worth noting that corresponding data sources or data consumers can be configured for data indicators based on data verification needs. For example, if it's necessary to verify the consistency of data indicator Y in data tables H1 and H2, query parameter C1 can be configured to retrieve the indicator result of data indicator Y in data table H1, and query parameter C2 can be configured to retrieve the indicator result of data indicator Y in data table H2, thereby achieving consistency verification of multi-source data. Similarly, corresponding query parameters can be configured to achieve consistency verification of data from multiple endpoints.

[0036] Furthermore, the same data metric may exhibit consistency issues across different data structures. Examples include the summary of a merchant's transaction amount over the past 7 days, list data split by day, and transaction amount data for a specific product. Therefore, consistency verification of heterogeneous data can be achieved by configuring the verification types and rules for data metrics across different data structures through the verification configuration information.

[0037] S202: For each of the at least two data indicators, perform a data query based on the query parameters corresponding to the data indicator to obtain the indicator result.

[0038] S203: Based on the verification configuration information, perform consistency verification on the indicator results of each data indicator to obtain verification results for at least two data indicators. The verification results are used to characterize whether the data between at least two data indicators are consistent.

[0039] Using the above method, data consistency verification can be performed on data indicator results from different data sources or different data consumers according to data verification needs. This allows for the accurate identification of data inconsistencies in each link of the data production and consumption chain, achieving end-to-end data consistency verification from the data source to the consumer. This provides a basis for fixing data inconsistencies and ultimately significantly improves the user experience.

[0040] In one possible approach, the data consistency verification method further includes: in response to a verification test case configuration operation on an interactive page for at least two data metrics, generating a verification test case corresponding to the verification test case configuration operation, wherein the verification test case is used to perform consistency verification on at least two data metrics, and the verification test case includes verification configuration information, test case scheduling configuration information, and metric configuration information corresponding to each data metric, wherein the metric configuration information is used to determine the query configuration information for the corresponding data metric; and in response to the arrival of the test case scheduling time in the test case scheduling configuration information, executing the verification test case to achieve the steps of determining the query configuration information corresponding to each of the at least two data metrics and obtaining the verification result for the at least two data metrics.

[0041] like Figure 3 As shown, users can interact on the interactive page, write and input the parameters required for verification test cases, call the interface, and generate verification test cases for consistency verification of at least two data metrics. These test cases can include verification configuration information, test case scheduling configuration information, and metric configuration information corresponding to each data metric, etc., which can be set according to requirements; this disclosure does not impose any restrictions on this. The data is then stored in the database to obtain the corresponding verification test case identifier. Simultaneously, the scheduling configuration information and the verification test case identifier can be synchronized to the test platform to create a task, waiting for the task to be scheduled again. When the test case scheduling time in the test case scheduling configuration information arrives, the task is scheduled and the corresponding verification test case is executed to perform the data consistency verification steps. This allows for the configuration of corresponding verification test cases according to consistency verification requirements, thereby achieving automated response of the data consistency verification process based on the verification test cases, effectively improving the efficiency of data consistency verification.

[0042] It should be noted that the test case scheduling configuration information mainly stores information such as the scheduling execution method, execution frequency, and execution status of the verification test cases. This information is used by the system to generate their scheduled execution cycles and has a one-to-one relationship with the verification test cases. The indicator configuration information for each data indicator contains the necessary information for querying the corresponding data indicator within a specified dimension and filtering condition in a query engine. This information is used by the system to obtain the indicator results for that data indicator and has a one-to-many relationship with the verification test cases. The verification configuration information stores information such as the verification type, verification method, and verification threshold among the various data indicators of the verification test case. This information is used by the system to aggregate and process the indicator results of all data indicators and perform consistency checks to obtain the verification results.

[0043] For example, the verification configuration information of verification test cases may include verification type, verification rules, verification threshold, etc.; the test case scheduling configuration information may include last scheduling time, whether to use caching, whether to schedule, whether to be a scheduled task, etc.; the indicator configuration information may include indicator index, indicator type, query parameters, hash value, processing logic, whether it is a benchmark indicator, path indication information, original query interface request, processed indicator query result, etc.; the verification test cases may also include meta-information such as test case name, business line, tag, creator, creation time, etc. The specific settings can be configured according to requirements, and this disclosure does not impose any restrictions on this.

[0044] To facilitate understanding of the data consistency verification process in this embodiment, the following description, in conjunction with the execution flow of the verification test cases, illustrates the data consistency verification process of this embodiment. It should be understood that in actual business scenarios, a visual page can also be provided to configure the required indicator training information and verification configuration information for data consistency verification according to needs, and then generate the corresponding execution script for data consistency verification. The specific settings can be customized according to requirements, and this disclosure does not impose any limitations on this.

[0045] Continue to refer to Figure 3 The system performs task orchestration and scheduling. Once a verification test case reaches its scheduled time, a blank test case context is created. The system retrieves the verification configuration information, test case scheduling configuration information, and indicator configuration information for that test case from the database using the test case identifier, and writes these information into the test case context. Alternatively, information such as whether to enable caching and cache expiration time can be read from the global configuration and written into the test case context as well. The specific settings can be configured according to requirements, and this disclosure does not impose any restrictions on this.

[0046] In possible methods, querying configuration information also includes query engines for corresponding data metrics. These engines perform data queries based on the query parameters corresponding to the data metrics to obtain the metric results. This includes: calling a sequence engine to serialize the query parameters corresponding to the data metrics to obtain a query string; inputting the query string into the query engine of the data metrics to obtain a first query result, which is obtained by the query engine from the data source interface or data consumer interface corresponding to the query parameters; calling a parsing engine to parse the first query result to obtain the metric results of the data metrics; and performing consistency checks on the metric results of each data metric based on the verification configuration information to obtain verification results for at least two data metrics. This includes: calling a verification engine to perform consistency checks on the metric results of each data metric based on the verification configuration information to obtain verification results for at least two data metrics.

[0047] For example, such as Figure 3 As shown, by calling the engine to execute tasks, lightweight data access capabilities for different data query interfaces and data types are achieved based on the sequence engine, query engine, and parsing engine. Lightweight data processing capabilities are also achieved based on the verification engine, thereby effectively improving the efficiency of data consistency verification. The functions of each engine will be described in detail in the specific application of the subsequent data consistency verification process, and will not be repeated here.

[0048] In one possible approach, the query configuration information corresponding to each of the at least two data metrics is determined, including: for each of the two data metrics, obtaining the metric configuration information corresponding to the data metric, the metric configuration information including the query parameter configuration items of the data metric; if the value of the query parameter configuration item includes path indication information, obtaining the parameter value of the corresponding query parameter configuration item from the data path indicated by the path indication information, and replacing the value of the query parameter configuration item with the parameter value to obtain the query parameters in the query configuration information corresponding to the data metric.

[0049] For example, the metric configuration information corresponding to all data metrics can be obtained from the context of the above use case. This metric configuration information includes query parameter configuration items corresponding to the query parameters. The query engine can support dynamic parameters, i.e., query parameter configuration items. These can be based on time, a key stored in a global configuration table to retrieve the current date ± N, custom single string values, numeric values, or list-type data, etc. In other words, dynamic parameters and path indication information for retrieving their values ​​are declared in the metric configuration information. This way, in the pre-processing steps before calling the query engine, the corresponding parameter value is retrieved based on the path indication information to replace the value of the dynamic parameter.

[0050] The dynamic parameters include date dynamic parameters and custom dynamic parameters. Taking date dynamic parameters as an example, when the value of the dynamic parameter is equal to ${date} or ${xxx_date_xxx}, it is replaced with the current date in yyyyMMdd format. The ±N operation, for example, ${date-2} represents the date two days ago. The xxx before ${xxx_date_xxx} represents the date in integer (int) or string (str) format; if not declared, it defaults to string type. The xxx after the string represents the date in yyyyMMdd format (bar) or timestamp type (timestamp); if not declared, yyyyMMdd format is used.

[0051] For example, ${date} represents a date in yyyyMMdd format as an integer, ${int_date_timestamp} represents a date in timestamp format as an integer, ${str_date_yyyyMMdd} represents a date in yyyyMMdd format as a string, and so on.

[0052] Custom dynamic parameters involve writing the possible values ​​and selection logic of dynamic parameters into the global configuration information before task execution. For example, if there is a dynamic parameter ${user_id}, the database will be queried for an unexpired record with the key user_id to determine whether the selection logic is a single element value or a list. If it is a single element value, one value will be randomly selected from the record separated by a delimiter as the parameter value for this execution. If it is a list, all values ​​will be selected as the parameter value after being separated by a delimiter.

[0053] This enables more flexible data queries based on dynamic parameters, effectively improving the versatility and flexibility of data consistency verification.

[0054] For example, after replacing the values ​​of the dynamic parameters in the query parameters with the parameter values ​​obtained from the path indication information, the sequence engine is called to serialize the query parameters. The query engine identifier can be declared in the indicator configuration information, and the corresponding query engine can be matched based on this. Then, the serialized query parameters are passed to the query engine, and the query is waited for to complete and return the query results.

[0055] It's important to note that the query configuration information can also include query expressions for accurately extracting metric results. These expressions can extract any type of data, including numbers, strings, arrays, objects, or null values. The parsing engine then uses these expressions to parse the query results and extract the corresponding metric results for the desired data metrics.

[0056] In some possible ways, the query configuration information for data metrics also includes data processing rules. Data queries are performed based on the query parameters corresponding to the data metrics to obtain the metrics results. This includes: performing data queries based on the query parameters corresponding to the data metrics to obtain a second query result for the data metrics; and performing data processing on the second query result based on the data processing rules to obtain the metrics results for the data metrics.

[0057] For example, query results can also be processed, such as converting query results with different units, like different length units or monetary units, to obtain index results with a unified unit. This allows for data consistency verification of index results with different data units, improving the accuracy of consistency verification.

[0058] After obtaining the metric results, the task status can be updated, and the queried metric results can be written into the above use case context for subsequent verification.

[0059] In possible ways, the verification configuration information includes verification type and verification rules. Based on the verification configuration information, the indicator results of each data indicator are verified for consistency to obtain verification results for at least two data indicators. This includes: for each of the at least two data indicators, data processing is performed on the indicator results of the data indicator based on the verification type and verification rules to obtain the indicator result to be verified corresponding to the data indicator; and consistency verification is performed on the indicator results to be verified corresponding to each data indicator to obtain verification results for at least two data indicators.

[0060] For example, by configuring the verification types and rules between each indicator, processing the indicator results of each data indicator, and then performing consistency verification, the consistency verification requirements for indicator results of different data structures can be met, thereby achieving consistency verification of heterogeneous data.

[0061] In possible approaches, each data indicator has multiple indicator results. The verification type includes a first type that aggregates and verifies multiple indicator results for each data indicator. The verification rules include aggregation functions. Based on the verification type and verification rules, the data indicator results are processed to obtain the corresponding indicator result to be verified. This includes: when the verification type is the first type, aggregating multiple indicator results for the data indicator based on the aggregation function to obtain an aggregated indicator result; and determining the aggregated indicator result as the corresponding indicator result to be verified.

[0062] In this implementation, the first type indicates that multiple indicator results of various data indicators can be aggregated and verified, and specific aggregation functions can be set in the verification rules, such as calculating the maximum value, minimum value, sum, average value, number of non-null values ​​after deduplication, etc. The specific configuration can be configured according to the needs, and this disclosure does not impose any restrictions on this.

[0063] For example, in the case of the first type of verification, the results of multiple indicators for each data metric are aggregated based on the set aggregation function to obtain the corresponding indicator result to be verified for each data metric. This satisfies the need for consistent verification of indicator results for different data structures, achieving consistent verification of heterogeneous data. For example, in an e-commerce business scenario, it is necessary to verify whether the total amount of the order sales data table from the order perspective is consistent with the total amount of the merchant sales data table from the merchant perspective.

[0064] In possible approaches, each data indicator has multiple indicator results. The verification type includes a second type that verifies each data indicator's multiple indicator results item by item. The verification rules include a first rule that constrains the number of indicator results for each data indicator to be equal and a second rule that allows the number of indicator results for each data indicator to be unequal. For each of at least two data indicators, the indicator results of the data indicator are processed based on the verification type and verification rules to obtain the indicator results to be verified corresponding to the data indicator. This includes: when the verification type is the second type and the verification rule is the first or second rule, if the number of indicator results for each data indicator is equal, for each of at least two data indicators, multiple indicator results of the data indicator are determined as the indicator results to be verified corresponding to the data indicator; when the verification type is the second type and the verification rule is the second rule, if the number of indicator results for each data indicator is unequal, the minimum number of indicator results among the number of indicator results for each data indicator is determined, and for each of at least two data indicators, the minimum number of indicator results among the multiple indicator results of the data indicator are determined as the indicator results to be verified corresponding to the data indicator.

[0065] In this implementation, the second type indicates that multiple indicator results for each data indicator can be checked item by item in the order of results, i.e., checked at the element granularity. Furthermore, specific checking rules can be specified, such as requiring that the number of indicator results for each data indicator be consistent, otherwise an error will be reported, or allowing that the number of indicator results for each data indicator be inconsistent. The specific rules can be configured according to requirements, and this disclosure does not impose any restrictions on them.

[0066] For example, in the case of verification type two, if the length of the indicator results for each data indicator is required to be consistent, then if the number of indicator results for each data indicator is equal, the indicator results for each data indicator can be used as the indicator results to be verified. If the number of indicator results for each data indicator is unequal, then the indicator results for each data indicator can be directly determined to be inconsistent. Of course, if the number of indicator results for each data indicator is unequal, but the number of indicator results for each data indicator is equal, then the indicator results for each data indicator can be used as the indicator results to be verified.

[0067] For example, when the number of results for each data indicator is allowed to be unequal, the results of each data indicator are truncated according to the minimum number of results for each data indicator, so that the number of results to be verified for each data indicator is consistent. The results are truncated in the order they appear.

[0068] This allows for item-by-item verification of the results of each data indicator. For example, it enables item-by-item verification of the data in the first data table displayed on the mobile device and the data in the second data table displayed on the webpage, thus meeting the requirements for fine-grained data consistency verification.

[0069] Furthermore, the results of each data indicator are processed and converted into strings or numbers through the above verification types and rules, and finally each data indicator obtains a single data point or a list of indicators to be verified.

[0070] In possible approaches, at least two data indicators include a first data indicator and a second data indicator. The verification configuration information also includes a verification threshold. Consistency verification is performed on the results of the indicators to be verified corresponding to each data indicator to obtain a verification result for at least two data indicators. This includes: performing consistency verification on the first indicator result to be verified corresponding to the first data indicator and the second indicator result to be verified corresponding to the second data indicator to obtain a data consistency rate between the first indicator result to be verified and the second indicator result to be verified; if the data consistency rate is greater than or equal to the verification threshold, a verification result indicating that the first data indicator and the second data indicator are consistent is determined; if the data consistency rate is less than the verification threshold, a verification result indicating that the first data indicator and the second data indicator are inconsistent is determined.

[0071] It should be noted that data consistency checks are usually performed in pairs. Therefore, two data indicators can be directly checked for data consistency. If there are multiple data indicators, a benchmark indicator needs to be set in advance among the multiple data indicators, or the first data indicator among the multiple data indicators can be set as the benchmark indicator by default. In this case, the other data indicators need to be checked for data consistency with the benchmark indicator separately. For example, the first data indicator is the benchmark indicator, and the second data indicator is any data indicator among the multiple data indicators except the first data indicator.

[0072] For example, a verification threshold can also be set, which allows for consistency verification of two data metrics with a tolerance margin in their consistency relationship, thereby improving the flexibility of consistency verification.

[0073] In one possible approach, a consistency check is performed on the first data indicator result to be checked and the second data indicator result to be checked to obtain the data consistency rate between the first data indicator result and the second data indicator result. This includes: when both the first data indicator result and the second data indicator result are numerical, determining the absolute value of the difference between the first data indicator result and the second data indicator result and the maximum value between the first data indicator result and the second data indicator result, and dividing the absolute value of the difference by the maximum value to obtain the difference rate, and determining the difference between 1 and the difference rate as the data consistency rate between the first data indicator result and the second data indicator result; when both the first data indicator result and the second data indicator result are strings, comparing the first string corresponding to the first data indicator result and the second string corresponding to the second data indicator result, if the first string and the second string are consistent, determining the data consistency rate between the first data indicator result and the second data indicator result to be 1, and if the first string and the second string are inconsistent, determining the data consistency rate between the first data indicator result and the second data indicator result to be 0.

[0074] For example, for a single data point to be verified, if the result is a string, the two strings are directly compared for consistency; if they match, the consistency rate is 1, otherwise it is 0. If the result is a numerical value, it can be calculated using the formula 1 - |Result 1, Result 2| / max(Result 1, Result 2) × 100%. Assuming the results for the two data points are 100 and 99 respectively, the result would be 1 - |100 - 99| / 100 × 100% = 99%.

[0075] This allows for consistency checks on single data points and data metrics of different data types, improving the versatility of consistency checks.

[0076] In possible methods, there are multiple first and second indicators to be verified, and they correspond one-to-one. A consistency check is performed on the first and second indicators corresponding to the first data indicator to obtain the data consistency rate between the first and second indicators. This includes: for each corresponding set of first and second indicators to be verified, a consistency check is performed on the first and second indicators to be verified to obtain verification sub-results. These sub-results are used to characterize whether the data of the first and second indicators to be verified are consistent; the number of sub-results characterizing the data consistency is determined from all verification sub-results; and the result of dividing the number of sub-results by the total number of all verification sub-results is determined as the data consistency rate between the first and second indicators to be verified.

[0077] For example, if both indicators to be verified have multiple results, such as list data, then the data elements of the two list data are compared element by element. During the comparison process, the consistency verification logic for single data can be referred to. Then, the ratio of the number of consistent indicator results to the total number of indicator results is calculated, and this ratio is determined as the data consistency rate between the two indicator results to be verified.

[0078] This allows for consistency checks on list data and data metrics of different data types, improving the versatility of consistency checks.

[0079] Finally, by comparing the consistency rate with the verification threshold, the pass / fail status of the consistency check is confirmed, and the verification process, consistency rate, and final verification result are written into the aforementioned use case context. Before the task ends, the use case context can also be synchronized to the database and rendered on the interactive page for users to view.

[0080] Among possible approaches, the data consistency verification method also includes: determining the cache configuration information for at least two data metrics. Data is queried based on the query parameters corresponding to the data metrics to obtain the metric results, including: if the cache configuration information indicates that data caching is enabled, determining the first hash value corresponding to the query parameters; if a second hash value consistent with the first hash value exists in the cache database, determining the metric results based on the cache result corresponding to the second hash value in the cache database. The cache database is used to store query results obtained from the corresponding data source interface or data consumer interface based on historical query parameters.

[0081] For example, such as Figure 3 As shown, if data caching is enabled in the test case scheduling configuration information, query parameters can be converted into hash values, and queries can be performed in the cache database based on these hash values. If the hash value exists, the corresponding metric result can be used directly. This reduces the number of data queries from the data source interface or the consumer interface, reduces interface pressure, and improves data query efficiency.

[0082] It should be noted that if the cache database stores the original query results obtained from the corresponding data source interface or consumer interface based on the query parameters, the parsing engine can be called to parse the query results to obtain the corresponding indicator results. The specific method can be determined according to the requirements, and this disclosure does not impose any restrictions on it.

[0083] In some possible ways, the data consistency verification method also includes: if there is no second hash value in the cache database that matches the first hash value, querying the corresponding data source interface or data consumer interface based on the query parameters to obtain a third query result, and determining the indicator result of the data indicator based on the third query result; and writing the first hash value, the third query result and the preset expiration time into the cache database.

[0084] For example, if the corresponding hash value does not exist in the cache database, the query engine is invoked using query parameters to obtain the query results from the corresponding data source interface or consumer interface. These results are then parsed by the parsing engine to obtain the corresponding metric results. Furthermore, the query results, the preset expiration time, and the hash value corresponding to the query parameters are written to the cache database, with the hash value as the primary key. If the hash value already exists, it is simply overwritten. Other information can also be stored, such as configuration information verification.

[0085] This reduces the number of data queries from the data source or consumer interface when querying the same data again, thus reducing interface pressure and improving data query efficiency.

[0086] like Figure 4 As shown in the embodiments of this disclosure, a data consistency verification system is provided. It can create orchestration scripts based on test case scheduling configuration information and indicator configuration information to obtain test case tasks. The test case scheduling configuration information, such as the test case scheduling execution method, execution frequency, execution status, whether caching is enabled, and cache expiration time, is then stored in a global configuration table. Furthermore, it can create query scripts based on indicator configuration information to obtain query tasks and verification scripts based on verification configuration information to obtain verification tasks. When a test case task is triggered, the corresponding engine is invoked to execute the query task and verification task, obtaining the execution result, i.e., the verification result. The verification result is then aggregated, stored, or visualized for subsequent data analysis and measurement. The test case context permeates the entire test case execution process, which will not be elaborated upon further in this disclosure.

[0087] The above methods enable orchestration and scheduling for multi-source or multi-terminal consistency verification, engine calls for consumer terminals or data sources with different data types, verification and validation for different data structures, and verification and validation based on dynamic parameters and threshold control for different data types. This achieves consistency verification capabilities across multiple terminals, heterogeneous data sources, and effectively improves the efficiency and coverage of end-to-end data consistency verification. It can accurately identify data inconsistency issues in each stage of the data production and consumption chain, achieving end-to-end data consistency verification from data source to consumer. This allows for the repair of data inconsistency issues based on the verification results, reducing the occurrence of unexplained and unexpected data, and improving the user experience.

[0088] Based on the same concept, embodiments of this disclosure also provide a data consistency verification device, such as... Figure 5 As shown, the data consistency verification device 500 includes: The determining module 501 is used to determine the query configuration information corresponding to each of the at least two data indicators and the verification configuration information of the at least two data indicators. The query configuration information includes at least the query parameters of the corresponding data indicators. The query parameters corresponding to different data indicators are used to obtain indicator results from different data sources or different data consumers. The query module 502 is used to perform a data query for each of the at least two data indicators according to the query parameters corresponding to the data indicator, and obtain the indicator result of the data indicator. The verification module 503 is used to perform consistency verification on the indicator results of each of the data indicators based on the verification configuration information, and obtain the verification result for the at least two data indicators. The verification result is used to characterize whether the data between the at least two data indicators is consistent.

[0089] Optionally, the verification configuration information includes verification type and verification rules, and the verification module 503 is used for: For each of the at least two data indicators, the indicator results of the data indicator are processed based on the verification type and the verification rules to obtain the corresponding indicator result to be verified. The consistency of the results of the indicators to be verified corresponding to each of the data indicators is checked to obtain the verification results for the at least two data indicators.

[0090] Optionally, each of the data indicators has multiple indicator results, the verification type includes a first type that aggregates and verifies the multiple indicator results of each of the data indicators, and the verification rule includes an aggregation function; The verification module 503 is used for: When the verification type is the first type, the multiple indicator results of the data indicator are aggregated based on the aggregation function to obtain the aggregated indicator result; The aggregated index result is determined as the index result to be verified corresponding to the data index.

[0091] Optionally, each of the data indicators has multiple indicator results. The verification type includes a second type that verifies each of the multiple indicator results of each data indicator item by item. The verification rules include a first rule that constrains the number of indicator results of each data indicator to be equal and a second rule that allows the number of indicator results of each data indicator to be unequal. The verification module 503 is used for: When the verification type is the second type and the verification rule is the first rule or the second rule, if the number of indicator results of each data indicator is equal, for each of the at least two data indicators, multiple indicator results of the data indicator are determined as the indicator results to be verified corresponding to the data indicator. When the verification type is the second type and the verification rule is the second rule, if the number of indicator results for each data indicator is not equal, the minimum number of indicator results for each data indicator is determined, and for each of the at least two data indicators, the minimum number of indicator results is determined from the multiple indicator results of the data indicator as the indicator result to be verified corresponding to the data indicator.

[0092] Optionally, the at least two data indicators include a first data indicator and a second data indicator, the verification configuration information further includes a verification threshold, and the verification module 503 is used for: A consistency check is performed on the first data indicator result to be checked and the second data indicator result to be checked, to obtain the data consistency rate between the first data indicator result and the second data indicator result. If the data consistency rate is greater than or equal to the verification threshold, a verification result indicating that the first data indicator and the second data indicator are consistent is determined. If the data consistency rate is less than the verification threshold, a verification result indicating inconsistency between the first data indicator and the second data indicator is determined.

[0093] Optionally, the verification module 503 is used for: When both the first and second indicators to be verified are numerical values, the absolute value of the difference between the first and second indicators to be verified and the maximum value between the first and second indicators to be verified are determined. The absolute value of the difference is divided by the maximum value to obtain the difference rate. The difference between 1 and the difference rate is determined as the data consistency rate between the first and second indicators to be verified. When both the first indicator result and the second indicator result are strings, compare the first string corresponding to the first indicator result to be verified with the second string corresponding to the second indicator result to be verified. If the first string is consistent with the second string, the data consistency rate between the first indicator result to be verified and the second indicator result to be verified is determined to be 1. If the first string is inconsistent with the second string, the data consistency rate between the first indicator result to be verified and the second indicator result to be verified is determined to be 0.

[0094] Optionally, the number of the first indicator results to be verified and the number of the second indicator results to be verified are both multiple and correspond one-to-one. The verification module 503 is used for: For each group of first and second indicators to be checked, the consistency of the first and second indicators to be checked is checked to obtain a check sub-result. The check sub-result is used to characterize whether the data of the first and second indicators to be checked are consistent. The number of sub-results representing data consistency is determined from all the verification sub-results. The number of sub-results is divided by the total number of all verification sub-results to determine the data consistency rate between the first indicator result to be verified and the second indicator result to be verified.

[0095] Optionally, the query configuration information also includes a query engine for the corresponding data metrics, and the query module 502 is used for: The sequence engine is invoked to serialize the query parameters corresponding to the data indicators, resulting in a query string. The query string is input into the query engine of the data metric to obtain the first query result, which is obtained by the query engine from the data source interface or data consumer interface corresponding to the query parameter. The parsing engine is invoked to parse the first query result to obtain the indicator results of the data indicators; The verification module 503 is used for: The verification engine is invoked to perform consistency verification on the indicator results of each of the data indicators based on the verification configuration information, so as to obtain the verification results for the at least two data indicators.

[0096] Optionally, the determining module 501 is used to: For each of the two data metrics, obtain the corresponding metric configuration information, which includes the query parameter configuration items for the data metric. When the value of the query parameter configuration item includes path indication information, the parameter value corresponding to the query parameter configuration item is obtained from the data path indicated by the path indication information, and the value of the query parameter configuration item is replaced with the parameter value to obtain the query parameter in the query configuration information corresponding to the data indicator.

[0097] Optionally, the query configuration information for the data indicators also includes data processing rules, and the query module 502 is used for: Perform a data query based on the query parameters corresponding to the data indicator to obtain the second query result of the data indicator; The second query result is processed based on the data processing rules to obtain the indicator result of the data indicator.

[0098] Optionally, the data consistency verification device 500 further includes: The determination submodule is used to determine the cache configuration information of the at least two data metrics; The query module 502 is used for: When the cache configuration information indicates that data caching is enabled, determine the first hash value corresponding to the query parameter; If a second hash value that is consistent with the first hash value exists in the cache database, the indicator result of the data indicator is determined based on the cache result corresponding to the second hash value in the cache database. The cache database is used to store query results obtained from the corresponding data source interface or data consumer interface based on historical query parameters.

[0099] Optionally, the data consistency verification device 500 further includes a caching module, the caching module being used for: If no second hash value matching the first hash value exists in the cache database, a third query result is obtained from the corresponding data source interface or data consumer interface based on the query parameters, and the indicator result of the data indicator is determined based on the third query result. Write the first hash value, the third query result, and the preset expiration time into the cache database.

[0100] Optionally, the data consistency verification device 500 further includes a use case module, which is used for: In response to the configuration operation of the verification test case for the at least two data metrics on the interactive page, a verification test case corresponding to the configuration operation is generated. The verification test case is used to perform consistency verification on the at least two data metrics. The verification test case includes the verification configuration information, test case scheduling configuration information and indicator configuration information corresponding to each data metric. The indicator configuration information is used to determine the query configuration information of the corresponding data metric. In response to the arrival of the test case scheduling time in the test case scheduling configuration information, the verification test case is executed to achieve the steps of determining the query configuration information corresponding to each of the at least two data indicators and obtaining the verification result of the at least two data indicators.

[0101] Based on the same concept, embodiments of this disclosure also provide a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of any of the above-described data consistency verification methods.

[0102] Based on the same concept, this disclosure also provides an electronic device that may include: A storage device on which computer programs are stored; A processing device for executing a computer program stored in a storage device to implement the steps of any of the above data consistency verification methods.

[0103] Based on the same concept, embodiments of this disclosure also provide a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the above-described data consistency verification methods.

[0104] The following is for reference. Figure 6 The diagram illustrates a structural schematic of an electronic device 600 suitable for implementing embodiments of the present disclosure. Terminal devices in embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 6 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.

[0105] like Figure 6 As shown, electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 601, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 602 or a program loaded from storage device 608 into random access memory (RAM) 603. RAM 603 also stores various programs and data required for the operation of electronic device 600. Processing device 601, ROM 602, and RAM 603 are interconnected via bus 604. Input / output (I / O) interface 605 is also connected to bus 604.

[0106] Typically, the following devices can be connected to I / O interface 605: input devices 606 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 608 including, for example, magnetic tapes, hard disks, etc.; and communication devices 609. Communication device 609 allows electronic device 600 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 6 An electronic device 600 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.

[0107] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, it performs the functions defined in the methods of embodiments of this disclosure.

[0108] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0109] In some implementations, communication can be conducted using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol), and can be interconnected with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and end-to-end networks (e.g., ad hoc end-to-end networks), as well as any currently known or future-developed networks.

[0110] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.

[0111] The aforementioned computer-readable medium carries one or more programs. When the electronic device executes the aforementioned one or more programs, the electronic device causes the electronic device to: determine query configuration information corresponding to each of at least two data indicators and verification configuration information for the at least two data indicators, wherein the query configuration information includes at least query parameters for the corresponding data indicators, and the query parameters corresponding to different data indicators are used to obtain indicator results from different data sources or different data consumers; for each of the at least two data indicators, perform a data query according to the query parameters corresponding to the data indicator to obtain the indicator result of the data indicator; and perform a consistency check on the indicator results of each of the data indicators based on the verification configuration information to obtain a verification result for the at least two data indicators, wherein the verification result is used to characterize whether the data between the at least two data indicators is consistent.

[0112] Computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof, including but not limited to object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0113] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0114] The modules described in the embodiments of this disclosure can be implemented in software or hardware. The names of the modules are not, in some cases, intended to limit the functionality of the module itself.

[0115] The functions described above in this document can be performed at least in part by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), and so on.

[0116] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0117] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.

[0118] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.

[0119] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative forms of implementing the claims. Regarding the apparatus in the above embodiments, the specific manner in which the various modules perform their operations has been described in detail in the embodiments relating to the method, and will not be elaborated upon here.

Claims

1. A data consistency verification method, characterized in that, The data consistency verification method includes: Determine the query configuration information corresponding to each of the at least two data metrics and the verification configuration information of the at least two data metrics. The query configuration information includes at least the query parameters of the corresponding data metrics. The query parameters corresponding to different data metrics are used to obtain metric results from different data sources or different data consumers. For each of the at least two data indicators, perform a data query based on the query parameters corresponding to the data indicator to obtain the indicator result of the data indicator; Based on the verification configuration information, the consistency of the indicator results of each data indicator is verified to obtain the verification result of the at least two data indicators. The verification result is used to characterize whether the data between the at least two data indicators is consistent.

2. The data consistency verification method according to claim 1, characterized in that, The verification configuration information includes verification type and verification rules. The step of performing consistency verification on the indicator results of each data indicator based on the verification configuration information to obtain verification results for at least two data indicators includes: For each of the at least two data indicators, the indicator results of the data indicator are processed based on the verification type and the verification rules to obtain the corresponding indicator result to be verified. The consistency of the results of the indicators to be verified corresponding to each of the data indicators is checked to obtain the verification results for the at least two data indicators.

3. The data consistency verification method according to claim 2, characterized in that, Each of the data indicators has multiple indicator results. The verification type includes a first type that aggregates and verifies the multiple indicator results of each data indicator. The verification rule includes an aggregation function. The step of processing the data indicators based on the verification type and the verification rules to obtain the corresponding verification indicator results includes: When the verification type is the first type, the multiple indicator results of the data indicator are aggregated based on the aggregation function to obtain the aggregated indicator result; The aggregated index result is determined as the index result to be verified corresponding to the data index.

4. The data consistency verification method according to claim 2, characterized in that, Each of the data indicators has multiple indicator results. The verification type includes a second type that verifies each of the multiple indicator results of each data indicator item by item. The verification rules include a first rule that constrains the number of indicator results of each data indicator to be equal and a second rule that allows the number of indicator results of each data indicator to be unequal. The step of processing the data result of each of the at least two data indicators based on the verification type and the verification rules to obtain the corresponding verification indicator result includes: When the verification type is the second type and the verification rule is the first rule or the second rule, if the number of indicator results of each data indicator is equal, for each of the at least two data indicators, multiple indicator results of the data indicator are determined as the indicator results to be verified corresponding to the data indicator. When the verification type is the second type and the verification rule is the second rule, if the number of indicator results for each data indicator is not equal, the minimum number of indicator results for each data indicator is determined, and for each of the at least two data indicators, the minimum number of indicator results is determined from the multiple indicator results of the data indicator as the indicator result to be verified corresponding to the data indicator.

5. The data consistency verification method according to claim 2, characterized in that, The at least two data indicators include a first data indicator and a second data indicator. The verification configuration information also includes a verification threshold. The step of performing a consistency verification on the results of the indicators to be verified corresponding to each of the data indicators to obtain the verification results for the at least two data indicators includes: A consistency check is performed on the first data indicator result to be checked and the second data indicator result to be checked, to obtain the data consistency rate between the first data indicator result and the second data indicator result. If the data consistency rate is greater than or equal to the verification threshold, a verification result indicating that the first data indicator and the second data indicator are consistent is determined. If the data consistency rate is less than the verification threshold, a verification result indicating inconsistency between the first data indicator and the second data indicator is determined.

6. The data consistency verification method according to claim 5, characterized in that, The step of performing a consistency check on the first data indicator result corresponding to the first data indicator and the second data indicator result corresponding to the second data indicator to obtain the data consistency rate between the first data indicator result and the second data indicator result includes: When both the first and second indicators to be verified are numerical values, the absolute value of the difference between the first and second indicators to be verified and the maximum value between the first and second indicators to be verified are determined. The absolute value of the difference is divided by the maximum value to obtain the difference rate. The difference between 1 and the difference rate is determined as the data consistency rate between the first and second indicators to be verified. When both the first indicator result and the second indicator result are strings, compare the first string corresponding to the first indicator result to be verified with the second string corresponding to the second indicator result to be verified. If the first string is consistent with the second string, the data consistency rate between the first indicator result to be verified and the second indicator result to be verified is determined to be 1. If the first string is inconsistent with the second string, the data consistency rate between the first indicator result to be verified and the second indicator result to be verified is determined to be 0.

7. The data consistency verification method according to claim 5, characterized in that, The number of the first and second indicators to be verified are both multiple and correspond one-to-one. The step of performing consistency verification on the first indicator to be verified corresponding to the first data indicator and the second indicator to be verified corresponding to the second data indicator to obtain the data consistency rate between the first and second indicators to be verified includes: For each group of first and second indicators to be checked, the consistency of the first and second indicators to be checked is checked to obtain a check sub-result. The check sub-result is used to characterize whether the data of the first and second indicators to be checked are consistent. The number of sub-results representing data consistency is determined from all the verification sub-results. The number of sub-results is divided by the total number of all verification sub-results to determine the data consistency rate between the first indicator result to be verified and the second indicator result to be verified.

8. The data consistency verification method according to any one of claims 1-7, characterized in that, The query configuration information also includes a query engine for the corresponding data metric. The step of performing a data query based on the query parameters corresponding to the data metric to obtain the metric result includes: The sequence engine is invoked to serialize the query parameters corresponding to the data indicators, resulting in a query string. The query string is input into the query engine of the data metric to obtain the first query result, which is obtained by the query engine from the data source interface or data consumer interface corresponding to the query parameter. The parsing engine is invoked to parse the first query result to obtain the indicator results of the data indicators; The process of performing consistency checks on the results of each data indicator based on the verification configuration information to obtain verification results for at least two data indicators includes: The verification engine is invoked to perform consistency verification on the indicator results of each of the data indicators based on the verification configuration information, so as to obtain the verification results for the at least two data indicators.

9. The data consistency verification method according to any one of claims 1-7, characterized in that, The step of determining the query configuration information corresponding to each of the at least two data metrics includes: For each of the two data metrics, obtain the corresponding metric configuration information, which includes the query parameter configuration items for the data metric. When the value of the query parameter configuration item includes path indication information, the parameter value corresponding to the query parameter configuration item is obtained from the data path indicated by the path indication information, and the value of the query parameter configuration item is replaced with the parameter value to obtain the query parameter in the query configuration information corresponding to the data indicator.

10. The data consistency verification method according to any one of claims 1-7, characterized in that, The query configuration information for the data metrics also includes data processing rules. The step of querying data based on the query parameters corresponding to the data metrics to obtain the metric results includes: Perform a data query based on the query parameters corresponding to the data indicator to obtain the second query result of the data indicator; The second query result is processed based on the data processing rules to obtain the indicator result of the data indicator.

11. The data consistency verification method according to any one of claims 1-7, characterized in that, The data consistency verification method also includes: Determine the cache configuration information for the at least two data metrics; The step of querying data based on the query parameters corresponding to the data indicator to obtain the indicator result includes: When the cache configuration information indicates that data caching is enabled, determine the first hash value corresponding to the query parameter; If a second hash value that is consistent with the first hash value exists in the cache database, the indicator result of the data indicator is determined based on the cache result corresponding to the second hash value in the cache database. The cache database is used to store query results obtained from the corresponding data source interface or data consumer interface based on historical query parameters.

12. The data consistency verification method according to claim 11, characterized in that, The data consistency verification method also includes: If no second hash value matching the first hash value exists in the cache database, a third query result is obtained from the corresponding data source interface or data consumer interface based on the query parameters, and the indicator result of the data indicator is determined based on the third query result. Write the first hash value, the third query result, and the preset expiration time into the cache database.

13. The data consistency verification method according to any one of claims 1-7, characterized in that, The data consistency verification method also includes: In response to the configuration operation of the verification test case for the at least two data metrics on the interactive page, a verification test case corresponding to the configuration operation is generated. The verification test case is used to perform consistency verification on the at least two data metrics. The verification test case includes the verification configuration information, test case scheduling configuration information and indicator configuration information corresponding to each data metric. The indicator configuration information is used to determine the query configuration information of the corresponding data metric. In response to the arrival of the test case scheduling time in the test case scheduling configuration information, the verification test case is executed to achieve the steps of determining the query configuration information corresponding to each of the at least two data indicators and obtaining the verification result of the at least two data indicators.

14. A data consistency verification device, characterized in that, The data consistency verification device includes: The determination module is used to determine the query configuration information corresponding to each of the at least two data indicators and the verification configuration information of the at least two data indicators. The query configuration information includes at least the query parameters of the corresponding data indicators. The query parameters corresponding to different data indicators are used to obtain indicator results from different data sources or different data consumers. The query module is used to perform data query for each of the at least two data indicators according to the query parameters corresponding to the data indicator, and obtain the indicator result of the data indicator. The verification module is used to perform consistency verification on the indicator results of each data indicator based on the verification configuration information, and obtain the verification result for the at least two data indicators. The verification result is used to characterize whether the data between the at least two data indicators is consistent.

15. A computer-readable medium having a computer program stored thereon, characterized in that, When executed by a processing device, the computer program performs the steps of the method described in any one of claims 1-13.

16. An electronic device, characterized in that, include: A storage device on which computer programs are stored; A processing apparatus for executing the computer program in the storage device to implement the steps of the method according to any one of claims 1-13.

17. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-13.

Citation Information

Patent Citations

  • Method, device and electronic equipment of data consistency comparison and readable storage medium

    CN108733662A

  • Method and equipment for judging consistency of returned data

    CN114330278A

  • Heterogeneous data consistency verification method, device and equipment and readable storage medium

    CN118331978A

  • Data quality verification method, device, computer equipment and storage medium

    CN119759893A

  • Reconciliation Method, Apparatus and System Based on Blockchain

    US20250045746A1