Meteorological data comparative analysis method, tool and equipment based on virtual valley database

By using a comparative analysis method for meteorological data based on the Xugu database, the problems of integrity and element-level differences in data tables within and across databases were solved. This enabled efficient and accurate identification of data differences and understanding of patterns, improving the uniformity of data tables and the speed of analysis.

CN121658464APending Publication Date: 2026-03-13STATE QIXIANG INFORMATION CENT
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-02-09
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

Existing technologies lack tools for comparing the integrity and feature-level differences of data tables within and across the Xugu database. This makes it impossible to promptly detect differences in the integrity and field values ​​between data tables, resulting in poor accuracy and efficiency in difference identification and hindering the understanding of data patterns.

Method used

This paper presents a method for comparative analysis of meteorological data based on the Xugu database. By reading the database connection configuration file, a connection is established between database A and database B. An SQL query statement with key values ​​is sent to obtain the query results and convert them into a hashmap structure. The differences between the key values ​​and fields are compared and written to a file under a specified path.

Benefits of technology

It enables the integrity of data tables within and across the Xugu database and the comparison of differences in element values, improving the efficiency and accuracy of difference identification, ensuring data structure uniformity, reducing system memory resource consumption, and improving the speed and efficiency of meteorological data comparison and analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121658464A_ABST
    Figure CN121658464A_ABST
Patent Text Reader

Abstract

The invention discloses a meteorological data comparative analysis method, tool and equipment based on virtual valley databases, and the method comprises the steps: respectively building virtual valley database connections with a database A and a database B through reading the first two lines of contents in a database connection configuration file; respectively sending two SQL (Structured Query Language) query statements with key values in a command line or a query configuration file to a library A and a library B for execution to obtain a query result, converting the query result into a character string, and storing the character string into a data structure of a hashmap in a memory; and comparing the key values in the hashmap, and writing the difference analysis result into the file under the specified path, so that the comparison of the integrity and the element value difference of the same or different data tables of the same or cross-database of the virtual valley database can be realized, the method is clear and specific, the usability is relatively high, the efficiency and the accuracy of difference identification are improved, the uniform data structure is ensured, and the user experience is improved. The speed and efficiency of comparative analysis are improved, and the meteorological data storage rule can be found and mastered easily.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer software technology, and in particular to a method, tool and equipment for comparative analysis of meteorological data based on the Xugu database. Background Technology

[0002] Xugu Database is an original, native distributed database, a database software product that has been independently iterated since 2002. In terms of usage, it is fully compatible with traditional relational databases, provides standard object and process management models, and is equipped with various database interfaces and management tools. The core database engine adopts a full-link architecture, where data is stored in data nodes in the form of physical slices, and computation is responded to simultaneously by each computing node.

[0003] Xugu Database Data Synchronization Software uses Xugu Distributed Database as its data source for full and incremental data synchronization and distribution, providing a user-friendly interface for configuration and startup. Facing ever-increasing data volumes, Xugu Database Data Synchronization Software flexibly synchronizes and distributes massive amounts of data stored in Xugu Distributed Database on demand, meeting users' various refined data service needs based on massive amounts of data, such as the creation of specialized databases, archiving and backing up important data, and full data archiving and backup. Incremental synchronization in Xugu Database Data Synchronization Software is based on the Xugu Distributed Database log architecture, completely independent of stored procedures, functions, materialized views, and triggers, requiring no agents, and has zero intrusion on the source database, without affecting the source database application system.

[0004] However, current technology lacks tools for comparing the integrity and feature-level differences of data tables within and across the Xugu database. It cannot promptly detect differences in integrity and field values ​​between identical or different data tables within or between the same database. The accuracy and efficiency of difference identification are poor, which is not conducive to discovering data problems between different databases and understanding data patterns. Summary of the Invention

[0005] The main objective of this invention is to provide a method, tool, and device for comparative analysis of meteorological data based on the Xugu database. This invention aims to address the current lack of tools in the art for comparing the integrity and element-level differences of data tables within and across the Xugu database. This results in the inability to promptly detect differences in integrity and field values ​​between identical or different data tables within and between the same database, leading to poor accuracy and efficiency in difference identification. Consequently, it hinders the discovery of data problems between different databases and the understanding of data patterns.

[0006] In a first aspect, the present invention provides a method for comparative analysis of meteorological data based on a virtual valley database, the method comprising the following steps: Read the first two lines of the database connection configuration file and establish virtual database connections with database A and database B respectively; Two SQL query statements with key values ​​from the command line or query configuration file are sent to database A and database B respectively for execution to obtain query results. The query results are then converted into strings and stored in a hashmap data structure in memory. The integrity difference analysis results are obtained by comparing the key values ​​in the hashmap, and the field value differences of records with the same key value are obtained by comparing the field value difference analysis results. The integrity difference analysis results and the field value difference analysis results are written to a file under the specified path.

[0007] Optionally, the step of reading the first two lines of the database connection configuration file and establishing virtual database connections with database A and database B respectively includes: Read the first two lines of the database connection configuration file dataBaseConn.txt, use the first line of the database connection configuration file as the connection address of database A, and use the second line of the database connection configuration file as the connection address of database B. The dataBaseConn.txt file has several database connection addresses reserved at the end. When using them, copy them to the first or second line to apply the changes. Establish a virtual database connection with database A based on the connection address of database A, and establish a virtual database connection with database B based on the connection address of database B.

[0008] Optionally, the step of sending two SQL query statements with key values ​​from the command line or query configuration file to database A and database B respectively for execution, obtaining query results, and then converting the query results into strings and storing them in a hashmap data structure in memory includes: Retrieve the SQL1 and SQL2 query statements from the SQL query statements entered in the command line; Alternatively, retrieve two query statements, SQL1 and SQL2, with key values ​​from the query configuration file; The SQL1 query statement is sent to database A for execution, and the query result of database A is obtained. The SQL2 query statement is sent to database B for execution, and the query result of database B is obtained. Store the first field from the query results of library A and the query results of library B as the key value; The second and subsequent fields of the query results from library A and library B are stored using a List, and the List is used as the value. After being converted into a string, it is stored in a hashmap data structure in memory.

[0009] Optionally, the step of retrieving two query statements, SQL1 and SQL2, with key values ​​from the query configuration file includes: Alternatively, if the command line detects that sql1 and sql2 are the fixed string "test", the first line of the query configuration file selectSql.txt will be used as the sql1 query statement, and the second line of selectSql.txt will be used as the sql2 query statement. The end of the selectSql.txt file contains several commonly used query SQL statements for databases. When needed, these statements can be copied to the first or second line to apply the query.

