CN113760928A - Cache data updating system and method - Google Patents

Cache data updating system and method Download PDF

Info

Publication number
CN113760928A
CN113760928A CN202110250865.3A CN202110250865A CN113760928A CN 113760928 A CN113760928 A CN 113760928A CN 202110250865 A CN202110250865 A CN 202110250865A CN 113760928 A CN113760928 A CN 113760928A
Authority
CN
China
Prior art keywords
data
cache
database
updating
update
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110250865.3A
Other languages
Chinese (zh)
Inventor
周振华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Zhenshi Information Technology Co Ltd
Original Assignee
Beijing Jingdong Zhenshi Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Zhenshi Information Technology Co Ltd filed Critical Beijing Jingdong Zhenshi Information Technology Co Ltd
Priority to CN202110250865.3A priority Critical patent/CN113760928A/en
Publication of CN113760928A publication Critical patent/CN113760928A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2379Updates performed during online database operations; commit processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2433Query languages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24552Database cache management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Mathematical Physics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a cache data updating system and method, and relates to the technical field of computers. One embodiment of the system comprises: the system comprises a monitoring device, a first cache and a database; the monitoring device is used for simulating nodes in the database and sending monitoring requests to the database as the simulated nodes of the database; when first data updating information is received, updating the data in the first cache according to the updating data indicated by the first data updating information and the identification of the updating data; the database is used for establishing communication connection with the monitoring device according to the monitoring request; and when data is updated, sending first data updating information to the monitoring module according to the communication connection. According to the implementation method, the data in the first cache can be updated in time, the consistency of the data returned from the first cache and the updated data in the database is ensured, and further the user experience is improved.

Description

