Data comparison method, system, computer device and storage medium

By generating SQL code for data comparison, the high cost and omissions of traditional data comparison methods are solved, realizing an efficient and standardized data comparison process and improving data development efficiency and quality assurance.

CN117076485BActive Publication Date: 2025-11-21CHINA PING AN PROPERTY INSURANCE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311177816.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-12
Publication Date
2025-11-21
Estimated Expiration
2043-09-12

AI Technical Summary

Technical Problem

Traditional data comparison methods require customized design scripts, which consume high manpower and time costs, and are difficult to standardize, making them prone to omissions.

Method used

By receiving preset configuration information, SQL code is generated to query data and generate a data comparison report. The system includes a configuration module, a code generation module, a query module, and a determination module, which reduces manpower and time costs and ensures the standardization of the data comparison process.

Benefits of technology

It enables efficient data comparison, reduces manpower and time costs, ensures that no data is missed in the comparison process, and improves data development efficiency and quality assurance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117076485B_ABST
    Figure CN117076485B_ABST
Patent Text Reader

Abstract

The embodiment of the application belongs to the field of data processing and the field of financial technology, and relates to a data comparison method, comprising the following steps: when a data comparison instruction carrying preset configuration information is received, configured parameters are obtained according to the preset configuration information, the configured parameters comprising table information, data ranges and project settings corresponding to different detection projects; SQL codes corresponding to each detection project are generated according to the table information, the data ranges and the project settings; data is queried according to each SQL code, and return results corresponding to each SQL code are obtained; data comparison results corresponding to each detection project are determined according to each return result, and a data comparison report is generated according to each data comparison result. The application also provides a data comparison system, a computer device and a storage medium. The application improves the efficiency of data development and reduces the consumption of labor cost and time cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of data processing and fintech, and is applied to scenarios in which data is compared between different data reports in fintech-related industries. In particular, it relates to a data comparison method, system computer equipment, and storage medium. Background Technology

[0002] Currently, in the fintech industry, there are stringent requirements for all aspects of data, especially its quality. The process of developing data to meet these needs often involves adding, deleting, and modifying fields in existing reports, or developing new reports based on the same fields.

[0003] In addition, to improve data query efficiency, redundant data is often used to ensure that data can be queried through reports with different purposes or dimensions. However, due to changes in data definitions, implementation logic, and task order, the data for the same indicator may be changed or adjusted in different reports, resulting in inconsistencies. Therefore, data comparison is necessary to determine the data vacancy rate, primary key duplication, data volume matching, and record consistency between the two reports to ensure data quality.

[0004] Data comparison is of paramount importance in the data development process. Traditional data comparison methods usually require customized design scripts, which consume a lot of manpower and time. Furthermore, as the demand increases, the number of inspection items also increases, making it easy to overlook some items and making it difficult to form a standardized process to ensure data quality. Summary of the Invention

[0005] The purpose of this application is to provide a data comparison method, system, computer device, and storage medium to solve the technical problem of high human and time costs associated with data comparison through customized design scripts.

[0006] To address the aforementioned technical problems, this application provides a data comparison method, employing the following technical solution:

[0007] When a data comparison instruction carrying preset configuration information is received, the configuration is performed according to the preset configuration information to obtain the configured parameters. The configured parameters include table information, data range, and project settings corresponding to different detection items.

[0008] Based on the table information, the data range, and the project settings, generate SQL code corresponding to each detection project;

[0009] Perform data queries based on each of the SQL codes to obtain the return results corresponding to each SQL code;

[0010] Based on the returned results, determine the data comparison result corresponding to each of the detection items, and generate a data comparison report based on the data comparison results.

[0011] Furthermore, the step of performing data queries based on each of the SQL codes to obtain the return result corresponding to each SQL code specifically includes:

[0012] Each SQL code is submitted to the corresponding database server for querying;

[0013] Receive the query results output by each of the database servers and use them as the return results for each of the database servers.

[0014] Furthermore, after the step of receiving the query results output by each of the database servers as the respective return results, the method further includes:

[0015] The submission information corresponding to each SQL code is recorded in the query log. The submission information includes the submission time, submission number, query record, and server feedback information.

[0016] Update the query results of each query to the query database.

[0017] Furthermore, after the step of performing data queries based on each of the SQL codes to obtain the return result corresponding to each SQL code, the method further includes:

[0018] The returned results are parsed to determine if any anomalies exist;

