Data comparison method, device, computer equipment and storage medium

By segmenting and encoding SQL statements, the problem of computing resources and time consumption caused by character-by-character comparison is solved, and efficient and accurate SQL difference comparison is achieved.

CN119202014BActive Publication Date: 2025-09-30PING AN BANK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411080760.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-07
Publication Date
2025-09-30
Estimated Expiration
2044-08-07

AI Technical Summary

Technical Problem

Existing SQL difference comparison methods usually use the method of comparing the previous and next versions of SQL statements character by character, which results in huge consumption of computing resources and time, seriously affecting the system response speed and comparison efficiency.

Method used

A segmentation strategy is used to process SQL statements. Code values ​​are generated through low-resolution and high-resolution encoding, and compared using a parser to filter out code values ​​with different values ​​to obtain change information.

Benefits of technology

This reduces the computing resources and time required for SQL difference comparison, improves comparison efficiency and accuracy, and enables quick and accurate acquisition of change information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119202014B_ABST
    Figure CN119202014B_ABST
Patent Text Reader

Abstract

This application belongs to the fields of artificial intelligence and financial technology, and relates to a data comparison method, apparatus, computer equipment, and storage medium, including: when detecting update information of a target job, obtaining an updated SQL statement and an original SQL statement corresponding to the target job; segmenting the updated SQL statement and the original SQL statement to obtain a first segment content and a second segment content; encoding the first segment content to obtain a first coding value; encoding the second segment content to obtain a second coding value; comparing the first coding value and the second coding value to screen out a first designated coding value and a second designated coding value with different numerical values; obtaining a first designated segment content corresponding to the first designated coding value, and obtaining a second designated segment content corresponding to the second designated coding value; comparing the first designated segment content and the second designated segment content to obtain change information. This application effectively improves the comparison efficiency of SQL difference comparison.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the fields of artificial intelligence development technology and financial technology, and in particular to data comparison methods, devices, computer equipment and storage media. Background Art

[0002] In the financial and insurance sectors, financial companies often establish equity systems to improve marketing effectiveness. As a crucial component of user incentive mechanisms, the accuracy and efficiency of these systems directly impact user experience and business operations. Traditionally, these systems rely on big data platforms to periodically run batch jobs. These systems extract user behavior data from massive amounts of data by executing complex SQL statements, then determine whether users meet pre-defined criteria to trigger the corresponding equity distribution.

[0003] However, this processing approach, which relies on highly customized SQL statements, carries significant risks: even a slight change in an SQL statement, such as a single character, can lead to job execution failure or data extraction bias, directly jeopardizing the accuracy of downstream equity distribution, ultimately impacting customer satisfaction and business stability. Therefore, effective monitoring of SQL statements and discrepancy identification are critical to ensuring stable system operation. However, the challenge lies in the fact that SQL statements are often lengthy and complex, ranging from hundreds of lines to over four or five hundred. Big data platforms typically only provide job-level SQL change notifications, unable to pinpoint the specific changes.

[0004] Traditional SQL difference comparison methods typically compare the previous and next versions of SQL statements character by character. While this approach is intuitive, it presents significant performance bottlenecks when used on large-scale job platforms. Considering that modern big data job platforms may manage tens of millions of jobs, each corresponding to one or more SQL queries, using this approach to compare differences one by one consumes enormous computing resources and time, severely impacting system responsiveness, resulting in low comparison efficiency and failing to meet actual business needs. Summary of the Invention

[0005] The purpose of the embodiments of the present application is to propose a data comparison method, apparatus, computer device and storage medium to solve the technical problem that the existing SQL difference comparison method usually adopts the method of comparing the previous and next versions of SQL statements character by character. This processing method consumes huge computing resources and time, seriously affects the system response speed, and has low comparison efficiency.

[0006] In order to solve the above technical problems, the present application provides a data comparison method, which adopts the following technical solutions:

[0007] When update information corresponding to a target job is detected, obtaining an update SQL statement and an original SQL statement corresponding to the target job;

[0008] Segmenting the update SQL statement and the original SQL statement based on a preset segmentation strategy to obtain first segment content corresponding to the update SQL statement and second segment content corresponding to the original SQL statement;

[0009] performing low-resolution encoding and high-resolution encoding on the first segment content to obtain corresponding first low-resolution encoding values ​​and first high-resolution encoding values, and generating a first encoding value based on the first low-resolution encoding value and the first high-resolution encoding value;

[0010] performing low-resolution encoding and high-resolution encoding on the second segment content to obtain corresponding second low-resolution coded values ​​and second high-resolution coded values, respectively, and generating a second coded value based on the second low-resolution coded value and the second high-resolution coded value;

[0011] Comparing the first coding value and the second coding value to select first designated coding values ​​and second designated coding values ​​having different values;

[0012] Acquire a first designated segment content corresponding to the first designated code value from the first segment content, and acquire a second designated segment content corresponding to the second designated code value from the second segment content;

[0013] Based on a preset parser, the first designated segment content and the second designated segment content are compared to obtain corresponding change information.

[0014] Furthermore, the step of segmenting the update SQL statement and the original SQL statement based on a preset segmentation strategy to obtain first segment content corresponding to the update SQL statement and second segment content corresponding to the original SQL statement specifically includes:

[0015] Get the preset segment value;

[0016] constructing a segmentation algorithm based on the segmentation values;

[0017] The update SQL statement and the original SQL statement are segmented based on the segmentation algorithm to obtain the first segment content corresponding to the update SQL statement and the second segment content corresponding to the original SQL statement.

[0018] Furthermore, the step of performing low-resolution encoding and high-resolution encoding on the first segment content to obtain corresponding first low-resolution encoding values ​​and first high-resolution encoding values, and generating the first encoding value based on the first low-resolution encoding value and the first high-resolution encoding value specifically includes:

[0019] Performing low-resolution encoding on the first segmented content based on a preset first hash algorithm to obtain the corresponding first low-resolution encoding value;

