CN114327603A - Data caching method and device thereof, and computer-readable storage medium - Google Patents
Data caching method and device thereof, and computer-readable storage medium Download PDFInfo
- Publication number
- CN114327603A CN114327603A CN202111679984.7A CN202111679984A CN114327603A CN 114327603 A CN114327603 A CN 114327603A CN 202111679984 A CN202111679984 A CN 202111679984A CN 114327603 A CN114327603 A CN 114327603A
- Authority
- CN
- China
- Prior art keywords
- version number
- data
- cache
- target
- caching
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 50
- 238000012544 monitoring process Methods 0.000 claims abstract description 35
- 238000013500 data storage Methods 0.000 claims abstract description 33
- 238000004590 computer program Methods 0.000 claims description 13
- 238000012423 maintenance Methods 0.000 abstract description 8
- 230000008859 change Effects 0.000 description 5
- 238000007726 management method Methods 0.000 description 5
- 238000010586 diagram Methods 0.000 description 4
- 230000008901 benefit Effects 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 230000004044 response Effects 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 238000012217 deletion Methods 0.000 description 2
- 230000037430 deletion Effects 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 238000013523 data management Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000014509 gene expression Effects 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
- 238000009941 weaving Methods 0.000 description 1
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
技术领域technical field
本发明涉及数据处理领域,具体而言,涉及一种数据缓存方法及其装置、计算机可读存储介质。The present invention relates to the field of data processing, and in particular, to a data caching method and device thereof, and a computer-readable storage medium.
背景技术Background technique
当前本地缓存解决方案中,常用到的spring cache、google gauva、ehance等缓存组件来管理缓存数据,这些方案的数据缓存需要开发人员编写额外代码来管理,对应用侵入性较大。In the current local cache solutions, commonly used cache components such as spring cache, google gauva, and ehance are used to manage cached data. The data cache of these solutions requires developers to write additional code to manage them, which is more intrusive to the application.
应用自身实现本地缓存虽然也能实现数据快速访问需求,但由于缓存数据管理逻辑不通用,数据更新时需要手动刷新等,需要额外工作量来完成缓存需求。Although the application itself can realize the local cache, it can also meet the needs of fast data access, but because the cache data management logic is not universal, and the data needs to be refreshed manually when updating, etc., additional workload is required to complete the cache requirements.
此外,通过采用中间件集中式缓存管理缓存数据,由于引入缓存中间件系统会额外增加系统维护和运维成本,增加开发和运维人员负担。In addition, by adopting the centralized cache management of the middleware, the introduction of the cache middleware system will increase the cost of system maintenance and operation and maintenance, and increase the burden on the development and operation and maintenance personnel.
针对上述问题,目前尚未提出有效的解决方案。For the above problems, no effective solution has been proposed yet.
发明内容SUMMARY OF THE INVENTION
本发明实施例提供了一种数据缓存方法及其装置、计算机可读存储介质,以至少解决相关技术中缓存数据更新组件兼容性较差导致数据更新自动化程度较低、运维人员工作量较大的技术问题。Embodiments of the present invention provide a data caching method and device, and a computer-readable storage medium, so as to at least solve the problem that the poor compatibility of cached data update components in the related art leads to a low degree of data update automation and a large workload of operation and maintenance personnel technical issues.
根据本发明实施例的一个方面,提供了一种数据缓存方法,包括:对目标数据存储介质的主版本号进行监听,得到监听结果;在所述监听结果表示所述主版本号发生变化时,将所述主版本号与目标数据缓存中心的当前版本号进行比对,得到版本号比对结果;在确定所述版本号比对结果表示所述主版本号大于所述当前版本号时,基于所述主版本号获取所述目标数据存储介质中的更新数据;将所述更新数据缓存至所述目标数据缓存中心。According to an aspect of the embodiments of the present invention, a data caching method is provided, comprising: monitoring the major version number of a target data storage medium to obtain a monitoring result; when the monitoring result indicates that the major version number has changed, Compare the main version number with the current version number of the target data cache center to obtain a version number comparison result; when it is determined that the version number comparison result indicates that the main version number is greater than the current version number, based on The major version number acquires the update data in the target data storage medium; and caches the update data in the target data cache center.
可选地,所述目标数据存储介质包含多个数据表,所述多个数据表中的每一个数据表均设置有从版本号,其中,所述每一个数据表中的数据发生变化时,其对应的从版本号自动更新;所述从版本号存在更新时,所述主版本号自动更新,并且所述主版本号中记录有所述从版本号的更新信息。Optionally, the target data storage medium includes a plurality of data tables, and each data table in the plurality of data tables is provided with a slave version number, wherein, when the data in the each data table changes, The corresponding secondary version number is automatically updated; when the secondary version number is updated, the primary version number is automatically updated, and the update information of the secondary version number is recorded in the primary version number.
可选地,将所述主版本号与目标数据缓存中心的当前版本号进行比对,得到版本号比对结果,包括:获取所述主版本号和所述当前版本号;将所述主版本号与所述当前版本号进行信息比对,得到所述版本号比对结果。Optionally, comparing the main version number with the current version number of the target data cache center to obtain a version number comparison result, including: obtaining the main version number and the current version number; The information is compared with the current version number to obtain the version number comparison result.
可选地,基于所述主版本号获取所述目标数据存储介质中的更新数据,包括:基于所述主版本号确定目标从版本号;在确定所述目标从版本号对应的目标数据表中存在数据更新时,从所述目标数据表获取所述更新数据。Optionally, acquiring the update data in the target data storage medium based on the master version number includes: determining a target slave version number based on the master version number; determining in a target data table corresponding to the target slave version number When there is data update, the update data is obtained from the target data table.
可选地,所述方法还包括:在确定所述目标从版本号对应的目标数据表中不存在数据更新时,则利用所述目标从版本号替换所述数据缓存中心中的缓存从版本号。Optionally, the method further includes: when it is determined that there is no data update in the target data table corresponding to the target slave version number, replacing the cache slave version number in the data cache center with the target slave version number. .
可选地,所述方法还包括:更新所述数据缓存中心的缓存主版本号。Optionally, the method further includes: updating the cache main version number of the data cache center.
可选地,将所述更新数据缓存至所述数据缓存中心,包括:基于所述目标从版本号确定所述缓存从版本号;搜索所述缓存从版本号对应的缓存数据表,其中,所述缓存数据表为所述数据缓存中心包含的数据表;将所述更新数据缓存至所述缓存数据表。Optionally, caching the update data to the data cache center includes: determining the cache slave version number based on the target slave version number; searching a cache data table corresponding to the cache slave version number, wherein the The cache data table is a data table included in the data cache center; the update data is cached to the cache data table.
可选地,在将所述更新数据缓存至所述目标数据缓存中心之后,所述方法还包括:删除所述缓存数据表中的历史缓存数据。Optionally, after the update data is cached in the target data cache center, the method further includes: deleting historical cache data in the cache data table.
根据本发明实施例的另外一个方面,还提供了一种数据缓存装置,包括:监听模块,用于对目标数据存储介质的主版本号进行监听,得到监听结果;比对模块,用于在所述监听结果表示所述主版本号发生变化时,将所述主版本号与目标数据缓存中心的当前版本号进行比对,得到版本号比对结果;获取模块,用于在确定所述版本号比对结果表示所述主版本号大于所述当前版本号时,基于所述主版本号获取所述目标数据存储介质中的更新数据;缓存模块,用于将所述更新数据缓存至所述目标数据缓存中心。According to another aspect of the embodiments of the present invention, there is also provided a data caching device, including: a monitoring module for monitoring the main version number of a target data storage medium to obtain a monitoring result; a comparison module for The monitoring result indicates that when the main version number changes, the main version number is compared with the current version number of the target data cache center to obtain a version number comparison result; an acquisition module is used to determine the version number When the comparison result indicates that the major version number is greater than the current version number, the update data in the target data storage medium is obtained based on the major version number; the cache module is configured to cache the update data to the target Data cache center.
可选地,所述目标数据存储介质包含多个数据表,所述多个数据表中的每一个数据表均设置有从版本号,其中,所述每一个数据表中的数据发生变化时,其对应的从版本号自动更新;所述从版本号存在更新时,所述主版本号自动更新,并且所述主版本号中记录有所述从版本号的更新信息。Optionally, the target data storage medium includes a plurality of data tables, and each data table in the plurality of data tables is provided with a slave version number, wherein, when the data in the each data table changes, The corresponding secondary version number is automatically updated; when the secondary version number is updated, the primary version number is automatically updated, and the update information of the secondary version number is recorded in the primary version number.
可选地,所述比对模块,包括:第一获取单元,用于获取所述主版本号和所述当前版本号;比对单元,用于将所述主版本号与所述当前版本号进行信息比对,得到所述版本号比对结果。Optionally, the comparison module includes: a first acquisition unit for acquiring the main version number and the current version number; a comparison unit for comparing the main version number with the current version number Perform information comparison to obtain the version number comparison result.
可选地,所述获取模块,包括:第一确定单元,用于基于所述主版本号确定目标从版本号;第二获取单元,用于在确定所述目标从版本号对应的目标数据表中存在数据更新时,从所述目标数据表获取所述更新数据。Optionally, the obtaining module includes: a first determining unit for determining a target slave version number based on the master version number; a second obtaining unit for determining a target data table corresponding to the target slave version number When there is data update in the target data table, the update data is obtained from the target data table.
可选地,所述装置还包括:替换模块,用于在确定所述目标从版本号对应的目标数据表中不存在数据更新时,则利用所述目标从版本号替换所述数据缓存中心中的缓存从版本号。Optionally, the device further includes: a replacement module, configured to replace the data cache center with the target slave version number when it is determined that there is no data update in the target data table corresponding to the target slave version number. The cache from the version number.
可选地,所述装置还包括:更新模块,用于更新所述数据缓存中心的缓存主版本号。Optionally, the apparatus further includes: an update module configured to update the cache main version number of the data cache center.
可选地,所述缓存模块,包括:第二确定单元,用于基于所述目标从版本号确定所述缓存从版本号;搜索单元,用于搜索所述缓存从版本号对应的缓存数据表,其中,所述缓存数据表为所述数据缓存中心包含的数据表;缓存单元,用于将所述更新数据缓存至所述缓存数据表。Optionally, the cache module includes: a second determination unit for determining the cache slave version number based on the target slave version number; a search unit for searching a cache data table corresponding to the cache slave version number , wherein the cache data table is a data table included in the data cache center; a cache unit is configured to cache the update data to the cache data table.
可选地,所述装置还包括:删除单元,用于在将所述更新数据缓存至所述目标数据缓存中心之后,删除所述缓存数据表中的历史缓存数据。Optionally, the apparatus further includes: a deletion unit, configured to delete the historical cached data in the cached data table after the updated data is cached in the target data cache center.
根据本发明实施例的另外一个方面,还提供了一种计算机可读存储介质,所述计算机可读存储介质包括存储的计算机程序,其中,在所述计算机程序被处理器运行时控制所述计算机可读存储介质所在设备执行上述中任一项所述的数据缓存方法。According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, the computer-readable storage medium comprising a stored computer program, wherein the computer is controlled when the computer program is run by a processor The device where the readable storage medium is located executes the data caching method described in any one of the above.
根据本发明实施例的另外一个方面,还提供了一种处理器,所述处理器用于运行计算机程序,其中,所述计算机程序运行时执行上述中任一项所述的数据缓存方法。According to another aspect of the embodiments of the present invention, a processor is also provided, and the processor is configured to run a computer program, wherein the computer program executes any one of the data caching methods described above when the computer program runs.
在本发明实施例中,对目标数据存储介质的主版本号进行监听,得到监听结果;在监听结果表示主版本号发生变化时,将主版本号与目标数据缓存中心的当前版本号进行比对,得到版本号比对结果;在确定版本号比对结果表示主版本号大于当前版本号时,基于主版本号获取目标数据存储介质中的更新数据;将更新数据缓存至目标数据缓存中心。通过本发明实施例提供的数据缓存方法,达到了通过对目标数据存储介质的主版本号的监听来更新并缓存数据的目的,从而实现了提高系统吞吐率的技术效果,进而解决了相关技术中缓存数据更新组件兼容性较差导致数据更新自动化程度较低、运维人员工作量较大的技术问题。In the embodiment of the present invention, the main version number of the target data storage medium is monitored to obtain a monitoring result; when the monitoring result indicates that the main version number has changed, the main version number is compared with the current version number of the target data cache center , obtain the version number comparison result; when it is determined that the version number comparison result indicates that the main version number is greater than the current version number, obtain the update data in the target data storage medium based on the main version number; cache the update data in the target data cache center. The data caching method provided by the embodiment of the present invention achieves the purpose of updating and caching data by monitoring the main version number of the target data storage medium, thereby achieving the technical effect of improving the system throughput rate, and further solving the problems in the related art. The poor compatibility of cached data update components leads to technical problems that the automation of data update is low and the workload of operation and maintenance personnel is large.
附图说明Description of drawings
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:The accompanying drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the attached image:
图1是根据本发明实施例的数据缓存方法的流程图;1 is a flowchart of a data caching method according to an embodiment of the present invention;
图2是根据本发明实施例的请求查询缓存响应的流程图;FIG. 2 is a flowchart of a request query cache response according to an embodiment of the present invention;
图3是根据本发明实施例的缓存SDK参数版本更新的流程图;Fig. 3 is the flow chart of cache SDK parameter version update according to an embodiment of the present invention;
图4是根据本发明实施例的缓存组件协作的示意图;4 is a schematic diagram of cache component cooperation according to an embodiment of the present invention;
图5是根据本发明实施例的数据缓存装置的示意图。FIG. 5 is a schematic diagram of a data caching apparatus according to an embodiment of the present invention.
具体实施方式Detailed ways
为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分的实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明保护的范围。In order to make those skilled in the art better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only Embodiments are part of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本发明的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。It should be noted that the terms "first", "second" and the like in the description and claims of the present invention and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific sequence or sequence. It is to be understood that the data so used may be interchanged under appropriate circumstances such that the embodiments of the invention described herein can be practiced in sequences other than those illustrated or described herein. Furthermore, the terms "comprising" and "having" and any variations thereof, are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those expressly listed Rather, those steps or units may include other steps or units not expressly listed or inherent to these processes, methods, products or devices.
实施例1Example 1
根据本发明实施例,提供了一种数据缓存方法的方法实施例,需要说明的是,在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行,并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。According to an embodiment of the present invention, a method embodiment of a data caching method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings may be executed in a computer system such as a set of computer-executable instructions, and, Although a logical order is shown in the flowcharts, in some cases steps shown or described may be performed in an order different from that herein.
图1是根据本发明实施例的数据缓存方法的流程图,如图1所示,该方法包括如下步骤:FIG. 1 is a flowchart of a data caching method according to an embodiment of the present invention. As shown in FIG. 1 , the method includes the following steps:
步骤S102,对目标数据存储介质的主版本号进行监听,得到监听结果。Step S102, monitor the major version number of the target data storage medium to obtain a monitoring result.
可选的,在上述步骤中,目标数据存储介质包括但不限于:本地缓存、服务器缓存。Optionally, in the above steps, the target data storage medium includes but is not limited to: a local cache and a server cache.
步骤S104,在监听结果表示主版本号发生变化时,将主版本号与目标数据缓存中心的当前版本号进行比对,得到版本号比对结果。Step S104, when the monitoring result indicates that the main version number has changed, compare the main version number with the current version number of the target data cache center to obtain a version number comparison result.
可选的,在上述步骤中,在监听过程中,主版本号发生变化的时候将当前的主版本号与目标数据缓存中心的当前版本号进行比对,并得到比对结果。Optionally, in the above steps, during the monitoring process, when the major version number changes, the current major version number is compared with the current version number of the target data cache center, and a comparison result is obtained.
步骤S106,在确定版本号比对结果表示主版本号大于当前版本号时,基于主版本号获取目标数据存储介质中的更新数据。Step S106, when it is determined that the version number comparison result indicates that the major version number is greater than the current version number, acquire the update data in the target data storage medium based on the major version number.
步骤S108,将更新数据缓存至目标数据缓存中心。Step S108, cache the updated data to the target data cache center.
由上可知,在本发明实施例中,首先可以对目标数据存储介质的主版本号进行监听,得到监听结果;接着可以在监听结果表示主版本号发生变化时,将主版本号与目标数据缓存中心的当前版本号进行比对,得到版本号比对结果;接着可以在确定版本号比对结果表示主版本号大于当前版本号时,基于主版本号获取目标数据存储介质中的更新数据;最后可以将更新数据缓存至目标数据缓存中心。通过本发明实施例提供的数据缓存方法,达到了通过对目标数据存储介质的主版本号的监听来更新并缓存数据的目的,从而实现了提高系统吞吐率的技术效果,进而解决了相关技术中缓存数据更新组件兼容性较差导致数据更新自动化程度较低、运维人员工作量较大的技术问题。As can be seen from the above, in the embodiment of the present invention, firstly, the main version number of the target data storage medium can be monitored to obtain the monitoring result; then, when the monitoring result indicates that the main version number has changed, the main version number and the target data can be cached. The current version number of the center is compared to obtain the version number comparison result; then, when it is determined that the version number comparison result indicates that the main version number is greater than the current version number, the update data in the target data storage medium can be obtained based on the main version number; finally Update data can be cached to the target data cache center. The data caching method provided by the embodiment of the present invention achieves the purpose of updating and caching data by monitoring the main version number of the target data storage medium, thereby achieving the technical effect of improving the system throughput rate, and further solving the problems in the related art. The poor compatibility of cached data update components leads to technical problems that the automation of data update is low and the workload of operation and maintenance personnel is large.
作为一种可选的实施例,目标数据存储介质包含多个数据表,多个数据表中的每一个数据表均设置有从版本号,其中,每一个数据表中的数据发生变化时,其对应的从版本号自动更新;从版本号存在更新时,主版本号自动更新,并且主版本号中记录有从版本号的更新信息。As an optional embodiment, the target data storage medium includes a plurality of data tables, and each data table in the plurality of data tables is set with a slave version number, wherein when the data in each data table changes, its The corresponding slave version number is automatically updated; when there is an update in the slave version number, the master version number is automatically updated, and the update information of the slave version number is recorded in the master version number.
在上述可选的实施例中,为了记录数据库参数表数据更新历史,管理缓存参数数据,以参数更新版本为数据维度,设计实现了参数表版本拉链法。参数表版本拉链法通过更新大版本号变更表A和小版本变更表B来记录参数表中数据的每一次变更。该设计是缓存组件管理参数的基础。该方法的具体步骤如下:In the above optional embodiment, in order to record the data update history of the database parameter table and manage the cached parameter data, the parameter table version zipper method is designed and implemented with the parameter update version as the data dimension. The parameter table version zipper method records every change of data in the parameter table by updating the major version number change table A and the minor version change table B. This design is the basis for the management parameters of the cache component. The specific steps of this method are as follows:
步骤1)、假设有参数表T1,T1中的每条记录带有版本号Vt,有数据变更时在A表中新增一条记录,内容为:(AV1,AV0,VFlag,UpdateTime),其中,AV1表示当前A表版本号;AV0表示A表上一版本号;VFlag表示A表版本同步状态;UpdateTime表示更新时间,接着设置A表记录版本号最大值为C,在B表中记录具体表更新信息,内容为:(T1,PVt,AV1,C,UpdateTime)其中,T1表示参数表表名;PVt表示参数表记录版本号;AV1表示当前A表版本号;C表示A表记录版本号最大值;UpdateTime表示更新时间。Step 1), assuming that there is a parameter table T 1 , each record in T 1 has a version number V t , when there is data change, a new record is added in the A table, and the content is: (AV 1 , AV 0 , VFlag, UpdateTime), wherein, AV 1 represents the current version number of the A table; AV 0 represents the previous version number of the A table; VFlag represents the version synchronization state of the A table; The specific table update information is recorded in the B table, and the content is: (T 1 , PV t , AV 1 , C, UpdateTime) Among them, T 1 represents the parameter table name; PV t represents the parameter table record version number; AV 1 represents the current A Table version number; C represents the maximum value of the A table record version number; UpdateTime represents the update time.
步骤2)、当T1表再次有数据更新时,T1表中写入记录的版本号为Vt+1,A表中新增记录如下:(AV2,AV1,VFlag,UpdateTime);B表中新增记录如下:(T1,PVt+1,AV2,C,UpdateTime),同时修改B表中记录(T1,PVt,AV1,C,UpdateTime)为(T1,PVt,AV1,AV2,UpdateTime)。Step 2 ), when the T1 table has data update again, the version number written in the record in the T1 table is Vt +1, and the newly added record in the A table is as follows: (AV2, AV1, VFlag , UpdateTime); The newly added records in table B are as follows: (T 1 , PV t+1 , AV 2 , C, UpdateTime), and at the same time modify the records in table B (T 1 , PV t , AV 1 , C, UpdateTime) to (T 1 , PV t , AV 1 , AV 2 , UpdateTime).
步骤3)、当有T1表数据再次更新时,升级对应版本号,重复步骤1)与步骤2)的步骤,并且缓存SDK(即目标数据存储介质)中缓存的参数表数据根据A表版本号缓存,初始为(AV,Cache),AV为A表当前版本号,Cache为该版本参数表缓存数据对象;为了保证缓存数据可用,缓存SDK中存有两个版本号的缓存数据,用于替换新版本时保证有可用版本的缓存数据。当有A表版本新增时,触发缓存SDK模块去配置中心拉取表A当前最新版本号,上送该版本号到参数查询服务模块去拉取对应版本数据。Step 3 ), when T1 table data is updated again, upgrade the corresponding version number, repeat the steps of step 1) and step 2), and cache the parameter table data cached in the SDK (that is, the target data storage medium) according to the A table version. Number cache, the initial value is (AV, Cache), AV is the current version number of the A table, and Cache is the cache data object of the version parameter table; in order to ensure that the cache data is available, cache data with two version numbers is stored in the cache SDK for A version of cached data is guaranteed to be available when replacing a new version. When a new version of table A is added, trigger the cache SDK module to go to the configuration center to pull the latest version number of table A, and upload the version number to the parameter query service module to pull the corresponding version data.
作为一种可选的实施例,将主版本号与目标数据缓存中心的当前版本号进行比对,得到版本号比对结果,包括:获取主版本号和当前版本号;将主版本号与当前版本号进行信息比对,得到版本号比对结果。As an optional embodiment, the main version number is compared with the current version number of the target data cache center to obtain the version number comparison result, including: obtaining the main version number and the current version number; comparing the main version number with the current version number The version number is compared for information, and the version number comparison result is obtained.
在上述可选的实施例中,首先获取主版本号和当前版本号,接着将其进行比对,以主版本号与当前版本号是否一致的比对结果。In the above-mentioned optional embodiment, the main version number and the current version number are obtained first, and then they are compared to obtain a comparison result of whether the main version number and the current version number are consistent.
作为一种可选的实施例,基于主版本号获取目标数据存储介质中的更新数据,包括:基于主版本号确定目标从版本号;在确定目标从版本号对应的目标数据表中存在数据更新时,从目标数据表获取更新数据。As an optional embodiment, acquiring the update data in the target data storage medium based on the master version number includes: determining the target slave version number based on the master version number; determining that there is a data update in the target data table corresponding to the target slave version number , get updated data from the target data table.
在上述可选的实施例中,缓存SDK加载参数表分为主动加载和懒加载模式两种。主动加载模式是在应用启动时将配置的参数表中的数据加载到内存当中(即本发明实施例中的主动获取主版本号和当前版本号后进行比对得到比对结果);懒加载模式是应用启动时不先加载参数表数据,当有查询请求查询该参数表数据时进行缓存(即本发明实施例中的确定目标从版本号对应的目标数据表中存在数据更新时,从目标数据表获取更新数据)。数据有热数据和冷数据,而表作为数据的集合,也有冷热区别,两种缓存模式的优点在于可以根据表维度的冷热来决定缓存的模式,主动加载模式可以应对全量热点数据的快速响应,而懒加载模式可以筛选出冷表中的热点数据进行缓存,既节省了内存空间,又针对性的做了数据加速访问。In the above-mentioned optional embodiment, the cached SDK loading parameter table is divided into two modes: active loading and lazy loading. The active loading mode is to load the data in the configured parameter table into the memory when the application starts (that is, in the embodiment of the present invention, the main version number and the current version number are actively obtained and compared to obtain the comparison result); lazy loading mode When the application starts, the parameter table data is not loaded first, and when there is a query request to query the parameter table data, the data is cached (that is, when there is a data update in the target data table corresponding to the version number of the determined target in the embodiment of the present invention, the data from the target data is updated. table gets updated data). The data has hot data and cold data, and the table, as a collection of data, also has the difference between hot and cold. The advantage of the two cache modes is that the cache mode can be determined according to the hot and cold of the table dimension, and the active loading mode can cope with the rapidity of the full amount of hot data. The lazy loading mode can filter out the hot data in the cold table for caching, which not only saves memory space, but also accelerates data access in a targeted manner.
作为一种可选的实施例,该数据缓存方法还包括:在确定目标从版本号对应的目标数据表中不存在数据更新时,则利用目标从版本号替换数据缓存中心中的缓存从版本号。As an optional embodiment, the data caching method further includes: when it is determined that there is no data update in the target data table corresponding to the target slave version number, replacing the cache slave version number in the data cache center with the target slave version number .
作为一种可选的实施例,该数据缓存方法还包括:更新数据缓存中心的缓存主版本号。As an optional embodiment, the data cache method further includes: updating the cache main version number of the data cache center.
下面详细介绍该数据缓存方法的具体步骤:The specific steps of the data caching method are described in detail below:
步骤a.参数表加载模式。缓存SDK加载参数表分为主动加载和懒加载模式两种。主动加载模式是在应用启动时将配置的参数表中的数据加载到内存当中。懒加载模式是应用启动时不先加载参数表数据,当有查询请求查询该参数表数据时进行缓存。数据有热数据和冷数据,而表作为数据的集合,也有冷热区别,两种缓存模式的优点在于可以根据表维度的冷热来决定缓存的模式,主动加载模式可以应对全量热点数据的快速响应,而懒加载模式可以筛选出冷表中的热点数据进行缓存,既节省了内存空间,又针对性的做了数据加速访问。Step a. Parameter table loading mode. The cache SDK loading parameter table is divided into two modes: active loading and lazy loading. Active loading mode is to load the data in the configured parameter table into memory when the application starts. In the lazy loading mode, the parameter table data is not loaded first when the application starts, and the parameter table data is cached when there is a query request to query the parameter table data. The data has hot data and cold data, and the table, as a collection of data, also has the difference between hot and cold. The advantage of the two cache modes is that the cache mode can be determined according to the hot and cold of the table dimension, and the active loading mode can cope with the rapidity of the full amount of hot data. The lazy loading mode can filter out the hot data in the cold table for caching, which not only saves memory space, but also accelerates data access in a targeted manner.
步骤b.缓存初始化。缓存SDK根据配置文件指定的表加载模式、索引字段、主键字段、缓存启用标志等决定如何加载数据和创建内存索引对象,支持根据主键和配置字段创建缓存数据索引。通过提供的SPI接口,还可扩展缓存数据的组合方式。Step b. Cache initialization. The cache SDK determines how to load data and create memory index objects according to the table load mode, index field, primary key field, cache enable flag, etc. specified in the configuration file, and supports the creation of cache data indexes based on the primary key and configuration fields. Through the provided SPI interface, the combination of cached data can also be extended.
步骤c.参数表数据访问。图2是根据本发明实施例的请求查询缓存响应的流程图,如图2所示,对于主动加载模式下的参数表数据访问,在查询参数表数据时,设置DaoSupport中sql语句操作映射接口切面,对于所有需访问参数表数据的查询请求,通过将访问缓存Advice(@Around(doPointSelectList())织入到Pointcut(@Pointcut(“execution(public*DaoSupport.selectList(..))&&args(java.lang.String,..)”))指定的Joinpoint处,来达到从缓存获取数据的目的。解析查询语句条件,比对索引字段集合,如果命中索引字段,则走缓存索引返回数据,如果未命中,则根据该字段创建索引后返回数据。Step c. Parameter table data access. Fig. 2 is a flow chart of requesting a query cache response according to an embodiment of the present invention. As shown in Fig. 2, for parameter table data access in active loading mode, when querying parameter table data, the sql statement operation mapping interface aspect in DaoSupport is set , for all query requests that need to access parameter table data, by weaving the access cache Advice(@Around(doPointSelectList()) into Pointcut(@Pointcut(“execution(public*DaoSupport.selectList(..))&&args(java. lang.String,..)”)) specified Joinpoint to achieve the purpose of obtaining data from the cache. Parse the query statement conditions, compare the index field set, if the index field is hit, go to the cache index to return the data, if not hit , the data is returned after creating an index based on this field.
另外,对于懒加载模式的参数表数据访问,通过拦截MyBatis的Executor中的query方法,解析query方法中的sql语句和sql标识,调用参数查询服务,实现懒加载参数表数据查询,数据返回后进行缓存。In addition, for the parameter table data access in the lazy loading mode, by intercepting the query method in the Executor of MyBatis, parsing the sql statement and sql identifier in the query method, calling the parameter query service, realizing the lazy loading parameter table data query, and performing the data return after the data is returned. cache.
需要说明的是,Mybatis为一种数据访问层框架,提供了可扩展的拦截器;SQL为一种结构化查询语言,操作关系型数据库使用的语言;拦截器为一种程序设计模式,用于在方法调用之前拦截方法参数,执行校验、赋值等操作;参数表为应用需要访问的参数缓存组件管理的数据库表;参数表版本为用于记录参数表数据更新历史;Jointpoint(连接点)表示在程序中明确定义的点,典型的包括方法调用,对类成员的访问以及异常处理程序块的执行等等,它自身还可以嵌套其它joint point;Pointcut(切点)表示一组joint point,这些joint point或是通过逻辑关系组合起来,或是通过通配、正则表达式等方式集中起来,它定义了相应的Advice将要发生的地方;Advice(增强)定义了在Pointcut里面定义的程序点具体要做的操作,它通过before、after和around来区别是在每个joint point之前、之后还是代替执行的代码。It should be noted that Mybatis is a data access layer framework that provides an extensible interceptor; SQL is a structured query language used to operate relational databases; Intercept method parameters before method invocation, perform operations such as verification and assignment; parameter table is the database table managed by the parameter cache component that the application needs to access; parameter table version is used to record the update history of parameter table data; Jointpoint (connection point) indicates A clearly defined point in a program typically includes method calls, access to class members, and execution of exception handler blocks, etc. It can also nest other joint points; Pointcut (pointcut) represents a group of joint points, These joint points are either combined through logical relationships, or concentrated through wildcards, regular expressions, etc., which define where the corresponding advice will occur; Advice (enhancement) defines the specific program points defined in Pointcut. The operation to do, it uses before, after and around to distinguish whether the code is executed before, after, or instead of each joint point.
作为一种可选的实施例,将更新数据缓存至数据缓存中心,包括:基于目标从版本号确定缓存从版本号;搜索缓存从版本号对应的缓存数据表,其中,缓存数据表为数据缓存中心包含的数据表;将更新数据缓存至缓存数据表。As an optional embodiment, caching the update data to the data cache center includes: determining the cache slave version number based on the target slave version number; searching for a cache data table corresponding to the cache slave version number, wherein the cache data table is a data cache The data table contained in the center; caches updated data to the cache data table.
图3是根据本发明实施例的缓存SDK参数版本更新的流程图,如图3所示,在缓存SDK节点监听到有主版本号变更后,进行最新参数表版本的数据拉取,下面对其缓存SDK参数版本更新的步骤进行详细说明。FIG. 3 is a flowchart of updating the parameter version of the cached SDK according to an embodiment of the present invention. As shown in FIG. 3 , after the cached SDK node detects that there is a change of the main version number, the data of the latest parameter table version is pulled. The steps for updating the cached SDK parameter version are described in detail.
步骤1)、获取主版本号,与当前缓存中的版本号对比,如果最新版本号大于内存中的版本号,则执行步骤2),否则结束。Step 1), obtain the main version number, compare with the version number in the current cache, if the latest version number is greater than the version number in the memory, perform step 2), otherwise end.
步骤2)、根据主版本号获取本次更新的参数表版本号。Step 2), obtain the version number of the parameter table updated this time according to the main version number.
步骤3)、判断表是否有更新,如果有更新,则拉取该版本号数据,删除之前版本数据。如果没有更新,则替换缓存版本号。Step 3), determine whether the table is updated, if there is an update, pull the version number data, and delete the previous version data. If there is no update, replace the cached version number.
作为一种可选的实施例,在将更新数据缓存至目标数据缓存中心之后,该数据缓存方法还包括:删除缓存数据表中的历史缓存数据。As an optional embodiment, after the update data is cached in the target data cache center, the data cache method further includes: deleting historical cache data in the cache data table.
图4是根据本发明实施例的缓存组件协作的示意图,如图4所示,缓存组件由三部分组成:缓存SDK、缓存查询服务模块及数据同步模块。缓存SDK提供应用常用参数缓存服务,通过配置需缓存的参数表表名,应用启动时组件加载缓存数据。缓存查询服务模块解决多节点并发访问数据库导致连接数突增问题,用于缓存数据获取。数据同步模块用于同步数据库参数表数据,实现节点缓存和数据库数据一致性,下面介绍其缓存组件协作的具体步骤。FIG. 4 is a schematic diagram of the cooperation of cache components according to an embodiment of the present invention. As shown in FIG. 4 , the cache component consists of three parts: a cache SDK, a cache query service module and a data synchronization module. The caching SDK provides a caching service for common application parameters. By configuring the name of the parameter table to be cached, the component loads the cached data when the application starts. The cache query service module solves the problem of sudden increase in the number of connections caused by concurrent access to the database by multiple nodes, and is used for cache data acquisition. The data synchronization module is used to synchronize the data of the database parameter table and realize the consistency of the node cache and the database data. The following describes the specific steps of the cooperation of the cache components.
步骤a.参数表有数据更新时,数据同步模块同步版本信息到主库和版本号队列中,主从库之间进行数据同步。Step a. When there is data update in the parameter table, the data synchronization module synchronizes the version information to the master library and the version number queue, and performs data synchronization between the master and slave libraries.
步骤b.数据同步模块定时任务监听队列版本是否更新变化,如有新增记录,则将该信息推送至配置中心。Step b. The timing task of the data synchronization module monitors whether the queue version is updated or changed. If there is a new record, the information is pushed to the configuration center.
步骤c.缓存SDK模块监听配置中心数据更新变化,数据变化后获取最新版本号调用缓存查询服务查询最新数据。Step c. The cache SDK module monitors the data update changes in the configuration center, and after the data changes, obtains the latest version number and calls the cache query service to query the latest data.
由上可知,在本发明实施例中,数据缓存虽然有很多的缓存中间件能够做到加速数据访问,但往往业务逻辑代码和缓存数据代码耦合在一块,开发人员要关注数据缓存逻辑,如果缓存逻辑出现问题,需了解缓存中间件的原理,缓存数据的管理需要开发人员去维护,包括数据一致性、缓存过期替换策略等,因此,本发明实施例基于简单配置即可引入缓存数据的管理和同步,对应用侵入性小,无需关注缓存实现逻辑细节,基于缓存索引的访问提高了访问响应速度。As can be seen from the above, in the embodiment of the present invention, although there are many cache middlewares for data cache that can accelerate data access, the business logic code and the cache data code are often coupled together. Developers should pay attention to the data cache logic. If there is a problem with the logic, it is necessary to understand the principle of the cache middleware. The management of cached data needs to be maintained by developers, including data consistency, cache expiration replacement strategy, etc. Therefore, the embodiment of the present invention can introduce the management and management of cached data based on simple configuration. Synchronization, less intrusive to the application, no need to pay attention to the details of the cache implementation logic, and the access based on the cache index improves the access response speed.
实施例2Example 2
根据本发明实施例的另外一个方面,还提供了一种数据缓存装置,图5是根据本发明实施例的数据缓存装置的示意图,如图5所示,包括:监听模块51、比对模块53、获取模块55以及缓存模块57。下面对该数据缓存装置进行说明。According to another aspect of the embodiment of the present invention, a data cache device is also provided. FIG. 5 is a schematic diagram of the data cache device according to an embodiment of the present invention. As shown in FIG. 5 , the device includes: a monitoring module 51 and a comparison module 53 , an acquisition module 55 and a cache module 57 . The data cache device will be described below.
监听模块51,用于对目标数据存储介质的主版本号进行监听,得到监听结果;The monitoring module 51 is used to monitor the main version number of the target data storage medium to obtain the monitoring result;
比对模块53,用于在监听结果表示主版本号发生变化时,将主版本号与目标数据缓存中心的当前版本号进行比对,得到版本号比对结果;The comparison module 53 is used to compare the main version number with the current version number of the target data cache center when the monitoring result indicates that the main version number changes, and obtain the version number comparison result;
获取模块55,用于在确定版本号比对结果表示主版本号大于当前版本号时,基于主版本号获取目标数据存储介质中的更新数据;The obtaining module 55 is used to obtain the updated data in the target data storage medium based on the major version number when it is determined that the version number comparison result indicates that the major version number is greater than the current version number;
缓存模块57,用于将更新数据缓存至目标数据缓存中心。The cache module 57 is configured to cache the updated data to the target data cache center.
此处需要说明的是,上述监听模块51、比对模块53、获取模块55以及缓存模块57对应于实施例1中的步骤S102至S108,上述模块与对应的步骤所实现的实例和应用场景相同,但不限于上述实施例1所公开的内容。需要说明的是,上述模块作为装置的一部分可以在诸如一组计算机可执行指令的计算机系统中执行。It should be noted here that the above-mentioned monitoring module 51, comparison module 53, acquisition module 55, and cache module 57 correspond to steps S102 to S108 in Embodiment 1, and the above-mentioned modules have the same examples and application scenarios as the corresponding steps. , but not limited to the content disclosed in Example 1 above. It should be noted that the above-mentioned modules can be executed in a computer system such as a set of computer-executable instructions as part of an apparatus.
由上可知,在本发明实施例中,首先可以借助监听模块51对目标数据存储介质的主版本号进行监听,得到监听结果;接着可以借助比对模块53在监听结果表示主版本号发生变化时,将主版本号与目标数据缓存中心的当前版本号进行比对,得到版本号比对结果;接着可以借助获取模块55在确定版本号比对结果表示主版本号大于当前版本号时,基于主版本号获取目标数据存储介质中的更新数据;最后可以借助缓存模块57将更新数据缓存至目标数据缓存中心。通过本发明实施例提供的数据缓存装置,达到了通过对目标数据存储介质的主版本号的监听来更新并缓存数据的目的,从而实现了提高系统吞吐率的技术效果,进而解决了相关技术中缓存数据更新组件兼容性较差导致数据更新自动化程度较低、运维人员工作量较大的技术问题。As can be seen from the above, in the embodiment of the present invention, firstly, the monitoring module 51 can be used to monitor the main version number of the target data storage medium to obtain a monitoring result; then, the monitoring result can be used to indicate that the main version number changes with the help of the comparison module 53. , compare the main version number with the current version number of the target data cache center, and obtain the version number comparison result; then the acquisition module 55 can be used to determine that the version number comparison result indicates that the main version number is greater than the current version number, based on the main version number. The version number acquires the updated data in the target data storage medium; finally, the updated data can be cached to the target data cache center by means of the cache module 57 . Through the data caching device provided by the embodiment of the present invention, the purpose of updating and caching data by monitoring the main version number of the target data storage medium is achieved, thereby achieving the technical effect of improving the system throughput rate, and further solving the problems in the related art. The poor compatibility of cached data update components leads to technical problems that the automation of data update is low and the workload of operation and maintenance personnel is large.
可选地,目标数据存储介质包含多个数据表,多个数据表中的每一个数据表均设置有从版本号,其中,每一个数据表中的数据发生变化时,其对应的从版本号自动更新;从版本号存在更新时,主版本号自动更新,并且主版本号中记录有从版本号的更新信息。Optionally, the target data storage medium includes a plurality of data tables, and each data table in the plurality of data tables is provided with a slave version number, wherein, when the data in each data table changes, its corresponding slave version number. Automatic update; when there is an update of the secondary version number, the main version number is automatically updated, and the update information of the secondary version number is recorded in the primary version number.
可选地,比对模块,包括:第一获取单元,用于获取主版本号和当前版本号;比对单元,用于将主版本号与当前版本号进行信息比对,得到版本号比对结果。Optionally, the comparison module includes: a first acquisition unit for acquiring a main version number and a current version number; a comparison unit for performing information comparison between the main version number and the current version number to obtain a version number comparison result.
可选地,获取模块,包括:第一确定单元,用于基于主版本号确定目标从版本号;第二获取单元,用于在确定目标从版本号对应的目标数据表中存在数据更新时,从目标数据表获取更新数据。Optionally, the acquisition module includes: a first determination unit, used for determining a target slave version number based on the master version number; a second acquisition unit, used for determining that there is a data update in the target data table corresponding to the target slave version number, Get updated data from the target data table.
可选地,该数据缓存装置还包括:替换模块,用于在确定目标从版本号对应的目标数据表中不存在数据更新时,则利用目标从版本号替换数据缓存中心中的缓存从版本号。Optionally, the data cache device also includes: a replacement module, configured to replace the cache slave version number in the data cache center with the target slave version number when it is determined that there is no data update in the target data table corresponding to the target slave version number. .
可选地,该数据缓存装置还包括:更新模块,用于更新数据缓存中心的缓存主版本号。Optionally, the data cache device further includes: an update module for updating the cache main version number of the data cache center.
可选地,缓存模块,包括:第二确定单元,用于基于目标从版本号确定缓存从版本号;搜索单元,用于搜索缓存从版本号对应的缓存数据表,其中,缓存数据表为数据缓存中心包含的数据表;缓存单元,用于将更新数据缓存至缓存数据表。Optionally, the cache module includes: a second determination unit for determining the cache slave version number based on the target slave version number; a search unit for searching the cache slave version number corresponding to the cache data table, wherein the cache data table is data. The data table contained in the cache center; the cache unit is used to cache the updated data to the cache data table.
可选地,该数据缓存装置还包括:删除单元,用于在将更新数据缓存至目标数据缓存中心之后,删除缓存数据表中的历史缓存数据。Optionally, the data caching apparatus further includes: a deletion unit, configured to delete the historical cached data in the cached data table after the updated data is cached in the target data cache center.
实施例3Example 3
根据本发明实施例的另外一个方面,还提供了一种计算机可读存储介质,计算机可读存储介质包括存储的计算机程序,其中,在计算机程序被处理器运行时控制计算机可读存储介质所在设备执行上述中任一项的数据缓存方法。According to another aspect of the embodiments of the present invention, a computer-readable storage medium is also provided, where the computer-readable storage medium includes a stored computer program, wherein when the computer program is executed by the processor, a device where the computer-readable storage medium is located is controlled Perform any of the data caching methods above.
实施例4Example 4
根据本发明实施例的另外一个方面,还提供了一种处理器,处理器用于运行计算机程序,其中,计算机程序运行时执行上述中任一项的数据缓存方法。According to another aspect of the embodiments of the present invention, a processor is also provided, where the processor is configured to run a computer program, wherein when the computer program runs, any one of the above data caching methods is executed.
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。The above-mentioned serial numbers of the embodiments of the present invention are only for description, and do not represent the advantages or disadvantages of the embodiments.
在本发明的上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the above-mentioned embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
在本申请所提供的几个实施例中,应该理解到,所揭露的技术内容,可通过其它的方式实现。其中,以上所描述的装置实施例仅仅是示意性的,例如所述单元的划分,可以为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,单元或模块的间接耦合或通信连接,可以是电性或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are only illustrative, for example, the division of the units may be a logical function division, and there may be other division methods in actual implementation, for example, multiple units or components may be combined or Integration into another system, or some features can be ignored, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of units or modules, and may be in electrical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and components shown as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可为个人计算机、服务器或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as an independent product, may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes .
以上所述仅是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。The above are only the preferred embodiments of the present invention. It should be pointed out that for those skilled in the art, without departing from the principles of the present invention, several improvements and modifications can be made. It should be regarded as the protection scope of the present invention.
Claims (11)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111679984.7A CN114327603A (en) | 2021-12-31 | 2021-12-31 | Data caching method and device thereof, and computer-readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111679984.7A CN114327603A (en) | 2021-12-31 | 2021-12-31 | Data caching method and device thereof, and computer-readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114327603A true CN114327603A (en) | 2022-04-12 |
Family
ID=81023595
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111679984.7A Pending CN114327603A (en) | 2021-12-31 | 2021-12-31 | Data caching method and device thereof, and computer-readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114327603A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114924893A (en) * | 2022-05-31 | 2022-08-19 | 福建天晴数码有限公司 | A method and system for managing site configuration by a three-level cache configuration center |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102073494A (en) * | 2010-12-30 | 2011-05-25 | 用友软件股份有限公司 | Method and device for managing cache data |
CN107465714A (en) * | 2017-01-23 | 2017-12-12 | 北京思特奇信息技术股份有限公司 | A kind of configuration data dynamic update system and method based on application cluster |
CN112988708A (en) * | 2021-03-11 | 2021-06-18 | 中国邮政储蓄银行股份有限公司 | Version updating method and device, computer readable storage medium and processor |
-
2021
- 2021-12-31 CN CN202111679984.7A patent/CN114327603A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102073494A (en) * | 2010-12-30 | 2011-05-25 | 用友软件股份有限公司 | Method and device for managing cache data |
CN107465714A (en) * | 2017-01-23 | 2017-12-12 | 北京思特奇信息技术股份有限公司 | A kind of configuration data dynamic update system and method based on application cluster |
CN112988708A (en) * | 2021-03-11 | 2021-06-18 | 中国邮政储蓄银行股份有限公司 | Version updating method and device, computer readable storage medium and processor |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114924893A (en) * | 2022-05-31 | 2022-08-19 | 福建天晴数码有限公司 | A method and system for managing site configuration by a three-level cache configuration center |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9239767B2 (en) | Selective database replication | |
CN112789606B (en) | Data redistribution method, device and system | |
EP3365807B1 (en) | Application containers for container databases | |
CN109144994B (en) | Index updating method, system and related device | |
US10572551B2 (en) | Application containers in container databases | |
WO2020228801A1 (en) | Multi-language fusion query method and multi-model database system | |
Huang et al. | Research on architecture and query performance based on distributed graph database Neo4j | |
US11726984B2 (en) | Data redistribution method and apparatus, and database cluster | |
CN104793988A (en) | Cross-database distributed transaction implementation method and device | |
JP2022543306A (en) | Blockchain data processing method, apparatus, equipment and readable storage medium | |
WO2022134797A1 (en) | Data fragmentation storage method and apparatus, a computer device, and a storage medium | |
US12292899B2 (en) | Method for scheduling multi-node cluster of K-DB database, device, and medium thereof | |
US9710532B2 (en) | Method for avoiding conflicts in database cluster | |
JP2023546897A (en) | Object processing methods, devices, and computer equipment | |
US7752225B2 (en) | Replication and mapping mechanism for recreating memory durations | |
CN115964444B (en) | Cloud native distributed multi-tenant database implementation method and system | |
CN114610509A (en) | Calling parameter processing method, system, device, storage medium and product | |
CN110618996B (en) | Function library heat updating method applied to distributed database | |
CN114327603A (en) | Data caching method and device thereof, and computer-readable storage medium | |
CN105630630A (en) | Data hot backup method and system | |
US9286303B1 (en) | Unified catalog service | |
US11138231B2 (en) | Method and system for data handling | |
CN113282335B (en) | Multi-version configuration method and system for application cluster service parameters | |
CN116737810B (en) | Consensus service interface for distributed time sequence database | |
CN119202093B (en) | Incremental data synchronization method and device of database, electronic equipment and medium |
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 |