[0010] Optionally, before storing the second and subsequent fields of the query results from database A and database B using a List, and converting the List as the value into a string and storing it in a hashmap data structure in memory, the meteorological data comparison and analysis method based on the Xugu database further includes: The second field in both the query results for database A and database B was found to contain the special character "". ", and not count( When querying database A and database B, all fields are automatically retrieved. The query results for database A and database B are compared based on the field names of all returned fields. The same fields are combined to form a new SQL query statement and sent to database A and database B. The first field of the new SQL query statement is still the first field of the original SQL1 query statement and SQL2 query statement.

[0011] Optionally, the step of comparing the key values ​​in the hashmap to obtain the integrity difference analysis result, comparing the field value differences of records with the same key value to obtain the field value difference analysis result, and writing the integrity difference analysis result and the field value difference analysis result to a file under a specified path includes: The key values ​​and other field values ​​in the hashmap are all converted to strings for comparison to obtain the integrity difference analysis results. The field value differences of records with the same key value are compared to obtain the field value difference analysis results of A&B records that exist in library A but not in library B, B&A records that exist in library B but not in library A, and A&B records that are common to library A and library B. The A&B records include records with completely identical field values, records with missing test differences in field values, and records with non-missing test differences in field values. Write the integrity difference analysis results and the field value difference analysis results to a file in the specified path.

[0012] Optionally, writing the difference analysis results to a file under a specified path includes: Write the difference analysis results to the pathname specified in the command line, and output a result file containing the overall situation output, the AB records, the BA records, the A&B records compared with the key value, the field difference classification statistics and analysis results, and the field comparison results of the A&B records. The result file is in csv or xlsx format, and the A&B records include the output field comparison result flag and the output results of library A and library B.

[0013] Secondly, to achieve the above objectives, the present invention also proposes a meteorological data comparison and analysis tool based on the Xugu database, wherein the meteorological data comparison and analysis tool based on the Xugu database includes: The connection establishment module is used to read the first two lines of the database connection configuration file and establish virtual database connections with database A and database B respectively. The query storage module is used to send two SQL query statements with key values ​​from the command line or query configuration file to the database A and the database B respectively for execution, obtain query results, convert the query results into strings and store them in the hashmap data structure in memory; The difference analysis module is used to compare the key values ​​in the hashmap to obtain the integrity difference analysis result, compare the field value differences of records with the same key value to obtain the field value difference analysis result, and write the integrity difference analysis result and the field value difference analysis result to a file under a specified path.

[0014] Thirdly, to achieve the above objectives, the present invention also proposes a meteorological data comparison and analysis device based on a virtual valley database. The meteorological data comparison and analysis device based on a virtual valley database includes: a memory, a processor, and a meteorological data comparison and analysis program based on a virtual valley database stored in the memory and executable on the processor. The meteorological data comparison and analysis program based on a virtual valley database is configured to implement the steps of the meteorological data comparison and analysis method based on a virtual valley database as described above.

[0015] Fourthly, to achieve the above objectives, the present invention also proposes a storage medium storing a meteorological data comparison and analysis program based on the Xugu database. When the meteorological data comparison and analysis program based on the Xugu database is executed by a processor, it implements the steps of the meteorological data comparison and analysis method based on the Xugu database as described above.

[0016] The meteorological data comparison and analysis method based on the Xugu database proposed in this invention establishes connections to databases A and B by reading the first two lines of the database connection configuration file. Two SQL query statements with key values ​​from the command line or query configuration file are sent to databases A and B respectively for execution, obtaining query results. These results are then converted into strings and stored in a hashmap data structure in memory. The key values ​​in the hashmap are compared to obtain integrity difference analysis results. The differences in field values ​​of records with the same key value are compared to obtain field value difference analysis results. These results are written to a file under a specified path. This method enables the comparison of integrity and element value differences between the same or different data tables within and across Xugu databases, quickly obtaining meteorological data comparison and analysis results based on the Xugu database. The results are clear, specific, and easy to use, improving the efficiency and accuracy of difference identification, ensuring the uniformity of the data table structure, improving program execution efficiency, reducing system memory resource consumption, and increasing the speed and efficiency of meteorological data comparison and analysis based on the Xugu database. This is beneficial for discovering and understanding the patterns of meteorological data entry into the database. Attached Figure Description

[0017] Figure 1 This is a schematic diagram of the device structure of the hardware operating environment involved in the embodiments of the present invention; Figure 2 This is a flowchart illustrating the first embodiment of the meteorological data comparison and analysis method based on the Xugu database of the present invention. Figure 3 This is a flowchart illustrating the second embodiment of the meteorological data comparison and analysis method based on the Xugu database of the present invention. Figure 4 This is a flowchart illustrating the third embodiment of the meteorological data comparison and analysis method based on the Xugu database of the present invention. Figure 5 This is a flowchart illustrating the fourth embodiment of the meteorological data comparison and analysis method based on the Xugu database of the present invention. Figure 6 This is a functional block diagram of the first embodiment of the meteorological data comparison and analysis tool based on the Xugu database of the present invention.

[0018] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0019] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0020] The solution of this invention mainly involves: establishing connections to databases A and B by reading the first two lines of the database connection configuration file; sending two SQL query statements with key values ​​from the command line or query configuration file to databases A and B respectively for execution to obtain query results; converting the query results into strings and storing them in a hashmap data structure in memory; comparing the key values ​​in the hashmap to obtain integrity difference analysis results; comparing the field value differences of records with the same key value to obtain field value difference analysis results; and writing the integrity difference analysis results and the field value difference analysis results to a file under a specified path. This enables the integrity of the same or different data tables within and across databases in the Xugu database. By comparing differences in feature values, this method quickly obtains comparative analysis results of meteorological data based on the Xugu database. The results are clear, specific, and easy to use, improving the efficiency and accuracy of difference identification. It ensures the uniformity of the data table structure, enhances program execution efficiency, reduces system memory resource consumption, and increases the speed and efficiency of comparative analysis of meteorological data based on the Xugu database. This is beneficial for discovering and understanding the patterns of meteorological data entering the database. It solves the current technical problem of lacking tools for comparing the integrity and feature-level differences of data tables within and across the Xugu database, making it difficult to promptly discover differences in integrity and field values ​​between identical or different data tables within and outside the same database. The accuracy and efficiency of difference identification are poor, hindering the discovery of data problems between different databases and the understanding of data patterns.