[0020] Performing high-resolution encoding on the first segmented content based on a preset second hash algorithm to obtain the corresponding first high-resolution encoding value;

[0021] The first low-resolution coded value and the first high-resolution coded value are concatenated to obtain the first coded value.

[0022] Furthermore, the step of concatenating the first low-resolution coded value and the first high-resolution coded value to obtain the first coded value specifically includes:

[0023] Get the preset splicing order;

[0024] splicing the first low-resolution code value and the first high-resolution code value based on the splicing order to obtain corresponding spliced ​​data;

[0025] The spliced ​​data is used as the first encoding value.

[0026] Furthermore, the step of comparing the first coding value and the second coding value to select the first designated coding value and the second designated coding value having different values ​​specifically includes:

[0027] Get the preset comparison algorithm;

[0028] Comparing the first code value and the second code value based on the comparison algorithm to obtain a corresponding comparison result;

[0029] Data analysis is performed on the comparison result to select the first designated coding value and the second designated coding value having different numerical values ​​from the first coding value and the second coding value.

[0030] Furthermore, the step of performing comparison processing on the first designated segment content and the second designated segment content based on a preset parser to obtain corresponding change information specifically includes:

[0031] Parsing the first segment content and the second segment content respectively based on the parser to obtain a first syntax tree corresponding to the first segment content and a second syntax tree corresponding to the second segment content;

[0032] Performing preset formatting processing on the first syntax tree and the second syntax tree respectively to obtain a first SQL string corresponding to the first syntax tree and a second SQL string corresponding to the second syntax tree;

[0033] Performing a difference comparison on the first SQL string and the second SQL string based on a preset difference comparison algorithm to obtain a corresponding difference comparison result;

[0034] Performing line number mapping processing on the difference comparison result to obtain corresponding line number change information;

[0035] The change information is generated based on the first SQL character string, the second SQL character string, and the row number change information.

[0036] Furthermore, after the step of generating the change information based on the first SQL string, the second SQL string, and the row number change information, the method further includes:

[0037] generating change reminder information based on the target job and the change information;

[0038] Obtain the communication method corresponding to the preset task leader;

[0039] Based on the communication method, the change reminder information is sent to the operation person in charge.

[0040] In order to solve the above technical problems, the present application also provides a data comparison device, which adopts the following technical solution:

[0041] A first acquisition module is configured to acquire, when update information corresponding to a target job is detected, an update SQL statement and an original SQL statement corresponding to the target job;

[0042] a processing module, configured to segment the update SQL statement and the original SQL statement based on a preset segmentation strategy, to obtain first segment content corresponding to the update SQL statement and second segment content corresponding to the original SQL statement;

[0043] a first encoding module configured to perform low-resolution encoding and high-resolution encoding on the first segmented content to obtain corresponding first low-resolution encoding values ​​and first high-resolution encoding values, and generate a first encoding value based on the first low-resolution encoding value and the first high-resolution encoding value;

[0044] a second encoding module configured to perform low-resolution encoding and high-resolution encoding on the second segment content to obtain corresponding second low-resolution encoding values ​​and second high-resolution encoding values, and generate a second encoding value based on the second low-resolution encoding value and the second high-resolution encoding value;

[0045] a first comparison module, configured to compare the first code value and the second code value, and select a first designated code value and a second designated code value having different values;

[0046] A second acquisition module is configured to acquire first designated segment content corresponding to the first designated code value from the first segment content, and acquire second designated segment content corresponding to the second designated code value from the second segment content;

[0047] The second comparison module is used to compare the first designated segment content with the second designated segment content based on a preset parser to obtain corresponding change information.

[0048] In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical solution:

[0049] The computer device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of any one of the data comparison methods proposed in the embodiments of the present application are implemented.

[0050] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solution:

[0051] The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of any one of the data comparison methods proposed in the embodiments of the present application.

[0052] Compared with the prior art, the embodiments of the present application have the following beneficial effects:

[0053] When the update information corresponding to the target job is detected, the present application obtains the update SQL statement and the original SQL statement corresponding to the target job; then, based on a preset segmentation strategy, the update SQL statement and the original SQL statement are segmented to obtain a first segment content corresponding to the update SQL statement, and a second segment content corresponding to the original SQL statement; then, the first segment content is low-resolution encoded and high-resolution encoded to obtain a corresponding first low-resolution encoding value and a first high-resolution encoding value, and a first encoding value is generated based on the first low-resolution encoding value and the first high-resolution encoding value; and then the second segment content is low-resolution encoded and high-resolution encoded to obtain a corresponding first low-resolution encoding value and a first high-resolution encoding value. The high-resolution code and the high-resolution code obtain the corresponding second low-resolution code value and the second high-resolution code value, and generate a second code value based on the second low-resolution code value and the second high-resolution code value; further compare the first code value and the second code value to screen out the first designated code value and the second designated code value with different values; and obtain the first designated segment content corresponding to the first designated code value from the first segment content, and obtain the second designated segment content corresponding to the second designated code value from the second segment content; finally, compare the first designated segment content and the second designated segment content based on a preset parser to obtain corresponding change information. The present application uses a segmentation strategy to segment the updated SQL statement and the original SQL statement respectively, and then performs low-resolution encoding and high-resolution encoding on the first segment content to obtain a first coding value, and performs low-resolution encoding and high-resolution encoding on the second segment content to obtain a second coding value, and then uses the first coding value and the second coding value to perform a comparison process to screen out the first designated coding value and the second designated coding value with different numerical values, and then uses a parser to perform a comparison process on the first designated segment content corresponding to the first designated coding value and the second designated segment content corresponding to the second designated coding value, so as to quickly and accurately obtain the corresponding change information. The present application performs SQL difference comparison by adopting a comparison method of segmenting the SQL statement and then performing encoding comparison, and no longer needs to perform a character-by-character comparison of the previous and next versions of the SQL statement, which greatly reduces the computing resources and time of the SQL difference comparison, effectively improves the comparison efficiency of the SQL difference comparison, and improves the comparison accuracy of the SQL difference comparison. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] In order to more clearly illustrate the solutions in this application, a brief introduction will be given below to the drawings required for use in the description of the embodiments of this application. Obviously, the drawings described below are some embodiments of this application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0055] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;

