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
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
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;...
PUM

Abstract
Description
Claims
Application Information

- R&D
- Intellectual Property
- Life Sciences
- Materials
- Tech Scout
- Unparalleled Data Quality
- Higher Quality Content
- 60% Fewer Hallucinations
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2025 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com