[0021] Reference Figure 1 , Figure 1 This is a schematic diagram of the device structure of the hardware operating environment involved in the embodiments of the present invention.

[0022] like Figure 1 As shown, the device may include: a processor 1001, such as a CPU; a communication bus 1002; a user interface 1003; a network interface 1004; and a memory 1005. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen or an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be high-speed RAM or non-volatile memory, such as a disk drive. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0023] Those skilled in the art will understand that Figure 1The device structure shown does not constitute a limitation on the device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0024] like Figure 1 As shown, the memory 1005, which serves as a storage medium, may include an operating device, a network communication module, a user interface module, and a meteorological data comparison and analysis program based on the virtual valley database.

[0025] The device of this invention calls the meteorological data comparison and analysis program based on the virtual valley database stored in the memory 1005 through the processor 1001, and performs the following operations: Read the first two lines of the database connection configuration file and establish virtual database connections with database A and database B respectively; Two SQL query statements with key values ​​from the command line or query configuration file are sent to database A and database B respectively for execution to obtain query results. The query results are then converted into strings and stored in a hashmap data structure in memory. The integrity difference analysis results are obtained by comparing the key values ​​in the hashmap, and the field value differences of records with the same key value are obtained by comparing the field value difference analysis results. The integrity difference analysis results and the field value difference analysis results are written to a file under the specified path.

[0026] The device of the present invention, through processor 1001, calls the meteorological data comparison and analysis program based on the virtual valley database stored in memory 1005, and also performs the following operations: Read the first two lines of the database connection configuration file dataBaseConn.txt, use the first line of the database connection configuration file as the connection address of database A, and use the second line of the database connection configuration file as the connection address of database B. The dataBaseConn.txt file has several database connection addresses reserved at the end. When using them, copy them to the first or second line to apply the changes. Establish a virtual database connection with database A based on the connection address of database A, and establish a virtual database connection with database B based on the connection address of database B.

[0027] The device of the present invention, through processor 1001, calls the meteorological data comparison and analysis program based on the virtual valley database stored in memory 1005, and also performs the following operations: Retrieve the SQL1 and SQL2 query statements from the SQL query statements entered in the command line; Alternatively, retrieve two query statements, SQL1 and SQL2, with key values ​​from the query configuration file; The SQL1 query statement is sent to database A for execution, and the query result of database A is obtained. The SQL2 query statement is sent to database B for execution, and the query result of database B is obtained. Store the first field from the query results of library A and the query results of library B as the key value; The second and subsequent fields of the query results from library A and library B are stored using a List, and the List is used as the value. After being converted into a string, it is stored in a hashmap data structure in memory.

[0028] The device of the present invention, through processor 1001, calls the meteorological data comparison and analysis program based on the virtual valley database stored in memory 1005, and also performs the following operations: Alternatively, if the command line detects that sql1 and sql2 are the fixed string "test", the first line of the query configuration file selectSql.txt will be used as the sql1 query statement, and the second line of selectSql.txt will be used as the sql2 query statement. The end of the selectSql.txt file contains several commonly used query SQL statements for databases. When needed, these statements can be copied to the first or second line to apply the query.

[0029] The device of the present invention, through processor 1001, calls the meteorological data comparison and analysis program based on the virtual valley database stored in memory 1005, and also performs the following operations: The second field in both the query results for database A and database B was found to contain the special character "". ", and not count( When querying database A and database B, all fields are automatically retrieved. The query results for database A and database B are compared based on the field names of all returned fields. The same fields are combined to form a new SQL query statement and sent to database A and database B. The first field of the new SQL query statement is still the first field of the original SQL1 query statement and SQL2 query statement.

[0030] The device of the present invention, through processor 1001, calls the meteorological data comparison and analysis program based on the virtual valley database stored in memory 1005, and also performs the following operations: The key values ​​and other field values ​​in the hashmap are all converted to strings for comparison to obtain the integrity difference analysis results. The field value differences of records with the same key value are compared to obtain the field value difference analysis results of A&B records that exist in library A but not in library B, B&A records that exist in library B but not in library A, and A&B records that are common to library A and library B. The A&B records include records with completely identical field values, records with missing test differences in field values, and records with non-missing test differences in field values. Write the integrity difference analysis results and the field value difference analysis results to a file in the specified path.

[0031] The device of the present invention, through processor 1001, calls the meteorological data comparison and analysis program based on the virtual valley database stored in memory 1005, and also performs the following operations: Write the difference analysis results to the pathname specified in the command line, and output a result file containing the overall situation output, the AB records, the BA records, the A&B records compared with the key value, the field difference classification statistics and analysis results, and the field comparison results of the A&B records. The result file is in csv or xlsx format, and the A&B records include the output field comparison result flag and the output results of library A and library B.

[0032] This embodiment, through the above-described scheme, establishes connections to the Xugu database with databases A and B respectively by reading the first two lines of the database connection configuration file; it sends two SQL query statements with key values ​​from the command line or query configuration file to databases A and B for execution, obtains query results, converts the query results into strings, and stores them in a hashmap data structure in memory; it compares the key values ​​in the hashmap to obtain integrity difference analysis results, compares the field value differences of records with the same key value to obtain field value difference analysis results, and writes the integrity difference analysis results and field value difference analysis results to a file under a specified path. This enables the comparison of integrity and element value differences between the same or different data tables in the same or different databases within the Xugu database, quickly obtaining comparative analysis results of meteorological data based on the Xugu database. The results are clear, specific, and easy to use, improving the efficiency and accuracy of difference identification, ensuring the uniformity of the data table structure, improving program execution efficiency, reducing system memory resource consumption, and increasing the speed and efficiency of meteorological data comparative analysis based on the Xugu database. This is beneficial for discovering and understanding the patterns of meteorological data entry into the database.

[0033] Based on the above hardware structure, an embodiment of the meteorological data comparison and analysis method based on the Xugu database of the present invention is proposed.

[0034] Reference Figure 2 , Figure 2 This is a flowchart illustrating the first embodiment of the meteorological data comparison and analysis method based on the Xugu database of the present invention.

[0035] In the first embodiment, the meteorological data comparative analysis method based on the virtual valley database includes the following steps: Step S10: Read the first two lines of the database connection configuration file and establish virtual database connections with database A and database B respectively.

[0036] It should be noted that by reading the first two lines of the database connection configuration file, virtual database connections to databases A and B can be established respectively.