[0056] Figure 2 A flowchart of an embodiment of a data comparison method according to the present application;

[0057] Figure 3 is a structural diagram of an embodiment of a data comparison device according to the present application;

[0058] Figure 4 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION

[0059] Unless otherwise defined, all technical and scientific terms used herein have the same meanings as commonly understood by those skilled in the art to which this application belongs. The terms used in the specification of the application are for the purpose of describing specific embodiments only and are not intended to limit this application. The terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of this application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.

[0060] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0061] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.

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

[0063] 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 platform software, etc.

[0064] The terminal devices 101, 102, and 103 can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 players (Moving Picture Experts Group Audio Layer IV), laptop computers, desktop computers, etc.

[0065] The server 105 may be a server that provides various services, such as a background server that provides support for web pages displayed on the terminal devices 101 , 102 , and 103 .

[0066] It should be noted that the data comparison method provided in the embodiment of the present application is generally executed by a server / terminal device, and accordingly, the data comparison device is generally set in the server / terminal device.

[0067] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is merely illustrative. Any number of terminal devices, networks and servers may be provided as required.

[0068] Continue to refer Figure 2, shows a flow chart of an embodiment of the data comparison method according to the present application. According to different requirements, the order of the steps in the flow chart can be changed, and some steps can be omitted. The data comparison method provided in the embodiment of the present application can be applied to any scenario that requires SQL statement comparison for related operations, and the data comparison method can be applied to products in these scenarios, for example, SQL statement comparison for related operations in the financial and insurance fields. The data comparison method includes the following steps:

[0069] Step S201 : when update information corresponding to a target job is detected, an update SQL statement and an original SQL statement corresponding to the target job are acquired.

[0070] In this embodiment, the data comparison method is executed on the electronic device (eg Figure 1 The server / terminal device shown in the figure) can obtain the updated SQL statement and the original SQL statement through a wired connection or a wireless connection. It should be noted that the above-mentioned wireless connection method may include but is not limited to 3G / 4G / 5G connection, Wi-Fi connection, Bluetooth connection, Wi MAX connection, Zigbee connection, UWB (Ultra Wi-Fi DeBand) connection, and other wireless connection methods currently known or to be developed in the future. The execution entity of this application may specifically be an operation platform. In the field of finance and insurance, in order to improve the effectiveness of business marketing, the construction and maintenance of the rights and interests system has become a crucial link. The rights and interests system provides users with a flexible and diverse rights and interests experience by defining and managing various rights and interests packages (usually including services, resources or privileges that users can enjoy). The rights and interests system mainly relies on the big data platform to run batch operations to determine whether the user has completed the target behavior. The operation mainly relies on SQL statements to retrieve data from the data table, and then determines whether the user has met the preset target conditions by analyzing the data to trigger the corresponding rights and interests distribution. When the SQL statements of a job, such as a target job, are modified, the big data platform pushes an update message corresponding to the target job. This update message typically only indicates which job's SQL statements have been modified, but does not reveal the specific changes to the SQL statements. The updated SQL statements corresponding to the target job refer to the current version of the SQL statements corresponding to the target job, while the original SQL statements corresponding to the target job refer to the previous version of the SQL statements corresponding to the target version.

[0071] Step S202 : segmenting the update SQL statement and the original SQL statement based on a preset segmentation strategy to obtain first segment content corresponding to the update SQL statement and second segment content corresponding to the original SQL statement.

[0072] In this embodiment, the first segmented content and the second segmented content may be multiple, and the segmented content may also be a substring. The specific implementation process of segmenting the update SQL statement and the original SQL statement based on the preset segmentation strategy to obtain the first segmented content corresponding to the update SQL statement and the second segmented content corresponding to the original SQL statement will be further described in detail in subsequent specific embodiments of this application and will not be elaborated on here.

[0073] Step S203 : performing low-resolution encoding and high-resolution encoding on the first segment content to obtain corresponding first low-resolution encoding values ​​and first high-resolution encoding values, and generating a first encoding value based on the first low-resolution encoding values ​​and the first high-resolution encoding values.

[0074] In this embodiment, the above-mentioned low-resolution encoding and high-resolution encoding of the first segmented content are respectively performed to obtain the corresponding first low-resolution coding value and first high-resolution coding value, and the specific implementation process of generating the first coding value based on the first low-resolution coding value and the first high-resolution coding value will be further described in detail in subsequent specific embodiments of this application and will not be elaborated on here.

[0075] Step S204 : performing low-resolution encoding and high-resolution encoding on the second segment content to obtain corresponding second low-resolution encoding values ​​and second high-resolution encoding values, and generating a second encoding value based on the second low-resolution encoding value and the second high-resolution encoding value.

[0076] In this embodiment, the specific implementation process of respectively performing low-resolution encoding and high-resolution encoding on the second segmented content to obtain corresponding second low-resolution coding values ​​and second high-resolution coding values, and generating the second coding value based on the second low-resolution coding value and the second high-resolution coding value can refer to the specific implementation method of respectively performing low-resolution encoding and high-resolution encoding on the first segmented content to obtain corresponding first low-resolution coding values ​​and first high-resolution coding values, and generating the first coding value based on the first low-resolution coding value and the first high-resolution coding value, and will not be repeated here.

[0077] Step S205 : performing a comparison process on the first coding value and the second coding value to screen out first designated coding values ​​and second designated coding values ​​having different values.

[0078] In this embodiment, the above-mentioned specific implementation process of comparing the first coding value and the second coding value to screen out the first designated coding value and the second designated coding value with different numerical values ​​will be further described in detail in the subsequent specific embodiments of this application and will not be elaborated on here.

[0079] Step S206: Acquire first designated segment content corresponding to the first designated coding value from the first segment content, and acquire second designated segment content corresponding to the second designated coding value from the second segment content.

[0080] In this embodiment, the first segment content may be content matched according to the first designated coding value to obtain the corresponding first designated segment content, and the second segment content may be content matched according to the second designated coding value to obtain the corresponding second designated segment content.

[0081] Step S207: Compare the first designated segment content and the second designated segment content based on a preset parser to obtain corresponding change information.

[0082] In this embodiment, the above-mentioned specific implementation process of comparing the first specified segment content with the second specified segment content based on the preset parser to obtain the corresponding change information will be further described in detail in subsequent specific embodiments of this application and will not be elaborated on here.

[0083] The present application uses a segmentation strategy to segment the updated SQL statement and the original SQL statement respectively, and then performs low-resolution encoding and high-resolution encoding on the first segment content to obtain a first coding value, and performs low-resolution encoding and high-resolution encoding on the second segment content to obtain a second coding value, and then uses the first coding value and the second coding value to perform a comparison process to screen out the first designated coding value and the second designated coding value with different numerical values, and then uses a parser to perform a comparison process on the first designated segment content corresponding to the first designated coding value and the second designated segment content corresponding to the second designated coding value, so as to quickly and accurately obtain the corresponding change information. The present application performs SQL difference comparison by adopting a comparison method of segmenting the SQL statement and then performing encoding comparison, and no longer needs to perform a character-by-character comparison of the previous and next versions of the SQL statement, which greatly reduces the computing resources and time of the SQL difference comparison, effectively improves the comparison efficiency of the SQL difference comparison, and improves the comparison accuracy of the SQL difference comparison.

[0084] In some optional implementations of this embodiment, step S202 includes the following steps:

[0085] Get the preset segment value.

[0086] In this embodiment, there is no specific limitation on the value of the above segmentation value, which can be set according to actual usage requirements. Specifically, by collecting a certain number of SQL statements from the operation platform as samples, these samples are representative and can cover the common SQL types and structures in the operation platform. Then, based on the average length of the above SQL statements, a preliminary segmentation size (for example, 100 characters per segment) is set as the above segmentation value. This segmentation size is an adjustable initial value, which can be adjusted later according to the actual effect.

[0087] A segmentation algorithm is constructed based on the segmentation values.

[0088] In this embodiment, a segmentation algorithm is written that can segment the SQL statement into multiple substrings (i.e., segment contents) according to the set segmentation value. If the end of the SQL statement is not enough to form a complete segment, the remaining part can be processed as a segment.

[0089] The update SQL statement and the original SQL statement are segmented based on the segmentation algorithm to obtain the first segment content corresponding to the update SQL statement and the second segment content corresponding to the original SQL statement.

[0090] In this embodiment, the update SQL statement and the original SQL statement are segmented by running the segmentation algorithm and segmenting according to the segmentation logic in the segmentation algorithm, thereby obtaining the first segmented content corresponding to the update SQL statement and the second segmented content corresponding to the original SQL statement. If the structure of the SQL statement is relatively fixed (such as the fixed portion of a SELECT, INSERT, UPDATE, or other statements), the SQL statement can be segmented at the structural demarcation points to preserve the integrity of the structure. Furthermore, special characters in the SQL statement (such as spaces, commas, and semicolons) can be considered during segmentation to achieve a more natural segmentation without affecting the SQL statement structure.

[0091] The present application obtains a preset segmentation value; then constructs a segmentation algorithm based on the segmentation value; and subsequently performs segmentation processing on the update SQL statement and the original SQL statement based on the segmentation algorithm to obtain the first segmentation content corresponding to the update SQL statement, and obtain the second segmentation content corresponding to the original SQL statement. The present application uses a segmentation algorithm constructed based on a preset segmentation value to perform segmentation processing on the update SQL statement and the original SQL statement, which can quickly and intelligently obtain the first segmentation content corresponding to the update SQL statement, and obtain the second segmentation content corresponding to the original SQL statement, effectively improving the processing efficiency of the segmentation processing of the update SQL statement and the original SQL statement.

[0092] In some optional implementations, step S203 includes the following steps:

[0093] The first segmented content is low-resolution encoded based on a preset first hash algorithm to obtain the corresponding first low-resolution encoding value.

[0094] In this embodiment, the first hash algorithm can be a fast hash algorithm with high computation speed and low resource consumption, such as a CRC32 or FNV-1 hash algorithm. The first segmented content is hashed using the first hash algorithm, and the resulting first hash value is used as the first low-resolution encoded value. The first low-resolution encoded value is subsequently stored or cached for subsequent comparison.

[0095] The first segmented content is encoded with high resolution based on a preset second hash algorithm to obtain the corresponding first high resolution encoding value.

[0096] In this embodiment, the second hash algorithm may be a hash algorithm with higher resolution but slower computation speed, such as MD5 or SHA-256. The first segmented content is hashed using the second hash algorithm, and the resulting second hash value is used as the first high-resolution encoded value. The first high-resolution encoded value is subsequently stored or cached for subsequent comparison.

[0097] The first low-resolution coded value and the first high-resolution coded value are concatenated to obtain the first coded value.

[0098] In this embodiment, the specific implementation process of splicing the first low-resolution coding value and the first high-resolution coding value to obtain the first coding value will be further described in detail in subsequent specific embodiments of this application and will not be elaborated on here.

[0099] The present application performs low-resolution encoding on the first segmented content based on a preset first hash algorithm to obtain the corresponding first low-resolution encoding value; and performs high-resolution encoding on the first segmented content based on a preset second hash algorithm to obtain the corresponding first high-resolution encoding value; and subsequently splices the first low-resolution encoding value and the first high-resolution encoding value to obtain the first encoding value. The present application performs low-resolution encoding and high-resolution encoding on the first segmented content based on the preset first hash algorithm and the second hash algorithm respectively, which can realize the rapid and intelligent generation of the corresponding first low-resolution encoding value and the first high-resolution encoding value, and then subsequently splices the first low-resolution encoding value and the first high-resolution encoding value to obtain the first encoding value, thereby effectively improving the generation efficiency of the first encoding value.

[0100] In some optional implementations, the concatenating the first low-resolution coded value and the first high-resolution coded value to obtain the first coded value includes the following steps:

[0101] Get the preset splicing order.

[0102] In this embodiment, the splicing order can be set according to actual needs and safety considerations. For example, the first low-resolution code value can be spliced ​​first, and then the first high-resolution code value, or any other order can be used.

[0103] The first low-resolution coding value and the first high-resolution coding value are spliced ​​based on the splicing order to obtain corresponding spliced ​​data.

[0104] In this embodiment, the first low-resolution coded value and the first high-resolution coded value are directly concatenated into a longer coded data, i.e., the concatenated data, according to the determined concatenation order. The concatenation process can be implemented using a string concatenation operator (e.g., + in Python, + or template string in JavaScript, + or StringBuilder / StringBuffer in Java, etc.).

[0105] The spliced ​​data is used as the first encoding value.

[0106] The present application obtains a preset splicing order; then splices the first low-resolution code value and the first high-resolution code value based on the splicing order to obtain corresponding spliced ​​data; and subsequently uses the spliced ​​data as the first code value. The present application uses the splicing order to splice the first low-resolution code value and the first high-resolution code value to quickly and intelligently generate a first code value that meets the requirements, effectively improving the efficiency and intelligence of generating the first code value.

[0107] In some optional implementations of this embodiment, step S205 includes the following steps:

[0108] Get the preset comparison algorithm.

[0109] In this embodiment, the comparison algorithm specifically adopts a sliding window comparison method.

[0110] The first coding value and the second coding value are compared based on the comparison algorithm to obtain a corresponding comparison result.

[0111] In this embodiment, a sliding window is used, and the length of each sliding window is set to the aforementioned segment value. Then, a sliding comparison process is performed on the first code value and the second code value to match the segment. If the same code value is found in a certain group of code values ​​in the first code value during the sliding comparison process, it means that the content of the segment corresponding to the certain group of code values ​​has not changed. If the same code value is not found in a certain group of code values ​​in the first code value during the sliding comparison process, it means that the content of the segment corresponding to the certain group of code values ​​has changed, that is, the content of the segment has been updated.

[0112] Data analysis is performed on the comparison result to select the first designated coding value and the second designated coding value having different numerical values ​​from the first coding value and the second coding value.

[0113] In this embodiment, data analysis is performed on the comparison result to find out the updated designated segment content, and the first designated coding value and the second designated coding value corresponding to the designated segment content are respectively selected from the first coding value and the second coding value.

[0114] The present application obtains a preset comparison algorithm; then compares the first coding value and the second coding value based on the comparison algorithm to obtain a corresponding comparison result; and subsequently performs data analysis on the comparison result to filter out the first designated coding value and the second designated coding value with different values ​​from the first coding value and the second coding value. The present application uses a comparison algorithm to compare the first coding value and the second coding value, and then performs data analysis on the obtained comparison result. This can quickly and accurately filter out the first designated coding value and the second designated coding value with different values ​​from the first coding value and the second coding value, effectively improving the comparison efficiency of the comparison processing of the first coding value and the second coding value, and ensuring the accuracy of the obtained comparison result.

[0115] In some optional implementations, step S207 includes the following steps:

[0116] The first segment content and the second segment content are parsed based on the parser to obtain a first syntax tree corresponding to the first segment content and a second syntax tree corresponding to the second segment content.

[0117] In the present embodiment, above-mentioned parser specifically can adopt ANTLR. ANTLR (Another Tool for Language Recognition) is a powerful parser generator, which can be used for reading, processing, executing or translating structured text or binary files. For SQL, ANTLR provides a ready-made grammar file (grammar), which can be easily converted into a syntax tree (AST, Abstract Syntax Tree). The parsing process of ANTLR comprises: by the SQL grammar file of ANTLR, the original SQL string is parsed into a syntax tree. This process can ignore the format of the original SQL (such as line breaks, spaces, etc.) and only pay attention to its structure (such as keywords such as SELECT, FROM, WHERE and the relationship between them).

[0118] The first syntax tree and the second syntax tree are respectively subjected to preset formatting processing to obtain a first SQL string corresponding to the first syntax tree and a second SQL string corresponding to the second syntax tree.

[0119] In this embodiment, a formatting rule is pre-set, and the content of the formatting rule is that each node occupies one line. Specifically, by traversing the syntax tree, each node in the syntax tree is re-assembled into an SQL string using a one-node-per-line format according to the formatting rule, ensuring that each node occupies one line, thereby obtaining a uniformly formatted SQL string.

[0120] A difference comparison is performed on the first SQL string and the second SQL string based on a preset difference comparison algorithm to obtain a corresponding difference comparison result.

[0121] In this embodiment, the difference comparison algorithm may specifically employ algorithms such as the longest common subsequence (LCS) algorithm and dynamic programming. By using the difference comparison algorithm to compare the first SQL string with the second SQL string, differences between the first and second SQL strings can be identified to obtain corresponding difference comparison results. Differences are typically manifested as the addition, deletion, or replacement of characters.

[0122] Perform line number mapping processing on the difference comparison result to obtain corresponding line number change information.

[0123] In this embodiment, since the SQL string has been formatted as one line per node, the difference between the first SQL string and the second SQL string can be mapped to a specific line number and used as the corresponding line number change information.

[0124] The change information is generated based on the first SQL character string, the second SQL character string, and the row number change information.

[0125] In this embodiment, the first SQL string, the second SQL string, and the row number change information may be integrated to obtain integrated information, and the integrated information may be used as the change information.

[0126] The present application parses the first segment content and the second segment content based on the parser to obtain a first syntax tree corresponding to the first segment content and a second syntax tree corresponding to the second segment content; then performs preset formatting on the first syntax tree and the second syntax tree to obtain a first SQL string corresponding to the first syntax tree and a second SQL string corresponding to the second syntax tree; then performs a difference comparison on the first SQL string and the second SQL string based on a preset difference comparison algorithm to obtain a corresponding difference comparison result; subsequently performs line number mapping on the difference comparison result to obtain corresponding line number change information; finally, generates the change information based on the first SQL string, the second SQL string and the line number change information. The present application compares the first specified segment content and the second specified segment content based on the use of a parser and a difference comparison algorithm, which can quickly and accurately generate corresponding change information, improve the efficiency of generating change information, and ensure the data accuracy of the obtained change information. In addition, the difference comparison results will be mapped to row numbers to obtain corresponding row number change information, and then the change information will be generated based on the first SQL string, the second SQL string and the row number change information, so that relevant personnel can intuitively locate the change position of the second SQL string relative to the first SQL string through the row number change information, thereby improving the user experience of relevant personnel.

[0127] In some optional implementations of this embodiment, after the step of generating the change information based on the first SQL string, the second SQL string, and the row number change information, the electronic device may further perform the following steps:

[0128] Generate change reminder information based on the target job and the change information.

[0129] In this embodiment, by obtaining the job identifier of the target job, the job identifier and the change information are filled into the corresponding positions in the preset change reminder information template to generate the corresponding change reminder information. The above-mentioned change reminder information template can be an information template pre-built according to actual business needs, including a job identifier area and a change information area.

[0130] Get the communication method corresponding to the preset task leader.

[0131] In this embodiment, the person in charge of the operation may be an administrator of the operation platform. The above communication information may include emails, text messages, instant messages, etc.

[0132] Based on the communication method, the change reminder information is sent to the operation person in charge.

[0133] In this embodiment, the change reminder information can be sent to the communication terminal corresponding to the operation person in charge by using the communication method.

[0134] This application generates change reminder information based on the target job and the change information; then obtains the communication method corresponding to the preset job leader; and subsequently sends the change reminder information to the job leader based on the communication method. After generating the change information based on the first SQL string, the second SQL string, and the row number change information, this application will also intelligently generate change reminder information based on the target job and the change information, and then send the change reminder information to the job leader based on the communication method corresponding to the job leader, so that the job leader can intuitively locate the changes in the second SQL string relative to the first SQL string by checking the change reminder information, thereby improving the user experience of the job leader and improving the efficiency of the job leader in confirming SQL.

[0135] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0136] It should be emphasized that in order to further ensure the privacy and security of the above-mentioned change information, the above-mentioned change information can also be stored in a node of a blockchain.

[0137] The blockchain referred to in this application is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Blockchain is essentially a decentralized database, a series of data blocks generated using cryptographic methods. Each data block contains information about a batch of network transactions, which is used to verify the validity of the information (anti-counterfeiting) and generate the next block. Blockchain can include the blockchain underlying platform, the platform product service layer, and the application service layer.

[0138] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) refers to the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results.

[0139] Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interaction systems, and mechatronics. AI software technologies primarily encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.

[0140] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing related hardware via computer-readable instructions. The computer-readable instructions can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes in the above-described method embodiments. The aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0141] It should be understood that although the steps in the flowcharts of the accompanying drawings are shown in sequence as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified 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 of the steps in the flowcharts of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.

[0142] Further references Figure 3 , as a response to the above Figure 2 In order to realize the method shown in the figure, the present application provides an embodiment of a data comparison device. Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0143] like Figure 3 As shown, the data comparison device 300 of this embodiment includes: a first acquisition module 301, a processing module 302, a first encoding module 303, a second encoding module 304, a first comparison module 305, a second acquisition module 306 and a second comparison module 307.

[0144] A first acquisition module is configured to acquire, when update information corresponding to a target job is detected, an update SQL statement and an original SQL statement corresponding to the target job;

[0145] a processing module, configured to segment the update SQL statement and the original SQL statement based on a preset segmentation strategy, to obtain first segment content corresponding to the update SQL statement and second segment content corresponding to the original SQL statement;

[0146] a first encoding module configured to perform low-resolution encoding and high-resolution encoding on the first segmented content to obtain corresponding first low-resolution encoding values ​​and first high-resolution encoding values, and generate a first encoding value based on the first low-resolution encoding value and the first high-resolution encoding value;

[0147] a second encoding module configured to perform low-resolution encoding and high-resolution encoding on the second segment content to obtain corresponding second low-resolution encoding values ​​and second high-resolution encoding values, and generate a second encoding value based on the second low-resolution encoding value and the second high-resolution encoding value;

[0148] a first comparison module, configured to compare the first code value and the second code value, and select a first designated code value and a second designated code value having different values;

[0149] A second acquisition module is configured to acquire first designated segment content corresponding to the first designated code value from the first segment content, and acquire second designated segment content corresponding to the second designated code value from the second segment content;

[0150] The second comparison module is used to compare the first designated segment content with the second designated segment content based on a preset parser to obtain corresponding change information.

[0151] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the data comparison method in the aforementioned embodiment, and are not described in detail here.

[0152] In some optional implementations of this embodiment, the processing module 302 includes:

[0153] The first acquisition submodule is used to obtain a preset segment value;

[0154] A construction submodule, configured to construct a segmentation algorithm based on the segmentation values;

[0155] The segmentation submodule is used to segment the update SQL statement and the original SQL statement based on the segmentation algorithm to obtain the first segment content corresponding to the update SQL statement and the second segment content corresponding to the original SQL statement.

[0156] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the data comparison method in the aforementioned embodiment, and are not described in detail here.

[0157] In some optional implementations of this embodiment, the first encoding module 303 includes:

[0158] a first encoding submodule, configured to perform low-resolution encoding on the first segmented content based on a preset first hash algorithm to obtain the corresponding first low-resolution encoding value;

[0159] a second encoding submodule, configured to perform high-resolution encoding on the first segmented content based on a preset second hash algorithm to obtain the corresponding first high-resolution encoding value;

[0160] The splicing submodule is configured to splice the first low-resolution code value and the first high-resolution code value to obtain the first code value.

[0161] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the data comparison method in the above embodiment, and are not described again here.

[0162] In some optional implementations of this embodiment, the splicing submodule includes:

[0163] An acquisition unit, used for acquiring a preset splicing order;

[0164] a splicing unit, configured to splice the first low-resolution code value and the first high-resolution code value based on the splicing order to obtain corresponding spliced ​​data;

[0165] A determining unit is configured to use the spliced ​​data as the first encoding value.

[0166] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the data comparison method in the aforementioned embodiment, and are not described in detail here.

[0167] In some optional implementations of this embodiment, the first comparison module 305 includes:

[0168] The second acquisition submodule is used to obtain a preset comparison algorithm;

[0169] A first comparison submodule is configured to compare the first code value with the second code value based on the comparison algorithm to obtain a corresponding comparison result;

[0170] The screening submodule is used to perform data analysis on the comparison result to correspondingly screen out the first designated coding value and the second designated coding value having different numerical values ​​from the first coding value and the second coding value.

[0171] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the data comparison method in the aforementioned embodiment, and are not described in detail here.

[0172] In some optional implementations of this embodiment, the second comparison module 307 includes:

[0173] a parsing submodule, configured to parse the first segment content and the second segment content respectively based on the parser to obtain a first syntax tree corresponding to the first segment content and a second syntax tree corresponding to the second segment content;

[0174] a processing submodule, configured to perform preset formatting processing on the first syntax tree and the second syntax tree respectively, to obtain a first SQL string corresponding to the first syntax tree, and to obtain a second SQL string corresponding to the second syntax tree;

[0175] A second comparison submodule is configured to perform a difference comparison between the first SQL string and the second SQL string based on a preset difference comparison algorithm to obtain a corresponding difference comparison result;

[0176] A mapping submodule is used to perform line number mapping processing on the difference comparison result to obtain corresponding line number change information;

[0177] The first generating submodule is used as a submodule, and is used to generate the change information based on the first SQL string, the second SQL string and the row number change information.

[0178] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the data comparison method in the aforementioned embodiment, and are not described in detail here.

[0179] In some optional implementations of this embodiment, the second comparison module 307 further includes:

[0180] A second generating submodule, configured to generate change reminder information based on the target job and the change information;

[0181] The third acquisition submodule is used to obtain the communication method corresponding to the preset task leader;

[0182] The sending submodule is used to send the change reminder information to the operation person in charge based on the communication method.

[0183] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the data comparison method in the aforementioned embodiment, and are not described in detail here.

[0184] To solve the above technical problems, the present application also provides a computer device. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.

[0185] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 4 having components 41-43, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art will understand that the computer device here is a device that can automatically perform 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.

[0186] The computer device may be a desktop computer, notebook computer, PDA, cloud server, etc. The computer device may interact with the user via a keyboard, mouse, remote control, touchpad, or voice control device.

[0187] 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 can 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 can also be an external storage device of the computer device 4, such as a plug-in hard disk equipped on the computer device 4, a smart memory card (SMC), a secure digital (SD) card, a flash memory card, etc. Of course, the memory 41 can also include both the internal storage unit of the computer device 4 and its external storage device. In this embodiment, the memory 41 is generally used to store the operating system and various application software installed on the computer device 4, such as computer-readable instructions of the data comparison method. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or are to be output.

[0188] The processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip in some embodiments. The processor 42 is generally 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 process data, such as computer-readable instructions for executing the data comparison method.

[0189] The network interface 43 may include a wireless network interface or a wired network interface. The network interface 43 is generally used to establish a communication connection between the computer device 4 and other electronic devices.

[0190] Compared with the prior art, the embodiments of the present application have the following beneficial effects:

[0191] In an embodiment of the present application, the updated SQL statement and the original SQL statement are segmented by using a segmentation strategy, and then the first segment content is low-resolution encoded and high-resolution encoded to obtain a first code value, and the second segment content is low-resolution encoded and high-resolution encoded to obtain a second code value. Then, the first code value and the second code value are compared to screen out the first designated code value and the second designated code value with different values, and then the parser is used to compare the first designated segment content corresponding to the first designated code value and the second designated segment content corresponding to the second designated code value, so as to quickly and accurately obtain the corresponding change information. The present application performs SQL difference comparison by adopting a comparison method of segmenting the SQL statement and then performing encoding comparison. There is no need to perform a character-by-character comparison of the previous and next versions of the SQL statement, which greatly reduces the computing resources and time of the SQL difference comparison, effectively improves the comparison efficiency of the SQL difference comparison, and improves the comparison accuracy of the SQL difference comparison.

[0192] The present application also provides another embodiment, namely, providing a computer-readable storage medium, which stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the data comparison method as described above.

[0193] Compared with the prior art, the embodiments of the present application have the following beneficial effects:

[0194] In an embodiment of the present application, the updated SQL statement and the original SQL statement are segmented by using a segmentation strategy, and then the first segment content is low-resolution encoded and high-resolution encoded to obtain a first code value, and the second segment content is low-resolution encoded and high-resolution encoded to obtain a second code value. Then, the first code value and the second code value are compared to screen out the first designated code value and the second designated code value with different values, and then the parser is used to compare the first designated segment content corresponding to the first designated code value and the second designated segment content corresponding to the second designated code value, so as to quickly and accurately obtain the corresponding change information. The present application performs SQL difference comparison by adopting a comparison method of segmenting the SQL statement and then performing encoding comparison. There is no need to perform a character-by-character comparison of the previous and next versions of the SQL statement, which greatly reduces the computing resources and time of the SQL difference comparison, effectively improves the comparison efficiency of the SQL difference comparison, and improves the comparison accuracy of the SQL difference comparison.

[0195] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course 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 the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0196] Obviously, the embodiments described above are only some of the embodiments of the present application, rather than all of the embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application has been described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions described in the aforementioned specific embodiments, or to make equivalent replacements for some of the technical features therein. Any equivalent structure made using the contents of the present application specification and the accompanying drawings, directly or indirectly used in other related technical fields, is also within the scope of patent protection of the present application.

Claims

1. A data comparison method, characterized in that: The steps include: When update information corresponding to a target job is detected, obtaining an update SQL statement and an original SQL statement corresponding to the target job; Segmenting the update SQL statement and the original SQL statement based on a preset segmentation strategy to obtain first segment content corresponding to the update SQL statement and second segment content corresponding to the original SQL statement; performing low-resolution encoding and high-resolution encoding on the first segment content to obtain corresponding first low-resolution encoding values ​​and first high-resolution encoding values, and concatenating the first low-resolution encoding values ​​and the first high-resolution encoding values ​​to obtain a first encoding value; performing low-resolution encoding and high-resolution encoding on the second segment content to obtain corresponding second low-resolution encoding values ​​and second high-resolution encoding values, and concatenating the second low-resolution encoding values ​​and the second high-resolution encoding values ​​to obtain a second encoding value; Comparing the first coding value and the second coding value to select first designated coding values ​​and second designated coding values ​​having different values; Acquire a first designated segment content corresponding to the first designated coding value from the first segment content, and acquire a second designated segment content corresponding to the second designated coding value from the second segment content; Based on a preset parser, the first designated segment content and the second designated segment content are compared to obtain corresponding change information.

2. The data comparison method according to claim 1, characterized in that: The step of segmenting the update SQL statement and the original SQL statement based on a preset segmentation strategy to obtain first segment content corresponding to the update SQL statement and second segment content corresponding to the original SQL statement specifically includes: Get the preset segment value; constructing a segmentation algorithm based on the segmentation values; The update SQL statement and the original SQL statement are segmented based on the segmentation algorithm to obtain the first segment content corresponding to the update SQL statement and the second segment content corresponding to the original SQL statement.

3. The data comparison method according to claim 1, characterized in that: The step of respectively performing low-resolution encoding and high-resolution encoding on the first segment content to obtain corresponding first low-resolution encoding values ​​and first high-resolution encoding values, and generating the first encoding value based on the first low-resolution encoding value and the first high-resolution encoding value, specifically includes: Performing low-resolution encoding on the first segmented content based on a preset first hash algorithm to obtain the corresponding first low-resolution encoding value; Performing high-resolution encoding on the first segmented content based on a preset second hash algorithm to obtain the corresponding first high-resolution encoding value; The first low-resolution coded value and the first high-resolution coded value are concatenated to obtain the first coded value.

4. The data comparison method according to claim 3, characterized in that: The step of concatenating the first low-resolution code value and the first high-resolution code value to obtain the first code value specifically includes: Get the preset splicing order; splicing the first low-resolution code value and the first high-resolution code value based on the splicing order to obtain corresponding spliced ​​data; The spliced ​​data is used as the first encoding value.

5. The data comparison method according to claim 1, characterized in that: The step of comparing the first coding value and the second coding value to select the first designated coding value and the second designated coding value having different values ​​specifically includes: Get the preset comparison algorithm; Comparing the first code value and the second code value based on the comparison algorithm to obtain a corresponding comparison result; Data analysis is performed on the comparison result to select the first designated coding value and the second designated coding value having different numerical values ​​from the first coding value and the second coding value.

6. The data comparison method according to claim 1, characterized in that: The step of comparing the first designated segment content with the second designated segment content based on a preset parser to obtain corresponding change information specifically includes: Parsing the first segment content and the second segment content respectively based on the parser to obtain a first syntax tree corresponding to the first segment content and a second syntax tree corresponding to the second segment content; Performing preset formatting processing on the first syntax tree and the second syntax tree respectively to obtain a first SQL string corresponding to the first syntax tree and a second SQL string corresponding to the second syntax tree; Performing a difference comparison on the first SQL string and the second SQL string based on a preset difference comparison algorithm to obtain a corresponding difference comparison result; Performing line number mapping processing on the difference comparison result to obtain corresponding line number change information; The change information is generated based on the first SQL character string, the second SQL character string, and the row number change information.

7. The data comparison method according to claim 6, characterized in that: After the step of generating the change information based on the first SQL string, the second SQL string, and the row number change information, the method further includes: generating change reminder information based on the target job and the change information; Obtain the communication method corresponding to the preset task leader; Based on the communication method, the change reminder information is sent to the operation person in charge.

8. A data comparison device, characterized in that: include: A first acquisition module is configured to acquire, when update information corresponding to a target job is detected, an update SQL statement and an original SQL statement corresponding to the target job; a processing module, configured to segment the update SQL statement and the original SQL statement based on a preset segmentation strategy, to obtain first segment content corresponding to the update SQL statement and second segment content corresponding to the original SQL statement; a first encoding module configured to perform low-resolution encoding and high-resolution encoding on the first segmented content to obtain corresponding first low-resolution encoding values ​​and first high-resolution encoding values, and to concatenate the first low-resolution encoding values ​​and the first high-resolution encoding values ​​to obtain a first encoding value; a second encoding module configured to perform low-resolution encoding and high-resolution encoding on the second segment content to obtain corresponding second low-resolution encoding values ​​and second high-resolution encoding values, and to concatenate the second low-resolution encoding values ​​and the second high-resolution encoding values ​​to obtain a second encoding value; a first comparison module, configured to compare the first code value and the second code value, and select a first designated code value and a second designated code value having different values; A second acquisition module is configured to acquire first designated segment content corresponding to the first designated code value from the first segment content, and acquire second designated segment content corresponding to the second designated code value from the second segment content; The second comparison module is used to compare the first designated segment content with the second designated segment content based on a preset parser to obtain corresponding change information.

9. A computer device comprising a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the data comparison method according to any one of claims 1 to 7 when executing the computer-readable instructions.

10. 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 according to any one of claims 1 to 7.