[0019] If the aforementioned abnormal situation exists, the corresponding processing procedure will be executed for the abnormal situation.

[0020] Furthermore, the abnormal situation includes a memory-limited exception. If such an abnormal situation exists, the steps for executing the corresponding processing flow for the abnormal situation specifically include:

[0021] If the abnormal situation is a memory-limited abnormal situation, then the first SQL code corresponding to the abnormal situation is determined, and the first SQL code is decomposed according to preset indicators to obtain multiple sub-codes;

[0022] Data is queried based on each of the sub-codes to obtain the secondary result corresponding to each sub-code;

[0023] The various secondary results are concatenated to obtain the return result corresponding to the first SQL code.

[0024] Furthermore, the abnormal situations also include server fluctuation abnormalities and other abnormalities. If such abnormal situations exist, the steps for executing the corresponding processing flow for the abnormal situations specifically include:

[0025] If the abnormal situation is a server fluctuation abnormality, then determine the second SQL code corresponding to the abnormal situation, and re-query the data according to the second SQL code to obtain the return result corresponding to the second SQL code;

[0026] If the abnormal situation is another abnormal situation, then a corresponding abnormal prompt message is generated according to the abnormal situation, and the abnormal prompt message is recorded.

[0027] Furthermore, after the steps of determining the data comparison result corresponding to each of the detection items based on the returned results, and generating a data comparison report based on the data comparison results, the method further includes:

[0028] Update the data comparison report to the comparison results database;

[0029] Upon receiving a report display instruction corresponding to the data comparison report, the data comparison report is extracted from the comparison result database and displayed on the front-end page.

[0030] To address the aforementioned technical problems, this application also provides a data comparison system, which employs the following technical solution:

[0031] A data comparison system, comprising:

[0032] The configuration module is used to configure according to the preset configuration information when it receives a data comparison instruction carrying preset configuration information, and obtain the configured parameters. The configured parameters include table information, data range, and project settings corresponding to different detection items.

[0033] The code generation module is used to generate SQL code corresponding to each detection item based on the table information, the data range, and the project settings.

[0034] The query module is used to perform data queries based on each of the SQL codes and obtain the return results corresponding to each SQL code.

[0035] The determination module is used to determine the data comparison result corresponding to each of the detection items based on the returned results, and to generate a data comparison report based on the data comparison results.

[0036] To address the aforementioned technical problems, this application also provides a computer device that employs the following technical solution:

[0037] A computer device includes a memory and a processor, the memory storing computer-readable instructions, the processor executing the computer-readable instructions to implement the steps of the data comparison method described above.

[0038] To address the aforementioned technical problems, this application also provides a computer-readable storage medium, employing the technical solution described below:

[0039] A computer-readable storage medium storing computer-readable instructions that, when executed by a processor, implement the steps of the data comparison method described above.

[0040] Compared with the prior art, the embodiments of this application have the following main advantages:

[0041] The data comparison method disclosed in this application involves receiving a data comparison instruction carrying preset configuration information, configuring the parameters according to the preset configuration information to obtain configured parameters, including table information, data range, and project settings corresponding to different detection items; then generating SQL code corresponding to each detection item based on the table information, data range, and project settings; subsequently, performing data queries based on each SQL code to obtain the return result corresponding to each SQL code; thereby determining the data comparison result corresponding to each detection item based on the return results, and generating a data comparison report based on the data comparison results. This application converts the relevant information for executing the data comparison process between different reports into configuration parameters, and then converts the configuration parameters into SQL code, enabling data comparison to be achieved ultimately through the query results of the SQL code. This reduces labor and time costs, ensures no omissions during the data comparison process, facilitates the formation of a standardized data comparison process, improves data development efficiency, and achieves better results in data quality assurance. Attached Figure Description

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

[0043] Figure 1 This is an exemplary system architecture diagram to which this application can be applied;

[0044] Figure 2 This is a flowchart of an embodiment of the data comparison method according to this application;

[0045] Figure 3 This is a schematic diagram of the structure of an embodiment of the data comparison system according to this application;

[0046] Figure 4 This is a schematic diagram of the structure of one embodiment of the computer device according to this application. Detailed Implementation

[0047] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein in the specification of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "comprising" and "having," and any variations thereof, in the specification, claims, and foregoing drawings of this application, are intended to cover non-exclusive inclusion. The terms "first," "second," etc., in the specification, claims, or foregoing drawings of this application are used to distinguish different objects, not to describe a particular order.

[0048] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0049] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.

[0050] like Figure 1 As shown, system architecture 100 may include terminal devices 101, 102, and 103, a network 104, and a server 105. Network 104 serves as the medium for providing communication links between terminal devices 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.

[0051] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social media platform software, etc.

[0052] Terminal devices 101, 102, and 103 can be various electronic devices with displays and web browsing capabilities, including but not limited to smartphones, tablets, e-book readers, MP3 (Moving Picture Experts Group Audio Layer III) players, MP4 (Moving Picture Experts Group Audio Layer IV) players, laptops, and desktop computers, etc.

[0053] Server 105 can be a server that provides various services, such as a backend server that supports the pages displayed on terminal devices 101, 102, and 103.

[0054] It should be noted that the data comparison method provided in the embodiments of this application is generally executed by a terminal device, and correspondingly, the data comparison system is generally set in the terminal device.

[0055] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0056] Continue to refer to Figure 2 A flowchart of an embodiment of the data comparison method according to this application is shown. The data comparison method includes the following steps:

[0057] Step S201: When a data comparison instruction carrying preset configuration information is received, the configuration is performed according to the preset configuration information to obtain the configured parameters. The configured parameters include table information, data range, and project settings corresponding to different detection items.

[0058] In this embodiment, the data comparison method operates on an electronic device (e.g., Figure 1 The terminal device shown can send requests or receive commands via wired or wireless connections. It should be noted that the aforementioned wireless connection methods may include, but are not limited to, 3G / 4G / 5G connections, WiFi connections, Bluetooth connections, WiMAX connections, Zigbee connections, UWB (ultra-wideband) connections, and other currently known or future wireless connection methods.

[0059] In this embodiment, upon receiving a data comparison instruction carrying preset configuration information, the data comparison process can begin. Configuration is performed according to the preset configuration information to obtain configured parameters. These configured parameters include table information, data range, and item settings corresponding to different detection items. Specifically, in the fintech industry, data quality requirements are generally quite strict during data development. For example, bank apps, due to their involvement in citizens' personal property security, need to ensure data quality by comparing data between different reports for optimization. Running the data comparison method of this embodiment first requires receiving a data comparison instruction and obtaining the preset configuration information carried by the data comparison quality. This preset configuration information is manually pre-set and represents the user's data comparison requirements. Configuration is performed according to the preset configuration information to obtain configured parameters. These configured parameters at least include table information, data range, and item settings corresponding to the detection items between the reports used for data comparison. Assuming a data comparison is performed between two reports, then in the configured parameters… The table information includes basic information about the two reports, such as the database name and table name corresponding to the first and second reports, which can be used to determine the data source. The data range includes the range and limiting conditions of each data item in the two reports, such as the table partition, time range, and organization name range of the first and second reports, which can be used to limit subsequent data extraction to not exceed the data range of the two reports. The project settings corresponding to the detection items include various detection items that need to be compared with the data and their corresponding settings. For example, the primary key check item checks whether the primary key of the data table records is duplicated, and its project settings need to configure the primary key field name and other information. Another example is the dimension indicator value check item, which checks whether the results of each indicator value under the same dimension are consistent in the two reports, and its project settings need to configure the dimension field and indicator field separately.

[0060] Optionally, in addition to the parameters already configured above, you can also configure the engine for subsequent data query operations, such as MapReduce, Presto, Tez, etc.; and whether to enable SQL caching globally when encountering server-side duplicate submissions. This allows you to avoid errors based on various configurations and ensure the stability of data comparison.

[0061] Step S202: Generate SQL code corresponding to each detection item based on the table information, the data range, and the item settings;

[0062] In this embodiment, after obtaining the configured parameters, SQL code corresponding to each detection item can be generated based on the table information, data range, and project settings corresponding to different detection items in the configured parameters. Specifically, the table information includes the basic information of the two reports for data comparison, the data range includes the range and limiting conditions of each data item in the two reports for data comparison, and the project settings corresponding to different detection items include the detection items in the two reports that need to be compared and their corresponding settings. Therefore, based on the table information, data range, and project settings, SQL code corresponding to each detection item can be generated in the background for subsequent data querying.

[0063] Step S203: Perform data query based on each of the SQL codes to obtain the return result corresponding to each SQL code;

[0064] In this embodiment, after generating the SQL code corresponding to each detection item, data queries can be performed based on each SQL code, and the return result corresponding to each SQL code can be obtained. Specifically, in the current data comparison process, each detection item corresponds to an SQL code. After generating the SQL code corresponding to each detection item according to the configured parameters, each SQL code can be submitted to its corresponding database server for querying, and the query results output by the database server for each SQL code can be received as the return result corresponding to each SQL code.

[0065] Step S204: Based on the returned results, determine the data comparison result corresponding to each detection item, and generate a data comparison report based on the data comparison results.

[0066] In this embodiment, after obtaining the return result corresponding to each SQL code, the data comparison result corresponding to each detection item can be determined based on the return result, and a data comparison report can be generated based on the data comparison results. Specifically, since each SQL code corresponds to one detection item, the return result corresponding to each SQL code also has a corresponding relationship with its corresponding detection item. For the same detection item, the data comparison result between the two reports can be generated based on the return result, such as whether the primary key is duplicated, whether the data volume is consistent, etc. Finally, by summarizing the data comparison results, the data comparison report corresponding to the current data comparison process can be obtained. The data comparison report can include the data comparison results corresponding to each detection item, the location of abnormal detection items, and conclusions, and can also include process log information and the SQL code used for each inspection item, so that the data comparison report can be verified based on the above content.

[0067] This application converts information related to the data comparison process between different reports into configuration parameters, and then converts the configuration parameters into SQL code. This allows data comparison to be achieved through the query results of the SQL code, reducing the consumption of manpower and time costs, ensuring no omissions during the data comparison process, facilitating the formation of a standardized data comparison process, improving the efficiency of data development, and achieving better results in data quality assurance.

[0068] In some optional implementations of this embodiment, the step of querying data based on each of the SQL codes to obtain the return result corresponding to each SQL code includes:

[0069] Each SQL code is submitted to the corresponding database server for querying;

[0070] Receive the query results output by each of the database servers and use them as the return results for each of the database servers.

[0071] In this embodiment, after generating SQL code for each detection item based on the configured parameters including table information, data range, and item settings corresponding to different detection items, each SQL code can be submitted to the corresponding database server for querying, and the query results output by each database server can be received as the return result for each SQL code. Specifically, each SQL code corresponds to one detection item. After submitting an SQL code to its corresponding database server and executing the query command, the query result output by the database server can be obtained as the return result for that SQL code. Since the SQL code corresponds to one detection item, the data comparison result corresponding to that detection item can be determined based on the return result.

[0072] This application uses SQL code to query the database server and compares the data based on the query results. This eliminates the need for customized design scripts, reduces manpower and time costs, facilitates the formation of a standardized data comparison process, improves the efficiency of data development, and achieves better results in data quality assurance.

[0073] In some optional implementations of this embodiment, after the step of receiving the query results output by each of the database servers as the return results, the method further includes:

[0074] The submission information corresponding to each SQL code is recorded in the query log. The submission information includes the submission time, submission number, query record, and server feedback information.

[0075] Update the query results of each query to the query database.

[0076] In this embodiment, the SQL code corresponding to each detection item is submitted to its corresponding database server for querying. After obtaining the return results, the submission information for each SQL code can be recorded in the query log. This submission information may include the submission time, submission number, query record, and server feedback information. Simultaneously, the query results are updated in the query database. Specifically, to track the specific operations during the data comparison process, after submitting each SQL code to the database server for querying, its corresponding submission information can be recorded in the query log. This submission information may include the time, submission number, query record, and server feedback information. Furthermore, the SQL code and its corresponding return results can be updated in the query database for later review.

[0077] This application records the submission information and return results of each SQL code during the data comparison process, ensuring that each specific operation can be tracked subsequently, reducing the risk of errors, facilitating the formation of a standardized data comparison process, and achieving better results in data quality assurance.

[0078] In some optional implementations of this embodiment, after the step of querying data according to each of the SQL codes and obtaining the return result corresponding to each SQL code, the method further includes:

[0079] The returned results are parsed to determine if any anomalies exist;

[0080] If the aforementioned abnormal situation exists, the corresponding processing procedure will be executed for the abnormal situation.

[0081] In this embodiment, after querying data according to each SQL code and obtaining the return result corresponding to each SQL code, it is necessary to parse each return result to determine whether there are any anomalies. If an anomaly is found, the corresponding processing procedure is executed. For example, anomalies may include memory constraints and server fluctuations. In the case of memory constraints, the query process that caused the anomaly can be broken down into multiple executions, and the results of the multiple executions can be concatenated to obtain the normal return result. In the case of server fluctuations, the query process that caused the anomaly can be repeatedly executed until a normal return result is obtained. In addition, in other anomalies, anomaly information can be generated and returned to notify relevant personnel for manual handling.

[0082] This application analyzes the query results of SQL code to determine if there are any anomalies. If anomalies are found, they are handled promptly, ensuring that no omissions occur during the data comparison process. This facilitates the formation of a standardized data comparison process, improves the efficiency of data development, and achieves better results in data quality assurance.

[0083] In some optional implementations of this embodiment, the above-mentioned abnormal situation includes a memory-limited exception. If such an abnormal situation exists, the steps for performing the corresponding processing flow for the abnormal situation include:

[0084] If the abnormal situation is a memory-limited abnormal situation, then the first SQL code corresponding to the abnormal situation is determined, and the first SQL code is decomposed according to preset indicators to obtain multiple sub-codes;

[0085] Data is queried based on each of the sub-codes to obtain the secondary result corresponding to each sub-code;

[0086] The various secondary results are concatenated to obtain the return result corresponding to the first SQL code.

[0087] In this embodiment, when parsing the returned results, if an anomaly exists, and the anomaly is a memory-limited anomaly, it is necessary to determine the first SQL code corresponding to the anomaly. This first SQL code is then decomposed into multiple sub-codes based on preset indicators. Data queries are then performed based on each sub-code to obtain secondary results for each sub-code. These secondary results are then concatenated to obtain the returned result corresponding to the first SQL code. Specifically, a memory-limited anomaly represents process termination due to excessively large data during the query or exceeding the memory limit. Therefore, it is necessary to determine the SQL code that caused this anomaly as the first SQL code. This code is then decomposed into multiple sub-codes based on preset indicators from multiple dimensions. Querying is then performed based on these sub-codes, and the query results corresponding to each sub-code are concatenated to obtain the returned result obtained by the first SQL code. This returned result is the normal result obtained after the anomaly handling is completed.

[0088] This application addresses potential memory-constrained anomalies by breaking down large datasets before querying them during the data comparison process. This ensures no data is missed during comparison, facilitates a standardized data comparison workflow, improves data development efficiency, and achieves better data quality assurance.

[0089] In some optional implementations of this embodiment, the above-mentioned abnormal situations also include server fluctuation abnormalities and other abnormalities. If such abnormal situations exist, the steps for performing the corresponding processing flow for such abnormal situations include:

[0090] If the abnormal situation is a server fluctuation abnormality, then determine the second SQL code corresponding to the abnormal situation, and re-query the data according to the second SQL code to obtain the return result corresponding to the second SQL code;

[0091] If the abnormal situation is another abnormal situation, then a corresponding abnormal prompt message is generated according to the abnormal situation, and the abnormal prompt message is recorded.

[0092] In this embodiment, when parsing each returned result, if an anomaly exists, and the anomaly is a server fluctuation anomaly, the corresponding second SQL code is determined, and the data query is performed again based on the second SQL code to obtain the returned result corresponding to the second SQL code. If an anomaly exists, and the anomaly is another type of anomaly, a corresponding anomaly message is generated based on the anomaly, and the anomaly message is recorded. Specifically, if the anomaly is a server fluctuation anomaly, the SQL code that caused the anomaly can be determined as the second SQL code, and then the second SQL code is automatically resubmitted for querying to obtain the returned result corresponding to the second SQL code. This returned result is the normal result obtained after the anomaly is handled. If the anomaly is neither a memory limitation anomaly nor a server fluctuation anomaly, but belongs to another type of anomaly, a corresponding anomaly message can be generated based on the anomaly and recorded to notify relevant personnel for manual handling.

[0093] This application addresses server fluctuations and other anomalies during data comparison, ensuring no omissions occur. This facilitates a standardized data comparison process, improves data development efficiency, and achieves better data quality assurance.

[0094] In some optional implementations of this embodiment, after the steps of determining the data comparison result corresponding to each detection item based on the returned results and generating a data comparison report based on the returned results, the method further includes:

[0095] Update the data comparison report to the comparison results database;

[0096] Upon receiving a report display instruction corresponding to the data comparison report, the data comparison report is extracted from the comparison result database and displayed on the front-end page.

[0097] In this embodiment, after generating a data comparison report based on the various data comparison results, the data comparison report can be updated to the comparison result database. Then, when a report display instruction corresponding to the data comparison report is received, the data comparison report can be retrieved from the comparison result database and displayed on the front-end page. Specifically, each SQL code corresponds to a detection item. Based on the return results of each SQL code, data comparison results corresponding to each detection item can be generated, and then summarized into a data comparison report corresponding to the current data comparison process. This data comparison report is updated to the comparison result database, so that when a report needs to be displayed later, it can be retrieved from the comparison result database and displayed on the front-end page.

[0098] This application updates the final data comparison report to the comparison results database, allowing for easy review of the data comparison process at any time. This reduces labor and time costs, facilitates the formation of a standardized data comparison process, and improves the efficiency of data development.

[0099] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing related hardware with computer-readable instructions. These computer-readable instructions can be stored in a computer-readable storage medium. When executed, the program can include the processes of the embodiments of the above methods. The aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, optical disk, or read-only memory (ROM), or random access memory (RAM).

[0100] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.

[0101] Further reference Figure 3 As a response to the above Figure 2 The implementation of the method shown in this application provides an embodiment of a data comparison system, which is similar to... Figure 2 Corresponding to the method embodiments shown, the system can be specifically applied to various electronic devices.

[0102] like Figure 3 As shown, the data comparison system 300 described in this embodiment includes: a configuration module 301, a code generation module 302, a query module 303, and a determination module 304. Wherein:

[0103] Configuration module 301 is used to configure according to the preset configuration information when receiving a data comparison instruction carrying preset configuration information, and obtain configured parameters. The configured parameters include table information, data range and item settings corresponding to different detection items.

[0104] The code generation module 302 is used to generate SQL code corresponding to each detection item based on the table information, the data range, and the item settings.

[0105] The query module 303 is used to perform data queries based on each of the SQL codes and obtain the return result corresponding to each of the SQL codes;

[0106] The determination module 304 is used to determine the data comparison result corresponding to each of the detection items based on the returned results, and to generate a data comparison report based on the data comparison results.

[0107] The data comparison system provided in this application converts the relevant information of the data comparison process between different reports into configuration parameters, and then converts the configuration parameters into SQL code. This allows the data comparison to be achieved through the query results of the SQL code, reducing the consumption of manpower and time costs, ensuring that no omissions occur during the data comparison process, facilitating the formation of a standardized data comparison process, improving the efficiency of data development, and achieving better results in data quality assurance.

[0108] In some optional implementations of this embodiment, the query module 303 is further configured to:

[0109] Each SQL code is submitted to the corresponding database server for querying;

[0110] Receive the query results output by each of the database servers and use them as the return results for each of the database servers.

[0111] The data comparison system provided in this application performs queries on the database server using SQL code and compares the data based on the query results. This eliminates the need for customized design scripts, reducing manpower and time costs, facilitating the formation of a standardized data comparison process, improving data development efficiency, and achieving better results in data quality assurance.

[0112] In some optional implementations of this embodiment, the data comparison system 300 is also used for:

[0113] The submission information corresponding to each SQL code is recorded in the query log. The submission information includes the submission time, submission number, query record, and server feedback information.

[0114] Update the query results of each query to the query database.

[0115] The data comparison system provided in this application records the submission information and return results corresponding to each SQL code during the data comparison process, ensuring that each specific operation can be tracked subsequently, reducing the risk of errors, facilitating the formation of a standardized data comparison process, and achieving better results in data quality assurance.

[0116] In some optional implementations of this embodiment, the data comparison system 300 is also used for:

[0117] The returned results are parsed to determine if any anomalies exist;

[0118] If the aforementioned abnormal situation exists, the corresponding processing procedure will be executed for the abnormal situation.

[0119] The data comparison system provided in this application analyzes the query results of SQL code to determine if there are any anomalies. If anomalies are found, they are dealt with in a timely manner, ensuring that no omissions occur during the data comparison process. This facilitates the formation of a standardized data comparison process, improves the efficiency of data development, and achieves better results in data quality assurance.

[0120] In some optional implementations of this embodiment, the above-mentioned abnormal conditions include memory-limited exceptions, and the data comparison system 300 is further used for:

[0121] If the abnormal situation is a memory-limited abnormal situation, then the first SQL code corresponding to the abnormal situation is determined, and the first SQL code is decomposed according to preset indicators to obtain multiple sub-codes;

[0122] Data is queried based on each of the sub-codes to obtain the secondary result corresponding to each sub-code;

[0123] The various secondary results are concatenated to obtain the return result corresponding to the first SQL code.

[0124] The data comparison system provided in this application solves the problem of possible anomalies caused by memory limitations by decomposing large datasets before querying them during the data comparison process. This ensures that no data is missed during the comparison process, facilitates the formation of a standardized data comparison process, improves the efficiency of data development, and achieves better results in data quality assurance.

[0125] In some optional implementations of this embodiment, the aforementioned abnormal situations also include server fluctuation abnormalities and other abnormalities, and the data comparison system 300 is further used for:

[0126] If the abnormal situation is a server fluctuation abnormality, then determine the second SQL code corresponding to the abnormal situation, and re-query the data according to the second SQL code to obtain the return result corresponding to the second SQL code;

[0127] If the abnormal situation is another abnormal situation, then a corresponding abnormal prompt message is generated according to the abnormal situation, and the abnormal prompt message is recorded.

[0128] The data comparison system provided in this application ensures that no data is missed during the comparison process by handling server fluctuations and other anomalies. This facilitates the formation of a standardized data comparison process, improves the efficiency of data development, and achieves better results in data quality assurance.

[0129] In some optional implementations of this embodiment, the data comparison system 300 is also used for:

[0130] Update the data comparison report to the comparison results database;

[0131] Upon receiving a report display instruction corresponding to the data comparison report, the data comparison report is extracted from the comparison result database and displayed on the front-end page.

[0132] The data comparison system provided in this application updates the final data comparison report to the comparison result database, allowing for real-time viewing of the results of the data comparison process. This reduces labor and time costs, facilitates the formation of a standardized data comparison process, and improves the efficiency of data development.

[0133] To address the aforementioned technical problems, embodiments of this application also provide a computer device. Please refer to [link / reference needed]. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.

[0134] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected via a system bus. It should be noted that only the computer device 4 with components 41-43 is shown in the figure; however, it should be understood that it is not required to implement all the shown components, and more or fewer components can be implemented alternatively. Those skilled in the art will understand that the computer device described here is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.

[0135] The computer device can be a desktop computer, laptop, handheld computer, or cloud server, etc. The computer device can interact with the user via a keyboard, mouse, remote control, touchpad, or voice control.

[0136] The memory 41 includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 41 may be an internal storage unit of the computer device 4, such as the hard disk or memory of the computer device 4. In other embodiments, the memory 41 may also be an external storage device of the computer device 4, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device 4. Of course, the memory 41 may include both the internal storage unit and its external storage device of the computer device 4. In this embodiment, the memory 41 is typically used to store the operating system and various application software installed on the computer device 4, such as computer-readable instructions for data comparison methods. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or will be output.

[0137] In some embodiments, the processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip. The processor 42 is typically used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to execute computer-readable instructions stored in the memory 41 or to process data, such as executing computer-readable instructions for the data comparison method.

[0138] The network interface 43 may include a wireless network interface or a wired network interface, which is typically used to establish communication connections between the computer device 4 and other electronic devices.

[0139] The computer equipment provided in this application converts relevant information about the data comparison process between different reports into configuration parameters, and then converts the configuration parameters into SQL code. This enables data comparison to be achieved through the query results of the SQL code, reducing the consumption of manpower and time costs, ensuring that no omissions occur during the data comparison process, facilitating the formation of a standardized data comparison process, improving the efficiency of data development, and achieving better results in data quality assurance.

[0140] This application also provides another embodiment, namely, providing a computer-readable storage medium storing computer-readable instructions that can be executed by at least one processor to cause the at least one processor to perform the steps of the data comparison method described above.

[0141] The computer-readable storage medium provided in this application converts information related to the data comparison process between different reports into configuration parameters, and then converts the configuration parameters into SQL code. This enables data comparison to be achieved through the query results of the SQL code, reducing the consumption of manpower and time costs, ensuring that no omissions occur during the data comparison process, facilitating the formation of a standardized data comparison process, improving the efficiency of data development, and achieving better results in data quality assurance.

[0142] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0143] Obviously, the embodiments described above are only some embodiments of this application, not all embodiments. The accompanying drawings show preferred embodiments of this application, but do not limit the patent scope of this application. This application can be implemented in many different forms; rather, the purpose of providing these embodiments is to provide a more thorough and comprehensive understanding of the disclosure of this application. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing specific embodiments, or make equivalent substitutions for some of the technical features. Any equivalent structures made using the content of this application's specification and drawings, directly or indirectly applied to other related technical fields, are similarly within the scope of patent protection of this application.

Claims

1. A data comparison method, characterized in that, Includes the following steps: When a data comparison instruction carrying preset configuration information is received, the configuration is performed according to the preset configuration information to obtain the configured parameters. The configured parameters include table information, data range, and project settings corresponding to different detection items. Based on the table information, the data range, and the project settings, generate SQL code corresponding to each detection project; Perform data queries based on each of the SQL codes to obtain the return results corresponding to each SQL code; Based on the returned results, determine the data comparison result corresponding to each of the detection items, and generate a data comparison report based on the data comparison results. After the step of querying data according to each of the SQL codes and obtaining the return result corresponding to each SQL code, the method further includes: The returned results are parsed to determine if any anomalies exist; If the abnormal situation is a memory-limited abnormality, then the SQL code that caused the abnormal situation is determined, and the SQL code is taken as the first SQL code. The first SQL code is decomposed from multiple dimensions according to preset indicators to obtain multiple sub-codes. The memory-limited abnormality indicates that the data is too large during the query, causing the process to terminate or exceeding the memory limit. Data is queried based on each of the sub-codes to obtain the secondary result corresponding to each sub-code; The various secondary results are concatenated to obtain the return result corresponding to the first SQL code.

2. The data comparison method according to claim 1, characterized in that, The step of querying data based on each of the SQL codes and obtaining the return result corresponding to each SQL code specifically includes: Each SQL code is submitted to the corresponding database server for querying; Receive the query results output by each of the database servers and use them as the return results for each of the database servers.