[0037] Step S20: Send the two SQL query statements with key values ​​from the command line or query configuration file to the database A and the database B respectively for execution, obtain the query results, convert the query results into strings and store them in the hashmap data structure in memory.

[0038] It should be understood that after obtaining the SQL query statement input from the command line, or obtaining two SQL query statements with key values ​​in the query configuration file, the SQL query statement can be sent to the database A and the database B respectively for execution, thereby obtaining the corresponding query results. Then, the query results are converted into strings and stored in the hashmap data structure in memory.

[0039] Step S30: Compare the key values ​​in the hashmap to obtain the integrity difference analysis results; compare the field value differences of records with the same key value to obtain the field value difference analysis results; and write the integrity difference analysis results and the field value difference analysis results into a file under the specified path.

[0040] It is understandable that by comparing the key values ​​in the hashmap, the difference analysis results can be output, and then the difference analysis results can be written to a file under a specified path.

[0041] This embodiment, through the above-described scheme, establishes connections to the Xugu database with databases A and B respectively by reading the first two lines of the database connection configuration file; it sends two SQL query statements with key values ​​from the command line or query configuration file to databases A and B for execution, obtains query results, converts the query results into strings, and stores them in a hashmap data structure in memory; it compares the key values ​​in the hashmap to obtain integrity difference analysis results, compares the field value differences of records with the same key value to obtain field value difference analysis results, and writes the integrity difference analysis results and field value difference analysis results to a file under a specified path. This enables the comparison of integrity and element value differences between the same or different data tables in the same or different databases within the Xugu database, quickly obtaining comparative analysis results of meteorological data based on the Xugu database. The results are clear, specific, and easy to use, improving the efficiency and accuracy of difference identification, ensuring the uniformity of the data table structure, improving program execution efficiency, reducing system memory resource consumption, and increasing the speed and efficiency of meteorological data comparative analysis based on the Xugu database. This is beneficial for discovering and understanding the patterns of meteorological data entry into the database.

[0042] Furthermore, Figure 3 This is a flowchart illustrating the second embodiment of the meteorological data comparison and analysis method based on the Xugu database of the present invention. Figure 3 As shown, based on the first embodiment, a second embodiment of the meteorological data comparison and analysis method based on the virtual valley database of the present invention is proposed. In this embodiment, step S10 specifically includes the following steps: Step S11: Read the first two lines of the database connection configuration file dataBaseConn.txt. Use the first line of the database connection configuration file as the connection address of database A and the second line of the database connection configuration file as the connection address of database B. The dataBaseConn.txt file has several database connection addresses reserved at the end. When using them, copy them to the first or second line to apply the changes.

[0043] It should be noted that the database connection configuration file dataBaseConn.txt can be used to connect to the Xugu database. After reading the first two lines of the database connection configuration file, the first line of the configuration file can be used as the connection address of database A, and the second line of the configuration file can be used as the connection address of database B. The dataBaseConn.txt file has several database connection addresses reserved at the end. When using them, copy them to the first or second line to apply the changes.

[0044] In the specific implementation, a connection to the Xugu database can be established with database A and database B respectively according to the database connection configuration file dataBaseConn.txt. The first line of the database connection configuration file is the connection address of database A (containing the corresponding user and password), and the second line is the connection address of database B. The configuration file can have multiple lines, but only the first two lines are read as the addresses of databases A and B respectively, and the other lines are treated as comment lines. The addresses, users, etc. of databases A and B can be the same or different.

[0045] Step S12: Establish a virtual database connection with database A based on the connection address of database A, and establish a virtual database connection with database B based on the connection address of database B.

[0046] It should be understood that the connection address contains the corresponding user and password. A virtual database connection to database A can be established through the connection address of database A, and a virtual database connection to database B can be established through the connection address of database B.

[0047] This embodiment, through the above-described scheme, reads the first two lines of the database connection configuration file dataBaseConn.txt, using the first line of the configuration file as the connection address for database A and the second line as the connection address for database B. The dataBaseConn.txt file retains connection addresses for several databases at the end; these are copied to the first or second line for application. A connection to the virtual valley database is established with database A based on the connection address of database A, and a connection to the virtual valley database is established with database B based on the connection address of database B. This enables rapid establishment of cross-database connections with the virtual valley database, improving program execution efficiency and increasing the speed and efficiency of meteorological data comparison and analysis based on the virtual valley database. This is beneficial for discovering and understanding the patterns of meteorological data entering the database.

[0048] Furthermore, Figure 4 This is a flowchart illustrating the third embodiment of the meteorological data comparison and analysis method based on the Xugu database of the present invention. Figure 4 As shown, based on the first embodiment, a third embodiment of the meteorological data comparison and analysis method based on the virtual valley database of the present invention is proposed. In this embodiment, step S20 specifically includes the following steps: Step S21: Obtain the sql1 query statement and sql2 query statement from the SQL query statement entered in the command line.

[0049] It should be noted that the SQL query statement (sql1) and the SQL query statement (sql2) can be obtained from the SQL query statement entered in the command line.

[0050] Step S22, or retrieve two query statements, SQL1 and SQL2, with key values ​​from the query configuration file.

[0051] It should be understood that two query statements, SQL1 and SQL2, with key values ​​can be obtained from the query configuration file.

[0052] It should be noted that when the command line is set to "test", it directly reads the first two lines of the configuration file. The command line method is convenient for batch querying applications. Querying the configuration file allows you to easily record multiple query statements for reuse in subsequent queries. The query statements at the end of line 3 in the configuration file can be used as a reference; simply copy them to line 1 or 2 to apply them. Querying the configuration file is similar to querying SQL statements; the configuration file can store connection addresses for multiple databases at the end of line 3, which can be copied to line 1 or 2 to take effect.

[0053] Furthermore, step S22 specifically includes the following steps: Alternatively, if the command line detects that sql1 and sql2 are the fixed string "test", the first line of the query configuration file selectSql.txt will be used as the sql1 query statement, and the second line of selectSql.txt will be used as the sql2 query statement. The end of the selectSql.txt file contains several commonly used query SQL statements for databases. When needed, these statements can be copied to the first or second line to apply the query.

[0054] Understandably, based on the SQL statements sql1 and sql2 entered in the command line, or by reading the SQL statements from the first two lines of the query statement configuration file selectSql.txt, sql1 is sent to database A for execution, and sql2 is sent to database B for execution. When sql1 or sql2 is the fixed string "test", the program automatically reads the corresponding SQL statement from the first two lines of selectSql.txt and ignores subsequent lines.

