[go: up one dir, main page]

WO2023056946A1 - Data caching method and apparatus, and electronic device - Google Patents

Data caching method and apparatus, and electronic device Download PDF

Info

Publication number
WO2023056946A1
WO2023056946A1 PCT/CN2022/123867 CN2022123867W WO2023056946A1 WO 2023056946 A1 WO2023056946 A1 WO 2023056946A1 CN 2022123867 W CN2022123867 W CN 2022123867W WO 2023056946 A1 WO2023056946 A1 WO 2023056946A1
Authority
WO
WIPO (PCT)
Prior art keywords
data table
cache
source data
matching
field name
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
Application number
PCT/CN2022/123867
Other languages
French (fr)
Chinese (zh)
Inventor
凌鹏
宋荣鑫
黄志文
黄师亮
邢吕亮
胡俊松
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Qifu Information Technology Co Ltd
Original Assignee
Shanghai Qifu Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Qifu Information Technology Co Ltd filed Critical Shanghai Qifu Information Technology Co Ltd
Publication of WO2023056946A1 publication Critical patent/WO2023056946A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24552Database cache management
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases

Definitions

  • the present application relates to the computer field, in particular to a data caching method, device and electronic equipment.
  • a relational database refers to a database that uses a relational model to organize data, and stores data in the form of rows and columns.
  • Key-value database A key-value database is a non-relational database that stores data as a set of key-value pairs, and the key name is used as a unique identifier. Because a key-value database uses a simple key-value pair method to store data, its data storage capacity is relatively large. Poor, rarely used in databases.
  • the embodiments of this specification provide a data caching method, device and electronic equipment, so as to improve the convenience of data caching.
  • the embodiment of this specification provides a data caching method, including:
  • the field name query is performed on the source data table by using the table structure information in the matching rule, and the queried target field name is read.
  • the table structure information in the matching rule is a table structure function with time as an independent variable
  • the value of the table structure function is a row number or a column number.
  • Configure data table monitoring rules for the cache model to monitor update events of the source data table, and if the source data table is detected, perform data synchronous reading to update the cache.
  • the matching rules include preset field names and similarity calculation rules
  • variable-based construction of the cache model includes:
  • the matching rules also include source data table matching rules
  • the acquisition source data table includes:
  • the source data table to be cached is determined and acquired from the database according to the source data table matching rule.
  • the embodiment of this specification also provides a data cache device, including:
  • the model construction module constructs a cache model based on variables, and configures annotation information with matching rules for the variables in the cache model;
  • the matching assignment module calls the cache model to read the annotation information in response to the cache trigger event, obtains the source data table, and determines the target field name in the source data table that matches the matching rule, based on the target
  • the field name is the variable assignment in the cache model
  • the cache execution module uses the assigned cache model to read the field value corresponding to the target field name in the source data table, and generates key-value pair information to store in the cache space.
  • the embodiment of this specification also provides an electronic device, wherein the electronic device includes:
  • a memory storing a computer-executable program which, when executed, causes the processor to perform any of the methods described above.
  • the embodiment of this specification also provides a computer-readable storage medium, wherein the computer-readable storage medium stores one or more programs, and when the one or more programs are executed by a processor, any one of the above-mentioned methods can be implemented .
  • the various technical solutions provided by the embodiments of this specification construct a cache model based on variables, and configure annotation information with matching rules for the variables in the cache model, and call the cache model to read the annotation information in response to a cache trigger event , obtain the source data table, and determine the name of the target field in the source data table that matches the matching rule, assign the value of the variable in the cache model based on the name of the target field, and use the cache model after the assignment to read
  • the field value corresponding to the target field name in the source data table generates key-value pair information and stores it in the cache space.
  • the cache model can be independent of the data table, so it can be applied to different data tables, and can automatically read the field names and corresponding field values in the source data table, and cache them in advance to avoid temporarily reading data from relational data tables.
  • the inefficiency of the data table is eliminated, and the convenience is improved by eliminating the need to develop code for each data table separately.
  • FIG. 1 is a schematic diagram of the principle of a data caching method provided by an embodiment of this specification
  • FIG. 2 is a schematic structural diagram of a data cache device provided by an embodiment of this specification
  • FIG. 3 is a schematic structural diagram of an electronic device provided by an embodiment of this specification.
  • Fig. 4 is a schematic diagram of the principle of a computer-readable medium provided by the embodiment of this specification.
  • Figure 1 is a schematic diagram of the principle of a data caching method provided by an embodiment of this specification, the method may include:
  • S101 Construct a cache model based on variables, and configure annotation information with matching rules for the variables in the cache model.
  • the performance of memory in terms of reading and writing is generally several orders of magnitude higher than that of disk.
  • variable-based construction of the cache model may include:
  • attributes of variables such as line numbers, can be configured in annotations.
  • the cache model corresponds to the table structure in the relational database, or corresponds to the data object that needs to be cached.
  • the customer table contains the following fields: customer number, name, gender, ID number, and the business primary key can be: customer number, ID number.
  • the configuration cache model may include:
  • the data table structure information includes field attributes corresponding to the data to be cached.
  • the structural feature of the data table may be the number of rows and columns where the target field is located.
  • the cache model can be adapted to multiple data tables.
  • the relational database can use mysql, oracle. Redis, memecache, etc. can be used in non-relational databases. In terms of caching, redis is usually used.
  • the embodiment of this specification can implement caching based on redis.
  • the API in the redis client may be difficult to meet more complex requirements, for example, when implementing some specific functions, it is likely to require multiple commands or interactions of multiple data types to complete, then such multiple network requests It has a relatively large impact on performance, so we can provide a mechanism to write some commands with business logic in order to reduce network requests.
  • support for the Lua environment is embedded in Redis, allowing developers to use Lua language to write scripts and transmit them to Redis for execution.
  • Redis clients can use Lua scripts to directly execute multiple Redis commands atomically on the server side.
  • the customer table contains the following fields: customer number, name, gender, and ID number.
  • the operations on the customer table can include: query (such as query by customer number, or query by ID number) , Add (add a new customer), modify (modify the customer's name through the customer number, modify the customer's ID number through the customer number), delete (delete a customer through the customer number).
  • the cache model is the CustEntity entity model
  • the configuring the cache model may further include: configuring and initializing the cache of the CustEntity entity model based on xml.
  • it can include: the system name for initializing the CustEntity entity model, the model type, the main cache switch, the maximum number of default caches, the default cache time, and the dynamic configuration environment information (based on the hot cache configuration implemented by the apollo configuration center: the maximum number of caches, the cache time wait).
  • S102 Call the cache model to read the annotation information in response to the cache trigger event, obtain the source data table, and determine the target field name in the source data table that matches the matching rule, based on the target field name Assign values to variables in the cached model.
  • the caching trigger event may be that a data table to be cached in the database is updated, or a data table is newly created.
  • the matching rules also include source data table matching rules
  • the acquisition source data table may include:
  • the source data table to be cached is determined and acquired from the database according to the source data table matching rule.
  • the table structure information of the target field name is included in the matching rule
  • the field name query is performed on the source data table by using the table structure information in the matching rule, and the queried target field name is read.
  • the table structure information in the matching rule is a table structure function with time as an argument
  • the value of the table structure function is a row number or a column number.
  • the matching rules have preset field names and similarity calculation rules
  • the similarity may be semantic similarity.
  • the semantics here can be equivalent semantics, or upper and lower semantics.
  • the matched field name can be: “Chinese Score”, “Mathematics Score” or "English Score”.
  • "a” can be constructed as a variable in the cache instruction, and its attribute "column number” and the matching rule for matching the column number of a can be added to the annotation.
  • the field is matched according to the matching rule If the name is "mathematics score”, assign "mathematics score” to a, and the cache model is called the code that can perform the cache function, and then read the data for caching.
  • S103 Use the assigned cache model to read the field value corresponding to the target field name in the source data table, generate key-value pair information and store it in the cache space.
  • the target field name in the data table that matches the matching rule is based on the variable assignment in the cache model of the target field name, and the value corresponding to the target field name in the source data table is read using the cache model after the assignment.
  • Field value generate key-value pair information and store it in the cache space.
  • the cache model can be independent of the data table, so it can be applied to different data tables, and can automatically read the field names and corresponding field values in the source data table, and cache them in advance to avoid temporarily reading data from relational data tables.
  • the inefficiency of the data table is eliminated, and the convenience is improved by eliminating the need to develop code for each data table separately.
  • the cache model When reading data, the cache model finds the column "mathematics score”, reads the field value under it, that is, the specific score value (such as 90), constructs a key-value pair "mathematics score: 90", and stores it in the memory middle.
  • the specific score value such as 90
  • the method may also include:
  • Configure data table monitoring rules for the cache model to monitor update events of the source data table, and if the source data table is detected, perform data synchronous reading to update the cache.
  • the apolloDefaultEnv environment configuration is initialized, and the configuration can be loaded from Apollo in real time;
  • An AOP interceptor can perform the following steps:
  • Step 1 When executing the method (selectCustByCustNo), it will first obtain the annotation on the method header, which is @CacheByFirstKeyAnnotation, then obtain the LUA expression, and obtain the value of the method input parameter custNo through the EL expression. Then use this value to execute the specific LUA script.
  • REDIS_VALUE is the specified string "LOCK", it means that the value is locked, and query the database again;
  • Step 2 When the getCustByIdNo method is executed, the annotation on the method header will be obtained first. This annotation is @CacheBySecondKeyAnnotation, the LUA expression is obtained, and the value of the method input parameter idNo is obtained through the EL expression. Then use this value to execute the specific LUA script.
  • Execute specific LUA scripts including:
  • Step 3 When the updateCustNameByCustNo method is executed, the EvictCacheByFirstKeyAnnotation annotation on the method header will be obtained first, the LUA expression will be obtained, and the value of the method input parameter custNo will be obtained through the EL expression.
  • Execute specific LUA scripts including:
  • Fig. 2 is a schematic structural diagram of a data caching device provided by an embodiment of this specification, and the device may include:
  • the model construction module 201 constructs a cache model based on variables, and configures annotation information with matching rules for the variables in the cache model;
  • the matching assignment module 202 calls the cache model to read the annotation information in response to the cache trigger event, obtains the source data table, and determines the name of the target field in the source data table that matches the matching rule, based on the The target field name is the variable assignment in the cache model;
  • the cache execution module 203 uses the assigned cache model to read the field value corresponding to the target field name in the source data table, and generates key-value pair information to store in the cache space.
  • the device constructs a cache model based on variables, configures annotation information with matching rules for the variables in the cache model, calls the cache model to read the annotation information in response to a cache trigger event, obtains a source data table, and determines the The target field name matching the matching rule in the source data table, based on the variable assignment in the cache model of the target field name, use the cache model after the assignment to read the target field name in the source data table Corresponding field values, generate key-value pair information and store them in the cache space.
  • the cache model can be independent of the data table, so it can be applied to different data tables, and can automatically read the field names and corresponding field values in the source data table, and cache them in advance to avoid temporarily reading data from relational data tables. The inefficiency of the data table is eliminated, and the convenience is improved by eliminating the need to develop code for each data table separately.
  • the embodiment of this specification also provides an electronic device.
  • FIG. 3 is a schematic structural diagram of an electronic device provided by an embodiment of this specification. An electronic device 300 according to this embodiment of the present invention is described below with reference to FIG. 3 .
  • the electronic device 300 shown in FIG. 3 is only an example, and should not limit the functions and application scope of this embodiment of the present invention.
  • electronic device 300 takes the form of a general-purpose computing device.
  • Components of the electronic device 300 may include, but are not limited to: at least one processing unit 310, at least one storage unit 320, a bus 330 connecting different system components (including the storage unit 320 and the processing unit 310), a display unit 340, and the like.
  • the storage unit stores program codes, and the program codes can be executed by the processing unit 310, so that the processing unit 310 executes the processing methods according to various exemplary embodiments of the present invention described in the above processing method section of this specification. step.
  • the processing unit 310 may execute the steps shown in FIG. 1 .
  • the storage unit 320 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 3201 and/or a cache storage unit 3202 , and may further include a read-only storage unit (ROM) 3203 .
  • RAM random access storage unit
  • ROM read-only storage unit
  • the storage unit 320 may also include a program/utility 3204 having a set (at least one) of program modules 3205, such program modules 3205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include the implementation of the network environment.
  • program modules 3205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include the implementation of the network environment.
  • Bus 330 may represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local area using any of a variety of bus structures. bus.
  • the electronic device 300 can also communicate with one or more external devices 400 (such as keyboards, pointing devices, Bluetooth devices, etc.), and can also communicate with one or more devices that enable the user to interact with the electronic device 300, and/or communicate with Any device (eg, router, modem, etc.) that enables the electronic device 300 to communicate with one or more other computing devices. Such communication may occur through input/output (I/O) interface 350 .
  • the electronic device 300 can also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN) and/or a public network such as the Internet) through the network adapter 360.
  • the network adapter 360 can communicate with other modules of the electronic device 300 through the bus 330 .
  • other hardware and/or software modules may be used in conjunction with electronic device 300, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape Drives and data backup storage systems, etc.
  • the technical solution according to the embodiment of the present invention can be embodied in the form of a software product, and the software product can be stored in a computer-readable storage medium (which can be a CD-ROM, U disk, mobile hard disk, etc.) or on a network , including several instructions to make a computing device (which may be a personal computer, a server, or a network device, etc.) execute the above-mentioned method according to the present invention.
  • a computer-readable storage medium which can be a CD-ROM, U disk, mobile hard disk, etc.
  • the computer-readable medium can realize the above-mentioned method of the present invention, that is, the method as shown in FIG. 1 .
  • Fig. 4 is a schematic diagram of the principle of a computer-readable medium provided by the embodiment of this specification.
  • the computer program implementing the method shown in Figure 1 can be stored on one or more computer readable media.
  • the computer readable medium may be a readable signal medium or a readable storage medium.
  • the readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: electrical connection with one or more conductors, portable disk, hard disk, random access memory (RAM), read only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
  • the computer readable storage medium may include a data signal carrying readable program code in baseband or as part of a carrier wave traveling as a data signal. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • a readable storage medium may also be any readable medium other than a readable storage medium that can send, propagate or transport a program for use by or in conjunction with an instruction execution system, apparatus or device.
  • Program code contained on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, cable, optical cable, RF, etc., or any suitable combination of the above.
  • Program code for carrying out the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages—such as Java, C++, etc., as well as conventional procedural programming languages. Programming language - such as "C" or a similar programming language.
  • the program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server to execute.
  • the remote computing device may be connected to the user computing device through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., using an Internet service provider). business to connect via the Internet).
  • LAN local area network
  • WAN wide area network
  • Internet service provider an Internet service provider
  • the present invention can be realized by hardware, or by software modules running on one or more processors, or by a combination thereof.
  • general data processing devices such as microprocessors or digital signal processors (DSPs) can be used in practice to implement some or all functions of some or all components in the embodiments of the present invention.
  • DSPs digital signal processors
  • the present invention can also be implemented as an apparatus or an apparatus program (for example, a computer program and a computer program product) for performing a part or all of the methods described herein.
  • Such a program for realizing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals.
  • Such a signal may be downloaded from an Internet site, or provided on a carrier signal, or provided in any other form.

