CN117076485A - Data comparison method, system, computer equipment and storage medium - Google Patents

Data comparison method, system, computer equipment and storage medium Download PDF

Info

Publication number
CN117076485A
CN117076485A CN202311177816.7A CN202311177816A CN117076485A CN 117076485 A CN117076485 A CN 117076485A CN 202311177816 A CN202311177816 A CN 202311177816A CN 117076485 A CN117076485 A CN 117076485A
Authority
CN
China
Prior art keywords
data
data comparison
query
sql code
sql
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311177816.7A
Other languages
Chinese (zh)
Inventor
张涵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Property and Casualty Insurance Company of China Ltd
Original Assignee
Ping An Property and Casualty Insurance Company of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Property and Casualty Insurance Company of China Ltd filed Critical Ping An Property and Casualty Insurance Company of China Ltd
Priority to CN202311177816.7A priority Critical patent/CN117076485A/en
Publication of CN117076485A publication Critical patent/CN117076485A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2433Query languages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2358Change logging, detection, and notification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the application belongs to the field of data processing and financial science and technology, and relates to a data comparison method, which comprises the following steps: when a data comparison instruction carrying preset configuration information is received, configuring according to the preset configuration information to obtain configured parameters, wherein the configured parameters comprise table information, data ranges and item settings corresponding to different detection items; according to the table information, the data range and the item setting, generating SQL codes corresponding to each detection item; performing data query according to each SQL code to obtain a return result corresponding to each SQL code; and determining a data comparison result corresponding to each detection item according to each returned result, and generating a data comparison report according to each data comparison result. The application also provides a data comparison system, computer equipment and a storage medium. The application improves the data development efficiency and reduces the consumption of labor cost and time cost.

Description