[0055] In the specific implementation, based on the sql and sql2 query statements in the command line, sql1 is always sent to database A for querying, and sql2 is always sent to database B for querying. When sql1 and sql2 in the command line are the fixed string "test", the query statement is obtained from selectSql.txt. The first line of selectSql.txt is sql1, and the second line is sql2. Similarly, sql1 is sent to database A for execution, and sql2 is sent to database B for execution. sql1 and sql2 can be the same or different. Except for the first two lines, the other lines are considered comment lines.

[0056] Step S23: Send the SQL1 query statement to database A for execution and obtain the query result of database A. Send the SQL2 query statement to database B for execution and obtain the query result of database B.

[0057] It is understandable that the SQL1 query statement corresponds to database A, and the SQL2 query statement corresponds to database B. Sending the SQL1 query statement to database A for execution will yield the query results for database A, and sending the SQL2 query statement to database B for execution will yield the query results for database B.

[0058] Step S24: Store the first field from the query results of library A and library B as the key value.

[0059] It should be understood that the first field in the query results of library A and library B can be stored as a key value in a hashmap data structure in memory.

[0060] It should be noted that the key field can be a single field, a combination of multiple fields, or an expression containing a subquery. The value of the key field must satisfy the uniqueness constraint to ensure the accuracy of the comparison. In SQL1 and SQL2 statements, the first field value is the key value to be compared. It should be ensured that all returned results can be indexed by the unique value of this field. This value can be a single field, a combination of multiple fields, or a subquery.

[0061] Step S25: Store the second and subsequent fields in the query results of library A and library B using a List, and then convert the List into a string and store it in the hashmap data structure in memory.

[0062] It is understandable that the second and subsequent fields in the query results of library A and library B can be stored using a List, and the List can be used as the value, converted into a string, and then stored in a hashmap data structure in memory.

[0063] It should be understood that the query results of database A and database B are stored as hashmap data structures in memory. The first field of each record is used as the key of the hashmap for unique indexing, and the second and subsequent fields are used as values, stored in a List structure.

[0064] In the specific implementation, the system receives the query results from databases A and B, and retrieves all records and field values ​​returned by them. After converting the search results into strings, the data is stored in a hashmap data structure in memory. The first field returned by the query results is used as the key value, and all fields after the second field of the search results are stored using a List to achieve the storage of multiple fields. The entire List is used as the value value.

[0065] Furthermore, prior to step S25, the meteorological data comparison and analysis method based on the virtual valley database also includes the following steps: The second field in both the query results for database A and database B was found to contain the special character "". ", and not count( When querying database A and database B, all fields are automatically retrieved. The query results for database A and database B are compared based on the field names of all returned fields. The same fields are combined to form a new SQL query statement and sent to database A and database B. The first field of the new SQL query statement is still the first field of the original SQL1 query statement and SQL2 query statement.

[0066] Understandably, if the second field of the SQL statement contains the special character "", The program automatically retrieves all fields from the two query results and generates a new SQL statement based on the field names. The first field of the new SQL statement is still the key field of the original SQL statement.

[0067] In the specific implementation, when the second field in the SQL is a special character " ", and not count( When ), it represents all fields of the entire query table; the program can automatically obtain all fields of the two queries, and compare the query results of databases A and B according to the returned field names, and send a new query with the same fields to databases A and B; the first field of the new query is still the first field of the original sql1 and sql2.

[0068] It should be understood that when the second field in the query results of database A and database B is detected to contain the special character "count( When you use ")", you can expand the data to get all the elements.

[0069] Understandably, the new query will also be output to the overall results, which will facilitate subsequent checks and reviews.

[0070] This embodiment, through the above-described scheme, obtains SQL1 and SQL2 query statements from SQL query statements entered in the command line; or obtains two SQL1 and SQL2 query statements with key values ​​from the query configuration file; sends the SQL1 query statement to database A for execution, obtains the query result of database A, and sends the SQL2 query statement to database B for execution, obtains the query result of database B; stores the first field of the query results of database A and database B as the key value; stores the second and subsequent fields of the query results of database A and database B using a List, and uses the List as the value value. After being converted into a string, it is stored in a hashmap data structure in memory. This prepares for the comparison of the integrity and feature value differences of the same or different data tables in the same or different databases of the Xugu database, improves the efficiency and accuracy of difference identification, ensures the uniformity of the data structure of the data tables, improves the program execution efficiency, reduces the system memory resource occupation, and improves the speed and efficiency of meteorological data comparison and analysis based on the Xugu database, which is conducive to discovering and mastering the patterns of meteorological data entering the database.

[0071] Furthermore, Figure 5 This is a flowchart illustrating the fourth embodiment of the meteorological data comparison and analysis method based on the Xugu database of the present invention. Figure 5 As shown, based on the first embodiment, a fourth embodiment of the meteorological data comparison and analysis method based on the virtual valley database of the present invention is proposed. In this embodiment, step S30 specifically includes the following steps: Step S31: Convert all key values ​​and other field values ​​in the hashmap into strings for comparison to obtain integrity difference analysis results. Compare the field value differences of records with the same key value to obtain the field value difference analysis results of AB records that exist in library A but not in library B, BA records that exist in library B but not in library A, and A&B records that are common to both library A and library B. The A&B records include records with completely identical field values, records with missing test differences in field values, and records with non-missing test differences in field values.

[0072] It should be noted that the key values ​​and other field values ​​in the hashmap are all converted to strings for comparison to obtain the integrity difference analysis results. By comparing the field value differences of records with the same key value, the field value difference analysis results can be obtained, including AB records that exist in database A but not in database B, BA records that exist in database B but not in database A, and A&B records that are common to database A and database B. Among them, A&B records include records with completely identical field values, records with missing test differences in field values, and records with non-missing test differences in field values.

[0073] It should be understood that converting all field values ​​to string format during field comparison eliminates the impact of data type differences on the comparison results. By comparing the key values ​​in the hashmap, the following difference analysis results can be output: AB records: Records that exist in database A but not in database B; BA record: A record where database B exists but database A does not; A&B records: Records shared by both database A and database B; By comparing the field values ​​in records A and B item by item, the results can be categorized as follows: Completely identical: Field values ​​are the same; Missing test difference (N1): Any database field value is 999999 or 999998; Non-missing test difference (N2): Field values ​​are different and not missing tests.

[0074] Understandably, comparing the differences between databases A and B based on the key value and outputting AB, BA, A&B, etc. respectively, converting the key value and other field values ​​to strings during the comparison can avoid the impact of data type differences on the comparison results.