Landscapes

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

Abstract

Provided in the embodiments of the present description is a data caching method. The method comprises: constructing a cache model on the basis of a variable, and configuring, for the variable in the cache model, annotation information that has a matching rule; in response to a cache trigger event, calling the cache model to read the annotation information therein, acquiring a source data table, determining a target field name, which matches the matching rule, in the source data table, and assigning a value to the variable in the cache model on the basis of the target field name; and reading, by using the cache model subjected to value assignment, a field value corresponding to the target field name in the source data table, and generating key-value pair information and storing same in a cache space. Since a cache model can be independent of a data table, the cache model can be applied to different data tables, and a field name in a source data table and a corresponding field value can be automatically read and cached in advance, such that the low efficiency caused by temporarily reading data from a relational data table is avoided, and there is no need to individually develop a code for each data table, thereby improving the convenience.

Description

一种数据缓存方法、装置和电子设备A data cache method, device and electronic equipment 技术领域technical field

本申请涉及计算机领域,尤其涉及一种数据缓存方法、装置和电子设备。The present application relates to the computer field, in particular to a data caching method, device and electronic equipment.

背景技术Background technique

在业务系统程序需要调用数据时会去访问关系型数据库,关系型数据库是指采用了关系模型来组织数据的数据库,其以行和列的形式存储数据。键值数据库:键值数据库是一种非关系数据库,将数据存储为键值对集合,键名作为唯一标识符,键值数据库由于使用简单的键值对方法来存储数据,因而数据存储能力较差,数据库中很少使用。When a business system program needs to call data, it will access a relational database. A relational database refers to a database that uses a relational model to organize data, and stores data in the form of rows and columns. Key-value database: A key-value database is a non-relational database that stores data as a set of key-value pairs, and the key name is used as a unique identifier. Because a key-value database uses a simple key-value pair method to store data, its data storage capacity is relatively large. Poor, rarely used in databases.

在数据访问量变大后,常常会碰到系统性能瓶颈,而一般这时候瓶颈是在访问关系数据库上。After the amount of data access increases, system performance bottlenecks are often encountered, and generally the bottleneck at this time is accessing the relational database.

因此,有必要提供一种新的方法,以提高数据访问速度。Therefore, it is necessary to provide a new method to improve data access speed.

发明内容Contents of the invention

本说明书实施例提供一种数据缓存方法、装置和电子设备,用以提高数据缓存的便利性。The embodiments of this specification provide a data caching method, device and electronic equipment, so as to improve the convenience of data caching.

本说明书实施例提供一种数据缓存方法,包括:The embodiment of this specification provides a data caching method, including:

基于变量构造缓存模型,并为所述缓存模型中的变量配置具有匹配规则的注解信息;Constructing a cache model based on variables, and configuring annotation information with matching rules for the variables in the cache model;