3. The data comparison method according to claim 2, characterized in that, After the step of receiving the query results output by each of the database servers as the respective return results, the method further includes: The submission information corresponding to each SQL code is recorded in the query log. The submission information includes the submission time, submission number, query record, and server feedback information. Update the query results of each query to the query database.

4. The data comparison method according to claim 1, characterized in that, The abnormal situations also include server fluctuation abnormalities and other abnormalities. If any of the above abnormal situations exist, the corresponding handling procedures will be executed for the abnormal situations, specifically including: If the abnormal situation is a server fluctuation abnormality, then determine the second SQL code corresponding to the abnormal situation, and re-query the data according to the second SQL code to obtain the return result corresponding to the second SQL code; If the abnormal situation is another abnormal situation, then a corresponding abnormal prompt message is generated according to the abnormal situation, and the abnormal prompt message is recorded.

5. The data comparison method according to any one of claims 1 to 4, characterized in that, After the steps of determining the data comparison result corresponding to each detection item based on the returned results, and generating a data comparison report based on the data comparison results, the method further includes: Update the data comparison report to the comparison results database; Upon receiving a report display instruction corresponding to the data comparison report, the data comparison report is extracted from the comparison result database and displayed on the front-end page.

6. A data comparison system, characterized in that, include: The configuration module is used to configure according to the preset configuration information when it receives a data comparison instruction carrying preset configuration information, and obtain the configured parameters. The configured parameters include table information, data range, and project settings corresponding to different detection items. The code generation module is used to generate SQL code corresponding to each detection item based on the table information, the data range, and the project settings. The query module is used to perform data queries based on each of the SQL codes and obtain the return results corresponding to each SQL code. The determination module is used to determine the data comparison result corresponding to each of the detection items based on the returned results, and to generate a data comparison report based on the data comparison results. The data comparison system is further used to parse each of the returned results to determine whether there are any abnormalities. If the abnormality is a memory-limited exception, the SQL code that caused the abnormality is identified, and the SQL code is used as the first SQL code. The first SQL code is then decomposed from multiple dimensions according to preset indicators to obtain multiple sub-codes. The memory-limited exception indicates that the data is too large during the query, causing the query to terminate or exceeding the memory limit. Data is queried according to each sub-code to obtain the secondary result corresponding to each sub-code. The secondary results are then concatenated to obtain the returned result corresponding to the first SQL code.

7. A computer device, characterized in that, The method includes a memory and a processor, wherein the memory stores computer-readable instructions, and the processor executes the computer-readable instructions to implement the steps of the data comparison method as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the steps of the data comparison method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Self-service real-time data comparison method and system based on MPP database

    CN115982278A

  • Data verification method and device, electronic equipment and storage medium

    CN116108017A