[0075] Step S32: Write the integrity difference analysis results and the field value difference analysis results into a file under the specified path.

[0076] It is understandable that after obtaining the difference analysis results, the integrity difference analysis results and the field value difference analysis results can be written to a file under a specified path.

[0077] Furthermore, step S32 specifically includes the following steps: Write the difference analysis results to the pathname specified in the command line, and output a result file containing the overall situation output, the AB records, the BA records, the A&B records compared with the key value, the field difference classification statistics and analysis results, and the field comparison results of the A&B records. The result file is in csv or xlsx format, and the A&B records include the output field comparison result flag and the output results of library A and library B.

[0078] It should be understood that writing the difference analysis results to the pathname specified in the command line can output a result file containing overall output, the AB records, BA records, A&B records compared with the key value, field difference classification statistics and analysis results, and field comparison results of the A&B records. The result file is in csv or xlsx format, and the A&B records include output field comparison result flags and output results of library A and library B.

[0079] It should be noted that CSV or XLSM formats can be easily opened with Microsoft Office tools, allowing for quick data filtering and selection. For comparing records A and B, the system outputs not only the field comparison result indicators but also the results from databases A and B for easy verification. If the number of records in the hashmap and the original searched records are not equal, a warning is given, indicating an issue with the key value selection. In general, if the total number of records does not match the number of records in the returned hashmap, it proves that the selected key value is not unique, which will affect the accuracy of the results.

[0080] Understandably, the field difference classification statistics provide the magnitude of the differences in each field, allowing people to quickly identify the factors that cause the biggest problems.

[0081] It should be understood that difference analysis is divided into two types: record-level integrity differences and feature-level value differences.

[0082] It should be noted that comparisons based on key values, such as AB, BA, and A&B, represent integrity differences; feature-level differences cannot be compared if the key values ​​are different.

[0083] Feature-level differences are calculated by comparing the values ​​of the second field and subsequent fields in the query results (where the key value is the first and the values ​​are the same) based on the same key value. The results can be filtered by comparison flags, and the specific feature values ​​of the two databases can be viewed. This generates an overall result of the differences in each field. Overall, feature-level differences in A&B queries involve more computation.

[0084] In the specific implementation, after comparing and calculating the hashmaps returned by libraries A and B, the following result files are output in the specified result directory (i.e., the pathname specified on the command line): main.txt: Outputs the overall situation, including the total number of records retrieved from the two libraries, the number of records after hashmapping using the key (if the total number of records is not equal, it indicates that the key selection in this statement is problematic), the number of records in A and B, the number of records in BA, and the number of records shared by A and B, etc.

