Method and system for monitoring data in large data volume table of Rds database

By synchronizing large-scale tables from the Rds database to dataworks and performing secondary verification, the accuracy problem of full-scale monitoring in MySQL databases during large-scale data processing was solved, achieving data accuracy and stability while reducing database burden and costs.

CN118672860APending Publication Date: 2024-09-20HUIBO TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411132579.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-19
Publication Date
2024-09-20

AI Technical Summary

Technical Problem

Existing MySQL databases lack effective means to monitor the accuracy of full data in large-scale data processing. Incremental monitoring and sampling monitoring are subject to chance and the monitoring results are not accurate enough. The development and maintenance costs of batch monitoring are high, and database performance issues lead to high complexity of monitoring logic.

Method used

The large data volume table of the Rds database is synchronized to DataWorks. The DataWorks big data processing platform is used to create a task workflow to execute the monitoring logic on a regular schedule. The monitoring results are then exported back to the Rds database for secondary verification. Finally, the results are sent to the person in charge via a Python script.

Benefits of technology

It achieves accurate full-scale monitoring of big data tables, reduces the burden on the Rds database, ensures data accuracy and timely detection of anomalies, and lowers development and maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118672860A
    Figure CN118672860A
Patent Text Reader

Abstract

The invention provides a method for monitoring data in a large data volume table of an Rds database. The method comprises the following steps: synchronizing the large data volume table to be monitored in the Rds database to dataworks; a dataworks big data processing platform is utilized to create a corresponding task process, and monitoring logic is executed regularly; the monitoring result is guided back to the rds database from the dataworks; performing secondary verification on the monitoring result set in the rds; and the secondary verification data result is sent to a person in charge.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer data technology, and in particular to a method and system for monitoring data in a large data table of an RDS database. Background Art

[0002] With the rapid development of information technology, MySQL databases are widely used in various data storage and processing scenarios. In the process of large-scale data processing, data accuracy is crucial. However, existing monitoring methods often focus on performance monitoring and small-batch data monitoring, but lack effective monitoring methods for the accuracy of full and large-scale data.

[0003] Disadvantages of existing technologies: incremental monitoring and sampling monitoring are accidental, the monitoring results are not comprehensive, and the accuracy is not very high; the batch monitoring method has high development costs, and the development, maintenance, database performance, and monitoring runtime costs of the basic code are high, and the monitoring SQL logic complexity cannot be too high due to database performance issues. Summary of the invention

[0004] In view of the above technical problems, in order to overcome the shortcomings of the above-mentioned prior art, the present invention proposes a data monitoring method and system for large data tables of Rds database, which solves the problem that large data tables are difficult to monitor, ensures the accuracy of large table data, and detects problems in advance.

[0005] The present invention provides a method for monitoring data in a large data table of an RDS database, comprising: S1. Synchronize the large data tables to be monitored by the Rds database to DataWorks; S2. Use the DataWorks big data processing platform to create corresponding task processes and execute monitoring logic regularly; S3. Import the monitoring results from DataWorks back to the RDS database; S4, perform secondary verification on the monitoring result set in RDS; S5. Send the secondary verification data result to the person in charge.

[0006] Furthermore, in S1, the large data volume table includes a points membership table and a points details table.

[0007] Furthermore, in S2, specific monitoring logic is added in the form of sql.

[0008] Furthermore, in S2, the points membership table and the points details table are associated according to the member ID full table, and the points are grouped according to the member ID, and the points values ​​are aggregated according to the points type and the addition and subtraction points type to obtain the remaining points, used points, and expired points recorded by each person in the points details table.

[0009] Furthermore, in S2, the remaining points, used points, and expired points obtained by aggregate calculation are compared with the points membership table.

[0010] Furthermore, in S3, the member ID records with abnormal points data are imported back to the RDS database as monitoring results.

[0011] Furthermore, in S4, a python script is used to perform secondary verification.

[0012] In a second aspect, a Rds database large data table data monitoring system includes: The data synchronization module is used to synchronize the large data tables to be monitored by the Rds database to DataWorks; The data monitoring module is used to use the DataWorks big data processing platform to create corresponding task processes and execute monitoring logic at regular intervals; The data import module is used to import monitoring results from DataWorks back to the RDS database; The data verification module is used to perform secondary verification on the monitoring result set in RDS; The monitoring result module is used to send the secondary verification data results to the person in charge.

[0013] In a third aspect, an embodiment of the present invention provides an electronic device, comprising a memory and a processor. The memory is used to store computer program instructions executable by the processor, and the processor implements the data monitoring method provided by the embodiment of the present invention when executing the computer program.

[0014] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer program instructions. When the computer program instructions are executed by a computer, the computer executes the steps of the above-mentioned data monitoring method.

[0015] The beneficial effects of the embodiments of the present invention are as follows: The present invention cleverly utilizes the combination of DataWorks+RDS+Python to complete data monitoring between large data tables and complete the accuracy verification of the entire data table; it ensures the accuracy of the results of multi-table association and full monitoring of large tables, and does not cause a large burden on the database while completing the monitoring, thus filling the gap of the lack of effective RDS large table monitoring method. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 A schematic diagram of a data monitoring method provided by an embodiment of the present invention; Figure 2A schematic diagram of the composition of a data monitoring system provided by an embodiment of the present invention; Figure 3 A schematic diagram of the composition of an electronic device provided by an embodiment of the present invention; Figure 4 A schematic diagram of the composition of a computer storage medium provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0017] Certain embodiments of the present invention will be described more fully hereinafter with reference to the accompanying drawings, in which some, but not all, embodiments are shown. Indeed, various embodiments of the present invention may be implemented in many different forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure may satisfy applicable legal requirements.

[0018] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with specific embodiments and with reference to the accompanying drawings.

[0019] Definitions of Abbreviations and Key Terms DataWorks: Alibaba Cloud's one-stop big data development and management tool (interface, a fast, fully managed GB / TB / PB-level data warehouse solution provided by Alibaba's general computing platform).

[0020] Rds: It is the abbreviation of relational database service, and the underlying layer is MySQL database.

[0021] Sql: is a programming language used to manage and operate relational databases.

[0022] An embodiment of the present invention provides a method for monitoring data in a large data table of an Rds database. Figure 1 As shown, S1. Synchronize the large data tables to be monitored by the Rds database to DataWorks; S2. Use the DataWorks big data processing platform to create corresponding task processes and execute monitoring logic regularly; S3. Import the monitoring results from DataWorks back to the RDS database; S4, perform secondary verification on the monitoring result set in RDS; S5. Send the secondary verification data result to the person in charge.

[0023] An embodiment of the present invention provides an actual use example of a method for monitoring data in a large data table of an Rds database: Table: Points Member Table Key fields: Remaining points, Used points, Expired points Key fields of the points details table: points type, points value, increase / deduction type 1) Synchronize the membership table and points details table to DataWorks; 2) Create a task flow and add specific monitoring logic in SQL.

[0024] The monitoring task is to check whether the remaining points, used points, and expired points recorded in the points membership table correspond to the points details.

[0025] The difficulty in monitoring is that the membership table marks one piece of data per person, and the data volume is counted in billions. The points membership table marks each member's points change record as one piece of data, and the data volume is more than one billion. Under the premise of such a large amount of data, even single-table full-table query monitoring is difficult in RDS. Now two super large tables need to be associated and aggregated for monitoring, so this task can only be completed using a big data platform.

[0026] a. The two tables are linked based on the member ID table, grouped by member ID, and the points value is aggregated according to the point type and addition and subtraction point type to obtain the remaining points, used points, and expired points recorded by each person in the points details table.

[0027] b. Compare the remaining points, used points, and expired points obtained through aggregate calculation with the points membership table.

[0028] 3) Import the member ID records with data anomalies back to the RDS database.

[0029] 4) Obtain the DataWorks monitoring results and perform secondary verification in RDS using a Python script as the result set.

[0030] Secondary verification can be implemented in RDS because the problematic data has been initially screened out through the initial screening of the DataWorks big data platform. The amount of data that needs to be monitored may be reduced from billions of data to a few or dozens of data items. This amount of data can be easily monitored through complex logic in RDS.

[0031] Because the data in DataWorks is delayed in time, secondary verification in RDS is a necessary step to ensure the accuracy of data monitoring.

[0032] The secondary verification steps include: a. Obtain the member list in the monitoring results; b. Based on the member list, retrieve the member's real-time member information and points details from the RDS database, and perform aggregate calculations according to the calculation logic; c. Determine whether there are any anomalies in the information in the real-time data.

[0033] 5) The secondary verification data results are sent to the corresponding person in charge through a script using the message robot interface provided by WeChat for Enterprise, so as to achieve the effect of early detection of problems.

[0034] Another embodiment of the present invention provides a Rds database large data table data monitoring system, such as Figure 2 As shown, including: The data synchronization module is used to synchronize the large data tables to be monitored by the Rds database to DataWorks; The data monitoring module is used to use the DataWorks big data processing platform to create corresponding task processes and execute monitoring logic at regular intervals; The data import module is used to import monitoring results from DataWorks back to the RDS database; The data verification module is used to perform secondary verification on the monitoring result set in RDS; The monitoring result module is used to send the secondary verification data results to the person in charge.

[0035] An embodiment of the present invention further provides an electronic device. Figure 3 As shown, the electronic device 9 includes: a processor 91, a communication interface 92, a memory 93, and a bus 94. The bus 94 is used to realize the connection communication of the components, the communication interface is used to communicate signaling or data with other node devices, and the memory 93 stores machine-readable instructions executable by the processor 91. When the electronic device 9 is running, the processor 91 communicates with the memory 93 through the bus 94, and the above-mentioned data monitoring method is executed when the machine-readable instructions are called by the processor 91.

[0036] The processor 91 includes one or more processors, which are responsible for executing instructions and performing arithmetic, logic and control operations. The processor can be a general-purpose processor, such as a central processing unit, or a dedicated processor, such as a graphics processor.

[0037] The communication interface 92 is an interface for communication and data transmission between different components, and may be a hardware interface, such as a connector, a cable, etc., or a software interface, such as a network protocol.

[0038] The memory 93 is used to store data and programs, and the data and programs used for the timed acquisition model training in the embodiment of the present invention are stored therein. The memory can be a main memory, that is, a main memory, or an auxiliary memory, such as a hard disk, a solid state drive, a USB flash drive, etc.

[0039] Bus 94 is used to transmit data and signals between various components and is divided into a data bus, an address bus and a control bus.

[0040] Figure 4 A computer-readable storage medium provided in an embodiment of the present invention is used to store computer program instructions. The storage medium can be embedded in the electronic device 9. When the computer program instructions are executed by the computer, the computer executes the data monitoring method described in the aforementioned method embodiment.

[0041] The present invention is based on the data monitoring method of large data tables in Rds database, transfers the pressure to dataowrks, and only performs monitoring, calculation and comparison of a small amount of data in Rds, thereby ensuring the stability of Rds and preventing online programs from being affected by database performance overflow due to monitoring programs. At the same time, the accuracy of the data is also protected, ensuring that abnormal data is discovered and processed early, and is suitable for monitoring of some tables with large data volumes, involving many tables and with complex monitoring logic.

[0042] In addition, the above-mentioned figures are only schematic illustrations of the processing included in the method according to the embodiment of the present invention, and are not intended to limit the purpose. The order in the figures does not limit the time sequence of these operations, and these operations can be performed simultaneously or independently in multiple modules. Moreover, multiple steps can be combined into one step for execution, or one step can be disassembled into multiple steps for execution.

[0043] The above description is only a specific implementation mode of the present invention and is not intended to limit the protection scope of the present invention. For those skilled in the art, the above embodiments can be changed or modified within the scope of the present invention, and these changes and modifications also fall within the protection scope of the claims of the present invention.

Claims

1. A method for monitoring data in a large data table of an Rds database, characterized in that: include: S1. Synchronize the large data tables to be monitored by the Rds database to DataWorks; S2. Use the DataWorks big data processing platform to create corresponding task processes and execute monitoring logic regularly; S3. Import the monitoring results from DataWorks back to the RDS database; S4, perform secondary verification on the monitoring result set in RDS; S5. Send the secondary verification data result to the person in charge.

2. The data monitoring method according to claim 1, characterized in that: In S1, the large data table includes a points membership table and a points details table.

3. The data monitoring method according to claim 2, characterized in that: In S2, specific monitoring logic is added in the form of SQL.

4. The data monitoring method according to claim 2, characterized in that: In S2, the points membership table and the points details table are associated according to the member ID full table, and the members are grouped according to the member IDs, and the points values ​​are aggregated according to the points type and the addition and subtraction points type to obtain the remaining points, used points, and expired points recorded by each person in the points details table.

5. The data monitoring method according to claim 4, characterized in that: In S2, the remaining points, used points, and expired points obtained by aggregate calculation are compared with the points membership table.

6. The data monitoring method according to claim 5, characterized in that: In the S3, the member ID records with abnormal points data are imported back to the RDS database as monitoring results.

7. The data monitoring method according to claim 1, characterized in that: In S4, a python script is used to perform secondary verification.

8. The data monitoring method according to claim 6, characterized in that: In S4, the secondary verification step includes: a. Obtain the member list from the monitoring results; b. Based on the member list, retrieve the member's real-time member information and points details from the RDS database, and perform aggregate calculations according to the calculation logic; c. Determine whether there are any anomalies in the information in the real-time data.

9. A Rds database large data table data monitoring system, characterized in that: include: The data synchronization module is used to synchronize the large data tables to be monitored by the Rds database to DataWorks; The data monitoring module is used to use the DataWorks big data processing platform to create corresponding task processes and execute monitoring logic at regular intervals; The data import module is used to import monitoring results from DataWorks back to the RDS database; The data verification module is used to perform secondary verification on the monitoring result set in RDS; The monitoring result module is used to send the secondary verification data results to the person in charge.

10. A computer-readable storage medium storing computer program instructions, wherein when the computer program instructions are executed by a computer, the computer executes the steps of the data monitoring method according to any one of claims 1 to 8.