Data comparison method, system, computer equipment and storage medium
Technical Field
The application relates to the field of data processing and financial science and technology, which is applied to the scene of data comparison among different data reports in the related industry of financial science and technology, in particular to a data comparison method, system computer equipment and storage medium.
Background
Currently, in the related industries of financial science and technology, requirements on various aspects of data, particularly quality, are strict. In the process of developing data according to data requirements, new fields, deletion and modification of existing reports are often required, or new reports are developed based on the same fields.
In addition, in order to improve the data query efficiency, a redundant data manner is generally adopted to ensure that data can be queried through reports with different purposes or different dimensions. However, due to the change of the caliber of the data, the realization logic and the task sequence, the data of the same index in different reports can be changed or adjusted, and the situation that the data cannot be corresponded to each other occurs. Therefore, data comparison is needed to determine the data empty rate, the primary key repetition degree, whether the data quantity is matched, whether all records are consistent, and the like of the two reports so as to ensure the data quality.
Data comparison is a serious problem in the data development process, a traditional data comparison mode generally needs customized design scripts, labor cost and time cost which are required to be consumed are high, inspection projects are increased gradually along with the increase of requirements, omission is easy to occur, and standardized flows are difficult to form to ensure data quality.
Disclosure of Invention
The embodiment of the application aims to provide a data comparison method, a system, computer equipment and a storage medium, so as to solve the technical problems of high labor cost and time cost consumed by data comparison through customized design scripts.
In order to solve the above technical problems, the embodiment of the present application provides a data comparison method, which adopts the following technical scheme:
when a data comparison instruction carrying preset configuration information is received, configuring according to the preset configuration information to obtain configured parameters, wherein the configured parameters comprise table information, data ranges and item settings corresponding to different detection items;
according to the table information, the data range and the item setting, generating SQL codes corresponding to each detection item;
performing data query according to each SQL code to obtain a return result corresponding to each SQL code;
and determining a data comparison result corresponding to each detection item according to each returned result, and generating a data comparison report according to each data comparison result.
Further, the step of performing data query according to each SQL code to obtain a returned result corresponding to each SQL code specifically includes:
Submitting each SQL code to a corresponding database server for inquiry;
and receiving the query results output by the database servers as the returned results.
Further, after the step of receiving the query results output by the database servers as the returned results, the method further includes:
recording the submitted information corresponding to each SQL code to a query log, wherein the submitted information comprises the submitted time, the submitted number, the query record and server feedback information;
and updating each query result to a query database.
Further, after the step of performing data query according to each SQL code to obtain a returned result corresponding to each SQL code, the method further includes:
analyzing each returned result, and determining whether an abnormal condition exists;
and if the abnormal condition exists, executing a corresponding processing flow aiming at the abnormal condition.
Further, the abnormal condition includes a memory-limited abnormality, and if the abnormal condition exists, executing a step of a corresponding processing flow for the abnormal condition, specifically including:
If the abnormal condition is a memory limited abnormality, determining a first SQL code corresponding to the abnormal condition, and disassembling the first SQL code according to a preset index to obtain a plurality of subcodes;
performing data query according to each subcode to obtain a secondary result corresponding to each subcode;
and splicing the secondary results to obtain a return result corresponding to the first SQL code.
Further, the abnormal situation further includes server fluctuation abnormality and other abnormalities, and if the abnormal situation exists, executing a step of a corresponding processing flow for the abnormal situation, specifically including:
if the abnormal condition is server fluctuation abnormality, determining a second SQL code corresponding to the abnormal condition, and carrying out data query again according to the second SQL code to obtain a return result corresponding to the second SQL code;
and if the abnormal condition is other abnormal conditions, generating corresponding abnormal prompt information according to the abnormal condition, and recording the abnormal prompt information.
Further, after the step of determining the data comparison result corresponding to each detection item according to each returned result and generating the data comparison report according to each data comparison result, the method further includes:
Updating the data comparison report to a comparison result database;
and when a report display instruction corresponding to the data comparison report is received, extracting the data comparison report from the comparison result database, and displaying the data comparison report on a front-end page.
In order to solve the above technical problems, the embodiment of the present application further provides a data comparison system, which adopts the following technical scheme:
a data comparison system, comprising:
the configuration module is used for carrying out configuration according to preset configuration information when receiving a data comparison instruction carrying the preset configuration information to obtain configured parameters, wherein the configured parameters comprise table information, data ranges and item settings corresponding to different detection items;
the code generation module is used for generating SQL codes corresponding to each detection item according to the table information, the data range and the item setting;
the query module is used for carrying out data query according to each SQL code to obtain a return result corresponding to each SQL code;
and the determining module is used for determining the data comparison result corresponding to each detection item according to each returned result and generating a data comparison report according to each data comparison result.
In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical schemes:
a computer device comprising a memory having stored therein computer readable instructions which when executed by a processor implement the steps of the data comparison method as described above.
In order to solve the above technical problems, an embodiment of the present application further provides a computer readable storage medium, which adopts the following technical schemes:
a computer readable storage medium having stored thereon computer readable instructions which when executed by a processor implement the steps of a data comparison method as described above.
Compared with the prior art, the embodiment of the application has the following main beneficial effects:
according to the data comparison method disclosed by the application, when a data comparison instruction carrying preset configuration information is received, the data comparison instruction is configured according to the preset configuration information to obtain configured parameters, wherein the configured parameters comprise table information, data ranges and item settings corresponding to different detection items; then according to the table information, the data range and the item setting, generating SQL codes corresponding to each detection item; then, carrying out data query according to each SQL code to obtain a return result corresponding to each SQL code; and determining a data comparison result corresponding to each detection item according to each returned result, and generating a data comparison report according to each data comparison result. According to the application, the related information of the data comparison flow executed between different reports is converted into the configuration parameters, and then the configuration parameters are converted into the SQL codes, so that the data comparison can be realized through the query result of the SQL codes, the consumption of labor cost and time cost is reduced, omission in the data comparison process is ensured, the standardized data comparison flow is favorably formed, the data development efficiency is improved, and a better effect is achieved in the aspect of data quality guarantee.
Drawings
In order to more clearly illustrate the solution of the present application, a brief description will be given below of the drawings required for the description of the embodiments of the present application, it being apparent that the drawings in the following description are some embodiments of the present application, and that other drawings may be obtained from these drawings without the exercise of inventive effort for a person of ordinary skill in the art.
FIG. 1 is an exemplary system architecture diagram in which the present application may be applied;
FIG. 2 is a flow chart of one embodiment of a data comparison method according to the present application;
FIG. 3 is a schematic diagram of one embodiment of a data comparison system in accordance with the present application;
FIG. 4 is a schematic structural diagram of one embodiment of a computer device in accordance with the present application.
Detailed Description
Unless defined otherwise, 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 belongs; the terminology used in the description of the applications herein 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 description of the application and the claims and the description of the drawings above are intended to cover a non-exclusive inclusion. The terms first, second and the like in the description and in the claims or in the above-described figures, are used for distinguishing between different objects and not necessarily for describing a sequential or chronological order.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
In order to make the person skilled in the art better understand the solution of the present application, the technical solution of the embodiment of the present application will be clearly and completely described below with reference to the accompanying drawings.
As shown in fig. 1, a system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium to provide communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may interact with the server 105 via the network 104 using the terminal devices 101, 102, 103 to receive or send messages or the like. Various communication client applications, such as a web browser application, a shopping class application, a search class application, an instant messaging tool, a mailbox client, social platform software, etc., may be installed on the terminal devices 101, 102, 103.
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablet computers, electronic book readers, MP3 (Moving Picture Experts Group Audio Layer III, moving picture experts compression standard audio layer 3) players, MP4 (Moving Picture Experts Group Audio Layer IV, moving picture experts compression standard audio layer 4) players, laptop and desktop computers, and the like.
The server 105 may be a server providing various services, such as a background server providing support for pages displayed on the terminal devices 101, 102, 103.
It should be noted that, the data comparison method provided in the embodiment of the present application is generally executed by the terminal device, and accordingly, the data comparison system is generally set in the terminal device.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to FIG. 2, a flow chart of one embodiment of a data comparison method in accordance with the present application is shown. The data comparison method comprises the following steps:
Step S201, when a data comparison instruction carrying preset configuration information is received, configuring according to the preset configuration information to obtain configured parameters, wherein the configured parameters comprise table information, data ranges and item settings corresponding to different detection items;
in this embodiment, the electronic device (for example, the terminal device shown in fig. 1) on which the data comparison method operates may send the request or receive the instruction through a wired connection manner or a wireless connection manner. It should be noted that the wireless connection may include, but is not limited to, 3G/4G/5G connection, wiFi connection, bluetooth connection, wiMAX connection, zigbee connection, UWB (ultra wideband) connection, and other now known or later developed wireless connection.
In this embodiment, when a data comparison instruction carrying preset configuration information is received, the data comparison process may be started to be executed, and configuration is performed according to the preset configuration information to obtain configured parameters, where the configured parameters include table information, a data range, and item settings corresponding to different detection items. Specifically, in the related industry of finance technology, the requirements on data quality are generally strict when data development is performed, for example, APP of each big bank is related to personal property safety of citizens, so that data quality needs to be guaranteed, data comparison is performed between different reports, and optimization is performed, the data comparison method of the embodiment is operated, first, a data comparison instruction needs to be accepted, preset configuration information carried by the data comparison quality is obtained, the preset configuration information is preset by personnel, the preset configuration information represents the data comparison requirement proposed by a user, configuration can be performed according to the preset configuration information, configured parameters are obtained, the configured parameters at least comprise table information between the reports used for data comparison, a data range and item settings corresponding to detection items, and if data comparison is performed between the two reports, the table information comprises basic information of the two reports, such as information of a first report, a data base name corresponding to the second report, a data table name and the like, and the configured parameters can be used for determining a data source; the data range comprises the range and limiting conditions of each item of data in the two reports, such as the information of the table partitions, the time ranges, the mechanism name ranges and the like of the first report and the second report, and can be used for limiting the subsequent data extraction not to exceed the data ranges of the two reports; the item setting corresponding to the detection item comprises detection items and corresponding settings, wherein the detection items need to be subjected to data comparison, such as a primary key detection item, namely, whether a primary key recorded by a data table is repeated is checked, information such as a primary key field name is required to be configured in the item setting, and a dimension index value detection item, namely, whether results of all index values in two reports are consistent in the same dimension is checked, and the dimension field and the index field are required to be configured in the item setting.
Optionally, in addition to the above configured parameters, an engine that performs a data query operation later may be configured, such as MapReduce, presto, tez; and whether SQL caching is started to perform global configuration when the server exception is repeatedly submitted. So that errors can be avoided according to various configurations, and stability of data comparison is ensured.
Step S202, according to the table information, the data range and the item setting, generating SQL codes corresponding to each detection item;
in this embodiment, after the configured parameters are obtained, the SQL code corresponding to each detection item may be generated according to table information, data ranges and item settings corresponding to different detection items in the configured parameters. Specifically, the table information includes basic information of two reports for data comparison, the data range includes ranges and limiting conditions of various data in the two reports for data comparison, and the item settings corresponding to different detection items include detection items and corresponding settings of various items to be subjected to data comparison in the two reports, so that SQL codes corresponding to each detection item can be generated in the background according to the table information, the data range and the item settings for subsequent data query.
Step 203, performing data query according to each SQL code to obtain a return result corresponding to each SQL code;
in this embodiment, after the SQL codes corresponding to each detection item are generated, data query may be performed according to each SQL code, and a return result corresponding to each SQL code may be obtained. Specifically, in the current data comparison process, each detection item corresponds to an SQL code, after the SQL code corresponding to each detection item is generated according to the configured parameters, each SQL code can be submitted to a corresponding database server for inquiry, and an inquiry result output by the database server for each SQL code is received and used as a return result corresponding to each SQL code.
And step S204, determining a data comparison result corresponding to each detection item according to each returned result, and generating a data comparison report according to each data comparison result.
In this embodiment, after the return result corresponding to each SQL code is obtained, the data comparison result corresponding to each detection item may be determined according to each return result, and a data comparison report may be generated according to each data comparison result. Specifically, since each SQL code corresponds to one detection item, the returned result corresponding to each SQL code has a corresponding relation with the detection item corresponding to each SQL code, and for the same detection item, a data comparison result between two reports, such as whether a primary key is repeated, whether the data amount is consistent, etc., can be generated according to the returned result, and finally, each data comparison result is summarized to obtain a data comparison report corresponding to the current data comparison process, where the data comparison report may include the data comparison result corresponding to each detection item, the location and conclusion of an abnormal detection item, etc., and may further include contents such as flow log information and SQL code adopted by each detection item, so that the data comparison report may be verified according to the contents.
According to the application, the related information of the data comparison flow executed between different reports is converted into the configuration parameters, and then the configuration parameters are converted into the SQL codes, so that the data comparison can be realized through the query result of the SQL codes, the consumption of labor cost and time cost is reduced, omission in the data comparison process is ensured, the standardized data comparison flow is favorably formed, the data development efficiency is improved, and a better effect is achieved in the aspect of data quality guarantee.
In some optional implementations of this embodiment, the step of obtaining the returned result corresponding to each SQL code includes:
submitting each SQL code to a corresponding database server for inquiry;
and receiving the query results output by the database servers as the returned results.
In this embodiment, according to table information, data ranges and item settings corresponding to different detection items included in the configured parameters, after generating an SQL code corresponding to each detection item, each SQL code may be submitted to a corresponding database server to perform a query, and a query result output by each database server is received as a return result corresponding to each SQL code. Specifically, each SQL code corresponds to one detection item, one SQL code is submitted to the corresponding database server, and after a query command is executed, a query result output by the database server can be obtained, and as a return result corresponding to the SQL code, the SQL code corresponds to one detection item, and then a data comparison result corresponding to the detection item can be determined according to the return result.
According to the application, the SQL codes are used for inquiring in the database server, and the data comparison is realized through the obtained inquiry result, so that customized design scripts are not needed, the consumption of labor cost and time cost is reduced, the standardized data comparison flow is formed, the data development efficiency is improved, and a better effect is achieved in the aspect of data quality guarantee.
In some optional implementations of this embodiment, after the step of receiving the query result output by each database server as each return result, the method further includes:
recording the submitted information corresponding to each SQL code to a query log, wherein the submitted information comprises the submitted time, the submitted number, the query record and server feedback information;
and updating each query result to a query database.
In this embodiment, the SQL code corresponding to each detection item is submitted to the corresponding database server to perform query, and after each return result is obtained, the submitted information corresponding to each SQL code may also be recorded to the query log, where the submitted information may include the submitted time, the submitted number, the query record, and the server feedback information, and at the same time, each query result is updated to the query database. Specifically, in order to track each specific operation in the data comparison process subsequently, after each SQL code is submitted to the database server for query, the corresponding submitted information may be recorded to the query log, where the submitted information may include time, a submitted number, a query record, server feedback information, and the like, and the SQL code and the corresponding returned result may also be updated to the query database for subsequent viewing.
According to the application, the submitted information and the returned result corresponding to each SQL code are recorded in the data comparison process, so that each specific operation can be tracked later, the risk in error is reduced, a standardized data comparison flow is formed, and a better effect is achieved in the aspect of data quality assurance.
In some optional implementations of this embodiment, after the step of performing the data query according to each SQL code to obtain the returned result corresponding to each SQL code, the method further includes:
analyzing each returned result, and determining whether an abnormal condition exists;
and if the abnormal condition exists, executing a corresponding processing flow aiming at the abnormal condition.
In this embodiment, after data query is performed according to each SQL code to obtain a return result corresponding to each SQL code, each return result needs to be parsed to determine whether an abnormal condition exists, if so, a corresponding processing flow is executed for the abnormal condition, for example, the abnormal condition may include memory limitation, server fluctuation, and the like, in the case of memory limitation, the query process generating the abnormality may be disassembled, and the disassembly may be completed in multiple times, and then the completed results are spliced to obtain a normal return result; under the condition of server fluctuation, the abnormal inquiry process can be repeatedly executed until a normal return result is obtained; in addition, in other abnormal situations, abnormal information may be generated and returned to notify the relevant personnel to perform manual processing.
According to the method, the query result of the SQL code is analyzed to determine whether the abnormal condition exists, if so, the abnormal condition is processed in time, so that omission is avoided in the data comparison process, a standardized data comparison flow is formed, the data development efficiency is improved, and a better effect is achieved in the aspect of data quality assurance.
In some optional implementations of this embodiment, the abnormal situation includes a memory-limited abnormality, and if the abnormal situation exists, executing the corresponding processing procedure for the abnormal situation includes:
if the abnormal condition is a memory limited abnormality, determining a first SQL code corresponding to the abnormal condition, and disassembling the first SQL code according to a preset index to obtain a plurality of subcodes;
performing data query according to each subcode to obtain a secondary result corresponding to each subcode;
and splicing the secondary results to obtain a return result corresponding to the first SQL code.
In this embodiment, when analyzing each returned result, if there is an abnormal condition, and the abnormal condition is a memory-limited abnormality, it is necessary to determine a first SQL code corresponding to the abnormal condition, disassemble the first SQL code according to a preset index to obtain a plurality of subcodes, then perform data query according to each subcode to obtain a secondary result corresponding to each subcode, and splice each secondary result to obtain a returned result corresponding to the first SQL code. Specifically, the abnormal condition is a memory limited abnormality, which represents that a process caused by oversized data is terminated or exceeds the upper limit of the memory, and the like, so that an SQL code generating the abnormality needs to be determined as a first SQL code, then the SQL code is disassembled from multiple dimensions according to a preset index to obtain multiple subcodes, then the subcodes are queried according to the multiple subcodes, and query results corresponding to the subcodes are spliced, so that a return result obtained by the first SQL code is obtained, and the return result is a normal result obtained after the abnormal condition is processed.
According to the application, the larger data is decomposed and queried in the data comparison process, so that the possible abnormal situation caused by limited memory is solved, omission is avoided in the data comparison process, the standardized data comparison process is formed, the data development efficiency is improved, and a better effect is achieved in the aspect of data quality guarantee.
In some optional implementations of this embodiment, the abnormal situation further includes a server fluctuation abnormality and other abnormalities, and if the abnormal situation exists, the step of executing a corresponding processing flow for the abnormal situation includes:
if the abnormal condition is server fluctuation abnormality, determining a second SQL code corresponding to the abnormal condition, and carrying out data query again according to the second SQL code to obtain a return result corresponding to the second SQL code;
and if the abnormal condition is other abnormal conditions, generating corresponding abnormal prompt information according to the abnormal condition, and recording the abnormal prompt information.
In this embodiment, when analyzing each returned result, if there is an abnormal condition, and the abnormal condition is a server fluctuation abnormality, determining a second SQL code corresponding to the abnormal condition, and performing data query again according to the second SQL code to obtain a returned result corresponding to the second SQL code; if the abnormal condition exists and the abnormal condition is other abnormal conditions, corresponding abnormal prompt information is generated according to the abnormal condition, and the abnormal prompt information is recorded. Specifically, the abnormal situation is server fluctuation abnormality, the SQL code generating the abnormality can be determined to be used as a second SQL code, then the second SQL code is automatically submitted again for inquiry, and a return result corresponding to the second SQL code is obtained, wherein the return result is a normal result obtained after the abnormal situation is processed; if the abnormal situation is neither memory-limited abnormality nor server fluctuation abnormality, but belongs to other abnormalities, corresponding abnormality prompt information can be generated and recorded according to the abnormal situation so as to inform related personnel to perform manual processing.
According to the application, by processing the server fluctuation abnormity and other abnormity in the data comparison process, omission is avoided in the data comparison process, a standardized data comparison flow is formed, the data development efficiency is improved, and a better effect is achieved in the aspect of data quality assurance.
In some optional implementations of this embodiment, after the step of determining a data comparison result corresponding to each detection item according to each returned result and generating a data comparison report according to each data comparison result, the method further includes:
updating the data comparison report to a comparison result database;
and when a report display instruction corresponding to the data comparison report is received, extracting the data comparison report from the comparison result database, and displaying the data comparison report on a front-end page.
In this embodiment, after generating the data comparison report according to each data comparison result, the data comparison report may be updated to the comparison result database, and then, when a report display instruction corresponding to the data comparison report is received, the data comparison report may be extracted from the comparison result database and displayed on the front end page. Specifically, each SQL code corresponds to one detection item, according to the returned result corresponding to each SQL code, a data comparison result corresponding to each detection item can be generated, then the data comparison result is summarized into a data comparison report corresponding to the current data comparison process, the data comparison report is updated to a comparison result database, and when the report needs to be displayed later, the data comparison report can be extracted from the comparison result database and displayed on a front page.
According to the application, the final data comparison report is updated to the comparison result database, so that the result of the data comparison process can be checked at any time later, the consumption of labor cost and time cost is reduced, the standardized data comparison process is formed, and the data development efficiency is improved.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by computer readable instructions stored in a computer readable storage medium that, when executed, may comprise the steps of the embodiments of the methods described above. The storage medium may be a nonvolatile storage medium such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a random access Memory (Random Access Memory, RAM).
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited in order and may be performed in other orders, unless explicitly stated herein. Moreover, at least some of the steps in the flowcharts of the figures may include a plurality of sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, the order of their execution not necessarily being sequential, but may be performed in turn or alternately with other steps or at least a portion of the other steps or stages.
With further reference to fig. 3, as an implementation of the method shown in fig. 2 described above, the present application provides an embodiment of a data comparison system, which corresponds to the method embodiment shown in fig. 2, and which is particularly applicable to various electronic devices.
As shown in fig. 3, the data comparison system 300 according to the present embodiment includes: configuration module 301, code generation module 302, query module 303, and determination module 304. Wherein:
the configuration module 301 is configured to obtain configured parameters according to preset configuration information when receiving a data comparison instruction carrying the preset configuration information, where the configured parameters include table information, a data range and item settings corresponding to different detection items;
the code generating module 302 is configured to generate an SQL code corresponding to each detection item according to the table information, the data range, and the item setting;
the query module 303 is configured to perform data query according to each SQL code to obtain a returned result corresponding to each SQL code;
and the determining module 304 is configured to determine a data comparison result corresponding to each detection item according to each returned result, and generate a data comparison report according to each data comparison result.
According to the data comparison system provided by the application, the related information of the execution data comparison flow among different reports is converted into the configuration parameters, and then the configuration parameters are converted into the SQL codes, so that the data comparison can be realized through the query result of the SQL codes, the consumption of labor cost and time cost is reduced, omission is avoided in the data comparison process, the standardized data comparison flow is favorably formed, the data development efficiency is improved, and a better effect is achieved in the aspect of data quality guarantee.
In some optional implementations of this embodiment, the query module 303 is further configured to:
submitting each SQL code to a corresponding database server for inquiry;
and receiving the query results output by the database servers as the returned results.
According to the data comparison system provided by the application, the SQL codes are used for inquiring in the database server, and the data comparison is realized through the obtained inquiry result, so that a customized design script is not needed, the consumption of labor cost and time cost is reduced, the standardized data comparison flow is formed, the data development efficiency is improved, and a better effect is achieved in the aspect of data quality guarantee.
In some alternative implementations of the present embodiment, the data comparison system 300 is further configured to:
recording the submitted information corresponding to each SQL code to a query log, wherein the submitted information comprises the submitted time, the submitted number, the query record and server feedback information;
and updating each query result to a query database.
According to the data comparison system provided by the application, the submitted information and the returned result corresponding to each SQL code are recorded in the data comparison process, so that each specific operation can be tracked later, the risk in error is reduced, a standardized data comparison flow is formed, and a better effect is achieved in the aspect of data quality assurance.
In some alternative implementations of the present embodiment, the data comparison system 300 is further configured to:
analyzing each returned result, and determining whether an abnormal condition exists;
and if the abnormal condition exists, executing a corresponding processing flow aiming at the abnormal condition.
According to the data comparison system provided by the application, the query result of the SQL code is analyzed to determine whether the abnormal condition exists, if so, the abnormal condition is processed in time, so that omission is avoided in the data comparison process, the standardized data comparison flow is formed, the data development efficiency is improved, and a better effect is achieved in the aspect of data quality guarantee.
In some optional implementations of this embodiment, the exception condition includes a memory-limited exception, and the data comparison system 300 is further configured to:
if the abnormal condition is a memory limited abnormality, determining a first SQL code corresponding to the abnormal condition, and disassembling the first SQL code according to a preset index to obtain a plurality of subcodes;
performing data query according to each subcode to obtain a secondary result corresponding to each subcode;
and splicing the secondary results to obtain a return result corresponding to the first SQL code.
According to the data comparison system provided by the application, the larger data is decomposed and queried in the data comparison process, so that the possible abnormal situation caused by limited memory is solved, omission is avoided in the data comparison process, the standardized data comparison process is favorably formed, the data development efficiency is improved, and a better effect is achieved in the aspect of data quality guarantee.
In some optional implementations of this embodiment, the above-mentioned anomalies further include server-wave anomalies and other anomalies, and the data comparison system 300 is further configured to:
If the abnormal condition is server fluctuation abnormality, determining a second SQL code corresponding to the abnormal condition, and carrying out data query again according to the second SQL code to obtain a return result corresponding to the second SQL code;
and if the abnormal condition is other abnormal conditions, generating corresponding abnormal prompt information according to the abnormal condition, and recording the abnormal prompt information.
According to the data comparison system, the server fluctuation abnormality and other abnormality conditions are processed in the data comparison process, so that omission is avoided in the data comparison process, a standardized data comparison flow is formed, the data development efficiency is improved, and a better effect is achieved in the aspect of data quality assurance.
In some alternative implementations of the present embodiment, the data comparison system 300 is further configured to:
updating the data comparison report to a comparison result database;
and when a report display instruction corresponding to the data comparison report is received, extracting the data comparison report from the comparison result database, and displaying the data comparison report on a front-end page.
According to the data comparison system provided by the application, the finally obtained data comparison report is updated to the comparison result database, so that the result of the data comparison process can be checked at any time later, the consumption of labor cost and time cost is reduced, the standardized data comparison process is favorably formed, and the data development efficiency is improved.
In order to solve the technical problems, the embodiment of the application also provides computer equipment. Referring specifically to fig. 4, fig. 4 is a basic structural block diagram of a computer device according to the present embodiment.
The computer device 4 comprises a memory 41, a processor 42, a network interface 43 communicatively connected to each other via a system bus. It should be noted that only computer device 4 having components 41-43 is shown in the figures, but it should be understood that not all of the illustrated components are required to be implemented and that more or fewer components may be implemented instead. It will be appreciated by those skilled in the art that the computer device herein is a device capable of automatically performing numerical calculations and/or information processing in accordance with predetermined or stored instructions, the hardware of which includes, but is not limited to, microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASICs), programmable gate arrays (fields-Programmable Gate Array, FPGAs), digital processors (Digital Signal Processor, DSPs), embedded devices, etc.
The computer equipment can be a desktop computer, a notebook computer, a palm computer, a cloud server and other computing equipment. The computer equipment can perform man-machine interaction with a user through a keyboard, a mouse, a remote controller, a touch pad or voice control equipment and the like.
The memory 41 includes at least one type of readable storage medium including flash memory, hard disk, multimedia card, card memory (e.g., SD or DX memory, etc.), 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 storage 41 may be an internal storage unit of the computer device 4, such as a hard disk or a 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, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card) or the like, which are provided on the computer device 4. Of course, the memory 41 may also comprise both an internal memory unit of the computer device 4 and an external memory device. In this embodiment, the memory 41 is typically used to store an operating system and various application software installed on the computer device 4, such as computer readable instructions of a data comparison method. Further, the memory 41 may be used to temporarily store various types of data that have been output or are to be output.
The processor 42 may be a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments. The processor 42 is typically used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is configured to execute computer readable instructions stored in the memory 41 or process data, such as computer readable instructions for executing the data comparison method.
The network interface 43 may comprise a wireless network interface or a wired network interface, which network interface 43 is typically used for establishing a communication connection between the computer device 4 and other electronic devices.
According to the computer equipment provided by the application, the related information of the data comparison flow executed between different reports is converted into the configuration parameters, and then the configuration parameters are converted into the SQL codes, so that the data comparison can be realized through the query result of the SQL codes, the consumption of labor cost and time cost is reduced, omission in the data comparison process is avoided, the standardized data comparison flow is favorably formed, the data development efficiency is improved, and a better effect is achieved in the aspect of data quality guarantee.
The present application also provides another embodiment, namely, a computer-readable storage medium storing computer-readable instructions executable by at least one processor to cause the at least one processor to perform the steps of the data comparison method as described above.
According to the computer readable storage medium, the related information of the data comparison process executed between different reports is converted into the configuration parameters, and then the configuration parameters are converted into the SQL codes, so that the data comparison can be realized through the query result of the SQL codes, the consumption of labor cost and time cost is reduced, omission in the data comparison process is avoided, the standardized data comparison process is favorably formed, the data development efficiency is improved, and a better effect is achieved in the aspect of data quality guarantee.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present application.
It is apparent that the above-described embodiments are only some embodiments of the present application, but not all embodiments, and the preferred embodiments of the present application are shown in the drawings, which do not limit the scope of the patent claims. This application may be embodied in many different forms, but rather, embodiments are provided in order to provide a thorough and complete understanding of the present disclosure. Although the application has been described in detail with reference to the foregoing embodiments, it will be apparent to those skilled in the art that modifications may be made to the embodiments described in the foregoing description, or equivalents may be substituted for elements thereof. All equivalent structures made by the content of the specification and the drawings of the application are directly or indirectly applied to other related technical fields, and are also within the scope of the application.

Claims (10)

1. A method of data comparison comprising the steps of:
when a data comparison instruction carrying preset configuration information is received, configuring according to the preset configuration information to obtain configured parameters, wherein the configured parameters comprise table information, data ranges and item settings corresponding to different detection items;
According to the table information, the data range and the item setting, generating SQL codes corresponding to each detection item;
performing data query according to each SQL code to obtain a return result corresponding to each SQL code;
and determining a data comparison result corresponding to each detection item according to each returned result, and generating a data comparison report according to each data comparison result.
2. The method for comparing data according to claim 1, wherein the step of obtaining a returned result corresponding to each SQL code by performing data query according to each SQL code specifically comprises:
submitting each SQL code to a corresponding database server for inquiry;
and receiving the query results output by the database servers as the returned results.
3. The data comparison method according to claim 2, further comprising, after said step of receiving the query results output from the respective database servers as the respective returned results:
recording the submitted information corresponding to each SQL code to a query log, wherein the submitted information comprises the submitted time, the submitted number, the query record and server feedback information;
And updating each query result to a query database.
4. The method for comparing data according to claim 1, further comprising, after said step of performing a data query according to each of said SQL codes to obtain a return result corresponding to each of said SQL codes:
analyzing each returned result, and determining whether an abnormal condition exists;
and if the abnormal condition exists, executing a corresponding processing flow aiming at the abnormal condition.
5. The method for comparing data according to claim 4, wherein the abnormal situation includes a memory-limited abnormality, and the step of executing a corresponding processing procedure for the abnormal situation if the abnormal situation exists specifically includes:
if the abnormal condition is a memory limited abnormality, determining a first SQL code corresponding to the abnormal condition, and disassembling the first SQL code according to a preset index to obtain a plurality of subcodes;
performing data query according to each subcode to obtain a secondary result corresponding to each subcode;
and splicing the secondary results to obtain a return result corresponding to the first SQL code.
6. The method for comparing data according to claim 5, wherein the abnormal situation further includes server fluctuation abnormality and other abnormality, and the step of executing a corresponding processing flow for the abnormal situation if the abnormal situation exists specifically includes:
if the abnormal condition is server fluctuation abnormality, determining a second SQL code corresponding to the abnormal condition, and carrying out data query again according to the second SQL code to obtain a return result corresponding to the second SQL code;
and if the abnormal condition is other abnormal conditions, generating corresponding abnormal prompt information according to the abnormal condition, and recording the abnormal prompt information.
7. The data comparison method according to any one of claims 1 to 6, further comprising, after the step of determining a data comparison result corresponding to each of the detection items based on the respective returned results, and generating a data comparison report based on the respective data comparison results:
updating the data comparison report to a comparison result database;
and when a report display instruction corresponding to the data comparison report is received, extracting the data comparison report from the comparison result database, and displaying the data comparison report on a front-end page.
8. A data comparison system, comprising:
the configuration module is used for carrying out configuration according to preset configuration information when receiving a data comparison instruction carrying the preset configuration information to obtain configured parameters, wherein the configured parameters comprise table information, data ranges and item settings corresponding to different detection items;
the code generation module is used for generating SQL codes corresponding to each detection item according to the table information, the data range and the item setting;
the query module is used for carrying out data query according to each SQL code to obtain a return result corresponding to each SQL code;
and the determining module is used for determining the data comparison result corresponding to each detection item according to each returned result and generating a data comparison report according to each data comparison result.
9. A computer device comprising a memory and a processor, the memory having stored therein computer readable instructions which when executed by the processor implement the steps of the data comparison method of any of claims 1 to 7.
10. A computer readable storage medium having stored thereon computer readable instructions which when executed by a processor perform the steps of the data comparison method according to any of claims 1 to 7.
CN202311177816.7A 2023-09-12 2023-09-12 Data comparison method, system, computer equipment and storage medium Pending CN117076485A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311177816.7A CN117076485A (en) 2023-09-12 2023-09-12 Data comparison method, system, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311177816.7A CN117076485A (en) 2023-09-12 2023-09-12 Data comparison method, system, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117076485A true CN117076485A (en) 2023-11-17