[0085] cimiss-yun.csv: Compare records by key value; records that exist in database A but not in database B. yun-cimiss.csv: Compare records by key value; records that are present in database B but not in database A. reasonOut.csv: When the key values ​​are the same, the total differences of each field in the two databases and the classification analysis (divided into completely identical, completely identical, and differences caused by missing tests (missing test values ​​of 999999 or 999998 are marked with N1, and differences of non-missing test values ​​are marked with N2) common.csvkey: Records with the same value are compared to the differences of each element. The differences of each element are arranged in order, in groups of 3 columns. The first column is the value of the field in database A, the second column is the value of the field in database B, and the third column is the comparison result (Y for the same, N1 and N2 for different), which facilitates subsequent filtering. The format is that each field has three corresponding columns, except for the key, which are the comparison result identifier, the cimiss field value, and the cloud platform field value, separated by commas.

[0086] In the actual implementation, the comparison results for each field in the output file common.csv are arranged in the following format: Field name_comparison result flag, Field name_value from database A, Field name_value from database B, The comparison results are marked as “Y” (same), “N1” (missing test difference) or “N2” (not missing test difference); By using unique indexes on key fields, the program enables integrity verification and element value consistency analysis of meteorological data tables (such as global surface tables, China surface hour tables, daily value tables, satellite cloud wind guidance tables, etc.). When the key field is a composite field, the program generates a unique identifier by string concatenation (such as V01301||'_'||d_datetime) and supports formatting of time and numerical fields (such as to_char(V05001,'999.000')).

[0087] This embodiment, through the above-described scheme, converts all key values ​​and other field values ​​in the hashmap into strings for comparison, obtaining integrity difference analysis results. It compares the field value differences of records with the same key value, obtaining AB records (those existing in database A but not in database B), BA records (those existing in database B but not in database A), and A&B records (shared by databases A and B). The A&B records include records with completely identical field values, records with missing data differences, and records with non-missing data differences. Writing the difference analysis results to a file under a specified path enables the comparison of integrity and element value differences between identical or different data tables within and across the same database in the Xugu database. This allows for rapid acquisition of meteorological data comparison and analysis results based on the Xugu database, providing clear, specific, and highly usable results. It improves the efficiency and accuracy of difference identification, ensures the uniformity of the data table structure, enhances program execution efficiency, reduces system memory resource consumption, and increases the speed and efficiency of meteorological data comparison and analysis based on the Xugu database. This is beneficial for discovering and understanding the patterns of meteorological data entry into the database.

[0088] Accordingly, the present invention further provides a meteorological data comparison and analysis tool based on the Xugu database.

[0089] Reference Figure 6 , Figure 6 This is a functional block diagram of the first embodiment of the meteorological data comparison and analysis tool based on the Xugu database of the present invention.

[0090] In the first embodiment of the meteorological data comparison and analysis tool based on the Xugu database of the present invention, the meteorological data comparison and analysis tool based on the Xugu database includes: The connection establishment module 10 is used to read the first two lines of the database connection configuration file and establish virtual database connections with database A and database B respectively.

[0091] The query storage module 20 is used to send two SQL query statements with key values ​​from the command line or query configuration file to the database A and the database B respectively for execution, obtain query results, convert the query results into strings and store them in the hashmap data structure in memory.

[0092] The difference analysis module 30 is used to compare the key values ​​in the hashmap to obtain the integrity difference analysis result, compare the field value differences of records with the same key value to obtain the field value difference analysis result, and write the integrity difference analysis result and the field value difference analysis result into a file under a specified path.

[0093] The connection establishment module 10 is further configured to read the first two lines of the database connection configuration file dataBaseConn.txt, use the first line of the database connection configuration file as the connection address of database A, and use the second line of the database connection configuration file as the connection address of database B. The dataBaseConn.txt file retains connection addresses of several databases at the end, which are copied to the first or second line for application. A virtual database connection to database A is established based on the connection address of database A, and a virtual database connection to database B is established based on the connection address of database B.

[0094] The query storage module 20 is further configured to obtain SQL1 and SQL2 query statements from SQL query statements input via the command line; or obtain two SQL1 and SQL2 query statements with key values ​​from a query configuration file; send the SQL1 query statement to database A for execution to obtain the query result of database A, and send the SQL2 query statement to database B for execution to obtain the query result of database B; store the first field of the query result of database A and the query result of database B as the key value; store the second and subsequent fields of the query result of database A and the query result of database B using a List, and use the List as the value value, convert it into a string and store it in a hashmap data structure in memory.

[0095] The query storage module 20 is also used to, or when it detects that sql1 and sql2 in the command line are the fixed string "test", use the first line of the query configuration file selectSql.txt as the sql1 query statement and the second line of selectSql.txt as the sql2 query statement. The end of the selectSql.txt file retains several commonly used query SQL statements for databases, which can be copied to the first or second line to be applied and effective.

[0096] The query storage module 20 is also used to detect when the second field in the query results of database A and database B contains the special character "". ", and not count( When the query results of database A and database B are returned, all fields are automatically obtained. The query results of database A and database B are compared according to the field names of all returned fields. The same fields are combined into a new SQL query statement and sent to database A and database B. The first field of the new SQL query statement is still the first field of the original SQL1 query statement and SQL2 query statement.

[0097] The difference analysis module 30 is further configured to convert all key values ​​and other field values ​​in the hashmap into strings for comparison, obtain integrity difference analysis results, compare the field value differences of records with the same key value, and obtain field value difference analysis results for records containing AB records that exist in library A but not in library B, records containing BA records that exist in library B but not in library A, and records containing A&B records that are common to both library A and library B. The A&B records include records with completely identical field values, records with missing test differences, and records with non-missing test differences. The integrity difference analysis results and the field value difference analysis results are written to a file under a specified path.

[0098] The difference analysis module 30 is further configured to write the difference analysis results to the pathname specified by the command line, and output a result file containing the overall situation output, the AB records, the BA records, the A&B records compared with the key value, the field difference classification statistics and analysis results, and the field comparison results of the A&B records. The result file is in csv or xlsx format, and the A&B records include the output field comparison result flag and the output results of library A and library B.

[0099] The steps for implementing each functional module of the meteorological data comparison and analysis tool based on the Xugu database can be referred to in the various embodiments of the meteorological data comparison and analysis method based on the Xugu database of this invention, and will not be repeated here.

[0100] Furthermore, this embodiment of the invention also proposes a storage medium storing a meteorological data comparison and analysis program based on the Xugu database. When the meteorological data comparison and analysis program based on the Xugu database is executed by a processor, it performs the following operations: Read the first two lines of the database connection configuration file and establish virtual database connections with database A and database B respectively; Two SQL query statements with key values ​​from the command line or query configuration file are sent to database A and database B respectively for execution to obtain query results. The query results are then converted into strings and stored in a hashmap data structure in memory. The integrity difference analysis results are obtained by comparing the key values ​​in the hashmap, and the field value differences of records with the same key value are obtained by comparing the field value difference analysis results. The integrity difference analysis results and the field value difference analysis results are written to a file under the specified path.

[0101] Furthermore, when the meteorological data comparison and analysis program based on the virtual valley database is executed by the processor, it also performs the following operations: Read the first two lines of the database connection configuration file dataBaseConn.txt, use the first line of the database connection configuration file as the connection address of database A, and use the second line of the database connection configuration file as the connection address of database B. The dataBaseConn.txt file has several database connection addresses reserved at the end. When using them, copy them to the first or second line to apply the changes. Establish a virtual database connection with database A based on the connection address of database A, and establish a virtual database connection with database B based on the connection address of database B.

[0102] Furthermore, when the meteorological data comparison and analysis program based on the virtual valley database is executed by the processor, it also performs the following operations: Retrieve the SQL1 and SQL2 query statements from the SQL query statements entered in the command line; Alternatively, retrieve two query statements, SQL1 and SQL2, with key values ​​from the query configuration file; The SQL1 query statement is sent to database A for execution, and the query result of database A is obtained. The SQL2 query statement is sent to database B for execution, and the query result of database B is obtained. Store the first field from the query results of library A and the query results of library B as the key value; The second and subsequent fields of the query results from library A and library B are stored using a List, and the List is used as the value. After being converted into a string, it is stored in a hashmap data structure in memory.

[0103] Furthermore, when the meteorological data comparison and analysis program based on the virtual valley database is executed by the processor, it also performs the following operations: Alternatively, if the command line detects that sql1 and sql2 are the fixed string "test", the first line of the query configuration file selectSql.txt will be used as the sql1 query statement, and the second line of selectSql.txt will be used as the sql2 query statement. The end of the selectSql.txt file contains several commonly used query SQL statements for databases. When needed, these statements can be copied to the first or second line to apply the query.

[0104] Furthermore, when the meteorological data comparison and analysis program based on the virtual valley database is executed by the processor, it also performs the following operations: The second field in both the query results for database A and database B was found to contain the special character "". ", and not count( When querying database A and database B, all fields are automatically retrieved. The query results for database A and database B are compared based on the field names of all returned fields. The same fields are combined to form a new SQL query statement and sent to database A and database B. The first field of the new SQL query statement is still the first field of the original SQL1 query statement and SQL2 query statement.

[0105] Furthermore, when the meteorological data comparison and analysis program based on the virtual valley database is executed by the processor, it also performs the following operations: The key values ​​and other field values ​​in the hashmap are all converted to strings for comparison to obtain the integrity difference analysis results. The field value differences of records with the same key value are compared to obtain the field value difference analysis results of A&B records that exist in library A but not in library B, B&A records that exist in library B but not in library A, and A&B records that are common to library A and library B. The A&B records include records with completely identical field values, records with missing test differences in field values, and records with non-missing test differences in field values. Write the integrity difference analysis results and the field value difference analysis results to a file in the specified path.

[0106] Furthermore, when the meteorological data comparison and analysis program based on the virtual valley database is executed by the processor, it also performs the following operations: Write the difference analysis results to the pathname specified in the command line, and output a result file containing the overall situation output, the AB records, the BA records, the A&B records compared with the key value, the field difference classification statistics and analysis results, and the field comparison results of the A&B records. The result file is in csv or xlsx format, and the A&B records include the output field comparison result flag and the output results of library A and library B.

[0107] Those skilled in the art will understand that all or part of the steps in the methods described above can be implemented by a program instructing related hardware. The program is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium is a computer-readable storage medium, including: USB flash drive, mobile hard drive, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, and other media that can store program code.

[0108] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0109] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0110] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.