响应于缓存触发事件调用所述缓存模型读取其中的注解信息,获取源数据表,并确定所述源数据表中与所述匹配规则相匹配的目标字段名,基于所述目标字段名为所述缓存模型中的变量赋值;Invoking the cache model to read the annotation information in response to the cache trigger event, obtaining the source data table, and determining the name of the target field in the source data table that matches the matching rule, based on the name of the target field Variable assignment in the cache model described above;

利用赋值后的缓存模型读取所述源数据表中目标字段名所对应的字段值, 生成键值对信息存储于缓存空间中。Using the assigned cache model to read the field value corresponding to the target field name in the source data table, generate key-value pair information and store it in the cache space.

可选地,所述匹配规则中具有目标字段名的表结构信息;Optionally, there is table structure information of the target field name in the matching rule;

所述确定所述源数据表中与所述匹配规则相匹配的目标字段名,包括:The determining the name of the target field matching the matching rule in the source data table includes:

利用匹配规则中的表结构信息对所述源数据表进行字段名查询,读取查询到的目标字段名。The field name query is performed on the source data table by using the table structure information in the matching rule, and the queried target field name is read.

可选地,所述匹配规则中的表结构信息是以时间为自变量的表结构函数;Optionally, the table structure information in the matching rule is a table structure function with time as an independent variable;

所述利用匹配规则中的表结构信息对所述源数据表进行字段名查询,包括:The field name query of the source data table by using the table structure information in the matching rule includes:

确定所述缓存触发事件的时间,结合所述时间和所述表结构函数计算表结构函数值,根据所述表结构函数值生成当前的匹配规则;Determining the time of the cache trigger event, calculating a table structure function value in combination with the time and the table structure function, and generating a current matching rule according to the table structure function value;

执行所述当前的匹配规则对所述源数据表进行字段名查询。Execute the current matching rule to perform field name query on the source data table.

可选地,所述表结构函数值为行序号或者列序号。Optionally, the value of the table structure function is a row number or a column number.

可选地,还包括:Optionally, also include:

为所述缓存模型配置数据表监测规则,监测源数据表的更新事件,若监测到源数据表,则进行数据同步读取,以更新缓存。Configure data table monitoring rules for the cache model to monitor update events of the source data table, and if the source data table is detected, perform data synchronous reading to update the cache.

可选地,所述匹配规则中具有预设的字段名和相似度计算规则;Optionally, the matching rules include preset field names and similarity calculation rules;

所述确定所述源数据表中与所述匹配规则相匹配的目标字段名,包括:The determining the name of the target field matching the matching rule in the source data table includes:

读取所述源数据表中的字段名,根据所述相似度计算规则计算其与预设字段名的相似度,根据相似度确定相匹配的目标字段名。Read the field name in the source data table, calculate its similarity with the preset field name according to the similarity calculation rule, and determine the matching target field name according to the similarity.

可选地,所述基于变量构造缓存模型包括:Optionally, the variable-based construction of the cache model includes:

构造缓存指令并用变量替换其中的字段名。Constructs a cache directive and replaces field names within it with variables.

可选地,所述匹配规则中还具有源数据表匹配规则;Optionally, the matching rules also include source data table matching rules;

所述获取源数据表,包括:The acquisition source data table includes:

根据所述源数据表匹配规则从数据库中确定并获取待缓存的源数据表。The source data table to be cached is determined and acquired from the database according to the source data table matching rule.

本说明书实施例还提供一种数据缓存装置,包括:The embodiment of this specification also provides a data cache device, including:

模型构造模块,基于变量构造缓存模型,并为所述缓存模型中的变量配置具有匹配规则的注解信息;The model construction module constructs a cache model based on variables, and configures annotation information with matching rules for the variables in the cache model;

匹配赋值模块,响应于缓存触发事件调用所述缓存模型读取其中的注解信息,获取源数据表,并确定所述源数据表中与所述匹配规则相匹配的目标字段名,基于所述目标字段名为所述缓存模型中的变量赋值;The matching assignment module calls the cache model to read the annotation information in response to the cache trigger event, obtains the source data table, and determines the target field name in the source data table that matches the matching rule, based on the target The field name is the variable assignment in the cache model;

缓存执行模块,利用赋值后的缓存模型读取所述源数据表中目标字段名所对应的字段值,生成键值对信息存储于缓存空间中。The cache execution module uses the assigned cache model to read the field value corresponding to the target field name in the source data table, and generates key-value pair information to store in the cache space.

本说明书实施例还提供一种电子设备,其中,该电子设备包括:The embodiment of this specification also provides an electronic device, wherein the electronic device includes:

处理器;以及,Processor; and,

存储计算机可执行程序的存储器,所述可执行程序在被执行时使所述处理器执行上述任一项方法。A memory storing a computer-executable program which, when executed, causes the processor to perform any of the methods described above.

本说明书实施例还提供一种计算机可读存储介质,其中,所述计算机可读存储介质存储一个或多个程序,所述一个或多个程序当被处理器执行时,实现上述任一项方法。The embodiment of this specification also provides a computer-readable storage medium, wherein the computer-readable storage medium stores one or more programs, and when the one or more programs are executed by a processor, any one of the above-mentioned methods can be implemented .

本说明书实施例提供的各种技术方案通过基于变量构造缓存模型,并为所述缓存模型中的变量配置具有匹配规则的注解信息,响应于缓存触发事件调用所述缓存模型读取其中的注解信息,获取源数据表,并确定所述源数据表中与所述匹配规则相匹配的目标字段名,基于所述目标字段名为所述缓存模型中的变量赋值,利用赋值后的缓存模型读取所述源数据表中目标字段名所对应的字段值,生成键值对信息存储于缓存空间中。通过缓存模型可以独立于数据表,因而能够应用到不同数据表中,能够自动读取源数据表中的字段名和对应的字段值,预先自行缓存,避免了临时从关系型数据表中读取数据的低下效率,而且无需针对每个数据表单独开发代码,因而提高了便利性。The various technical solutions provided by the embodiments of this specification construct a cache model based on variables, and configure annotation information with matching rules for the variables in the cache model, and call the cache model to read the annotation information in response to a cache trigger event , obtain the source data table, and determine the name of the target field in the source data table that matches the matching rule, assign the value of the variable in the cache model based on the name of the target field, and use the cache model after the assignment to read The field value corresponding to the target field name in the source data table generates key-value pair information and stores it in the cache space. The cache model can be independent of the data table, so it can be applied to different data tables, and can automatically read the field names and corresponding field values in the source data table, and cache them in advance to avoid temporarily reading data from relational data tables. The inefficiency of the data table is eliminated, and the convenience is improved by eliminating the need to develop code for each data table separately.

附图说明Description of drawings

此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:The drawings described here are used to provide a further understanding of the application and constitute a part of the application. The schematic embodiments and descriptions of the application are used to explain the application and do not constitute an improper limitation to the application. In the attached picture:

图1为本说明书实施例提供的一种数据缓存方法的原理示意图;FIG. 1 is a schematic diagram of the principle of a data caching method provided by an embodiment of this specification;

图2为本说明书实施例提供的一种数据缓存装置的结构示意图;FIG. 2 is a schematic structural diagram of a data cache device provided by an embodiment of this specification;

图3为本说明书实施例提供的一种电子设备的结构示意图;FIG. 3 is a schematic structural diagram of an electronic device provided by an embodiment of this specification;

图4为本说明书实施例提供的一种计算机可读介质的原理示意图。Fig. 4 is a schematic diagram of the principle of a computer-readable medium provided by the embodiment of this specification.

具体实施方式Detailed ways

现在将参考附图更全面地描述本发明的示例性实施例。然而,示例性实施例能够以多种形式实施,且不应被理解为本发明仅限于在此阐述的实施例。相反,提供这些示例性实施例能够使得本发明更加全面和完整,更加便于将发明构思全面地传达给本领域的技术人员。在图中相同的附图标记表示相同或类似的元件、组件或部分,因而将省略对它们的重复描述。Exemplary embodiments of the present invention will now be described more fully with reference to the accompanying drawings. However, example embodiments may be embodied in many forms, and this invention should not be construed as limited to the embodiments set forth herein. On the contrary, providing these exemplary embodiments can make the present invention more comprehensive and complete, and facilitate the full transfer of the inventive concept to those skilled in the art. The same reference numerals denote the same or similar elements, components or parts in the drawings, and thus their repeated descriptions will be omitted.

在符合本发明的技术构思的前提下,在某个特定的实施例中描述的特征、结构、特性或其他细节不排除可以以合适的方式结合在一个或更多其他的实施例中。On the premise of conforming to the technical concept of the present invention, the features, structures, characteristics or other details described in a specific embodiment do not exclude that they can be combined in one or more other embodiments in a suitable manner.

在对于具体实施例的描述中,本发明描述的特征、结构、特性或其他细节是为了使本领域的技术人员对实施例进行充分理解。但是,并不排除本领域技术人员可以实践本发明的技术方案而没有特定特征、结构、特性或其他细节的一个或更多。In the description of the specific embodiments, the features, structures, characteristics or other details described in the present invention are intended to enable those skilled in the art to fully understand the embodiments. However, it does not exclude that those skilled in the art can practice the technical solutions of the present invention without one or more of the specific features, structures, characteristics or other details.

附图中所示的流程图仅是示例性说明,不是必须包括所有的内容和操作/步骤,也不是必须按所描述的顺序执行。例如,有的操作/步骤还可以分解,而有的操作/步骤可以合并或部分合并,因此实际执行的顺序有可能根据实际情况改变。The flow charts shown in the drawings are only exemplary illustrations, and do not necessarily include all contents and operations/steps, nor must they be performed in the order described. For example, some operations/steps can be decomposed, and some operations/steps can be combined or partly combined, so the actual order of execution may be changed according to the actual situation.

附图中所示的方框图仅仅是功能实体,不一定必须与物理上独立的实体相对应。即,可以采用软件形式来实现这些功能实体,或在一个或多个硬件模块或集成电路中实现这些功能实体,或在不同网络和/或处理器装置和/或微控制器装置中实现这些功能实体。The block diagrams shown in the drawings are merely functional entities and do not necessarily correspond to physically separate entities. That is, these functional entities may be implemented in software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices entity.

术语“和/或”或者“及/或”包括相关联的列出项目中的任一个或多者的所有组合。The term "and/or" or "and/or" includes all combinations of any one or more of the associated listed items.

图1为本说明书实施例提供的一种数据缓存方法的原理示意图,该方法可以包括:Figure 1 is a schematic diagram of the principle of a data caching method provided by an embodiment of this specification, the method may include:

S101:基于变量构造缓存模型,并为所述缓存模型中的变量配置具有匹配规则的注解信息。S101: Construct a cache model based on variables, and configure annotation information with matching rules for the variables in the cache model.

内存在读写方面性能一般高出磁盘几个数量级,为了提高程序性能,减小对数据库的访问,我们可以利用内存的高性能对数据库数据进行缓存,进而提高程序响应速度、吞吐量。The performance of memory in terms of reading and writing is generally several orders of magnitude higher than that of disk. In order to improve program performance and reduce access to the database, we can use the high performance of memory to cache database data, thereby improving program response speed and throughput.

考虑到一般业务数据库使用的是关系型数据库,因此,要想将数据库中的数据读取到内存中,需要进行存储结构的转换。Considering that the general business database uses a relational database, if you want to read the data in the database into the memory, you need to convert the storage structure.

考虑到在对数据缓存时需要数据转换,为了避免对每个关系型数据库表单独进行业务代码开发所造成的开发过程繁琐的弊端,我们提供一种适用于多个数据表的处理方法。Considering the need for data conversion when caching data, in order to avoid the disadvantages of cumbersome development process caused by separate business code development for each relational database table, we provide a processing method suitable for multiple data tables.

我们通过一个独立于数据表的缓存模型,而不是直接在数据表上配置缓存指令,使得这种方法适用于多个数据表成为了可能。We make it possible to apply this method to multiple data tables through a caching model independent of data tables, rather than directly configuring caching instructions on data tables.

接着,考虑到这个方法的通用性目标,以及缓存指令的专用性限制,我们可以将缓存模型构造成通用的工具。Then, considering the generality goal of this method, and the specificity constraints of cache instructions, we can construct the cache model as a general tool.

具体的,我们以以下构思来实现:构造模型的阶段,以变量构造缓存模型,在使用缓存模型的阶段,根据待缓存的源数据表确定如何向变量赋值,继而利用赋值后的缓存模型来实现缓存。Specifically, we implement it with the following idea: in the stage of constructing the model, construct the cache model with variables, in the stage of using the cache model, determine how to assign values to the variables according to the source data table to be cached, and then use the cache model after assignment to realize cache.

在本说明书实施例中,所述基于变量构造缓存模型,可以包括:In the embodiment of this specification, the variable-based construction of the cache model may include:

构造缓存指令并用变量替换其中的字段名。Constructs a cache directive and replaces field names within it with variables.

在本说明书实施例中,可以在注解中配置变量的属性,比如行序号。In this embodiment of the specification, attributes of variables, such as line numbers, can be configured in annotations.

缓存模型对应关系型数据库中的表结构,或者对应需要缓存的数据对象。The cache model corresponds to the table structure in the relational database, or corresponds to the data object that needs to be cached.

比如客户表包含以下字段:客户号、姓名、性别、身份证号,业务主键可 为:客户号、身份证号。For example, the customer table contains the following fields: customer number, name, gender, ID number, and the business primary key can be: customer number, ID number.

在本说明书实施例中,所述配置缓存模型,可以包括:In the embodiment of this specification, the configuration cache model may include:

根据待缓存的数据表结构信息配置缓存模型。Configure the cache model according to the structure information of the data table to be cached.

具体的,所述数据表结构信息包括待缓存数据对应的字段属性。Specifically, the data table structure information includes field attributes corresponding to the data to be cached.

我们可以将原来开发的代码中的数据表参数信息和表结构参数信息替换成变量的形式,形成变量表达式,同时为变量表达式配置注解,形成待赋值的缓存模型,这样,在执行缓存模型的时候,读取其中注解,为变量表达式赋值,便可以进行读取目标关系型数据表中的字段名和对应的字段值。We can replace the data table parameter information and table structure parameter information in the originally developed code with variable forms to form variable expressions, and at the same time configure annotations for variable expressions to form a cache model to be assigned. In this way, when executing the cache model When reading the annotations and assigning values to the variable expressions, the field names and corresponding field values in the target relational data table can be read.

具体的,可以:可以根据目标关系型数据表为数据表参数类变量配置注解,可以根据数据表结构特征为数据表结构变量配置注解。Specifically, it is possible to: configure annotations for data table parameter variables according to the target relational data table, and configure annotations for data table structure variables according to data table structure characteristics.

数据表结构特征可以是,目标字段所处行列数。The structural feature of the data table may be the number of rows and columns where the target field is located.

通过这种方式,代替在缓存代码中直接配置数据表名称的方式,代替直接在缓存代码中配置具体的行、列名称的方式,能够使缓存模型适配多个数据表。In this way, instead of directly configuring data table names in the cache code, instead of directly configuring specific row and column names in the cache code, the cache model can be adapted to multiple data tables.

具体实施时,关系型数据库可以使用mysql、oracle。在非关系型数据库中可以使用redis,memecache等。在缓存方面,通常使用redis。During specific implementation, the relational database can use mysql, oracle. Redis, memecache, etc. can be used in non-relational databases. In terms of caching, redis is usually used.

本说明书实施例可以基于redis实现缓存。The embodiment of this specification can implement caching based on redis.

考虑到redis客户端中的api可能难以满足较复杂的需求,比如,在实现某些特定功能的时候,很可能需要多个命令或者多个数据类型的交互才能完成,那么这种多次网络请求对性能影响比较大,所以我们可以提供需要一种机制能够编写一些具有业务逻辑的命令,以求减少网络请求。具体是,在Redis中内嵌对Lua环境的支持,允许开发者使用Lua语言编写脚本传到Redis中执行,Redis客户端可以使用Lua脚本,直接在服务端原子的执行多个Redis命令。Considering that the API in the redis client may be difficult to meet more complex requirements, for example, when implementing some specific functions, it is likely to require multiple commands or interactions of multiple data types to complete, then such multiple network requests It has a relatively large impact on performance, so we can provide a mechanism to write some commands with business logic in order to reduce network requests. Specifically, support for the Lua environment is embedded in Redis, allowing developers to use Lua language to write scripts and transmit them to Redis for execution. Redis clients can use Lua scripts to directly execute multiple Redis commands atomically on the server side.

这样,本说明书实施例通过在java的方法上配置注解和spring EL表达式,就可以在不修改业务代码的逻辑上,可以很方便的使用该缓存技术。In this way, by configuring annotations and spring EL expressions on java methods in the embodiment of this specification, the caching technology can be conveniently used without modifying the logic of the business code.

以将客户表添加为缓存为例,客户表包含以下字段:客户号、姓名、性别、身份证号,对客户表的操作可以包括:查询(比如通过客户号查询,或通过身 份证号查询)、新增(新增一个客户)、修改(通过客户号修改客户的姓名、通过客户号修改客户的身份证号)、删除(通过客户号删除一个客户)。Take adding the customer table as a cache as an example. The customer table contains the following fields: customer number, name, gender, and ID number. The operations on the customer table can include: query (such as query by customer number, or query by ID number) , Add (add a new customer), modify (modify the customer's name through the customer number, modify the customer's ID number through the customer number), delete (delete a customer through the customer number).

在本说明书实施例中,缓存模型为CustEntity实体模型,所述配置缓存模型,还可以包括:基于xml的方式配置初始化CustEntity实体模型的缓存。In this embodiment of the specification, the cache model is the CustEntity entity model, and the configuring the cache model may further include: configuring and initializing the cache of the CustEntity entity model based on xml.

具体可以包括:初始化CustEntity实体模型的系统名、模型类型、缓存总开关、默认缓存最大数量、默认缓存时间和动态配置的环境信息(基于apollo配置中心实现的热缓存配置:缓存最大数量、缓存时间等)。Specifically, it can include: the system name for initializing the CustEntity entity model, the model type, the main cache switch, the maximum number of default caches, the default cache time, and the dynamic configuration environment information (based on the hot cache configuration implemented by the apollo configuration center: the maximum number of caches, the cache time wait).

再配置待缓存对象字段:基于注解配置初始化CustEntity中缓存的字段信息和在redis中缓存的key前缀。Then configure the object fields to be cached: Based on the annotation configuration, initialize the field information cached in CustEntity and the key prefix cached in redis.

具体代码实现:Specific code implementation:

Figure PCTCN2022123867-appb-000001
Figure PCTCN2022123867-appb-000001

Figure PCTCN2022123867-appb-000002
Figure PCTCN2022123867-appb-000002

S102:响应于缓存触发事件调用所述缓存模型读取其中的注解信息,获取源数据表,并确定所述源数据表中与所述匹配规则相匹配的目标字段名,基于所述目标字段名为所述缓存模型中的变量赋值。S102: Call the cache model to read the annotation information in response to the cache trigger event, obtain the source data table, and determine the target field name in the source data table that matches the matching rule, based on the target field name Assign values to variables in the cached model.

其中,缓存触发事件,可以是数据库中待缓存的数据表发生了更新,或者新建了数据表。Wherein, the caching trigger event may be that a data table to be cached in the database is updated, or a data table is newly created.

考虑到实际应用时,我们可以让缓存模型适用于某一数据库的所有数据表,也可以让其适用于某一类数据表,对于后者,就需要在缓存时识别作为缓存目标的待缓存数据表。When considering practical applications, we can make the cache model applicable to all data tables of a certain database, or to a certain type of data table. For the latter, it is necessary to identify the data to be cached as the cache target when caching surface.

因此,在本说明书实施例中,所述匹配规则中还具有源数据表匹配规则;Therefore, in the embodiment of this specification, the matching rules also include source data table matching rules;

所述获取源数据表,可以包括:The acquisition source data table may include:

根据所述源数据表匹配规则从数据库中确定并获取待缓存的源数据表。The source data table to be cached is determined and acquired from the database according to the source data table matching rule.

在读取数据表中的数据时,可能是按照数据表结构进行读取的,因此,在进行字段名匹配时,可以根据数据表结构进行匹配。When reading the data in the data table, it may be read according to the structure of the data table. Therefore, when matching the field name, it can be matched according to the structure of the data table.

因此,在本说明书实施例中,所述匹配规则中具有目标字段名的表结构信息;Therefore, in the embodiment of this specification, the table structure information of the target field name is included in the matching rule;

所述确定所述源数据表中与所述匹配规则相匹配的目标字段名,可以包括:The determining the name of the target field matching the matching rule in the source data table may include:

利用匹配规则中的表结构信息对所述源数据表进行字段名查询,读取查询到的目标字段名。The field name query is performed on the source data table by using the table structure information in the matching rule, and the queried target field name is read.

在本说明书实施例中,所述匹配规则中的表结构信息是以时间为自变量的表结构函数;In the embodiment of this specification, the table structure information in the matching rule is a table structure function with time as an argument;

所述利用匹配规则中的表结构信息对所述源数据表进行字段名查询,包括:The field name query of the source data table by using the table structure information in the matching rule includes:

确定所述缓存触发事件的时间,结合所述时间和所述表结构函数计算表结构函数值,根据所述表结构函数值生成当前的匹配规则;Determining the time of the cache trigger event, calculating a table structure function value in combination with the time and the table structure function, and generating a current matching rule according to the table structure function value;

执行所述当前的匹配规则对所述源数据表进行字段名查询。Execute the current matching rule to perform field name query on the source data table.

在本说明书实施例中,所述表结构函数值为行序号或者列序号。In this embodiment of the specification, the value of the table structure function is a row number or a column number.

在本说明书实施例中,所述匹配规则中具有预设的字段名和相似度计算规则;In the embodiment of this specification, the matching rules have preset field names and similarity calculation rules;

所述确定所述源数据表中与所述匹配规则相匹配的目标字段名,包括:The determining the name of the target field matching the matching rule in the source data table includes:

读取所述源数据表中的字段名,根据所述相似度计算规则计算其与预设字段名的相似度,根据相似度确定相匹配的目标字段名。Read the field name in the source data table, calculate its similarity with the preset field name according to the similarity calculation rule, and determine the matching target field name according to the similarity.

相似度可以是语义相似度。The similarity may be semantic similarity.

这里的语义,可以是等同语义,还可以是上下位语义。The semantics here can be equivalent semantics, or upper and lower semantics.

比如,匹配规则中的预设字段为“科目成绩”,那么匹配到的字段名可以为:“语文成绩”、“数学成绩”或“英语成绩”。For example, if the default field in the matching rule is "Subject Score", then the matched field name can be: "Chinese Score", "Mathematics Score" or "English Score".

在具体实施时,可以在缓存指令中构造“a”作为变量,注解中添加其属性“列序号”以及对a进行列序号匹配的匹配规则,获得源数据表后,根据匹配规则,匹配到字段名“数学成绩”,则将“数学成绩”赋值于a,缓存模型便称为可以执行缓存功能的代码,继而进行数据的读取以进行缓存。In the actual implementation, "a" can be constructed as a variable in the cache instruction, and its attribute "column number" and the matching rule for matching the column number of a can be added to the annotation. After obtaining the source data table, the field is matched according to the matching rule If the name is "mathematics score", assign "mathematics score" to a, and the cache model is called the code that can perform the cache function, and then read the data for caching.

S103:利用赋值后的缓存模型读取所述源数据表中目标字段名所对应的字段值,生成键值对信息存储于缓存空间中。S103: Use the assigned cache model to read the field value corresponding to the target field name in the source data table, generate key-value pair information and store it in the cache space.

基于变量构造缓存模型,并为所述缓存模型中的变量配置具有匹配规则的 注解信息,响应于缓存触发事件调用所述缓存模型读取其中的注解信息,获取源数据表,并确定所述源数据表中与所述匹配规则相匹配的目标字段名,基于所述目标字段名为所述缓存模型中的变量赋值,利用赋值后的缓存模型读取所述源数据表中目标字段名所对应的字段值,生成键值对信息存储于缓存空间中。通过缓存模型可以独立于数据表,因而能够应用到不同数据表中,能够自动读取源数据表中的字段名和对应的字段值,预先自行缓存,避免了临时从关系型数据表中读取数据的低下效率,而且无需针对每个数据表单独开发代码,因而提高了便利性。Construct a cache model based on variables, configure annotation information with matching rules for the variables in the cache model, call the cache model to read the annotation information in response to a cache trigger event, obtain a source data table, and determine the source The target field name in the data table that matches the matching rule is based on the variable assignment in the cache model of the target field name, and the value corresponding to the target field name in the source data table is read using the cache model after the assignment. Field value, generate key-value pair information and store it in the cache space. The cache model can be independent of the data table, so it can be applied to different data tables, and can automatically read the field names and corresponding field values in the source data table, and cache them in advance to avoid temporarily reading data from relational data tables. The inefficiency of the data table is eliminated, and the convenience is improved by eliminating the need to develop code for each data table separately.

在读取数据时,缓存模型找到“数学成绩”这一列,读取其下的字段值,也就是具体的成绩数值(比如90),构造成键值对“数学成绩:90”,存储到内存中。When reading data, the cache model finds the column "mathematics score", reads the field value under it, that is, the specific score value (such as 90), constructs a key-value pair "mathematics score: 90", and stores it in the memory middle.

在本说明书实施例中,该方法还可以包括:In the embodiment of this specification, the method may also include:

为所述缓存模型配置数据表监测规则,监测源数据表的更新事件,若监测到源数据表,则进行数据同步读取,以更新缓存。Configure data table monitoring rules for the cache model to monitor update events of the source data table, and if the source data table is detected, perform data synchronous reading to update the cache.

在使用缓存模型时,可以实现以下步骤:When using a cached model, the following steps can be implemented:

应用启动时,初始化apolloDefaultEnv环境配置,可从Apollo中实时加载配置;When the application starts, the apolloDefaultEnv environment configuration is initialized, and the configuration can be loaded from Apollo in real time;

初始化CacheConfig.Builder配置,获取CustEntity模型的缓存配置;Initialize the CacheConfig.Builder configuration to obtain the cache configuration of the CustEntity model;

读取CustEntity的缓存具体字段信息。把元信息存入应用缓存中待执行时使用(例如:key:com.qihoo.finance.cis.modules.cust.entity.CustEntity(缓存对象Key),value:com.qihoo.finance.hackit.cache.config.CacheConfig(缓存对象配置元信息);Read the cache specific field information of CustEntity. Store meta information in the application cache for execution (for example: key: com.qihoo.finance.cis.modules.cust.entity.CustEntity (cache object Key), value: com.qihoo.finance.hackit.cache. config.CacheConfig (cache object configuration metadata);

Dao方法CustDao执行时,进入AOP拦截器。When the Dao method CustDao is executed, it enters the AOP interceptor.

AOP拦截器可以执行以下步骤:An AOP interceptor can perform the following steps:

步骤1.执行方法(selectCustByCustNo)时,会先获取方法头上的注解,注解是@CacheByFirstKeyAnnotation,再获取LUA表达式,通过EL表达式获取到方法入参custNo的值。然后使用该值,执行具体的LUA脚本。Step 1. When executing the method (selectCustByCustNo), it will first obtain the annotation on the method header, which is @CacheByFirstKeyAnnotation, then obtain the LUA expression, and obtain the value of the method input parameter custNo through the EL expression. Then use this value to execute the specific LUA script.

其中,执行具体的LUA脚本具体包括:Among them, the execution of specific LUA scripts specifically includes:

根据custNo查询到Redis中的值REDIS_VALUE;Query the value REDIS_VALUE in Redis according to custNo;

如果REDIS_VALUE不为空,并且也不为指定字符串“LOCK”,则直接使用该值返回(可选:返回前会执行convert方法进行数据转换填充),不再查询数据库;If REDIS_VALUE is not empty, and the specified string "LOCK" is not specified, then use this value to return directly (optional: before returning, the convert method will be executed for data conversion and filling), and the database will not be queried;

如果REDIS_VALUE为空,则说明该custNo没有缓存,再次查询数据库If REDIS_VALUE is empty, it means that the custNo is not cached, and query the database again

如果REDIS_VALUE为指定字符串“LOCK”,则说明该值已锁定,再次查询数据库;If REDIS_VALUE is the specified string "LOCK", it means that the value is locked, and query the database again;

查询完成数据库,获取到数据:DB_VALUE;Query the database and get the data: DB_VALUE;

如果DB_VALUE为空,则直接返回;If DB_VALUE is empty, return directly;

如果DB_VALUE不为空,则会把该对象存入到Redis中。If DB_VALUE is not empty, the object will be stored in Redis.

步骤2.执行getCustByIdNo方法时,会先获取方法头上的注解,这个注解是@CacheBySecondKeyAnnotation,获取到LUA表达式,通过EL表达式获取到方法入参idNo的值。然后使用该值,执行具体的LUA脚本。Step 2. When the getCustByIdNo method is executed, the annotation on the method header will be obtained first. This annotation is @CacheBySecondKeyAnnotation, the LUA expression is obtained, and the value of the method input parameter idNo is obtained through the EL expression. Then use this value to execute the specific LUA script.

执行具体的LUA脚本,包括:Execute specific LUA scripts, including:

根据idNo查询到Redis中的客户号custNo;Query the customer number custNo in Redis according to idNo;

如果custNo为空,则直接查询数据库;If custNo is empty, query the database directly;

根据custNo查询到Redis中的值REDIS_VALUE;Query the value REDIS_VALUE in Redis according to custNo;

后续步骤同selectCustByCustNo部分,不再详述。Subsequent steps are the same as selectCustByCustNo and will not be described in detail.

步骤3.执行updateCustNameByCustNo方法时,会先获取方法头上的EvictCacheByFirstKeyAnnotation注解,获取到LUA表达式,通过EL表达式获取到方法入参custNo的值。执行具体的LUA脚本,具体包括:Step 3. When the updateCustNameByCustNo method is executed, the EvictCacheByFirstKeyAnnotation annotation on the method header will be obtained first, the LUA expression will be obtained, and the value of the method input parameter custNo will be obtained through the EL expression. Execute specific LUA scripts, including:

锁定数据写入Redis中;Write locked data into Redis;

将REDIS_VALUE固定为“LOCK”,超时时间默认为60s;Fix REDIS_VALUE to "LOCK", and the default timeout is 60s;

执行数据库的更新操作。Perform an update operation on the database.

图2为本说明书实施例提供的一种数据缓存装置的结构示意图,该装置可以包括:Fig. 2 is a schematic structural diagram of a data caching device provided by an embodiment of this specification, and the device may include:

模型构造模块201,基于变量构造缓存模型,并为所述缓存模型中的变量配置具有匹配规则的注解信息;The model construction module 201 constructs a cache model based on variables, and configures annotation information with matching rules for the variables in the cache model;

匹配赋值模块202,响应于缓存触发事件调用所述缓存模型读取其中的注解信息,获取源数据表,并确定所述源数据表中与所述匹配规则相匹配的目标字段名,基于所述目标字段名为所述缓存模型中的变量赋值;The matching assignment module 202 calls the cache model to read the annotation information in response to the cache trigger event, obtains the source data table, and determines the name of the target field in the source data table that matches the matching rule, based on the The target field name is the variable assignment in the cache model;

缓存执行模块203,利用赋值后的缓存模型读取所述源数据表中目标字段名所对应的字段值,生成键值对信息存储于缓存空间中。The cache execution module 203 uses the assigned cache model to read the field value corresponding to the target field name in the source data table, and generates key-value pair information to store in the cache space.

该装置基于变量构造缓存模型,并为所述缓存模型中的变量配置具有匹配规则的注解信息,响应于缓存触发事件调用所述缓存模型读取其中的注解信息,获取源数据表,并确定所述源数据表中与所述匹配规则相匹配的目标字段名,基于所述目标字段名为所述缓存模型中的变量赋值,利用赋值后的缓存模型读取所述源数据表中目标字段名所对应的字段值,生成键值对信息存储于缓存空间中。通过缓存模型可以独立于数据表,因而能够应用到不同数据表中,能够自动读取源数据表中的字段名和对应的字段值,预先自行缓存,避免了临时从关系型数据表中读取数据的低下效率,而且无需针对每个数据表单独开发代码,因而提高了便利性。The device constructs a cache model based on variables, configures annotation information with matching rules for the variables in the cache model, calls the cache model to read the annotation information in response to a cache trigger event, obtains a source data table, and determines the The target field name matching the matching rule in the source data table, based on the variable assignment in the cache model of the target field name, use the cache model after the assignment to read the target field name in the source data table Corresponding field values, generate key-value pair information and store them in the cache space. The cache model can be independent of the data table, so it can be applied to different data tables, and can automatically read the field names and corresponding field values in the source data table, and cache them in advance to avoid temporarily reading data from relational data tables. The inefficiency of the data table is eliminated, and the convenience is improved by eliminating the need to develop code for each data table separately.

基于同一发明构思,本说明书实施例还提供一种电子设备。Based on the same inventive concept, the embodiment of this specification also provides an electronic device.

下面描述本发明的电子设备实施例,该电子设备可以视为对于上述本发明的方法和装置实施例的具体实体实施方式。对于本发明电子设备实施例中描述的细节,应视为对于上述方法或装置实施例的补充;对于在本发明电子设备实施例中未披露的细节,可以参照上述方法或装置实施例来实现。An electronic device embodiment of the present invention will be described below, and the electronic device can be regarded as a specific physical implementation of the above-mentioned method and device embodiments of the present invention. The details described in the electronic device embodiments of the present invention should be regarded as supplements to the above method or device embodiments; details not disclosed in the electronic device embodiments of the present invention can be implemented by referring to the above method or device embodiments.

图3为本说明书实施例提供的一种电子设备的结构示意图。下面参照图3 来描述根据本发明该实施例的电子设备300。图3显示的电子设备300仅仅是一个示例,不应对本发明实施例的功能和使用范围带来任何限制。FIG. 3 is a schematic structural diagram of an electronic device provided by an embodiment of this specification. An electronic device 300 according to this embodiment of the present invention is described below with reference to FIG. 3 . The electronic device 300 shown in FIG. 3 is only an example, and should not limit the functions and application scope of this embodiment of the present invention.

如图3所示,电子设备300以通用计算设备的形式表现。电子设备300的组件可以包括但不限于:至少一个处理单元310、至少一个存储单元320、连接不同系统组件(包括存储单元320和处理单元310)的总线330、显示单元340等。As shown in FIG. 3, electronic device 300 takes the form of a general-purpose computing device. Components of the electronic device 300 may include, but are not limited to: at least one processing unit 310, at least one storage unit 320, a bus 330 connecting different system components (including the storage unit 320 and the processing unit 310), a display unit 340, and the like.

其中,所述存储单元存储有程序代码,所述程序代码可以被所述处理单元310执行,使得所述处理单元310执行本说明书上述处理方法部分中描述的根据本发明各种示例性实施方式的步骤。例如,所述处理单元310可以执行如图1所示的步骤。Wherein, the storage unit stores program codes, and the program codes can be executed by the processing unit 310, so that the processing unit 310 executes the processing methods according to various exemplary embodiments of the present invention described in the above processing method section of this specification. step. For example, the processing unit 310 may execute the steps shown in FIG. 1 .

所述存储单元320可以包括易失性存储单元形式的可读介质,例如随机存取存储单元(RAM)3201和/或高速缓存存储单元3202,还可以进一步包括只读存储单元(ROM)3203。The storage unit 320 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 3201 and/or a cache storage unit 3202 , and may further include a read-only storage unit (ROM) 3203 .

所述存储单元320还可以包括具有一组(至少一个)程序模块3205的程序/实用工具3204,这样的程序模块3205包括但不限于:操作系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。The storage unit 320 may also include a program/utility 3204 having a set (at least one) of program modules 3205, such program modules 3205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include the implementation of the network environment.

总线330可以为表示几类总线结构中的一种或多种,包括存储单元总线或者存储单元控制器、外围总线、图形加速端口、处理单元或者使用多种总线结构中的任意总线结构的局域总线。Bus 330 may represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local area using any of a variety of bus structures. bus.

电子设备300也可以与一个或多个外部设备400(例如键盘、指向设备、蓝牙设备等)通信,还可与一个或者多个使得用户能与该电子设备300交互的设备通信,和/或与使得该电子设备300能与一个或多个其它计算设备进行通信的任何设备(例如路由器、调制解调器等等)通信。这种通信可以通过输入/输出(I/O)接口350进行。并且,电子设备300还可以通过网络适配器360与一个或者多个网络(例如局域网(LAN),广域网(WAN)和/或公共网络,例 如因特网)通信。网络适配器360可以通过总线330与电子设备300的其它模块通信。应当明白,尽管图3中未示出,可以结合电子设备300使用其它硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理单元、外部磁盘驱动阵列、RAID系统、磁带驱动器以及数据备份存储系统等。The electronic device 300 can also communicate with one or more external devices 400 (such as keyboards, pointing devices, Bluetooth devices, etc.), and can also communicate with one or more devices that enable the user to interact with the electronic device 300, and/or communicate with Any device (eg, router, modem, etc.) that enables the electronic device 300 to communicate with one or more other computing devices. Such communication may occur through input/output (I/O) interface 350 . Moreover, the electronic device 300 can also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN) and/or a public network such as the Internet) through the network adapter 360. The network adapter 360 can communicate with other modules of the electronic device 300 through the bus 330 . It should be appreciated that although not shown in FIG. 3, other hardware and/or software modules may be used in conjunction with electronic device 300, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape Drives and data backup storage systems, etc.

通过以上的实施方式的描述,本领域的技术人员易于理解,本发明描述的示例性实施例可以通过软件实现,也可以通过软件结合必要的硬件的方式来实现。因此,根据本发明实施方式的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个计算机可读的存储介质(可以是CD-ROM,U盘,移动硬盘等)中或网络上,包括若干指令以使得一台计算设备(可以是个人计算机、服务器、或者网络设备等)执行根据本发明的上述方法。当所述计算机程序被一个数据处理设备执行时,使得该计算机可读介质能够实现本发明的上述方法,即:如图1所示的方法。Through the above description of the implementation manners, those skilled in the art can easily understand that the exemplary embodiments described in the present invention can be implemented by software, or by combining software with necessary hardware. Therefore, the technical solution according to the embodiment of the present invention can be embodied in the form of a software product, and the software product can be stored in a computer-readable storage medium (which can be a CD-ROM, U disk, mobile hard disk, etc.) or on a network , including several instructions to make a computing device (which may be a personal computer, a server, or a network device, etc.) execute the above-mentioned method according to the present invention. When the computer program is executed by a data processing device, the computer-readable medium can realize the above-mentioned method of the present invention, that is, the method as shown in FIG. 1 .

图4为本说明书实施例提供的一种计算机可读介质的原理示意图。Fig. 4 is a schematic diagram of the principle of a computer-readable medium provided by the embodiment of this specification.

实现图1所示方法的计算机程序可以存储于一个或多个计算机可读介质上。计算机可读介质可以是可读信号介质或者可读存储介质。可读存储介质例如可以为但不限于电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。The computer program implementing the method shown in Figure 1 can be stored on one or more computer readable media. The computer readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: electrical connection with one or more conductors, portable disk, hard disk, random access memory (RAM), read only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

所述计算机可读存储介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了可读程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。可读存储介质还可以是可读存储介质以外的任何可读介质,该可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。可读存储 介质上包含的程序代码可以用任何适当的介质传输,包括但不限于无线、有线、光缆、RF等等,或者上述的任意合适的组合。The computer readable storage medium may include a data signal carrying readable program code in baseband or as part of a carrier wave traveling as a data signal. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A readable storage medium may also be any readable medium other than a readable storage medium that can send, propagate or transport a program for use by or in conjunction with an instruction execution system, apparatus or device. Program code contained on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, cable, optical cable, RF, etc., or any suitable combination of the above.

可以以一种或多种程序设计语言的任意组合来编写用于执行本发明操作的程序代码,所述程序设计语言包括面向对象的程序设计语言—诸如Java、C++等,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算设备上执行、部分地在用户设备上执行、作为一个独立的软件包执行、部分在用户计算设备上部分在远程计算设备上执行、或者完全在远程计算设备或服务器上执行。在涉及远程计算设备的情形中,远程计算设备可以通过任意种类的网络,包括局域网(LAN)或广域网(WAN),连接到用户计算设备,或者,可以连接到外部计算设备(例如利用因特网服务提供商来通过因特网连接)。Program code for carrying out the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages—such as Java, C++, etc., as well as conventional procedural programming languages. Programming language - such as "C" or a similar programming language. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server to execute. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., using an Internet service provider). business to connect via the Internet).

综上所述,本发明可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)等通用数据处理设备来实现根据本发明实施例中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。To sum up, the present invention can be realized by hardware, or by software modules running on one or more processors, or by a combination thereof. Those skilled in the art should understand that general data processing devices such as microprocessors or digital signal processors (DSPs) can be used in practice to implement some or all functions of some or all components in the embodiments of the present invention. The present invention can also be implemented as an apparatus or an apparatus program (for example, a computer program and a computer program product) for performing a part or all of the methods described herein. Such a program for realizing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet site, or provided on a carrier signal, or provided in any other form.

以上所述的具体实施例,对本发明的目的、技术方案和有益效果进行了进一步详细说明,应理解的是,本发明不与任何特定计算机、虚拟装置或者电子设备固有相关,各种通用装置也可以实现本发明。以上所述仅为本发明的具体实施例而已,并不用于限制本发明,凡在本发明的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The specific embodiments described above have further described the purpose, technical solutions and beneficial effects of the present invention in detail. It should be understood that the present invention is not inherently related to any specific computer, virtual device or electronic device, and various general devices are also The present invention can be realized. The above descriptions are only specific embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included in the scope of the present invention. within the scope of protection.

本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。Each embodiment in this specification is described in a progressive manner, the same and similar parts of each embodiment can be referred to each other, and each embodiment focuses on the differences from other embodiments.

以上所述仅为本申请的实施例而已,并不用于限制本申请。对于本领域技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本申请的权利要求范围之内。The above descriptions are only examples of the present application, and are not intended to limit the present application. For those skilled in the art, various modifications and changes may occur in this application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the scope of the claims of the present application.

Claims (11)

一种数据缓存方法,其特征在于,包括:A data caching method, characterized in that, comprising: 基于变量构造缓存模型,并为所述缓存模型中的变量配置具有匹配规则的注解信息;Constructing a cache model based on variables, and configuring annotation information with matching rules for the variables in the cache model; 响应于缓存触发事件调用所述缓存模型读取其中的注解信息,获取源数据表,并确定所述源数据表中与所述匹配规则相匹配的目标字段名,基于所述目标字段名为所述缓存模型中的变量赋值;Invoking the cache model to read the annotation information in response to the cache trigger event, obtaining the source data table, and determining the name of the target field in the source data table that matches the matching rule, based on the name of the target field Variable assignment in the cache model described above; 利用赋值后的缓存模型读取所述源数据表中目标字段名所对应的字段值,生成键值对信息存储于缓存空间中。Using the assigned cache model to read the field value corresponding to the target field name in the source data table, generate key-value pair information and store it in the cache space. 根据权利要求1所述的方法,其特征在于,所述匹配规则中具有目标字段名的表结构信息;The method according to claim 1, wherein the matching rule has table structure information of a target field name; 所述确定所述源数据表中与所述匹配规则相匹配的目标字段名,包括:The determining the name of the target field matching the matching rule in the source data table includes: 利用匹配规则中的表结构信息对所述源数据表进行字段名查询,读取查询到的目标字段名。The field name query is performed on the source data table by using the table structure information in the matching rule, and the queried target field name is read. 根据权利要求2所述的方法,其特征在于,所述匹配规则中的表结构信息是以时间为自变量的表结构函数;The method according to claim 2, wherein the table structure information in the matching rule is a table structure function with time as an independent variable; 所述利用匹配规则中的表结构信息对所述源数据表进行字段名查询,包括:The field name query of the source data table by using the table structure information in the matching rule includes: 确定所述缓存触发事件的时间,结合所述时间和所述表结构函数计算表结构函数值,根据所述表结构函数值生成当前的匹配规则;Determining the time of the cache trigger event, calculating a table structure function value in combination with the time and the table structure function, and generating a current matching rule according to the table structure function value; 执行所述当前的匹配规则对所述源数据表进行字段名查询。Execute the current matching rule to perform field name query on the source data table. 根据权利要求3所述的方法,其特征在于,所述表结构函数值为行序号或者列序号。The method according to claim 3, wherein the value of the table structure function is a row number or a column number. 根据权利要求1所述的方法,其特征在于,还包括:The method according to claim 1, further comprising: 为所述缓存模型配置数据表监测规则,监测源数据表的更新事件,若监测到源数据表,则进行数据同步读取,以更新缓存。Configure data table monitoring rules for the cache model to monitor update events of the source data table, and if the source data table is detected, perform data synchronous reading to update the cache. 根据权利要求1所述的方法,其特征在于,所述匹配规则中具有预设的 字段名和相似度计算规则;The method according to claim 1, characterized in that, there are preset field names and similarity calculation rules in the matching rules; 所述确定所述源数据表中与所述匹配规则相匹配的目标字段名,包括:The determining the name of the target field matching the matching rule in the source data table includes: 读取所述源数据表中的字段名,根据所述相似度计算规则计算其与预设字段名的相似度,根据相似度确定相匹配的目标字段名。Read the field name in the source data table, calculate its similarity with the preset field name according to the similarity calculation rule, and determine the matching target field name according to the similarity. 根据权利要求1所述的方法,其特征在于,所述基于变量构造缓存模型包括:The method according to claim 1, wherein said constructing a cache model based on variables comprises: 构造缓存指令并用变量替换其中的字段名。Constructs a cache directive and replaces field names within it with variables. 根据权利要求1所述的方法,其特征在于,所述匹配规则中还具有源数据表匹配规则;The method according to claim 1, wherein the matching rule also has a source data table matching rule; 所述获取源数据表,包括:The acquisition source data table includes: 根据所述源数据表匹配规则从数据库中确定并获取待缓存的源数据表。The source data table to be cached is determined and acquired from the database according to the source data table matching rule. 一种数据缓存装置,其特征在于,包括:A data cache device, characterized in that it comprises: 模型构造模块,基于变量构造缓存模型,并为所述缓存模型中的变量配置具有匹配规则的注解信息;The model construction module constructs a cache model based on variables, and configures annotation information with matching rules for the variables in the cache model; 匹配赋值模块,响应于缓存触发事件调用所述缓存模型读取其中的注解信息,获取源数据表,并确定所述源数据表中与所述匹配规则相匹配的目标字段名,基于所述目标字段名为所述缓存模型中的变量赋值;The matching assignment module calls the cache model to read the annotation information in response to the cache trigger event, obtains the source data table, and determines the target field name in the source data table that matches the matching rule, based on the target The field name is the variable assignment in the cache model; 缓存执行模块,利用赋值后的缓存模型读取所述源数据表中目标字段名所对应的字段值,生成键值对信息存储于缓存空间中。The cache execution module uses the assigned cache model to read the field value corresponding to the target field name in the source data table, and generates key-value pair information to store in the cache space. 一种电子设备,其中,该电子设备包括:An electronic device, wherein the electronic device includes: 处理器;以及,Processor; and, 存储计算机可执行指令的存储器,所述可执行指令在被执行时使所述处理器执行根据权利要求1-8中任一项所述的方法。A memory storing computer-executable instructions which, when executed, cause the processor to perform the method of any one of claims 1-8. 一种计算机可读存储介质,其中,所述计算机可读存储介质存储一个或多个程序,所述一个或多个程序当被处理器执行时,实现权利要求1-8中任一项所述的方法。A computer-readable storage medium, wherein the computer-readable storage medium stores one or more programs, and when the one or more programs are executed by a processor, the implementation of any one of claims 1-8 Methods.
PCT/CN2022/123867 2021-10-09 2022-10-08 Data caching method and apparatus, and electronic device Ceased WO2023056946A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111176782.0 2021-10-09
CN202111176782.0A CN113918602A (en) 2021-10-09 2021-10-09 A data caching method, device and electronic device

Publications (1)

Publication Number Publication Date
WO2023056946A1 true WO2023056946A1 (en) 2023-04-13

Family

ID=79238764

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/123867 Ceased WO2023056946A1 (en) 2021-10-09 2022-10-08 Data caching method and apparatus, and electronic device

Country Status (2)

Country Link
CN (1) CN113918602A (en)
WO (1) WO2023056946A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116701474A (en) * 2023-05-18 2023-09-05 中国工商银行股份有限公司 Request response method, device, electronic device and storage medium
CN117033318A (en) * 2023-10-08 2023-11-10 深圳安天网络安全技术有限公司 Method and device for generating data to be tested, storage medium and electronic equipment
CN118363993A (en) * 2024-04-22 2024-07-19 中航信移动科技有限公司 Event stream data field completion method, electronic device and storage medium

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113918602A (en) * 2021-10-09 2022-01-11 上海淇馥信息技术有限公司 A data caching method, device and electronic device
CN114443660A (en) * 2022-01-26 2022-05-06 网易(杭州)网络有限公司 Abnormity positioning method, abnormity positioning device, storage medium and computing equipment
CN116680270A (en) * 2023-06-09 2023-09-01 中国联合网络通信集团有限公司 Data table conversion method, device and storage medium
CN119211390B (en) * 2024-08-28 2025-11-25 中电金信技术有限公司 Field assignment methods and devices

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110490724A (en) * 2019-07-03 2019-11-22 平安证券股份有限公司 The storage method and device of account data
CN113434091A (en) * 2021-07-07 2021-09-24 中国人民解放军国防科技大学 Cold and hot key value identification method based on hybrid DRAM-NVM
CN113836162A (en) * 2021-11-16 2021-12-24 湖北省楚建易网络科技有限公司 Method and device for service decoupling and automatic updating of multi-level cache
CN113918602A (en) * 2021-10-09 2022-01-11 上海淇馥信息技术有限公司 A data caching method, device and electronic device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113448995B (en) * 2020-03-25 2024-11-26 北京沃东天骏信息技术有限公司 Database operation method and device, system, electronic device and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110490724A (en) * 2019-07-03 2019-11-22 平安证券股份有限公司 The storage method and device of account data
CN113434091A (en) * 2021-07-07 2021-09-24 中国人民解放军国防科技大学 Cold and hot key value identification method based on hybrid DRAM-NVM
CN113918602A (en) * 2021-10-09 2022-01-11 上海淇馥信息技术有限公司 A data caching method, device and electronic device
CN113836162A (en) * 2021-11-16 2021-12-24 湖北省楚建易网络科技有限公司 Method and device for service decoupling and automatic updating of multi-level cache

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116701474A (en) * 2023-05-18 2023-09-05 中国工商银行股份有限公司 Request response method, device, electronic device and storage medium
CN116701474B (en) * 2023-05-18 2025-09-30 中国工商银行股份有限公司 Request response method, device, electronic device and storage medium
CN117033318A (en) * 2023-10-08 2023-11-10 深圳安天网络安全技术有限公司 Method and device for generating data to be tested, storage medium and electronic equipment
CN117033318B (en) * 2023-10-08 2023-12-08 深圳安天网络安全技术有限公司 Method and device for generating data to be tested, storage medium and electronic equipment
CN118363993A (en) * 2024-04-22 2024-07-19 中航信移动科技有限公司 Event stream data field completion method, electronic device and storage medium

Also Published As

Publication number Publication date
CN113918602A (en) 2022-01-11

Similar Documents

Publication Publication Date Title
WO2023056946A1 (en) Data caching method and apparatus, and electronic device
US11163739B2 (en) Database table format conversion based on user data access patterns in a networked computing environment
CN111949693B (en) Data processing device, data processing method, storage medium and electronic equipment
CN104160381B (en) Managing method and system for tenant-specific data sets in a multi-tenant environment
CN112000734A (en) A big data processing method and device
CN106445645B (en) Method and apparatus for executing distributed computing task
CN110362404A (en) A SQL-based resource allocation method, device and electronic device
CA3089289C (en) System and methods for loading objects from hash chains
CN108108392B (en) Commodity data management method, device, computer equipment and storage medium
CN109947768B (en) local identifier for database objects
CN111752964A (en) Data processing method and device based on data interface
CN115292313A (en) Pseudo-column implementation method and device, electronic equipment and storage medium
CN115374181A (en) Data processing method and device, electronic equipment and storage medium
US11030241B2 (en) Query usage based organization for very large databases
CN113448995A (en) Database operation method, device and system, electronic equipment and storage medium
WO2020112178A1 (en) Systems and methods for storing object state on hash chains
CN116955314A (en) Unified database maintenance and control methods, devices, equipment and storage media
CN117149832A (en) Hierarchical caching, data query methods, apparatus, equipment, media and program products
CN116450715A (en) Information integration data processing method, system, electronic equipment and storage medium
US20240126726A1 (en) Techniques for comprehensively supporting json schema in a rdbms
US20240126727A1 (en) Techniques for comprehensively supporting json schema in a rdbms
CN110888939A (en) A data management method and device
CN115357653A (en) Data processing method, device, electronic device and storage medium
CN116361371A (en) Data export method and device, computing equipment and storage medium
CN117827369A (en) Virtual machine encryption method, device, electronic device and storage medium

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: 22877961

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22877961

Country of ref document: EP

Kind code of ref document: A1

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 27.11.2024)

122 Ep: pct application non-entry in european phase

Ref document number: 22877961

Country of ref document: EP

Kind code of ref document: A1