Cache updating method and system based on Canal
An update method and cache technology, applied in the computer field, can solve the problem of high database load, achieve the effect of improving the reading speed, increasing the update frequency, and avoiding excessive load
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0042] This embodiment provides a Canal-based cache update method, such as figure 1 As shown, Canal-based cache update methods include:
[0043] Step 101, the database generates an update log after the data field is changed, and the update log includes the changed value of the data field.
[0044] The database of the present embodiment is a MySQL database, and when MySQL internal additions, deletions, changes, etc. have updated content records to the MySQL database, a binary log (binary log file) update log can be generated to record the above-mentioned changes of the database.
[0045] Step 102, using Canal to read the database to obtain the updated diary;
[0046] More specifically, as figure 2 As shown, step 102 includes:
[0047] Step 1021, Canal sends an update command to the database;
[0048] Step 1022, the database receives the update instruction and sends the update log to Canal.
[0049] Canal simulates the interactive protocol of MySQL slave (master), and pret...
Embodiment 2
[0062] This embodiment provides a Canal-based cache update system, such as Figure 4 As shown, the Canal-based cache update system includes a change module 201 , a read module 202 , a parse module 203 , an update module 204 and an application module 205 .
[0063] The change module 201 is used to generate an update log when the data field is changed in the database, and the update log includes the changed value of the data field.
[0064] The database of the present embodiment is a MySQL database, and when MySQL internal additions, deletions, changes, etc. have updated content records to the MySQL database, a binary log (binary log file) update log can be generated to record the above-mentioned changes of the database.
[0065] The reading module 202 is used to use Canal to read the database to obtain the update log.
[0066] More specifically, the reading module 202 is also configured to use the Canal to send an update instruction to the database, and use the database to rec...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com