Claims

1. A method for comparative analysis of meteorological data based on the Xugu database, characterized in that, The meteorological data comparative analysis method based on the Xugu database includes: Read the first two lines of the database connection configuration file and establish virtual database connections with database A and database B respectively; Two SQL query statements with key values ​​from the command line or query configuration file are sent to database A and database B respectively for execution to obtain query results. The query results are then converted into strings and stored in a hashmap data structure in memory. The integrity difference analysis results are obtained by comparing the key values ​​in the hashmap, and the field value differences of records with the same key value are obtained by comparing the field value difference analysis results. The integrity difference analysis results and the field value difference analysis results are written to a file under the specified path.

2. The meteorological data comparative analysis method based on the Xugu database as described in claim 1, characterized in that, The step of reading the first two lines of the database connection configuration file and establishing virtual database connections with databases A and B respectively includes: Read the first two lines of the database connection configuration file dataBaseConn.txt, use the first line of the database connection configuration file as the connection address of database A, and use the second line of the database connection configuration file as the connection address of database B. The dataBaseConn.txt file has several database connection addresses reserved at the end. When using them, copy them to the first or second line to apply the changes. A virtual database connection is established with database A based on the connection address of database A, and a virtual database connection is established with database B based on the connection address of database B.

3. The meteorological data comparative analysis method based on the Xugu database as described in claim 1, characterized in that, The process of sending two SQL query statements with key values ​​from the command line or query configuration file to database A and database B respectively for execution, obtaining query results, converting the query results into strings, and storing them in a hashmap data structure in memory includes: Retrieve the SQL1 and SQL2 query statements from the SQL query statements entered in the command line; Alternatively, retrieve two query statements, SQL1 and SQL2, with key values ​​from the query configuration file; The SQL1 query statement is sent to database A for execution, and the query result of database A is obtained. The SQL2 query statement is sent to database B for execution, and the query result of database B is obtained. Store the first field from the query results of library A and the query results of library B as the key value; The second and subsequent fields of the query results from library A and library B are stored using a List, and the List is used as the value. After being converted into a string, it is stored in a hashmap data structure in memory.

4. The meteorological data comparative analysis method based on the Xugu database as described in claim 3, characterized in that, The above refers to retrieving two SQL1 and SQL2 query statements with key values ​​from the query configuration file, including: Alternatively, if the command line detects that sql1 and sql2 are the fixed string "test", the first line of the query configuration file selectSql.txt will be used as the sql1 query statement, and the second line of selectSql.txt will be used as the sql2 query statement. The end of the selectSql.txt file contains several commonly used query SQL statements for databases. When needed, these statements can be copied to the first or second line to apply the query.

5. The meteorological data comparative analysis method based on the Xugu database as described in claim 3, characterized in that, Before storing the second and subsequent fields of the query results from database A and database B using a List, and converting the List into a string and storing it in a hashmap data structure in memory, the meteorological data comparison and analysis method based on the Xugu database further includes: The second field in both the query results for database A and database B was found to contain the special character "". ", and not count( When querying database A and database B, all fields are automatically retrieved. The query results for database A and database B are compared based on the field names of all returned fields. The same fields are combined to form a new SQL query statement and sent to database A and database B. The first field of the new SQL query statement is still the first field of the original SQL1 query statement and SQL2 query statement.

6. The meteorological data comparative analysis method based on the Xugu database as described in claim 1, characterized in that, The process of comparing the key values ​​in the hashmap to obtain integrity difference analysis results, comparing the field value differences of records with the same key value to obtain field value difference analysis results, and writing the integrity difference analysis results and the field value difference analysis results to a file under a specified path includes: The key values ​​and other field values ​​in the hashmap are all converted to strings for comparison to obtain the integrity difference analysis results. The field value differences of records with the same key value are compared to obtain the field value difference analysis results of A&B records that exist in library A but not in library B, B&A records that exist in library B but not in library A, and A&B records that are common to library A and library B. The A&B records include records with completely identical field values, records with missing test differences in field values, and records with non-missing test differences in field values. Write the integrity difference analysis results and the field value difference analysis results to a file in the specified path.

7. The meteorological data comparative analysis method based on the Xugu database as described in claim 6, characterized in that, The step of writing the difference analysis results to a file under a specified path includes: Write the difference analysis results to the pathname specified in the command line, and output a result file containing the overall situation output, the AB records, the BA records, the A&B records compared with the key value, the field difference classification statistics and analysis results, and the field comparison results of the A&B records. The result file is in csv or xlsx format, and the A&B records include the output field comparison result flag and the output results of library A and library B.

8. A meteorological data comparison and analysis tool based on the Xugu database, characterized in that, The meteorological data comparison and analysis tool based on the Xugu database includes: The connection establishment module is used to read the first two lines of the database connection configuration file and establish virtual database connections with database A and database B respectively. The query storage module is used to send two SQL query statements with key values ​​from the command line or query configuration file to the database A and the database B respectively for execution, obtain query results, convert the query results into strings and store them in the hashmap data structure in memory; The difference analysis module is used to compare the key values ​​in the hashmap to obtain the integrity difference analysis result, compare the field value differences of records with the same key value to obtain the field value difference analysis result, and write the integrity difference analysis result and the field value difference analysis result to a file under a specified path.

9. A meteorological data comparison and analysis device based on the Xugu database, characterized in that, The meteorological data comparison and analysis device based on the virtual valley database includes: a memory, a processor, and a meteorological data comparison and analysis program based on the virtual valley database stored in the memory and executable on the processor. The meteorological data comparison and analysis program based on the virtual valley database is configured to implement the steps of the meteorological data comparison and analysis method based on the virtual valley database as described in any one of claims 1 to 7.

10. A storage medium, characterized in that, The storage medium stores a meteorological data comparison and analysis program based on the Xugu database. When the processor executes the meteorological data comparison and analysis program based on the Xugu database, it implements the steps of the meteorological data comparison and analysis method based on the Xugu database as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Data difference comparison method based on Oracle database

    CN107784102A

  • Method and device for full data comparison based on database, equipment and storage medium

    CN111177119A

  • Universal configurable unstructured meteorological data processing method and device

    CN116089366A

  • Data search method and system

    JP2023021946A