A method and system for storing batch data

Through the batch data warehousing method and system, the detection module and the data cleaning module are used to process the data in batches and asynchronous thread processing, which solves the problem of high server pressure in the traditional data warehousing method, realizes efficient data upload and extends the life of the server. effect.

CN114625807BActive Publication Date: 2024-10-08SHENZHEN COMTOP INFORMATION TECH
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210169028.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-23
Publication Date
2024-10-08
Estimated Expiration
2042-02-23

AI Technical Summary

Technical Problem

The traditional data warehousing method transmits information offline, which causes high pressure on the server, affects the data transmission speed and shortens the service life.

Method used

Use batch data warehousing methods and systems, including detection module, data receiving module, data processing module, data engine, database and data cleaning module, to extract, clean and configure SQL through offline and real-time data warehousing. Script and batch upload, utilize asynchronous thread processing and index building, dynamically adjust server performance detection to reduce server pressure.

Benefits of technology

It improves data upload efficiency, extends server service life, ensures data consistency and accuracy, reduces server performance pressure, and improves data transmission effects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114625807B_ABST
    Figure CN114625807B_ABST
Patent Text Reader

Abstract

The present invention discloses a batch data storage method and system. The batch data storage system includes a detection module, a data receiving module, a data processing module, a data engine, a database and a data cleaning module. The batch data storage method includes two modes: offline data storage and real-time data storage. The specific operation steps are as follows: S1: offline data storage: S11: extracting data through a data engine; S12: collecting data through a data receiving module and cleaning data through a data cleaning module; S13: configuring an SQL script for the cleaned data according to the data processing module. The present application cleans data when offline data is stored, and the cleaned data is used to configure an SQL script, and the server performance is detected through a detection module, and the data is converted and uploaded in batches, which greatly reduces the pressure on the server, increases the service life of the server, and improves the data upload efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computer technology, and specifically relates to a batch data storage method and system. Background Art

[0002] A data warehouse is a strategic collection of all types of data support for decision-making processes at all levels of an enterprise. It is considered a core component of business intelligence. It is composed of a variety of data information. The data in the data warehouse is extracted, integrated, processed and summarized from the original scattered data, and the amount of data is very large.

[0003] When inputting scattered information data into a data warehouse, the traditional method is to transmit the information offline. The information is integrated and processed before transmission, and all data is directly transmitted during transmission. This puts a lot of pressure on the server, easily affects the data transmission speed and causes server overload, affecting its service life. Therefore, in order to solve the above problems, a data warehousing method and system with good data upload processing effect are proposed. Summary of the invention

[0004] In view of the deficiencies in the prior art, the present invention provides a batch data storage method and system, which has the advantage of good data upload processing effect.

[0005] To achieve the above object, the present invention provides the following technical solutions: a batch data storage method and system, the batch data storage system includes a detection module, a data receiving module, a data processing module, a data engine, a database and a data cleaning module, the batch data storage method includes two modes: offline data storage and real-time data storage, and the specific operation steps are as follows:

[0006] S1: Offline data storage:

[0007] S11: extracting data through a data engine;

[0008] S12: Gathering the data through the data receiving module and cleaning the data through the data cleaning module;

[0009] S13: configuring an SQL script for the cleaned data according to the data processing module, and storing the script information in the memory of the data processing module;

[0010] S14: Detecting the server performance through the detection module and setting a suitable upload data size;

[0011] S15: taking the appropriate uploaded data size in S14 as the standard, batch converting all data according to the standard and classifying them into batches;

[0012] S16: Upload the converted data to the database and integrate the data through the SQL script configured in S13.

[0013] S2: Real-time data storage:

[0014] S21: Detecting the server performance through the detection module and setting a suitable upload data size;

[0015] S22: Taking the set appropriate uploaded data size as a standard, extracting data in real time through the data engine;

[0016] S23: receiving data through the data receiving module and cleaning the extracted data through the data cleaning module, configuring SQL scripts for the cleaned data through the data processing module, and storing the scripts in the memory of the data processing module.

[0017] S24: Upload the cleaned data and back it up in the server as a data sample;

[0018] S25: The uploaded data is spliced ​​and integrated using the SQL script configured in S23;

[0019] S26: Continue to extract data that meets the standard size, and use the data sample previously backed up and saved in the server as the main data, perform data cleaning on the newly extracted data, and upload and back up the data after data cleaning to the server;