Family

ID=88717054

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311177816.7A Pending CN117076485A (en) 2023-09-12 2023-09-12 Data comparison method, system, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117076485A (en)

Similar Documents

Publication Publication Date Title
CN110764798A (en) Microcode upgrading method, device, computer equipment and storage medium
CN110222017B (en) Real-time data processing method, device and equipment and computer readable storage medium
CN113010542B (en) Service data processing method, device, computer equipment and storage medium
CN112363814A (en) Task scheduling method and device, computer equipment and storage medium
CN117033249A (en) Test case generation method and device, computer equipment and storage medium
CN117114618A (en) To-be-handled item follow-up method, system, computer equipment and storage medium
CN116860311A (en) Script analysis method, script analysis device, computer equipment and storage medium
CN111475388A (en) Data push test method and device, computer equipment and storage medium
CN114626352B (en) Report automatic generation method, device, computer equipment and storage medium
CN103809915A (en) Read-write method and device of magnetic disk files
CN116450723A (en) Data extraction method, device, computer equipment and storage medium
CN117076485A (en) Data comparison method, system, computer equipment and storage medium
CN113377368A (en) Project development method, device, server and storage medium
US9471569B1 (en) Integrating information sources to create context-specific documents
CN111221817B (en) Service information data storage method, device, computer equipment and storage medium
CN114328214B (en) Efficiency improving method and device for interface test case of reporting software and computer equipment
CN117827661A (en) Code grammar checking method, system, computer device and storage medium
CN113504957A (en) Table data processing method and device, computer equipment and storage medium
CN116701119A (en) Batch running task data monitoring method, device, equipment and storage medium thereof
CN116719854A (en) Data comparison method, device, computer equipment and storage medium
CN118070881A (en) Page processing method, device, computer equipment and storage medium
CN117492752A (en) Page dynamic configuration method and device, computer equipment and storage medium
CN116662418A (en) Report realization method, device and equipment based on configuration and storage medium thereof
CN116954977A (en) Page abnormality investigation method, device, equipment and storage medium thereof
CN117032789A (en) Business rule configuration and execution method, system, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination