WO2020168878A1 - 数据缓存方法、装置、终端及存储介质 - Google Patents
数据缓存方法、装置、终端及存储介质 Download PDFInfo
- Publication number
- WO2020168878A1 WO2020168878A1 PCT/CN2020/072655 CN2020072655W WO2020168878A1 WO 2020168878 A1 WO2020168878 A1 WO 2020168878A1 CN 2020072655 W CN2020072655 W CN 2020072655W WO 2020168878 A1 WO2020168878 A1 WO 2020168878A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- data
- local
- database
- log file
- slave
- 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.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
Definitions
- the embodiments of the present disclosure relate to the field of computer application technology, for example, to a data caching method, device, electronic device, and storage medium.
- the topological structure of MySQL database generally adopts a master database and two slave databases, and the master server and the slave server are often separated for reading and writing.
- the master server supports read operations and the slave servers support write operations, which not only guarantees data
- the security of storage can also increase the throughput of the data library.
- the single-computer room cache synchronization in the related technology mainly deletes the original data in the cache while updating the cache data. However, after deleting the original data in the cache, the data from the secondary database will be pulled when the cached data is loaded again. Once the data from the secondary database is delayed, the local cache and the primary database will be inconsistent.
- the embodiments of the present disclosure provide a data caching method, device, electronic device, and storage medium, so as to realize the situation that the local cache and the local database data are consistent.
- an embodiment of the present disclosure provides a data caching method, the method includes: obtaining a data delay state between a local master database and at least one local slave database of the local master database; The data in the local cache is subjected to data management, where the data management includes data deletion.
- an embodiment of the present disclosure also provides a data caching device, the device comprising: a delay state determining module configured to obtain the data delay state between the local master database and at least one local slave database of the local master database Cache data management module, configured to perform data management on data in the local cache according to the data delay state, wherein the data management includes data deletion.
- embodiments of the present disclosure also provide an electronic device, which includes: at least one processing device; a memory configured to store at least one program; when the at least one program is executed by the at least one processing device, The at least one processing device is enabled to implement the data caching method according to any embodiment of the present disclosure.
- embodiments of the present disclosure also provide a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the data caching method as described in any of the embodiments of the present disclosure is implemented .
- FIG. 1 is a schematic flowchart of the data caching method provided by an embodiment of the present disclosure
- FIG. 2 is a schematic flowchart of the data caching method provided by another embodiment of the present disclosure.
- FIG. 3 is a schematic flowchart of the data caching method provided by another embodiment of the present disclosure.
- FIG. 4 is a schematic diagram of the data caching device provided by an embodiment of the present disclosure.
- FIG. 5 is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure.
- FIG. 1 is a flowchart of a data caching method provided by an embodiment of the present disclosure. This embodiment is applicable to a situation where cached data is automatically updated.
- the method may be executed by a data caching device, which may be configured in a terminal Or the server is used to execute the data caching method of the embodiment of the present disclosure.
- the method of this embodiment may include step S110 and step S120.
- step S110 the data delay state between the local master database and at least one local slave database of the local master database is acquired.
- the data delay state may include the existence of data delay and the absence of data delay.
- the existence of data delay may also include information such as the time of the data delay.
- the number of local slave databases can be set according to actual needs, which is not limited here. There can be one, two or more local master databases.
- acquiring the data delay status between the local master database and at least one local slave database of the local master database may include: separately acquiring the data delay status between the local master database and each local slave database of the local master database; or , Obtain the data delay state between the local master database and some of the local slave databases of the local master database.
- the data delay view command may be called to determine the data delay state between the local master database and at least one local slave database of the local master database. For example, taking the MySQL database as an example, you can determine the data delay status between the local master database and the local slave database by monitoring the value of the Seconds_Behind_Master delay parameter output by the show slave status ⁇ G command.
- the data delay status of the local master database and the local slave database may change dynamically.
- the local master database and the local master database can be obtained in real time or at preset intervals.
- the data delay state between at least one local slave database of the master database can be obtained in real time or at preset intervals.
- step S120 data management is performed on the data in the local cache according to the data delay state.
- the data management may include data deletion.
- the data management may also include data update and the like.
- performing data management on the data in the local cache according to the data delay state may include: deleting data in the local cache according to the data delay state; or, performing data management on the data in the local cache according to the data delay state Update.
- Performing data management on the data in the local cache according to the data delay status may also include deleting the data in the local cache according to the data delay status, and updating the target cache data to the local cache.
- the target cache data can be determined according to the actual needs of the user, which is not limited here.
- performing data management on the data in the local cache according to the data delay state may include: deleting the data in the local cache according to the data delay state and the cache key mapping logic. It may include: obtaining the database storage address of the target deleted data in the local cache from the database of the target local cache according to the data delay state; mapping the database storage address to a keyword in the local cache according to the cache key mapping logic, and Delete the keyword from the local cache.
- the target deletion data may be all data currently stored in the local cache.
- the read operations to the local slave database may be randomly allocated. Therefore, the local cache may randomly select or be randomly allocated when pulling cached data A local slave database.
- the target local slave database may be determined according to the source of the target deletion data in the local cache. For example, to determine which local slave database the target delete data in the local cache originates from, then the determined local slave database is taken as the target local slave database.
- the cache keyword mapping logic stores the database storage address of the data in the database and the correspondence between the keywords in the local cache.
- performing data management on the data in the local cache according to the data delay state may include: determining a target log file according to the data delay state, and performing data management on the data in the local cache according to the target log file ;
- the target log file includes at least one of the main library log file of the local master database and the slave library log file of the local slave database.
- performing data management on the data in the local cache according to the data delay state includes: separately according to the existing data delay and the non-existent data delay. Determine the cache management strategy of the local cache, and perform data management on the data in the local cache according to the cache management strategy. It should be noted that the cache management strategy is used to determine how to perform the operation of "data management on the data in the local cache".
- performing data management on the data in the local cache according to the data delay state may include: if the data delay state is that there is no data delay, determining the first cache management strategy of the local cache, and further, Perform data management on the data in the local cache according to the first cache management strategy.
- performing data management on the data in the local cache according to the data delay state may include: if the data delay state is that there is a data delay, determining a second cache management strategy, and further, according to the first The second cache management strategy performs data management on the data in the local cache.
- the technical solution of the embodiment of the present disclosure can manage the data in the local cache by obtaining the data delay state between the local master database and the local slave database, which can avoid the local cache and master caused by the master-slave data delay.
- the consistency of local cache and local database data is realized.
- FIG. 2 is a schematic flowchart of a data caching method provided by another embodiment of the present disclosure. The embodiment is detailed on the basis of various optional solutions in the foregoing embodiment.
- the performing data management on the data in the local cache according to the data delay state includes: if the data delay state is that there is no data delay, obtaining the main database log file of the local main database; The main library log file performs data management on the data in the local cache.
- the performing data management on the data in the local cache according to the data delay state may include: if the data delay state is that there is a data delay, then obtaining all data The main library log file of the local main database and at least one slave log file of the local slave database of the local master database; the local cache is based on the master library log file and the at least one slave log file Data in the data management.
- the method of this embodiment may include:
- the absence of data delay can be understood as the data of the local master database is consistent with the data of the local slave database.
- different cache management strategies can be pre-configured for different data delay states. For example, if the data delay state is that there is no data delay, the first cache management strategy of the local cache is determined.
- the main library log file is used to record data information and data operations, which can provide a complete data stream and ensure that the data is not lost, such as the log Binlog file. It can be understood that the log file of the master database complies with the master-slave protocol between the first master database and the first slave database.
- S230 Perform data management on the data in the local cache according to the main library log file.
- the performing data management on the data in the local cache according to the main library log file may include: when it is determined based on the main library log file that the data of the local main database has changed To delete the data in the local cache.
- main library log file can completely record the data changes of the local main database
- monitoring the data changes of the local main database through the main library log file is simpler and faster than the way of compiling and testing programs in related technologies. And more accurate.
- log files from the library are used to record data information and data operations, which can provide a complete data stream and ensure that data is not lost, such as Binlog files. It is understandable that the log file of the slave database conforms to the master-slave protocol between the first master database and the first slave database.
- S270 Perform data management on the data in the local cache according to the master library log file and at least one of the slave library log files.
- performing data management on the data in the local cache according to the main library log file and at least one of the slave library log files may be: according to the main library log file and one, two or two
- the above-mentioned slave library log file performs data management on the data in the local cache. That is, the data in the local cache can be performed according to the master library log file and the slave library log file of a part of the local slave database (for example, one of the two local slave databases). Data management can also perform data management on the data in the local cache according to the master library log file and the slave library log files of all the local slave databases.
- the specific method may be to determine the data change of the local master database based on the master database log file; determine the data change of the local slave database based on the slave database log file; and then detect that when data changes occur, delete the cache sequentially as a trigger
- the trigger condition of the operation is to delete the data in the local cache, that is, no matter which data delay occurs in the local master database and the local slave database, the data in the local cache must be deleted.
- the data management of the data in the local cache according to the master library log file and at least one of the slave library log files may include: the slave database of the slave database that delays the data the most The log file is used as the target slave library log file; the data in the local cache is managed according to the main library log file and the target slave library log file.
- performing data management on the data in the local cache according to the target slave library log file of the master library log file includes: when the target slave library log file is based on the target slave library log file, it is determined When the data in the local slave database corresponding to the log file is changed, the data in the local cache is deleted.
- Performing data management on the data in the local cache may also include: deleting the data in the local cache when it is determined that the data of the local master database has changed based on the log file of the master database.
- the technical solution of this embodiment performs data management on the data in the local cache for the two data delay states with data delay and without data delay, which can more specifically avoid the inconsistency of cached data and database data, and It can be more targeted to avoid the inconsistency of update data and cached data when there is a data delay in the local master database and the local slave database. It can also use the master database log file and the slave database log file to make the same data two When the versions are updated at the same time, the database update sequence and the cache update sequence remain the same.
- FIG. 3 is a schematic diagram of a data caching device provided by an embodiment of the present disclosure.
- a cache management module (Cache manager) monitors mysql cluster information. If there is no data delay between the local master database (MySQL Master) and the local slave database (MySQL Slave), the cache manager can only monitor the Binlog of the local master database MySQL Master. After monitoring the data change, it will be mapped according to the cache key. mapping) logic to delete the keyword key in the local cache. If there is a data delay between the local master database MySQL Master and the local slave database MySQL Slave, the cache manager will monitor the local master database MySQL Master and the local slave database MySQL Slave with the most latency. After monitoring the data change, according to the cache key mapping logic, Delete the keyword key in the local cache.
- the local master database MySQL Master can realize data intercommunication with the peer master database through the DRC component of the data replication center. That is, the local master database MySQL Master includes the data of the peer master database MySQL Master, and the peer master database MySQL Master includes the data of the local master database MySQL Master. It is understandable that the data change of the local master database MySQL Master also includes the data change event of the peer master database MySQL Master, for example, the data or modification written by the peer database MySQL Master is received from the peer database MySQL Master. Data etc.
- the technical solution of this example can ensure the consistency of the local cache and the local database data, the consistency of the local cache and the peer database data, and when two or more versions of the same data are updated at the same time, the update sequence of the database data It is consistent with the update sequence of local cache data.
- FIG 4 is a schematic structural diagram of a data caching device provided by an embodiment of the present disclosure, which can be implemented by software and/or hardware, and can be used to execute the data caching method provided by the embodiment of the present disclosure, as shown in Figure 4
- the data caching apparatus of the embodiment of the present disclosure includes a delay state determination module 410 and a cache data management module 420.
- the delay state determination module 410 is configured to obtain the data delay state between the local master database and at least one local slave database of the local master database;
- the cache data management module 420 is configured to cache the local data according to the data delay state Data in the data management, where the data management includes data deletion.
- the technical solution of this embodiment by obtaining the data delay state between the local master database and the local slave database to perform data management on the data in the local cache, can avoid the local cache and master database caused by the master-slave data delay In the case of inconsistencies, the consistency of local cache and local database data is realized.
- the cache data management module may include: a main library log obtaining unit configured to obtain the main library log file of the local main database if the data delay state is that there is no data delay; first The data management unit is configured to perform data management on the data in the local cache according to the main library log file.
- the first data management unit may be configured to delete the data in the local cache when it is determined that the data of the local master database is changed based on the master database log file.
- the cache data management module may include: a slave library log obtaining unit configured to obtain the main library log file of the local main database if the data delay state is that there is a data delay, and The at least one slave log file of the local slave database of the local master database; the second data management unit is configured to compare the log files in the local cache according to the master log file and at least one slave log file Data for data management.
- the second data management unit may be configured to: use the slave database log file of the slave database with the largest data delay as the target slave database log file; and locally cache the slave database log file according to the target slave database log file. Data in the data management.
- the second data management unit may be configured to: when it is determined based on the target slave log file that the data of the local slave database corresponding to the target slave log file is changed; When it is determined based on the main library log file that the data of the local main database has changed, the data in the local cache is deleted.
- the cache data management module can be configured to: obtain the target deleted data in the local cache according to the data delay state, and the database storage address of the target local slave database; according to the cache keyword mapping logic The storage address of the database is mapped to a keyword in the local cache, and the keyword is deleted from the local cache.
- the above-mentioned data caching device can execute the data caching method provided by any embodiment of the present disclosure, and has the corresponding functional module for executing the data caching method.
- FIG. 5 shows a schematic structural diagram of an electronic device (such as a terminal device) 500 suitable for implementing embodiments of the present disclosure.
- the terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile phones, notebook computers, digital broadcast receivers, personal digital assistants (Personal Digital Assistant, PDA), PAD (tablet computers), and portable multimedia players (Portable Media Player). , PMP), in-vehicle terminals (for example, in-vehicle navigation terminals), etc., and fixed terminals such as digital (Television, TV), desktop computers, etc.
- PMP Personal Digital Assistant
- in-vehicle terminals for example, in-vehicle navigation terminals
- fixed terminals such as digital (Television, TV), desktop computers, etc.
- the electronic device shown in FIG. 5 is only an example, and should not bring any limitation to the function and scope of use of the embodiments of the present disclosure.
- the electronic device 500 may include a processing device (such as a central processing unit, a graphics processor, etc.) 501, which may be based on a program stored in a read only memory (Read Only Memory, ROM) 502 or from a storage device 508
- the program loaded in the random access memory (Random Access Memory, RAM) 503 executes various appropriate actions and processing.
- the RAM 503 also stores various programs and data required for the operation of the electronic device 500.
- the processing device 501, the ROM 502, and the RAM 503 are connected to each other through a bus 504.
- An input/output (Input/Output, I/O) interface 505 is also connected to the bus 504.
- the following devices can be connected to the I/O interface 505: including input devices 506 such as touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, a liquid crystal display (LCD) Output devices 507 such as speakers, vibrators, etc.; storage devices 508 such as magnetic tapes, hard disks, etc.; and communication devices 509.
- the communication device 509 may allow the electronic device 500 to perform wireless or wired communication with other devices to exchange data.
- FIG. 5 shows an electronic device 500 having various devices, it should be understood that it is not required to implement or have all the illustrated devices. It may alternatively be implemented or provided with more or fewer devices.
- the process described above with reference to the flowchart can be implemented as a computer software program.
- the embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart.
- the computer program may be downloaded and installed from the network through the communication device 509, or installed from the storage device 508, or installed from the ROM 502.
- the processing device 501 the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
- the aforementioned computer-readable medium in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two.
- the computer-readable storage medium may be, for example, but not limited to, an electric, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above.
- Computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable Programmable Read Only Memory (Erasable Programmable Read Only Memory, EPROM or flash memory), optical fiber, portable compact disk read-only memory (Compact Disc Read-Only Memory, CD-ROM), optical storage device, magnetic storage device, or any of the above suitable The combination.
- a computer-readable storage medium may be any tangible medium that contains or stores a program, and the program may be used by or in combination with an instruction execution system, apparatus, or device.
- a computer-readable signal medium may include a data signal propagated in a baseband or as a part of a carrier wave, and a computer-readable program code is carried therein.
- This propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
- the computer-readable signal medium may also be any computer-readable medium other than the computer-readable storage medium.
- the computer-readable signal medium may send, propagate, or transmit the program for use by or in combination with the instruction execution system, apparatus, or device .
- the program code contained on the computer-readable medium can be transmitted by any suitable medium, including but not limited to: wire, optical cable, radio frequency (RF), etc., or any suitable combination of the foregoing.
- the above-mentioned computer-readable medium may be included in the above-mentioned electronic device; or it may exist alone without being assembled into the electronic device.
- the above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by the electronic device, the electronic device is caused to: obtain the relationship between the local master database and at least one local slave database of the local master database.
- the computer program code used to perform the operations of the present disclosure may be written in one or more programming languages or a combination thereof.
- the above-mentioned programming languages include object-oriented programming languages—such as Java, Smalltalk, C++, and also conventional Procedural programming language-such as "C" language or similar programming language.
- the program code can be executed entirely on the user's computer, partly on the user's computer, executed as an independent software package, partly on the user's computer and partly executed on a remote computer, or entirely executed on the remote computer or server.
- the remote computer can be connected to the user's computer through any kind of network-including Local Area Network (LAN) or Wide Area Network (WAN)-or it can be connected to an external computer (for example, use an Internet service provider to connect via the Internet).
- LAN Local Area Network
- WAN Wide Area Network
- each block in the flowchart or block diagram can represent a module, program segment, or part of code, and the module, program segment, or part of code contains one or more for realizing the specified logical function Executable instructions.
- the functions marked in the block may also occur in a different order from the order marked in the drawings. For example, two blocks shown in succession can actually be executed substantially in parallel, or they can sometimes be executed in the reverse order, depending on the functions involved.
- each block in the block diagram and/or flowchart, and the combination of the blocks in the block diagram and/or flowchart can be implemented by a dedicated hardware-based system that performs the specified functions or operations Or it can be realized by a combination of dedicated hardware and computer instructions.
- modules and units involved in the described embodiments of the present disclosure can be implemented in software or hardware. Among them, the names of modules and units do not constitute a limitation on the modules or units themselves under certain circumstances.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
一种数据缓存方法、装置、终端及存储介质。该数据缓存方法包括:获取本地主数据库与所述本地主数据库的至少一个本地从数据库之间的数据延迟状态(S110);根据所述数据延迟状态对本地缓存中的数据进行数据管理(S120),其中,所述数据管理包括数据删除。
Description
本申请要求在2019年02月19日提交中国专利局、申请号为201910127761.6的中国专利申请的优先权,该申请的全部内容通过引用结合在本申请中。
本公开实施例涉及计算机应用技术领域,例如涉及一种数据缓存方法、装置、电子设备及存储介质。
目前,MySQL数据库的拓扑结构一般会采用一个主数据库两个从数据库的架构,而且主服务器与从服务器读写往往是分离的,主服务器支持读操作,从服务器支持写操作,这样不仅能够保证数据存储的安全性,还能够增加数据的库的吞吐量。
相关技术中的单机房缓存同步主要是在更新缓存数据的同时删除缓存中的原始数据。但是,由于删除缓存中的原始数据后,再次加载缓存数据时会拉取从数据库的数据,一旦从数据库的数据有延迟,就会产生本地缓存和主数据库不一致的现象。
发明内容
本公开实施例提供了一种数据缓存方法、装置、电子设备及存储介质,以实现本地缓存和本地数据库数据一致的情况。
第一方面,本公开实施例提供了一种数据缓存方法,该方法包括:获取本地主数据库与所述本地主数据库的至少一个本地从数据库之间的数据延迟状态;根据所述数据延迟状态对本地缓存中的数据进行数据管理,其中,所述数据管理包括数据删除。
第二方面,本公开实施例还提供了一种数据缓存装置,该装置包括:延迟状态确定模块,设置为获取本地主数据库与所述本地主数据库的至少一个本地从数据库之间的数据延迟状态;缓存数据管理模块,设置为根据所述数据延迟状态对本地缓存中的数据进行数据管理,其中,所述数据管理包括数据删除。
第三方面,本公开实施例还提供了一种电子设备,该电子设备包括:至少一个处理装置;存储器,设置为存储至少一个程序;当所述至少一个程序被所述至少一个处理装置执行,使得所述至少一个处理装置实现如本公开中任一实施例所述的数据缓存方法。
第四方面,本公开实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如本公开中任一实施例所述的数据缓存方法。
图1是本公开一实施例所提供的一种该数据缓存方法的流程示意图;
图2是本公开另一实施例所提供的一种该数据缓存方法的流程示意图;
图3是本公开另一实施例所提供的一种该数据缓存方法的流程示意图;
图4是本公开一实施例所提供的一种该数据缓存装置的示意图;
图5是本公开一实施例所提供的一种电子设备的结构示意图。
下面结合附图和实施例对本公开作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释本公开,而非对本公开的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本公开相关的部分而非全部结构。下述各实施例中,每个实施例中同时提供了可选特征和示例,实施例中记载的各个特征可进行组合,形成多个示例方案,不应将每个编号的实施例仅视为一个技术方案。
图1为本公开一实施例所提供的一种数据缓存方法的流程图,本实施例可适用于缓存数据自动更新的情况,该方法可以由数据缓存装置来执行,所述装置可以配置在终端或服务器中用于执行本公开实施例的数据缓存方法。
如图1所示,本实施例的方法可包括步骤S110和步骤S120。
在步骤S110中,获取本地主数据库与所述本地主数据库的至少一个本地从数据库之间的数据延迟状态。
其中,数据延迟状态可包括存在数据延迟和不存在数据延迟。在一实施例中,存在数据延迟还可以包括数据延迟的时间等信息。
可以理解的是,本地从数据库的数量可以根据实际需求进行设置,在此并 不做限定,本地主数据库可设置有一个、两个或两个以上。
示例性地,获取本地主数据库与本地主数据库的至少一个本地从数据库之间的数据延迟状态,可以包括:分别获取本地主数据库与本地主数据库的各本地从数据库之间的数据延迟状态;或者,获取本地主数据库与本地主数据库的各本地从数据库中的部分本地从数据库之间的数据延迟状态。
在一实施例中,可以调用数据延迟查看命令来确定本地主数据库与所述本地主数据库的至少一个本地从数据库之间的数据延迟状态。例如,以MySQL数据库为例,可以通过监控show slave status\G命令输出的Seconds_Behind_Master延时参数的值来判断本地主数据库与本地从数据库之间的数据延迟状态。
需要说明的是,本地主数据库与本地从数据库的数据延迟状态可能是动态变化的,为了更好地对本地缓存的缓存数据进行管理,可以实时或间隔预设时间获取本地主数据库与所述本地主数据库的至少一个本地从数据库之间的数据延迟状态。
在步骤S120中,根据所述数据延迟状态对本地缓存中的数据进行数据管理。
其中,所述数据管理可包括数据删除。所述数据管理还可包括数据更新等。相应地,根据所述数据延迟状态对本地缓存中的数据进行数据管理可包括:根据所述数据延迟状态对本地缓存中的数据进行删除;或者,根据所述数据延迟状态对本地缓存中的数据进行更新。根据所述数据延迟状态对本地缓存中的数据进行数据管理还可以是,根据所述数据延迟状态所述本地缓存中的数据进行删除,并将目标缓存数据更新至所述本地缓存中。其中,目标缓存数据可以根据用户实际需求进行确定,在此并不做限定。
在本公开实施例中,根据所述数据延迟状态对本地缓存中的数据进行数据管理,可以包括:根据所述数据延迟状态以及缓存关键字映射逻辑对本地缓存中的数据进行数据删除。可包括:根据所述数据延迟状态获取本地缓存中的目标删除数据在目标本地从数据库中的数据库存储地址;根据缓存关键字映射逻辑将所述数据库存储地址映射为本地缓存中的关键字,并从本地缓存中删除所述关键字。其中,目标删除数据可以是本地缓存中当前所存储的所有数据。
当本地主数据库存在两个或两个以上的本地从数据库时,对本地从数据库的读取操作可能是随机分配的,因此本地缓存在拉取缓存数据的时候可能会随机选择或者被随机分配到一个本地从数据库,在本公开实施例中,所述目标本地从数据库可以是根据本地缓存中的目标删除数据的来源确定。比如,确定出 本地缓存中的目标删除数据的来源于哪个本地从数据库,就将所确定出的该本地从数据库作为目标本地从数据库。
可以理解的是,所述缓存关键字映射逻辑中存储有数据在数据库中的数据库存储地址以及在本地缓存中的关键字之间的对应关系。
在本公开实施例中,根据数据延迟状态对本地缓存中的数据进行数据管理,可包括:根据数据延迟状态确定目标日志文件,根据所述目标日志文件对所述本地缓存中的数据进行数据管理;其中,所述目标日志文件包括本地主数据库的主库日志文件与本地从数据库的从库日志文件中的至少一个。
为了更加准确地对本地缓存中的数据进行数据管理,在一实施例中,根据数据延迟状态对本地缓存中的数据进行数据管理包括:分别根据所述存在数据延迟和所述不存在数据延迟来确定本地缓存的缓存管理策略,根据缓存管理策略对所述本地缓存中的数据进行数据管理。需要说明的是,所述缓存管理策略用于确定如何执行“对所述本地缓存中的数据进行数据管理”的操作。
在一实施例中,根据所述数据延迟状态对本地缓存中的数据进行数据管理,可包括:如果所述数据延迟状态为不存在数据延迟,则确定本地缓存的第一缓存管理策略,进而,根据所述第一缓存管理策略对所述本地缓存中的数据进行数据管理。
在一实施例中,根据所述数据延迟状态对本地缓存中的数据进行数据管理,可包括:如果所述数据延迟状态为存在数据延迟,则确定第二缓存管理策略,进而,根据所述第二缓存管理策略对所述本地缓存中的数据进行数据管理。
需要说明的是,“第一缓存管理策略”中的“第一”,以及“第二缓存管理策略”中的“第二”仅仅是为了区分不同状态下的缓存管理策略,而非对缓存管理策略的限定,“第一”和“第二”本身没有实际意义,也并没有对缓存管理策略在顺序上的限定。
本公开实施例的技术方案,通过获取本地主数据库与本地从数据库之间的数据延迟状态来对所述本地缓存中的数据进行数据管理,能够避免由于主从数据延迟所导致的本地缓存和主数据库不一致的情况,实现本地缓存和本地数据库数据的一致性。
图2为本公开另一实施例所提供的一种数据缓存方法的流程示意图,实施例以上述实施例中各个可选方案为基础进行细化。在一实施例中,所述根据所述数据延迟状态对本地缓存中的数据进行数据管理,包括:如果所述数据延迟 状态为不存在数据延迟,则获取本地主数据库的主库日志文件;根据所述主库日志文件对所述本地缓存中的数据进行数据管理。
在上述各技术方案的基础上,在一实施例中,所述根据所述数据延迟状态对本地缓存中的数据进行数据管理可包括:如果所述数据延迟状态为存在数据延迟,则,获取所述本地主数据库的主库日志文件以及所述本地主数据库的至少一个所述本地从数据库的从库日志文件;根据所述主库日志文件以及至少一个所述从库日志文件对所述本地缓存中的数据进行数据管理。
如图2所示,本实施例的方法可包括:
S210、获取本地主数据库与所述本地主数据库的至少一个本地从数据库之间的数据延迟状态。
S220、如果所述数据延迟状态为不存在数据延迟,则获取本地主数据库的主库日志文件。
其中,不存在数据延迟可以理解为本地主数据库的数据与本地从数据库的数据是一致的。在本公开实施例中,可针对不同的数据延迟状态预先配置不同的缓存管理策略。例如,如果所述数据延迟状态为不存在数据延迟,则确定本地缓存的第一缓存管理策略。
其中,主库日志文件用于记录数据信息以及数据操作,能够一整条完整的数据流,能够保证数据不丢失,例如日志Binlog文件。可以理解的是,主库日志文件符合第一主数据库与第一从数据库之间的主从协议。
S230、根据所述主库日志文件对所述本地缓存中的数据进行数据管理。
在一实施例中,所述根据所述主库日志文件对所述本地缓存中的数据进行数据管理,可包括:当基于所述主库日志文件中确定所述本地主数据库的数据发生变更时,对本地缓存中的数据进行删除。
由于主库日志文件能够完整地记录本地主数据库的数据变更,因此通过所述主库日志文件监听所述本地主数据库的数据变更,相对于相关技术通过编写编译检测程序的方式,更加简单快捷,而且更加准确。
S240、如果所述数据延迟状态为存在数据延迟,则获取所述本地主数据库的主库日志文件以及所述本地主数据库的至少一个所述本地从数据库的从库日志文件。
类似地,从库日志文件用于记录数据信息以及数据操作,能够一整条完整的数据流,能够保证数据不丢失,例如Binlog文件。可以理解的是,从库日志 文件符合第一主数据库与第一从数据库之间的主从协议。
S270、根据所述主库日志文件以及至少一个所述从库日志文件对所述本地缓存中的数据进行数据管理。
示例性地,根据所述主库日志文件以及至少一个所述从库日志文件对所述本地缓存中的数据进行数据管理,可以是:根据所述主库日志文件以及一个、两个或两个以上的所述从库日志文件对所述本地缓存中的数据进行数据管理。即,可以根据所述主库日志文件以及一部分所述本地从数据库(例如,2个本地从数据库中的其中1个本地从数据库)的所述从库日志文件对所述本地缓存中的数据进行数据管理,也可以根据所述主库日志文件以及全部所述本地从数据库的所述从库日志文件对所述本地缓存中的数据进行数据管理。具体方式可以是基于所述主库日志文件确定出本地主数据库的数据变更;基于所述从库日志文件确定出本地从数据库的数据变更;进而检测出在发生数据变更时,依次作为触发删除缓存操作的触发条件,对本地缓存中的数据进行删除,即无论本地主数据库和本地从数据库中哪个出现数据延迟,都要对本地缓存中的数据进行删除。
在本公开实施例中,所述根据所述主库日志文件以及至少一个所述从库日志文件对所述本地缓存中的数据进行数据管理,可包括:将数据延迟最大的从数据库的从库日志文件作为目标从库日志文件;根据所述主库日志文件以及所述目标从库日志文件对本地缓存中的数据进行数据管理。通过增加对本地从数据库的从库日志文件的监听,来对本地缓存中的数据进行数据管理,能够充分保证本地缓存和本地数据库数据的一致性,而且对于分布式数据库系统,在同一条数据两个及两个以上版本同时更新时,也能够使得数据库数据的更新顺序和本地缓存数据的更新顺序保持一致。
在一实施例中,根据所述主库日志文件所述目标从库日志文件对本地缓存中的数据进行数据管理,包括:当基于所述目标从库日志文件中确定出与所述目标从库日志文件对应的本地从数据库的数据发生变更时,对本地缓存中的数据进行删除。
由于本地从数据库与本地主数据库存在数据延迟,需要充分考虑由于本地从数据库的数据延迟可能导致的缓存数据更新不及时的问题,因此,根据所述主库日志文件以及所述目标从库日志文件对本地缓存中的数据进行数据管理,还可以包括:当基于所述主库日志文件中确定出所述本地主数据库的数据发生 变更时,对本地缓存中的数据进行删除。
由于从库志文件能够完整地记录本地从数据库的数据变更,因此,通过目标从库日志文件监听与所述目标从库日志文件对应的本地从数据库的数据变更,相对于相关技术通过编写编译检测程序的方式,更加简单快捷,而且更加准确。本实施例的技术方案,分别针对存在数据延迟和不存在数据延迟的两种数据延迟状态对本地缓存中的数据进行数据管理,能够更有针对性地避免缓存数据与数据库数据不一致的情况,而且能够更加有针对性地避免本地主数据库和本地从数据库存在数据延迟时所导致的更新数据和缓存数据更新不一致的情况,还能够通过主库日志文件和从库日志文件使得在同一条数据两个版本同时更新的情况下,数据库的更新顺序和缓存的更新顺序保持一致。
图3为本公开一实施例所提供的一种数据缓存装置的示意图,如图3所示,以MySQL数据库集群为例,缓存管理模块(Cache manager)会监听mysql集群信息。如果本地主数据库(MySQL Master)与本地从数据库(MySQL Slave)中不存在数据延迟,则cache manager可以只监听本地主数据库MySQL Master的Binlog,监听到数据变更后,根据缓存关键字映射(cache key mapping)逻辑,删除本地缓存cache中的关键字key。如果本地主数据库MySQL Master与本地从数据库MySQL Slave中存在数据延迟,则cache manager会监听本地主数据库MySQL Master与延迟最厉害的本地从数据库MySQL Slave,监听到数据变更后,根据cache key mapping逻辑,删除本地缓存cache中的关键字key。
在本实例中,本地主数据库MySQL Master可以通过数据复制中心DRC组件实现与对端主数据库的数据互通。即,本地主数据库MySQL Master中包括对端主数据库MySQL Master的数据,对端主数据库MySQL Master中包括本地主数据库MySQL Master的数据。可以理解的是,本地主数据库MySQL Master的数据变更还包括对端主数据库MySQL Master的数据变更事件,例如,接收到对端数据库MySQL Master传输的所述对端数据库MySQL Master写入的数据或修改的数据等。
本实例的技术方案能够保证本地缓存和本地数据库数据的一致性,本地缓存与对端数据库数据的一致性,而且在同一条数据两个及两个以上版本同时更新时,使得数据库数据的更新顺序和本地缓存数据的更新顺序保持一致。
图4为本公开一实施例所提供的一种数据缓存装置的结构示意图,可通过软件和/或硬件的方式实现,可用于执行本公开实施例所提供的数据缓存方法, 如图4所示,本公开实施例的数据缓存装置包括延迟状态确定模块410和缓存数据管理模块420。其中,延迟状态确定模块410,设置为获取本地主数据库与所述本地主数据库的至少一个本地从数据库之间的数据延迟状态;缓存数据管理模块420,设置为根据所述数据延迟状态对本地缓存中的数据进行数据管理,其中,所述数据管理包括数据删除。
本实施例的技术方案,通过获取本地主数据库与本地从数据库之间的数据延迟状态来对所述本地缓存中的数据进行数据管理,能够避免由于主从数据延迟所导致的本地缓存和主数据库不一致的情况,实现本地缓存和本地数据库数据的一致性。
在上述技术方案的基础上,所述缓存数据管理模块可包括:主库日志获取单元,设置为如果所述数据延迟状态为不存在数据延迟,则获取本地主数据库的主库日志文件;第一数据管理单元,设置为根据所述主库日志文件对所述本地缓存中的数据进行数据管理。
在上述各技术方案的基础上,所述第一数据管理单元可设置为:当基于所述主库日志文件中确定所述本地主数据库的数据发生变更时,对本地缓存中的数据进行删除。
在上述各技术方案的基础上,所述缓存数据管理模块可包括:从库日志获取单元,设置为如果所述数据延迟状态为存在数据延迟,则获取所述本地主数据库的主库日志文件以及所述本地主数据库的至少一个所述本地从数据库的从库日志文件;第二数据管理单元,设置为根据所述主库日志文件以及至少一个所述从库日志文件对所述本地缓存中的数据进行数据管理。
在上述各技术方案的基础上,所述第二数据管理单元可设置为:将数据延迟最大的从数据库的从库日志文件作为目标从库日志文件;根据所述目标从库日志文件对本地缓存中的数据进行数据管理。
在上述各技术方案的基础上,所述第二数据管理单元可设置为:当基于所述目标从库日志文件中确定出与所述目标从库日志文件对应的本地从数据库的数据发生变更;当基于所述主库日志文件中确定出所述本地主数据库的数据发生变更时,对本地缓存中的数据进行删除。
在上述各技术方案的基础上,所述缓存数据管理模块可设置为:根据数据延迟状态获取本地缓存中的目标删除数据在目标本地从数据库中的数据库存储地址;根据缓存关键字映射逻辑将所述数据库存储地址映射为本地缓存中的关 键字,并从本地缓存中删除所述关键字。
上述数据缓存装置可执行本公开任意实施例所提供的数据缓存方法,具备执行数据缓存方法相应的功能模块。
下面参考图5,其示出了适于用来实现本公开实施例的电子设备(例如终端设备)500的结构示意图。本公开实施例中的终端设备可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、个人数字助理(Personal Digital Assistant,PDA)、PAD(平板电脑)、便携式多媒体播放器(Portable Media Player,PMP)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字(Television,TV)、台式计算机等等的固定终端。图5示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。
如图5所示,电子设备500可以包括处理装置(例如中央处理器、图形处理器等)501,其可以根据存储在只读存储器(Read Only Memory,ROM)502中的程序或者从存储装置508加载到随机访问存储器(Random Access Memory,RAM)503中的程序而执行各种适当的动作和处理。在RAM 503中,还存储有电子设备500操作所需的各种程序和数据。处理装置501、ROM 502以及RAM503通过总线504彼此相连。输入/输出(Input/Output,I/O)接口505也连接至总线504。
通常,以下装置可以连接至I/O接口505:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置506;包括例如液晶显示器(Liquid Crystal Display,LCD)、扬声器、振动器等的输出装置507;包括例如磁带、硬盘等的存储装置508;以及通信装置509。通信装置509可以允许电子设备500与其他设备进行无线或有线通信以交换数据。虽然图5示出了具有各种装置的电子设备500,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置509从网络上被下载和安装,或者从存储装置508被安装,或者从ROM 502被安装。在该计算机程序被处理装置501执行时,执行本公开实施例的方法中限定的上述功能。
需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(Erasable Programmable Read Only Memory,EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(Compact Disc Read-Only Memory,CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、射频(Radio Frequency,RF)等等,或者上述的任意合适的组合。
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:获取本地主数据库与所述本地主数据库的至少一个本地从数据库之间的数据延迟状态;根据所述数据延迟状态对本地缓存中的数据进行数据管理,其中,所述数据管理包括数据删除。
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(Local Area Network, LAN)或广域网(Wide Area Network,WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
附图中的流程图和框图,图示了按照本公开各种实施例的方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本公开实施例中所涉及到的模块、单元可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,模块、单元的名称在某种情况下并不构成对该模块或单元本身的限定。
Claims (10)
- 一种数据缓存方法,包括:获取本地主数据库与所述本地主数据库的至少一个本地从数据库之间的数据延迟状态;根据所述数据延迟状态对本地缓存中的数据进行数据管理,其中,所述数据管理包括数据删除。
- 根据权利要求1所述的方法,其中,所述根据所述数据延迟状态对本地缓存中的数据进行数据管理包括:在所述数据延迟状态为不存在数据延迟的情况下,获取所述本地主数据库的主库日志文件;根据所述主库日志文件对所述本地缓存中的数据进行数据管理。
- 根据权利要求2所述的方法,其中,所述根据所述主库日志文件对本地缓存中的数据进行数据管理,包括:在基于所述主库日志文件中确定所述本地主数据库的数据发生变更的情况下,对所述本地缓存中的数据进行删除。
- 根据权利要求1所述的方法,其中,所述根据所述数据延迟状态对本地缓存中的数据进行数据管理包括:在所述数据延迟状态为存在数据延迟的情况下,获取所述本地主数据库的主库日志文件以及所述本地主数据库的至少一个所述本地从数据库的从库日志文件;根据所述主库日志文件以及至少一个所述从库日志文件对所述本地缓存中的数据进行数据管理。
- 根据权利要求4所述的方法,其中,所述根据所述主库日志文件以及至少一个所述从库日志文件对所述本地缓存中的数据进行数据管理,包括:将数据延迟最大的从数据库的从库日志文件作为目标从库日志文件;根据所述主库日志文件以及所述目标从库日志文件对本地缓存中的数据进行数据管理。
- 根据权利要求5所述的方法,其中,根据所述主库日志文件以及所述目标从库日志文件对本地缓存中的数据进行数据管理,包括:在基于所述目标从库日志文件中确定出与所述目标从库日志文件对应的本地从数据库的数据发生变更的情况下,对本地缓存中的数据进行删除;在基于所述主库日志文件中确定出所述本地主数据库的数据发生变更的情 况下,对本地缓存中的数据进行删除。
- 根据权利要求3或6所述的方法,其中,根据所述数据延迟状态对本地缓存中的数据进行数据管理,包括:根据所述数据延迟状态获取本地缓存中的目标删除数据在目标本地从数据库中的数据库存储地址;根据缓存关键字映射逻辑将所述数据库存储地址映射为所述本地缓存中的关键字,并从所述本地缓存中删除所述关键字。
- 一种数据缓存装置,包括:延迟状态确定模块,设置为获取本地主数据库与所述本地主数据库的至少一个本地从数据库之间的数据延迟状态;缓存数据管理模块,设置为根据所述数据延迟状态对本地缓存中的数据进行数据管理,其中,所述数据管理包括数据删除。
- 一种电子设备,包括:至少一个处理装置;存储器,设置为存储至少一个程序;当所述至少一个程序被所述至少一个处理装置执行,使得所述至少一个处理装置实现如权利要求1-7中任一所述的数据缓存方法。
- 一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1-7中任一所述的数据缓存方法。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910127761.6 | 2019-02-19 | ||
| CN201910127761.6A CN109828980A (zh) | 2019-02-19 | 2019-02-19 | 数据缓存方法、装置、终端及存储介质 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2020168878A1 true WO2020168878A1 (zh) | 2020-08-27 |
Family
ID=66863936
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2020/072655 Ceased WO2020168878A1 (zh) | 2019-02-19 | 2020-01-17 | 数据缓存方法、装置、终端及存储介质 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN109828980A (zh) |
| WO (1) | WO2020168878A1 (zh) |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109828980A (zh) * | 2019-02-19 | 2019-05-31 | 北京字节跳动网络技术有限公司 | 数据缓存方法、装置、终端及存储介质 |
| CN110727694B (zh) * | 2019-10-10 | 2024-01-09 | 北京字节跳动网络技术有限公司 | 数据处理方法、装置、电子设备及存储介质 |
| CN112131455B (zh) * | 2020-09-28 | 2021-09-17 | 贝壳找房(北京)科技有限公司 | 列表页检索降级方法、装置、电子设备和存储介质 |
| CN113343045B (zh) * | 2021-07-29 | 2021-11-05 | 阿里云计算有限公司 | 一种数据缓存方法及网络设备 |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103955486A (zh) * | 2014-04-14 | 2014-07-30 | 五八同城信息技术有限公司 | 分布式服务系统及其数据更新、数据查询的方法 |
| US20140244584A1 (en) * | 2013-02-26 | 2014-08-28 | Facebook, Inc. | System and method for implementing cache consistent regional clusters |
| CN104699541A (zh) * | 2015-03-30 | 2015-06-10 | 北京奇虎科技有限公司 | 同步数据的方法、装置、数据传输组件及系统 |
| CN104881444A (zh) * | 2015-05-14 | 2015-09-02 | 微梦创科网络科技(中国)有限公司 | 网站中更新缓存服务器的方法及系统 |
| CN109828980A (zh) * | 2019-02-19 | 2019-05-31 | 北京字节跳动网络技术有限公司 | 数据缓存方法、装置、终端及存储介质 |
Family Cites Families (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107133234B (zh) * | 2016-02-29 | 2021-04-27 | 创新先进技术有限公司 | 缓存数据更新的方法、装置及系统 |
| CN107291779B (zh) * | 2016-04-12 | 2021-08-13 | 百度在线网络技术(北京)有限公司 | 缓存数据管理方法及装置 |
| US20170316045A1 (en) * | 2016-04-29 | 2017-11-02 | Linkedin Corporation | Read-after-write consistency for derived non-relational data |
| CN108073660B (zh) * | 2016-11-18 | 2021-10-15 | 腾讯科技(深圳)有限公司 | 一种实现缓存数据同步的方法及系统 |
| CN107122410A (zh) * | 2017-03-29 | 2017-09-01 | 武汉斗鱼网络科技有限公司 | 一种缓存更新方法及装置 |
| CN107341212A (zh) * | 2017-06-26 | 2017-11-10 | 努比亚技术有限公司 | 一种缓存更新方法及设备 |
-
2019
- 2019-02-19 CN CN201910127761.6A patent/CN109828980A/zh active Pending
-
2020
- 2020-01-17 WO PCT/CN2020/072655 patent/WO2020168878A1/zh not_active Ceased
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20140244584A1 (en) * | 2013-02-26 | 2014-08-28 | Facebook, Inc. | System and method for implementing cache consistent regional clusters |
| CN103955486A (zh) * | 2014-04-14 | 2014-07-30 | 五八同城信息技术有限公司 | 分布式服务系统及其数据更新、数据查询的方法 |
| CN104699541A (zh) * | 2015-03-30 | 2015-06-10 | 北京奇虎科技有限公司 | 同步数据的方法、装置、数据传输组件及系统 |
| CN104881444A (zh) * | 2015-05-14 | 2015-09-02 | 微梦创科网络科技(中国)有限公司 | 网站中更新缓存服务器的方法及系统 |
| CN109828980A (zh) * | 2019-02-19 | 2019-05-31 | 北京字节跳动网络技术有限公司 | 数据缓存方法、装置、终端及存储介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN109828980A (zh) | 2019-05-31 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US10291702B2 (en) | Synchronized content library | |
| WO2020168878A1 (zh) | 数据缓存方法、装置、终端及存储介质 | |
| WO2021051761A1 (zh) | 用于同步节点数据的方法和装置 | |
| WO2021027205A1 (zh) | 一种传屏处理方法、装置、设备和存储介质 | |
| CN108363813A (zh) | 数据存储方法、装置和系统 | |
| WO2019047976A1 (zh) | 网络文件管理方法、终端及计算机可读存储介质 | |
| CN115344688B (zh) | 业务数据展示方法、装置、电子设备和计算机可读介质 | |
| WO2021190129A1 (zh) | 页面处理方法、装置、电子设备及计算机可读存储介质 | |
| CN113239049B (zh) | 信息的处理方法、装置、终端和存储介质 | |
| CN107835181B (zh) | 服务器集群的权限管理方法、装置、介质和电子设备 | |
| CN112905848A (zh) | 信息查询方法、装置、电子设备、存储介质及程序产品 | |
| JP7691463B2 (ja) | コンピューティングデバイス上でアプリケーションを更新するための、メモリ効率のよいソフトウェアパッチング | |
| WO2023029850A1 (zh) | 一种数据处理方法、装置、电子设备和介质 | |
| CN116467275A (zh) | 共享远程存储方法、装置、系统、电子设备及存储介质 | |
| CN109697034B (zh) | 一种数据写入方法、装置、电子设备及存储介质 | |
| CN111787043A (zh) | 数据请求方法和装置 | |
| CN117234588A (zh) | 信息处理方法、装置、电子设备和存储介质 | |
| WO2023241283A1 (zh) | 用于视频编辑的方法及设备 | |
| WO2023273576A1 (zh) | 异常请求处理方法、装置、电子设备和存储介质 | |
| CN113127438B (zh) | 用于存储数据的方法、装置、服务器和介质 | |
| WO2022017458A1 (zh) | 同步数据方法、装置、电子设备和介质 | |
| WO2025044758A1 (zh) | 信息处理方法、装置、电子设备和存储介质 | |
| CN109947613B (zh) | 文件读取测试方法和装置 | |
| CN111382058B (zh) | 一种服务的测试方法、装置,服务器及存储介质 | |
| CN112506490A (zh) | 一种接口生成方法、装置、电子设备及存储介质 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20759393 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 21/01/2022) |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 20759393 Country of ref document: EP Kind code of ref document: A1 |