[0020] S27: Repeat the operations in S22 to S26 until all the data are uploaded.

[0021] Preferably, the data cleaned by the data cleaning module in S12 and S23 needs to be converted into a preset format, and the SQL script is configured by the preset format. The preset format is the data storage structure format in the data warehouse, and the primary key or joint primary key of the target data is determined by the name and time information of the target data. In this way, the SQL script can be easily configured. Through the conversion of the preset format, the data warehouse can store data conveniently, and the accuracy of the SQL script can be improved, which is convenient for data conversion and the subsequent processing and calling of uploaded data.

[0022] Preferably, indexes and internal tables are created for the data that has been stored, and the internal tables are converted into external tables. By creating indexes and tables, it is convenient to query the data, and it is also convenient for downstream data engines to query and download, which facilitates the use of data.

[0023] Preferably, when the newly extracted data is cleaned in S26, the data sample serving as the main data is not cleaned, and only the newly extracted data sample is cleaned. The newly extracted data is merged into the previous data sample when it is backed up and saved after cleaning. Such a design can ensure that the newly extracted data has a higher accuracy with the uploaded data, does not generate duplicate information, ensures data consistency, and only cleans the newly extracted data, which can ensure the accuracy of the uploaded data.

[0024] Preferably, the SQL script is parsed through an asynchronous thread, which can process multiple files in multiple threads. When processing one file, the program does not stop and wait for the file to be processed. Instead, the program processes the new file through a new thread, thereby ensuring the speed of data processing, saving time and improving efficiency.

[0025] Preferably, the size of the data after data cleaning in S23 is less than or equal to the size of the standard data. After the extracted new data is cleaned, the internal duplicate data and erroneous data are cleaned up, and its size is reduced to a certain extent compared with the size before cleaning, and does not affect the data upload speed. In addition, batching the data can reduce the pressure on server performance caused by uploading data too fast.

[0026] Preferably, the data cleaning in S12 and S23 is divided into three steps, the first step is deviation check, the second step is data transformation, and the third step is manual spot check, and the first two steps are iteratively performed. During cleaning, conflicting spelling rules, conflicting data and other human errors are first re-spelled, and some special values ​​in the data that have a greater impact on the analysis results are excluded. Then the logical consistency of the data is checked to eliminate logical errors. Finally, the data quality is manually spot-checked to determine the impact of erroneous data on the overall data results and understand the data quality. Through the process of data cleaning, it is possible to find spelling errors and conflicts between rules between data, and to exclude special data that have a greater impact on data analysis results, thereby ensuring the validity and accuracy of the analysis data. Finally, the data quality is manually spot-checked to understand the overall quality of the data and improve the degree of understanding of the data.

[0027] Preferably, the detection module in S14 and S21 detects the server including hard disk storage space, memory, CPU and bandwidth. The hard disk storage of the server is the limiting factor of the database size. The storage can also be in the form of network storage. The size of the server memory will affect the speed at which the server processes instructions. When processing complex and more instructions, higher memory is required. The CPU is the main factor affecting SQL script parsing. The number of CPUs and cores will affect how many concurrent instructions can be executed, and also affect the speed of executing instructions. Broadband has great limitations on data transmission. The higher the bandwidth, the greater the amount of data sent concurrently to the server. Multiple hardware jointly limit the effect of data transmission. Dynamically determining the appropriate standard data size for different server configurations can effectively reduce server pressure and improve data transmission efficiency.

[0028] Compared with the prior art, the present invention has the following beneficial effects:

[0029] This application cleans the data when the offline data is entered into the database, uses the cleaned data to configure the SQL script, detects the server performance through the detection module, and converts and uploads the data in batches, which greatly reduces the pressure on the server, increases the service life of the server, and improves the data upload efficiency; when uploading real-time data, the extracted data of standard size is cleaned to ensure data consistency, and the correctness of the new data is ensured by comparing and cleaning the subsequent new data with the uploaded data, and the data will not be repeated, which ensures data consistency and improves the effect of data transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 This is a flow chart of offline data storage in the present invention;

[0031] Figure 2 This is a flow chart of real-time data storage in the present invention. DETAILED DESCRIPTION

[0032] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0033] like Figure 1 to Figure 2 As shown, the present invention provides a technical solution: a batch data storage method and system, the batch data storage system includes a detection module, a data receiving module, a data processing module, a data engine, a database and a data cleaning module, the batch data storage method includes two modes: offline data storage and real-time data storage, and the specific operation steps are as follows:

[0034] S1: Offline data storage:

[0035] S11: extracting data through a data engine;

[0036] S12: Gathering the data through the data receiving module and cleaning the data through the data cleaning module;

[0037] S13: configuring an SQL script for the cleaned data according to the data processing module, and storing the script information in the memory of the data processing module;

[0038] S14: Detecting the server performance through the detection module and setting a suitable upload data size;

[0039] S15: taking the appropriate uploaded data size in S14 as the standard, batch converting all data according to the standard and classifying them into batches;

[0040] S16: Upload the converted data to the database and integrate the data through the SQL script configured in S13.

[0041] S2: Real-time data storage:

[0042] S21: Detecting the server performance through the detection module and setting a suitable upload data size;

[0043] S22: Taking the set appropriate uploaded data size as a standard, extracting data in real time through the data engine;

[0044] S23: receiving data through the data receiving module and cleaning the extracted data through the data cleaning module, configuring SQL scripts for the cleaned data through the data processing module, and storing the scripts in the memory of the data processing module.

[0045] S24: Upload the cleaned data and back it up in the server as a data sample;

[0046] S25: The uploaded data is spliced ​​and integrated using the SQL script configured in S23;

[0047] S26: Continue to extract data that meets the standard size, and use the data sample previously backed up and saved in the server as the main data, perform data cleaning on the newly extracted data, and upload and back up the data after data cleaning to the server;

[0048] S27: Repeat the operations in S22 to S26 until all the data are uploaded.

[0049] Among them, the data cleaned by the data cleaning module in S12 and S23 needs to be converted into a preset format, and the SQL script is configured according to the preset format. This method can facilitate the configuration of the SQL script. Through the conversion of the preset format, the accuracy of the SQL script can be improved, and the conversion speed can be increased, which is also convenient for processing the uploaded data.

[0050] Among them, indexes and internal tables are established for the data that has been stored, and the internal tables are converted into external tables. By establishing indexes and tables, it is convenient to query the data, and it is also convenient for downstream data engines to query and download, which facilitates the use of data.

[0051] Among them, when the newly extracted data is cleaned in S26, the data sample serving as the main data is not cleaned, and only the newly extracted data sample is cleaned. The newly extracted data is merged into the previous data sample when it is backed up and saved after cleaning. Such a design can ensure that the newly extracted data has a high accuracy with the uploaded data, does not generate duplicate information, ensures data consistency, and only cleans the newly extracted data to ensure the accuracy of the uploaded data.

[0052] The SQL script is parsed through an asynchronous thread, which can process multiple files in multiple threads. When processing one file, the program does not stop and wait for the processing of the file to be completed. Instead, the program processes the new file through a new thread, thereby ensuring the speed of data processing, saving time and improving efficiency.

[0053] Among them, the size of the data after data cleaning in S23 is less than or equal to the size of the standard data. After the new data is extracted and cleaned, the internal duplicate data and error data are cleaned up, and its size is reduced to a certain extent compared with the size before cleaning, and it does not affect the data upload speed. In addition, batching the data can reduce the pressure on server performance caused by uploading data too fast.

[0054] Among them, the data cleaning in S12 and S23 is divided into three steps, the first step is deviation check, the second step is data transformation, and the third step is manual spot check, and the first two steps are iteratively performed. During cleaning, conflicting spelling rules, conflicting data and other human errors are first re-spelled, and some special values ​​in the data that have a greater impact on the analysis results are excluded. Then the logical consistency of the data is checked to eliminate logical errors. Finally, the data quality is manually spot-checked to determine the impact of erroneous data on the overall data results and understand the data quality. Through the process of data cleaning, it is possible to find spelling errors and conflicts between rules between data, and to exclude special data that have a greater impact on data analysis results, thereby ensuring the validity and accuracy of the analysis data. Finally, the data quality is manually spot-checked to understand the overall quality of the data and improve the degree of understanding of the data.