Cache data updating system and method
Technical Field
The invention relates to the technical field of computers, in particular to a cache data updating system and method.
Background
As the amount of data and the frequency of data access increase, caching techniques have evolved in an effort to alleviate the pressure on databases from large numbers of data access requests. The caching technology can pre-store data in the database in the cache, and when a data access request comes, relevant data can be hit from the cache and returned, so that the pressure of the database is reduced.
The caching technology needs to ensure that data in the cache is consistent with data in the database, but when the data in the database changes, the data in the cache cannot be updated in time by the existing caching technology, and further, the data returned from the cache is not the updated data in the database, which may affect user experience.
Disclosure of Invention
In view of the above, embodiments of the present invention provide a cache data updating system and method, in which a monitoring device is capable of simulating a node in a database, sending a monitoring request to the database to establish a communication connection with the database, and monitoring whether there is data update in the database. When data in the database is updated, the database sends first data updating information to the monitoring module, the first data updating information indicates the updated data and the identification of the updated data, and the monitoring module updates the data in the first cache according to the first data updating information, so that the data in the first cache can be updated in time, the consistency of the data returned from the first cache and the updated data in the database is ensured, and the user experience is further improved.
To achieve the above object, according to an aspect of an embodiment of the present invention, a cache data updating system is provided.
The cache data updating system of the embodiment of the invention comprises: the system comprises a monitoring device, a first cache and a database; wherein the content of the first and second substances,
the monitoring device is used for simulating nodes in the database and sending monitoring requests to the database as the simulated nodes of the database; when first data updating information is received, updating the data in the first cache according to the updating data indicated by the first data updating information and the identification of the updating data;
the database is used for establishing communication connection with the monitoring device according to the monitoring request; and when data is updated, sending first data updating information to the monitoring module according to the communication connection.
Alternatively,
the listening device is configured according to the canal tool to simulate nodes in the database by the canal tool.
Alternatively,
when the first cache comprises a local second cache,
and the monitoring device is further used for determining whether the second cache is in an enabled state, if so, generating second data update information according to the update data and the identification, and sending the second data update information to the second cache, so that the second cache is updated according to the second data update information.
Alternatively,
when the first data update information is in binary format,
and the monitoring device is also used for carrying out format conversion on the first data updating information to obtain an SQL statement so as to update the data in the first cache by using the SQL statement.
Alternatively,
the identification of each update data includes: updating the change operation corresponding to the data, updating the data table to which the data belongs, and updating the number of the data in the data table to which the data belongs; wherein the changing operation comprises: a modify operation, an add operation, or a delete operation.
Alternatively,
when the new data is the empty third buffer,
the monitoring device is also used for acquiring a preset data format of the third cache and sending a data acquisition request to the database as a simulation node; after receiving data returned by the database, writing the data into a cache according to a preset data format;
and the database is used for returning data to the monitoring device according to the data acquisition request.
Alternatively,
the monitoring device is also used for setting effective duration for the updated data in the first cache and recording the storage duration of the updated data in the cache; and when the storage duration is longer than the effective duration, clearing the updating data and the identification corresponding to the updating data.
To achieve the above object, according to another aspect of the embodiments of the present invention, a cache data updating method is provided.
The cache data updating method of the embodiment of the invention is applied to a cache data updating system and comprises the following steps:
the monitoring device simulates nodes in a database and sends monitoring requests to the database as the simulation nodes of the database; when first data updating information is received, updating the data in the first cache according to the updating data indicated by the first data updating information and the identification of the updating data;
the database establishes communication connection with the monitoring device according to the monitoring request; and when data is updated, sending first data updating information to the monitoring module according to the communication connection.
To achieve the above object, according to still another aspect of the embodiments of the present invention, an electronic device for updating cache data is provided.
An electronic device for updating cache data according to an embodiment of the present invention includes: one or more processors; the storage device is used for storing one or more programs, and when the one or more programs are executed by one or more processors, the one or more processors implement the cache data updating method of the embodiment of the invention.
To achieve the above object, according to still another aspect of embodiments of the present invention, there is provided a computer-readable storage medium.
A computer-readable storage medium of an embodiment of the present invention stores thereon a computer program that, when executed by a processor, implements a cache data updating method of an embodiment of the present invention.
One embodiment of the above invention has the following advantages or benefits: the monitoring device can simulate nodes in the database, send monitoring requests to the database to establish communication connection with the database, and monitor whether data in the database is updated or not. When data in the database is updated, the database sends first data updating information to the monitoring module, the first data updating information indicates the updated data and the identification of the updated data, and the monitoring module updates the data in the first cache according to the first data updating information, so that the data in the first cache can be updated in time, the consistency of the data returned from the first cache and the updated data in the database is ensured, and the user experience is further improved.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a diagram illustrating major blocks of a cache data update system according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating the main steps of a cache data update method according to an embodiment of the present invention;
FIG. 3 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 4 is a schematic block diagram of a computer system suitable for use in implementing a terminal device or server of an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It should be noted that the embodiments of the present invention and the technical features of the embodiments may be combined with each other without conflict.
In the prior art, the data to be stored in the cache is some basic data, such as user information, system enumeration, service enumeration, geographic information, weather conditions of a certain place, and the like, the access heat of the basic data in the system is generally very high, and some basic data are continuously added and updated. The access times of basic data are determined by the size of the business unit, for the business unit of tens of millions or hundreds of millions, the basic data directly acquired from the database can cause great pressure to the database, the performance is lower, and even the database is crashed, so the basic data can be preferably loaded into a cache in time. Based on the scheme, the cache data updating system and method are provided.
Fig. 1 is a schematic diagram illustrating major modules of a cache data updating system according to an embodiment of the present invention.
As shown in fig. 1, a cache data updating system 100 according to an embodiment of the present invention includes: a monitoring device 101, a first cache 102 and a database 103; wherein the content of the first and second substances,
the monitoring device 101 is used for simulating nodes in the database 103 and sending monitoring requests to the database 103 as the simulated nodes of the database 103; when first data updating information is received, updating the data in the first cache 102 according to the updating data indicated by the first data updating information and the identification of the updating data;
the database 103 is used for establishing communication connection with the monitoring device 101 according to the monitoring request; when there is a data update, first data update information is sent to the monitoring module 101 according to the communication connection.
In the embodiment of the present invention, the monitoring device 101 is configured according to the canal tool to simulate the nodes in the database 103 through the canal tool. Specifically, the monitoring apparatus 101 sends a monitoring request to the MySQL Master by simulating MySQL slave through the canal tool, and receives first data update information pushed by the MySQL Master. In a preferred embodiment of the present invention, the snoop request is a dump request and the first data update information is binlog information.
In this embodiment of the present invention, when the first data update information is in a binary format, the monitoring device 101 is further configured to perform format conversion on the first data update information to obtain an SQL statement, so as to update the data in the first cache by using the SQL statement.
In the embodiment of the present invention, the monitoring apparatus 101 may further develop a processing function after analyzing the binlog information based on the canal tool, and the processing function can read the update data and the identifier of the update data from the analyzed binlog information.
In an embodiment of the present invention, the identification of each update data includes: updating the change operation corresponding to the data, updating the data table to which the data belongs, and updating the number of the data in the data table to which the data belongs; wherein the changing operation comprises: a modify operation, an add operation, or a delete operation.
In this embodiment of the present invention, when the change operation is a modify operation, the snooping device 101 may read the JSON string of the data to be updated from the first cache according to the data table to which the update data belongs and the number of the update data in the data table to which the update data belongs, then update some attributes in the read JSON string according to the update data, so that the data to be updated is replaced with the update data, and write the update data into the first cache after the update is completed.
In the embodiment of the present invention, the first cache may be configured as a multi-level cache, that is, the first cache includes a Redis cache and a local second cache.
In this embodiment of the present invention, when the first cache includes a local second cache, the snooping device 101 is further configured to determine whether the second cache is in an enabled state, and if so, generate second data update information according to the update data and the identifier, and send the second data update information to the second cache, so that the second cache is updated according to the second data update information. Specifically, snooping device 101 may determine whether the local second cache is in an enabled state through openlocalcarche ═ true or false, and when openlocalcarche ═ true, it indicates that the second cache is enabled, and snooping device 101 generates an information Queue (MQ) Message according to the update data and the identifier, and sends the MQ Message to the second cache, so that the second cache is updated according to the MQ Message. In a preferred embodiment of the present invention, the local second cache may be constructed in a manner of springing's cache or guava's loadingCache, and an MQ message listener is created in the second cache and is used for listening to MQ messages.
In the embodiment of the present invention, when newly adding a third cache whose data is empty, the monitoring apparatus 101 is further configured to obtain a preset data format of the third cache, and send a data obtaining request to the database as the simulation node; after receiving data returned by the database, writing the data into a cache according to a preset data format; and the database 103 is used for returning data to the monitoring device according to the data acquisition request.
In the embodiment of the present invention, the preset data format may be a Key-Value format, where the data table name + the unique number of the data may be used as a Key, and the data may be converted into a JSON string format and stored as Value.
In the embodiment of the present invention, the snooping device 101 may further include a cache read module, which is responsible for managing the cache instance, initializing the instance, and providing a read function for the cache. Specifically, the cache reading module may manage the first cache, the second cache, and the third cache by using a CacheManager component of Spring, instantiate a specific cache, and set attributes such as a cache dimension and a cache timeout time for each cache. Specifically, the cache reading module may adopt a CacheManager interface to create a cache manager, implement a cache instance by using an abstract value adding cache, and implement instantiation of a cache by using a Spring-config.xml configuration file, for example:
<bean id="user_table"class="com.*.MyCache">
<constructor-arg index="0"type="java.lang.String"value="cache_day"/>
in this embodiment of the present invention, the monitoring apparatus 101 is further configured to set an effective duration for the update data in the first cache, and record a storage duration of the update data in the cache; and when the storage duration is longer than the effective duration, clearing the updating data and the identification corresponding to the updating data.
In the embodiment of the invention, because the Spring Cache interface is realized, when the data in the first Cache needs to be read, the @ Cache can be directly added to the method for querying the data
And annotating the identifier, namely realizing the query of the first cache. In a preferred embodiment of the present invention, data read from the database may be used as a bottom-trapping scheme, and once the first cache is crashed or the first cache cannot be connected, the corresponding data may still be obtained by querying the database, thereby ensuring the hit rate of the data.
According to the cache data updating system provided by the embodiment of the invention, the monitoring device can simulate the nodes in the database, send monitoring requests to the database to establish communication connection with the database and monitor whether data updating exists in the database. When data in the database is updated, the database sends first data updating information to the monitoring module, the first data updating information indicates the updated data and the identification of the updated data, and the monitoring module updates the data in the first cache according to the first data updating information, so that the data in the first cache can be updated in time, the consistency of the data returned from the first cache and the updated data in the database is ensured, and the user experience is further improved.
Fig. 2 is a schematic diagram illustrating main steps of a cache data updating method according to an embodiment of the present invention.
As shown in fig. 2, a cache data updating method according to an embodiment of the present invention is applied to a cache
The data storage updating system mainly comprises the following steps:
step S201: the monitoring device simulates nodes in a database and sends monitoring requests to the database as the simulation nodes of the database; when first data updating information is received, updating the data in the first cache according to the updating data indicated by the first data updating information and the identification of the updating data;
step S202: the database establishes communication connection with the monitoring device according to the monitoring request; and when data is updated, sending first data updating information to the monitoring module according to the communication connection.
In the embodiment of the present invention, the monitoring device is configured according to the canal tool to simulate the nodes in the database through the canal tool.
In this embodiment of the present invention, when the first cache includes a local second cache, the snooping device may determine whether the second cache is in an enabled state, and if so, generate second data update information according to the update data and the identifier, and send the second data update information to the second cache, so that the second cache is updated according to the second data update information.
In the embodiment of the present invention, when the first data update information is in a binary format, the monitoring device may perform format conversion on the first data update information to obtain an SQL statement, so as to update the data in the first cache with the SQL statement.
In an embodiment of the present invention, the identification of each update data includes: updating the change operation corresponding to the data, updating the data table to which the data belongs, and updating the number of the data in the data table to which the data belongs; wherein the changing operation comprises: a modify operation, an add operation, or a delete operation.
In the embodiment of the invention, when the newly added data is an empty third cache, the monitoring device can acquire a preset data format of the third cache and serve as a simulation node to send a data acquisition request to the database; after receiving data returned by the database, writing the data into a cache according to a preset data format; the database may return data to the listening device in accordance with the data acquisition request.
In the embodiment of the present invention, the monitoring apparatus may set an effective duration for the update data in the first cache, and record a storage duration of the update data in the cache; and when the storage duration is longer than the effective duration, clearing the updating data and the identification corresponding to the updating data.
According to the cache data updating method provided by the embodiment of the invention, the monitoring device can simulate the nodes in the database, send monitoring requests to the database to establish communication connection with the database and monitor whether data updating exists in the database. When data in the database is updated, the database sends first data updating information to the monitoring module, the first data updating information indicates the updated data and the identification of the updated data, and the monitoring module updates the data in the first cache according to the first data updating information, so that the data in the first cache can be updated in time, the consistency of the data returned from the first cache and the updated data in the database is ensured, and the user experience is further improved.
Fig. 3 illustrates an exemplary system architecture 300 of a cache data update method or a cache data update system to which embodiments of the invention may be applied.
As shown in fig. 3, the system architecture 300 may include terminal devices 301, 302, 303, a network 304, and an electronic device 305. The network 304 serves to provide a medium for communication links between the terminal devices 301, 302, 303 and the electronic device 305. Network 304 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
A user may use the terminal devices 301, 302, 303 to interact with the electronic device 305 via the network 304 to receive or send messages or the like. The terminal devices 301, 302, 303 may have various communication client applications installed thereon, such as shopping applications, web browser applications, search applications, instant messaging tools, mailbox clients, social platform software, and the like.
The terminal devices 301, 302, 303 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The electronic device 305 may be a server that provides various services, such as a background management server that supports shopping websites browsed by users using the terminal devices 301, 302, 303. The background management server may analyze and perform other processing on the received data such as the product information query request, and feed back a processing result (e.g., target push information and product information) to the terminal device.
It should be understood that the number of terminal devices, networks, and electronic devices in fig. 3 is merely illustrative. There may be any number of terminal devices, networks, and electronic devices, as desired for implementation.
Referring now to FIG. 4, a block diagram of a computer system 400 suitable for use with a terminal device implementing an embodiment of the invention is shown. The terminal device shown in fig. 4 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 4, the computer system 400 includes a Central Processing Unit (CPU)401 that can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)402 or a program loaded from a storage section 408 into a Random Access Memory (RAM) 403. In the RAM 403, various programs and data necessary for the operation of the system 400 are also stored. The CPU 401, ROM 402, and RAM 403 are connected to each other via a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
The following components are connected to the I/O interface 405: an input section 406 including a keyboard, a mouse, and the like; an output section 407 including a display device such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 408 including a hard disk and the like; and a communication section 409 including a network interface card such as a LAN card, a modem, or the like. The communication section 409 performs communication processing via a network such as the internet. A driver 410 is also connected to the I/O interface 405 as needed. A removable medium 411 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 410 as necessary, so that a computer program read out therefrom is mounted into the storage section 408 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 409, and/or installed from the removable medium 411. The computer program performs the above-described functions defined in the system of the present invention when executed by a Central Processing Unit (CPU) 401.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The present invention also provides a computer-readable medium, which may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: the monitoring device simulates nodes in a database and sends monitoring requests to the database as the simulation nodes of the database; when first data updating information is received, updating the data in the first cache according to the updating data indicated by the first data updating information and the identification of the updating data; the database establishes communication connection with the monitoring device according to the monitoring request; and when data is updated, sending first data updating information to the monitoring module according to the communication connection.
According to the technical scheme of the embodiment of the invention, the monitoring device can simulate the nodes in the database, send monitoring requests to the database to establish communication connection with the database and monitor whether the database has data updating. When data in the database is updated, the database sends first data updating information to the monitoring module, the first data updating information indicates the updated data and the identification of the updated data, and the monitoring module updates the data in the first cache according to the first data updating information, so that the data in the first cache can be updated in time, the consistency of the data returned from the first cache and the updated data in the database is ensured, and the user experience is further improved.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A cache data update system, comprising: the system comprises a monitoring device, a first cache and a database; wherein the content of the first and second substances,
the monitoring device is used for simulating nodes in the database and sending monitoring requests to the database as the simulated nodes of the database; when first data updating information is received, updating the data in the first cache according to the updating data indicated by the first data updating information and the identification of the updating data;
the database is used for establishing communication connection with the monitoring device according to the monitoring request; and when data is updated, sending the first data updating information to the monitoring module according to the communication connection.
2. The system of claim 1,
the listening device is configured according to a canal tool to simulate nodes in the database by the canal tool.
3. The system of claim 1, wherein when the first cache comprises a local second cache,
the monitoring device is further configured to determine whether the second cache is in an enabled state, if so, generate second data update information according to the update data and the identifier, and send the second data update information to the second cache, so that the second cache is updated according to the second data update information.
4. The system of claim 1, wherein when the first data update information is in binary format,
the monitoring device is further configured to perform format conversion on the first data update information to obtain an SQL statement, so as to update the data in the first cache by using the SQL statement.
5. The system of claim 1,
the identification of each of the update data comprises: the change operation corresponding to the update data, the data table to which the update data belongs, and the number of the update data in the data table to which the update data belongs; wherein the altering operation comprises: a modify operation, an add operation, or a delete operation.
6. The system of claim 1, wherein when the new data is added to the empty third buffer,
the monitoring device is further configured to acquire a preset data format of the third cache and send a data acquisition request to the database as the simulation node; after receiving the data returned by the database, writing the data into the cache according to the preset data format;
and the database is used for returning data to the monitoring device according to the data acquisition request.
7. The system of claim 1,
the monitoring device is further configured to set an effective duration for the update data in the first cache, and record a storage duration of the update data in the cache; and when the storage duration is longer than the effective duration, clearing the updating data and the identification corresponding to the updating data.
8. A cache data updating method is applied to a cache data updating system and comprises the following steps:
the monitoring device simulates nodes in a database and sends monitoring requests to the database as the simulation nodes of the database; when first data updating information is received, updating the data in the first cache according to the updating data indicated by the first data updating information and the identification of the updating data;
the database establishes communication connection with the monitoring device according to the monitoring request; and when data is updated, sending the first data updating information to the monitoring module according to the communication connection.
9. An electronic device for updating cached data, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of claim 8.
10. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method of claim 8.
CN202110250865.3A 2021-03-08 2021-03-08 Cache data updating system and method Pending CN113760928A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110250865.3A CN113760928A (en) 2021-03-08 2021-03-08 Cache data updating system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110250865.3A CN113760928A (en) 2021-03-08 2021-03-08 Cache data updating system and method

Publications (1)

Publication Number Publication Date
CN113760928A true CN113760928A (en) 2021-12-07

Family

ID=78786706

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110250865.3A Pending CN113760928A (en) 2021-03-08 2021-03-08 Cache data updating system and method

Country Status (1)

Country Link
CN (1) CN113760928A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115150470A (en) * 2022-09-06 2022-10-04 百融至信(北京)征信有限公司 Cache data processing method and device, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115150470A (en) * 2022-09-06 2022-10-04 百融至信(北京)征信有限公司 Cache data processing method and device, electronic equipment and storage medium
CN115150470B (en) * 2022-09-06 2022-11-25 百融至信(北京)科技有限公司 Cache data processing method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110019350B (en) Data query method and device based on configuration information
CN105472045A (en) Database migration method and database migration device
CN107844488B (en) Data query method and device
CN110866040A (en) User portrait generation method, device and system
CN113190517B (en) Data integration method and device, electronic equipment and computer readable medium
CN109992719B (en) Method and apparatus for determining push priority information
CN111258988A (en) Asset management method, device, electronic device, and medium
CN113760928A (en) Cache data updating system and method
CN111241189A (en) Method and device for synchronizing data
CN110928594A (en) Service development method and platform
CN110866001A (en) Method and device for determining order to be processed
CN113378346A (en) Method and device for model simulation
CN116226189A (en) Cache data query method, device, electronic equipment and computer readable medium
CN115496544A (en) Data processing method and device
CN113138943B (en) Method and device for processing request
CN109087097B (en) Method and device for updating same identifier of chain code
CN110019671B (en) Method and system for processing real-time message
CN113450170A (en) Information display method and device
CN111125112A (en) Data processing method and device, electronic equipment and computer readable storage medium
CN112711572A (en) Online capacity expansion method and device suitable for sub-warehouse and sub-meter
CN111787043A (en) Data request method and device
CN113778909B (en) Method and device for caching data
CN110262756B (en) Method and device for caching data
CN109446183B (en) Global anti-duplication method and device
CN113362097B (en) User determination method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination