Supercharge Your Innovation With Domain-Expert AI Agents!

MySQL data tracking method and storage medium

A data tracking and database technology, applied in database models, digital data processing, structured data retrieval, etc., can solve problems such as increasing the difficulty of MySQL data analysis and query, and achieve the effect of data auditing and supervision

Inactive Publication Date: 2019-07-05
福建省天奕网络科技有限公司
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, this also increases the difficulty of MySQL data parsing and query

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • MySQL data tracking method and storage medium
  • MySQL data tracking method and storage medium
  • MySQL data tracking method and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0059] This embodiment provides a MySQL data tracking method, which can track the change process of the target data, and audit and monitor the target data more conveniently and accurately.

[0060] see figure 2 , including the following steps:

[0061] S1: Obtain (synchronize) the binlog log file of the MySQL database, and parse it into an executable set of plaintext MySQL execution statements.

[0062] Optionally, the set of MySQL execution statements is stored in the form of a list.

[0063] Optionally, use the mysqlbinlog command to parse binlog log files.

[0064] Preferably, the S1 specifically includes:

[0065] S10: Determine the target time period according to the target data;

[0066] S11: Parse the database binlog log file corresponding to the target time period, and obtain a set of corresponding MySQL execution statements.

[0067] For example, player Zhang San got an item with item number 10000 on 2019-01-01, but found that the item suddenly disappeared on 20...

Embodiment 2

[0110] This embodiment corresponds to the method in Embodiment 1, and provides a specific application scenario:

[0111] Assume player 1 feedback: an item coded 1000 that he once owned suddenly disappeared; I hope the official response to the problem of missing item 1000.

[0112] For game officials, the MySQL data tracking method provided in the first embodiment above can be used for analysis to obtain the circulation process of item 1000 and provide technical support for answering questions.

[0113] Specifically, the data tracking process is as follows:

[0114] 1. Use the user account information "Player 1" to query the user data table, and get his user_id as 1. Among them, the user data table is the data of the current user table in the database, and the format can be shown in Table 1 below:

[0115] id username level score 1 player 1 30 580025 2 player 2 3 1500 3 player 3 2 1500 4 player 4 0 1350

[0116] Table 1

...

Embodiment 3

[0153] This embodiment corresponds to Embodiment 1 and Embodiment 2, and provides a specific example for further limiting the methods for matching and parsing execution statements in steps S4 and S5.

[0154] Take a specific fragment of a MySQL execution statement set as an example for illustration:

[0155] The specific fragment content is as follows:

[0156] #at 1213

[0157] #190202 14:25:18 server id 1 end_log_pos 1045CRC32 0x41e66b40Intvar

[0158] SET INSERT_ID = 1 / *! * / ;

[0159] #190202 14:25:18 server id 1 end_log_pos 1197CRC320x8466c9e5 querythread_id=9 exec_time=0 error_code=0

[0160] SET TIMESTAMP=1549088718 / *! * / ;

[0161] INSERT INTO `user`(`username`,`level`,`score`) VALUES('player 1','0','0')

[0162] / *! * / ;

[0163] In the above fragment, the behavior beginning with "#" is not an operation line, but a description line;

[0164] Among them, SET sets the value; SET INSERT_ID=1 sets the primary key auto-increment number of the insert statement to 1;...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides a MySQL data tracking method and a storage medium, and the method comprises the steps: S1, analyzing a database binlog file, and obtaining a MySQL execution statement set; S2, inquiring a data table, and obtaining a target data field corresponding to the target data; S3, obtaining a current matched data field according to the target data field and the MySQL table corresponding to the target data field; S4, matching the current matched data field with the MySQL execution statement set to obtain a corresponding execution statement; S5, analyzing other execution statementsafter the execution statements, and obtaining the execution statements for performing content change on the execution statements; S6, obtaining the latest matched data field according to the executionstatement obtained in the S5, and returning to execute the S4 until the execution statement cannot be obtained; and S7, sequentially integrating the execution statements obtained each time, and obtaining the change process of the target data. According to the method, data auditing and supervision are facilitated, and the realization mode is more convenient and effective.

Description

technical field [0001] The invention relates to the field of database data analysis, in particular to a MySQL data tracking method and a storage medium. Background technique [0002] MySQL is a relational database management system. Relational databases store data in different tables instead of putting all data in one big warehouse, thereby increasing speed and improving flexibility. However, this also increases the difficulty of MySQL data parsing and querying. [0003] The present invention provides a method for tracking MySQL data and a corresponding storage medium, which can calculate the complete change process of MySQL data, thereby realizing the tracking of MySQL data changes, which is beneficial to the audit and supervision of MySQL data, and compared with the prior art In other words, it can be realized without business task adjustment, which is more convenient and efficient. Contents of the invention [0004] The technical problem to be solved by the present in...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F16/245G06F16/242G06F16/28
Inventor 刘德建詹彦安范福生黄钟贵江洪郑含章李正郑涛岳万恕陈宏展
Owner 福建省天奕网络科技有限公司
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More