[0055] Among them, the detection module in S14 and S21 detects the server including hard disk storage space, memory, CPU and bandwidth. The hard disk storage of the server is the limiting factor of the database size. Storage can also be in the form of network storage. The size of the server memory will affect the speed at which the server processes instructions. When processing complex and more instructions, higher memory is required. The CPU is the main factor affecting SQL script parsing. The number of CPUs and cores will affect how many concurrent instructions can be executed, and also affect the speed of executing instructions. Broadband has great limitations on data transmission. The higher the bandwidth, the greater the amount of data sent to the server. Multiple hardware jointly limit the effect of data transmission. For different server configurations, dynamically determining the appropriate standard data size can effectively reduce server pressure and improve data transmission efficiency.

[0056] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.

[0057] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A method and system for storing batch data, characterized in that: The batch data storage system includes a detection module, a data receiving module, a data processing module, a data engine, a database and a data cleaning module. The batch data storage method includes two modes: offline data storage and real-time data storage. The specific operation steps are as follows: S1: Offline data storage: S11: extracting data through a data engine; S12: Gathering the data through the data receiving module and cleaning the data through the data cleaning module; S13: configuring an SQL script for the cleaned data according to the data processing module, and storing the script information in the memory of the data processing module; S14: Detecting the server performance through the detection module and setting a suitable upload data size; S15: taking the appropriate uploaded data size in S14 as the standard, batch converting all data according to the standard and classifying them into batches; S16: upload the converted data to the database and integrate the data using the SQL script configured in S13; S2: Real-time data storage: S21: Detecting the server performance through the detection module and setting a suitable upload data size; S22: Taking the set appropriate uploaded data size as a standard, extracting data in real time through the data engine; S23: receiving data through the data receiving module and cleaning the extracted data through the data cleaning module, configuring SQL scripts for the cleaned data through the data processing module, and storing the scripts in the memory of the data processing module. S24: Upload the cleaned data and back it up in the server as a data sample; S25: The uploaded data is spliced ​​and integrated using the SQL script configured in S23; S26: Continue to extract data that meets the standard size, and use the data sample previously backed up and saved in the server as the main data, perform data cleaning on the newly extracted data, and upload and back up the data after data cleaning to the server; S27: Repeat the operations in S22 to S26 until all the data are uploaded.

2. A method and system for storing batch data according to claim 1, characterized in that: The data cleaned by the data cleaning module in S12 and S23 needs to be converted into a preset format, and the SQL script is configured according to the preset format. The preset format is the data storage structure format in the data warehouse, and the primary key or joint primary key of the target data is determined by the name and time information of the target data.

3. A method and system for storing batch data according to claim 1, characterized in that: Create indexes and internal tables for the data that has been stored, and convert the internal tables into external tables.

4. A method and system for storing batch data according to claim 1, characterized in that: When the newly extracted data is cleaned in S26, the data samples as the main data are not cleaned, and only the newly extracted data samples are cleaned. After the newly extracted data is cleaned, it is merged into the previous data samples when backing up and saving.

5. A method and system for storing batch data according to claim 1, characterized in that: The SQL script is parsed through an asynchronous thread.

6. A method and system for storing batch data according to claim 1, characterized in that: The size of the data after data cleaning in S23 is smaller than or equal to the size of the standard data.

7. A method and system for storing batch data according to claim 1, characterized in that: The data cleaning in S12 and S23 is divided into three steps. The first step is deviation check, the second step is data transformation, and the third step is manual spot check. The first two steps are iteratively performed. During cleaning, the conflicting spelling rules and conflicting data human errors are first re-spelled, and some special values ​​in the data that have a greater impact on the analysis results are excluded. Then, the logical consistency of the data is checked to eliminate logical errors. Finally, the data quality is manually spot checked to determine the impact of erroneous data on the overall data results and understand the data quality.

8. A method and system for storing batch data according to claim 1, characterized in that: The detection modules in S14 and S21 detect the server including hard disk storage space, memory, CPU and bandwidth. The hard disk storage of the server is the limiting factor of the database size. The storage adopts the form of network storage. The size of the server memory will affect the speed at which the server processes instructions. When processing complex and more instructions, higher memory is required. The CPU is the main factor affecting SQL script parsing. The number of CPUs and cores will affect how many concurrent instructions can be executed, and also affect the speed of executing instructions. Broadband has great limitations on data transmission. The higher the bandwidth, the greater the amount of data sent concurrently to the server.

Citation Information

Patent Citations

  • Data warehousing method and device

    CN107463610A

  • Data processing task operation detection method, computer equipment and storage medium

    CN113590445A

  • Method and system of restating telecommunications data by a batch-driven integrated rules module

    US7552145B1