WO2022095366A1 - 基于Redis的数据读取方法、装置、设备及可读存储介质 - Google Patents

基于Redis的数据读取方法、装置、设备及可读存储介质 Download PDF

Info

Publication number
WO2022095366A1
WO2022095366A1 PCT/CN2021/090761 CN2021090761W WO2022095366A1 WO 2022095366 A1 WO2022095366 A1 WO 2022095366A1 CN 2021090761 W CN2021090761 W CN 2021090761W WO 2022095366 A1 WO2022095366 A1 WO 2022095366A1
Authority
WO
WIPO (PCT)
Prior art keywords
database
data
reading instruction
data reading
target data
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/CN2021/090761
Other languages
English (en)
French (fr)
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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Publication of WO2022095366A1 publication Critical patent/WO2022095366A1/zh
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/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • 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/21Design, administration or maintenance of databases
    • G06F16/214Database migration support
    • 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/25Integrating or interfacing systems involving database management systems
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present application relates to the field of cloud technologies, and in particular, to a Redis-based data reading method, a Redis-based data reading apparatus, computer equipment, and a computer-readable storage medium.
  • Redis architecture there are three architectural modes for using Redis as an enterprise cache in the market: master-slave mode, cluster mode, and Sentinel mode. Since the development of most enterprises is from small to medium to large, when the business volume is not large in the early stage, most of the cache adopts the master-slave mode, which can fully support the needs of enterprises for the use of cache, but as the number of users increases , if Redis as a session and business data cache still adopts the master-slave single-write double-read architecture model, which is not enough to support the growing TPS requests, then the Redis architecture will be upgraded at this time to meet the needs of greater development. need.
  • the present application provides a Redis-based data reading method, device, computer equipment, and storage medium, so as to realize non-action migration of data.
  • the application provides a Redis-based data reading method, the method comprising:
  • the first database is controlled to access the second database based on the data reading instruction, and the first database is controlled to The target data is synchronized, wherein the first database and the second database are both Redis databases;
  • the first database is controlled to respond to the data reading instruction to feed back the target data.
  • the present application also provides a Redis-based data reading device, the device comprising:
  • an instruction receiving module configured to receive a data reading instruction, and query the first database according to the data reading instruction
  • the data query module is configured to control the first database to access the second database based on the data reading instruction if it is determined that the target data corresponding to the data reading instruction is not included in the first database, and control all The first database synchronizes the target data, wherein the first database and the second database are both Redis databases;
  • a data feedback module configured to control the first database to respond to the data reading instruction when it is determined that the data synchronization is completed, so as to feed back the target data.
  • the present application also provides a computer device, the computer device includes a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program and execute the computer program.
  • the computer program implements the following steps:
  • the first database is controlled to access the second database based on the data reading instruction, and the first database is controlled to The target data is synchronized, wherein the first database and the second database are both Redis databases;
  • the first database is controlled to respond to the data reading instruction to feed back the target data.
  • the present application also provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the following steps:
  • the first database is controlled to access the second database based on the data reading instruction, and the first database is controlled to The target data is synchronized, wherein the first database and the second database are both Redis databases;
  • the first database is controlled to respond to the data reading instruction to feed back the target data.
  • the present application discloses a Redis-based data reading method, device, computer equipment, and storage medium.
  • the Redis-based data reading method when receiving a data reading instruction, performs the data identification contained in the data reading instruction. Obtain, and then query in the first database (that is, cluster Redis) according to the obtained data identification to determine whether there is corresponding data, and when it is determined that there is no corresponding data, switch the corresponding access interface API to realize the A database accesses the second database (ie master-slave Redis) to obtain target data in the second database according to the obtained data identifier, and finally writes and stores the obtained target data in the first database, and after writing When completed, the corresponding data reading instruction realizes reading and feedback of the target data in the first database.
  • the first database that is, cluster Redis
  • the second database ie master-slave Redis
  • the data migration can be completed without any sense while ensuring the data reading.
  • avoiding one-time data migration can better reduce the operating load caused by a large amount of data migration, without affecting the system operation. while completing the data migration.
  • FIG. 1 is a schematic flowchart of a Redis-based data reading method provided by an embodiment of the present application
  • FIG. 2 is a schematic flowchart of a step of querying a first database provided by an embodiment of the present application
  • FIG. 3 is a schematic flowchart of a step of accessing a second database provided by an embodiment of the present application.
  • FIG. 4 is a schematic block diagram of a Redis-based data reading device in an embodiment of the application.
  • FIG. 5 is a schematic block diagram of the structure of a computer device in an embodiment of the present application.
  • FIG. 1 is a schematic flowchart of a Redis-based data reading method provided by an embodiment of the present application.
  • the Redis-based data reading method includes steps S101 to S103.
  • Step S101 receiving a data reading instruction, and querying the first database according to the data reading instruction.
  • the relevant data reading instruction is sent to the corresponding system or server, so as to obtain the data.
  • the system or server is made to query according to the received data reading instruction, so as to feed back the obtained data information.
  • data query when a data reading instruction is received, data query will be performed in the first database according to the data reading instruction, so as to perform further operations according to the obtained query result, such as performing query matching on the obtained data Give feedback.
  • the data reading method is applied in the Redis environment.
  • Redis is an open-source log-type and key-value database written in ANSIC language, supporting the network, and being memory-based and persistent.
  • the API of various languages is simply a database, but it has its own advantages, and thus has better and wider application scenarios.
  • the data reading method is applied to two Redis service clusters, that is, for the database, there are two mutually independent databases, and there is a certain network connection between the two databases, and through the network connection, the Realize the interaction of information, such as data synchronization.
  • Redis service clusters For two Redis service clusters, they can be divided into master-slave Redis and cluster Redis according to their different functions, that is, the first database and the second database, wherein the first database described here is cluster Redis, The second database mentioned later is the master and slave Redis.
  • the master-slave Redis can meet a certain amount of business needs, but when the business demand increases, the ability of Redis needs to be horizontally expanded, and the load capacity of Redis needs to be flexibly expanded through the cluster mode to meet larger business needs.
  • the master-slave Redis is the initial database of the server, that is, the first database is the original database of the server.
  • the first database is to a certain extent. It cannot well meet the actual demand, so it is necessary to expand the second database to realize the storage of more data information. Due to the increase in the number of servers, unnecessary consumption will increase. Therefore, when upgrading the database, that is, upgrading from the second database to the first database, it is also necessary to transfer the data recorded in the second database to the first database.
  • data can be migrated from the second database to the first database in a non-inductive manner.
  • the first database when receiving a data reading instruction, the first database will be queried according to the received data reading instruction, and if relevant data information is recorded in the first database, it will be directly in the first database The acquisition and feedback are performed. If no relevant data information is recorded in the first database, further query acquisition will be performed, specifically, a query is performed in the second database.
  • FIG. 2 is a schematic flowchart of a step of querying a first database provided by an embodiment of the present application.
  • the step S101 includes sub-steps S201 to S202.
  • Sub-step S201 Receive a data reading instruction, and identify a data identifier included in the data reading instruction.
  • the data identifier is a unique identifier or label of the data to be acquired, or other identifiers or labels that can represent data information.
  • the first database After receiving the data reading instruction, the first database will be queried according to the data reading instruction to determine whether corresponding target data can be obtained. Therefore, when the user needs to obtain data, it needs to be obtained in the relevant server or database. Therefore, when the data needs to be obtained, the relevant data reading instruction is sent to the corresponding system, and the system receives the data. After reading the command, identify the data identifier contained in the received data reading command.
  • Each data or each type of data has its own corresponding query method, so it can be Query the target data according to the relevant features.
  • Redis different data have their own corresponding information, such as the key/value key-value pair in Redis.
  • Redis there are multiple different Redis used to store different data. Different attribute characteristics are stored, that is, the data stored in the same Redis has a certain correlation or commonality. For example, the key value has a certain similarity or the same or correlation. For example, the data corresponding to the key values starting with different letters are stored in in the same Redis.
  • the data identifier contained in the received data reading instruction will be acquired.
  • the received data reading instruction may contain the data to be read. The corresponding key value, and then the data information is obtained according to the obtained key value.
  • Sub-step S202 Obtain a query list corresponding to the first database, so as to perform a query in the first list corresponding to the first database according to the query list and the data identifier, wherein the query list is stored in in the blockchain node.
  • the first database is the cluster Redis in the system.
  • the Redis contained in it can classify and store data information, and according to different attribute characteristics of the data, the data with the same attribute characteristics is stored in the in the same Redis. That is, different data have different data identifiers, and related data information can be obtained through the data identifiers.
  • the first database After obtaining the data identifier contained in the received data reading instruction, the first database will be queried according to the obtained data identifier to determine whether there is corresponding data. Specifically, after identifying the data identifier corresponding to the data reading instruction, the query list corresponding to the first database will be obtained, and then the query list corresponding to the first database will be queried according to the obtained query list and the identified data identifier. A query is performed in the list to determine whether there is corresponding target data in the first database, wherein the query list is stored in the blockchain node.
  • the acquired data is identified as the key value of the data to be read, and the corresponding relationship between different key values and data is recorded in the query list, and then according to the obtained key value according to the first
  • the information contained in the database is used for data query.
  • the corresponding query result includes that the obtained key value is included in the first database and the obtained key value is not included in the first database.
  • the target data can be read according to the key value, and then the obtained target data can be read. target data for feedback.
  • the obtained key value is not included in the first database, it is determined that the target data required by the user is not recorded and stored in the first database, that is, it cannot be directly completed in the first database according to the key value at this time. For data reading, further operations will be required at this time to achieve the acquisition of the target issue.
  • Step S102 if it is determined that the first database does not contain the target data corresponding to the data reading instruction, then control the first database to access the second database based on the data reading instruction, and control the first database.
  • the database synchronizes the target data, wherein the first database and the second database are both Redis databases.
  • the target data corresponding to the currently received data read command may not exist in the first database, then further operations will be performed at this time to Realize the acquisition of target data.
  • the target data corresponding to the received data reading instruction when it is determined that the target data corresponding to the received data reading instruction is not included in the first database, it means that the acquisition of the target data cannot be achieved in the first database at present, and the first database will be controlled at this time.
  • a database accesses the second database, and implements data query in the second database according to the received data reading instruction, so as to feed back the target data obtained by the query.
  • the second database is the master-slave Redis of the system.
  • the master-slave Redis there is only one Redis, not the cluster Redis.
  • the data information is stored in a Redis, that is The stored data will not be classified and stored as in the first database, but all data records will be stored together.
  • the second database When the query is performed to determine that the first database does not contain data corresponding to the data identifier, the second database will be accessed to read the data desired by the user.
  • the corresponding data is obtained by querying the data in the master-slave Redis.
  • the API application program interface
  • the target data obtained by the query is directly read for corresponding feedback, such as directly displayed on a corresponding display interface.
  • Fig. 3 is a schematic flowchart of the steps of accessing the second database provided by an embodiment of the present application.
  • the step S102 includes sub-steps S301 to S303.
  • Sub-step S301 If it is determined that the query list does not contain the data identifier, call a preset access interface to control the first database to access the second database based on the access interface.
  • the access interface accesses the second data to realize the query and acquisition of the data.
  • the relevant interface when accessing the server, the relevant interface is usually used to realize the access to the master-slave Redis or cluster Redis, and then realize the data acquisition. That is, when accessing the first database, the access interface (API) corresponding to the first database will be used to realize the access to the first database and the query of data, and there is no currently required database in the first database. , the access interface that can access the second database will be invoked, and the data query in the second database will be implemented.
  • API access interface
  • Sub-step S302 controlling the first database to query the second database according to the data identifier to obtain corresponding target data
  • the query of data information will be carried out in the second database. Specifically, the query will be carried out in the second database according to the data identification obtained in advance, and the matching query of the data identification will be used, Get the target data that needs to be read currently.
  • the second database when accessing the second database, that is, querying and acquiring data in the second database, so as to obtain corresponding required target data.
  • the second database is similar to the general database of the system and stores all the data in the system, but because the amount of data in the second database is too large and the data is not related, under normal circumstances, it will not be directly in the master-slave Redis Instead, the query will be performed in the cluster Redis first. Only when the cluster Redis does not contain the desired data will it be searched in the master and slave Redis.
  • a new data reading thread can be started, so that the target data can be read in the second database according to the obtained data identifier, and the target data corresponding to the data identifier can be read when the target data corresponding to the data identifier is read. After the data, put the target data into the memory queue Queue.
  • the second database When querying in the second database, it means that the data you want to query currently does not exist in the first database, so that the next query can be obtained directly in the first database, and the second database can be avoided again. Therefore, when the data information is fed back, the obtained data information also needs to be synchronized to the first database, so as to realize the non-inductive migration of the data information.
  • Sub-step S303 Record the target data in the first database according to the data identifier, and update the query list.
  • the obtained target data is written and stored in the first database, so that when reading the data, the corresponding data information can be directly obtained in the first database . Therefore, when the target data is obtained, the target data is stored in the first database according to the data identifier of the target data, and the query list corresponding to the first database is also updated for subsequent data query.
  • writing and storing the obtained target data in the first database is to facilitate subsequent data reading.
  • By ensuring the uniformity of data in the first database and the second database frequent access to the second database is avoided.
  • the data is processed in the first database to a certain extent, such as classification processing, by dividing the database, the search time required for data search is shortened and the operation caused by data search is reduced. The load is reduced.
  • the target data When the target data is written into the first database, since the target data has a corresponding data identifier, and the first data is classified and stored according to the relevant attributes of the data, the target data will also be classified and stored according to the data identifier at this time.
  • the storage is performed to realize writing the target data in the first database.
  • the data is stored according to the corresponding data identifier of the target data.
  • the data identifier can be the key value corresponding to the data, that is, the data is written through the key value. to a Redis in the cluster Redis.
  • the data to be read contains multiple data identifiers
  • the data will be written to different Redis according to different data identifiers. For example, according to the alphabetical order, write the data corresponding to the key value starting with A/a in the same python script (Redis), and write the data corresponding to the key value starting with B/b in the same python script (Redis). in a python script (Redis).
  • an expiration time of a data identifier can be set.
  • TTL Time To Live, time-to-live value
  • the valid duration TTL ensures the validity of the data.
  • the process of copying the target data from the second database to the first database involves the process from reading out to writing, so there is also time consumption.
  • the consumption of this intermediate process is Internal, then set the When the real valid duration of the key is set, the valid duration can be set to TTL+Interval, that is, the sum of the two durations is the final valid duration.
  • Step S103 when it is determined that the data synchronization is completed, control the first database to respond to the data reading instruction, so as to feed back the target data.
  • the target data After the target data is obtained, since the data read interface associated with the client is connected to the first database, the obtained target data will be written and stored in the first database first, and then the target data will be written into the first database.
  • the target data When the database is completed, the target data is obtained from the first database, so as to realize the response to the data reading instruction.
  • a corresponding data reading instruction When a corresponding data reading instruction is used, data is acquired in the first database according to the data identifier corresponding to the identified data reading instruction, and then corresponding feedback is performed after the target data is obtained.
  • the feedback for the user is to display the obtained data, while for the system, the data not stored in the first database is synchronized from the second database to be recorded in the first database.
  • a database is also a kind of feedback.
  • first query is performed in the first database to achieve the acquisition of target data, and when the first database does not contain the corresponding target data, in the first database Further queries are implemented in the second database.
  • the migration of the data contained in the second database can be gradually improved. Every time the data not contained in the first database is read , which is a data migration.
  • This method avoids the system operation load caused by the simultaneous migration of a large amount of data at the same time, and completes the data migration at the same time as the data is read, which can realize non-inductive data migration.
  • the entire data reading process can also be understood as a process of data migration, but it is not a one-time migration of all data information, but through the data again and again.
  • Read import data that does not exist in the first database from the second database, so as to realize data migration in the actual use process without interfering with the actual use of the server.
  • the data acquired in the second database can also be marked, and whether all the data in the second database has been completely migrated can be determined by marking.
  • the number of servers will have a certain impact on revenue.
  • the first database can meet the actual business needs, if the second database is still maintained at this time, it will obviously cause unnecessary waste of resources. Therefore, through data reading, the migration of data information is continuously realized, and when all the data in the first database is migrated to the second database, the calling interface for accessing the second database is invalidated, that is, the second database is downloaded into the second database. line to no longer use the second database.
  • the method further includes: matching the data in the second database to the corresponding target data.
  • the target data is marked for migration, and the migration list corresponding to the second database is based on the migration mark; when it is determined that all data identifiers included in the migration list are marked with a migration mark, the second database is determined Data migration is complete.
  • the status of the data will be updated in the migration list, for example, the status of the data will be updated from the unmigrated state to the migrated state, and the status of all data will be monitored through the migration list.
  • all data data is migrated, it means that the upgrade of the second database is completed.
  • the data identifier contained in the data reading instruction is acquired, and then the data identifier is stored in the first database (that is, the cluster Redis) according to the obtained data identifier. ) to determine whether there is corresponding data, and when it is determined that there is no corresponding data, switch the corresponding access interface API to realize the access of one database to the second database (ie master-slave Redis), to Obtain the data identification to obtain the target data in the second database, and finally write and store the obtained target data in the first database, and when the writing is completed, the corresponding data reading instruction is implemented in the first database to read the target data take and feedback.
  • the first database that is, the cluster Redis
  • the data migration can be completed without any sense while ensuring the data reading.
  • avoiding one-time data migration can better reduce the operating load caused by a large amount of data migration, without affecting the system operation. while completing the data migration.
  • FIG. 4 is a schematic block diagram of a Redis-based data reading apparatus according to an embodiment of the present application, and the apparatus is configured to execute the aforementioned Redis-based data reading method.
  • the Redis-based data reading device 400 includes:
  • an instruction receiving module 401 configured to receive a data reading instruction, and query the first database according to the data reading instruction
  • the data query module 402 is configured to control the first database to access the second database based on the data reading instruction if it is determined that the target data corresponding to the data reading instruction is not included in the first database, and control The first database synchronizes the target data, wherein the first database and the second database are both Redis databases;
  • the data feedback module 403 is configured to control the first database to respond to the data reading instruction to feedback the target data when it is determined that the data synchronization is completed.
  • the instruction receiving module 401 is further configured to:
  • the instruction receiving module 401 is further configured to:
  • the data query module 402 is further configured to:
  • the target data is recorded in the first database, and the query list is updated.
  • the Redis-based data reading device 400 is further used for:
  • the Redis-based data reading device 600 further includes a state update module, wherein the state update module is used for:
  • the response data feedback module 403 is further configured to:
  • the data reading instruction is responded to, and the target data is fed back.
  • the above-mentioned apparatus can be implemented in the form of a computer program that can be executed on a computer device as shown in FIG. 5 .
  • FIG. 5 is a schematic block diagram of the structure of a computer device according to an embodiment of the present application.
  • the computer device may be a server.
  • the computer device includes a processor, a memory, and a network interface connected by a system bus, wherein the memory may include a non-volatile storage medium and an internal memory.
  • Non-volatile storage media can store operating systems and computer programs.
  • the computer program includes program instructions, which, when executed, can cause the processor to execute any Redis-based data reading method.
  • the processor is used to provide computing and control capabilities to support the operation of the entire computer equipment.
  • the internal memory provides an environment for running the computer program in the non-volatile storage medium.
  • the processor can execute any Redis-based data reading method.
  • the network interface is used for network communication, such as sending assigned tasks.
  • the network interface is used for network communication, such as sending assigned tasks.
  • FIG. 5 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer equipment to which the solution of the present application is applied. Include more or fewer components than shown in the figures, or combine certain components, or have a different arrangement of components.
  • the processor may be a central processing unit (Central Processing Unit, CPU), and the processor may also be other general-purpose processors, digital signal processors (Digital Signal Processors, DSP), application specific integrated circuits (Application Specific Integrated circuits) Circuit, ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor can be a microprocessor or the processor can also be any conventional processor or the like.
  • the processor is configured to run a computer program stored in the memory to implement the following steps:
  • the first database is controlled to access the second database based on the data reading instruction, and the first database is controlled to The target data is synchronized, wherein the first database and the second database are both Redis databases;
  • the first database is controlled to respond to the data reading instruction to feed back the target data.
  • the processor when the processor implements the receiving data reading instruction and performs a query in the first database according to the data reading instruction, the processor is further configured to implement:
  • the processor is further configured to implement:
  • the processor controls the first database to read the data based on the data read instruction if it is determined that the first database does not contain target data corresponding to the data read instruction.
  • the processor controls the first database to read the data based on the data read instruction if it is determined that the first database does not contain target data corresponding to the data read instruction.
  • the target data is recorded in the first database, and the query list is updated.
  • the processor controls the first database to read the data based on the data read instruction if it is determined that the first database does not contain target data corresponding to the data read instruction.
  • the processor controls the first database to read the data based on the data read instruction if it is determined that the first database does not contain target data corresponding to the data read instruction.
  • the processor after the processor performs the query in the first database according to the data reading instruction, the processor is further configured to:
  • the data reading instruction is responded to, and the target data is fed back.
  • the embodiments of the present application further provide a computer-readable storage medium, where the computer-readable storage medium stores a computer program, the computer program includes program instructions, and the processor executes the program instructions to implement the present application Any of the Redis-based data reading methods provided in the embodiments.
  • the computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiments, such as a hard disk or a memory of the computer device.
  • the computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk equipped on the computer device, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) ) card, Flash Card, etc.
  • the computer-readable storage medium may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function, and the like; The data created by the use of the node, etc.
  • Blockchain essentially a decentralized database, is a series of data blocks associated with cryptographic methods. Each data block contains a batch of network transaction information to verify its Validity of information (anti-counterfeiting) and generation of the next block.
  • the blockchain can include the underlying platform of the blockchain, the platform product service layer, and the application service layer.

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)
  • Computing Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

一种数据读取方法、装置、设备及可读存储介质,该方法包括:接收数据读取指令,根据数据读取指令在第一数据库中进行查询;若确定第一数据库中不包含有数据读取指令对应的目标数据,则控制第一数据库访问第二数据库,控制第一数据库将目标数据同步;当确定同步完成时,控制第一数据库响应数据读取指令,将目标数据进行反馈。

Description

基于Redis的数据读取方法、装置、设备及可读存储介质
本申请要求于2020年11月06日提交中国专利局、申请号为202011232436.5发明名称为“基于Redis的数据读取方法、装置、设备及可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及云技术领域,尤其涉及一种基于Redis的数据读取方法、基于Redis的数据读取装置、计算机设备及计算机可读存储介质。
背景技术
目前市场上使用Redis作为企业缓存有三种架构模式:主从模式,集群模式,Sentinel模式。由于大部分企业的发展都是从小到中到大的模式,故前期在业务量不大的时候,缓存大部分采用主从模式,完全可以支撑企业对缓存使用的需求,但是随着用户量增加,作为会话和业务数据缓存的Redis如果还采用主从这种单写双读的架构模式,不足以支撑日益增长的TPS请求,那么此时将会对Redis架构的升级,以满足发展的更大需求。
在对Redis架构进行升级时,会存在版本兼容的问题,如Redis Master-Slave(版本3.0.x)的持久化存储RDB和集群模式(Cluster/Sentinel 4.0.x)的持久化存储RDB头部信息不一致,这样就造成了在升级时Master-Slave服务器的持久化信息无法通过拷贝RDB文件的方式同步到cluster服务器。另外进行数据拷贝是一个巨大的工程,如暂停系统的使用以完成数据的迁移显然不现实。
因此,亟需一种处理方式实现无感化的数据迁移的数据读取方法。
发明内容
本申请提供了一种基于Redis的数据读取方法、装置、计算机设备及存储介质,以实现数据的无感化迁移。
第一方面,本申请提供了一种基于Redis的数据读取方法,所述方法包括:
接收数据读取指令,并根据所述数据读取指令在第一数据库中进行查询;
若确定所述第一数据库中不包含有所述数据读取指令对应的目标数据,则控制所述第一数据库基于所述数据读取指令访问第二数据库,并控制所述第一 数据库将所述目标数据进行同步,其中所述第一数据库和第二数据库均为Redis数据库;
当确定数据同步完成时,控制所述第一数据库响应所述数据读取指令,以将所述目标数据进行反馈。
第二方面,本申请还提供了一种基于Redis的数据读取装置,所述装置包括:
指令接收模块,用于接收数据读取指令,并根据所述数据读取指令在第一数据库中进行查询;
数据查询模块,用于若确定所述第一数据库中不包含有所述数据读取指令对应的目标数据,则控制所述第一数据库基于所述数据读取指令访问第二数据库,并控制所述第一数据库将所述目标数据进行同步,其中所述第一数据库和第二数据库均为Redis数据库;
数据反馈模块,用于当确定数据同步完成时,控制所述第一数据库响应所述数据读取指令,以将所述目标数据进行反馈。
第三方面,本申请还提供了一种计算机设备,所述计算机设备包括存储器和处理器;所述存储器用于存储计算机程序;所述处理器,用于执行所述计算机程序并在执行所述计算机程序时实现如下步骤:
接收数据读取指令,并根据所述数据读取指令在第一数据库中进行查询;
若确定所述第一数据库中不包含有所述数据读取指令对应的目标数据,则控制所述第一数据库基于所述数据读取指令访问第二数据库,并控制所述第一数据库将所述目标数据进行同步,其中所述第一数据库和第二数据库均为Redis数据库;
当确定数据同步完成时,控制所述第一数据库响应所述数据读取指令,以将所述目标数据进行反馈。
第四方面,本申请还提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时使所述处理器实现如下步骤:
接收数据读取指令,并根据所述数据读取指令在第一数据库中进行查询;
若确定所述第一数据库中不包含有所述数据读取指令对应的目标数据,则控制所述第一数据库基于所述数据读取指令访问第二数据库,并控制所述第一数据库将所述目标数据进行同步,其中所述第一数据库和第二数据库均为Redis数据库;
当确定数据同步完成时,控制所述第一数据库响应所述数据读取指令,以将所述目标数据进行反馈。
本申请公开了一种基于Redis的数据读取方法、装置、计算机设备及存储介质,基于Redis的数据读取方法,在接收到数据读取指令时,对数据读取指令所包含的数据标识进行获取,然后根据所得到的数据标识在第一数据库(也就是集群Redis)中进行查询,以确定是否存在对应的数据,而在确定不存在对应的数据时,切换相应的访问接口API以实现对一数据库对第二数据库(即主从Redis)的访问,以根据所得到数据标识在第二数据库中得到目标数据,最后将所得到的目标数据写入存储在第一数据库中,并在写入完成时相应数据读取指令在第一数据库中实现对目标数据的读取和反馈。实现了在数据读取过程中,在保证数据读取的同时无感的完成数据的迁移,同时避免一次性的数据迁移可以更好的降低大量数据迁移带来的运行负载,在不影响系统运行的同时完成数据迁移。
附图说明
为了更清楚地说明本申请实施例技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请一个实施例提供的一种基于Redis的数据读取方法的流程示意图;
图2为本申请一实施例提供的在第一数据库中进行查询的步骤的流程示意图;
图3为本申请一实施例提供的访问第二数据库的步骤的流程示意图;
图4为本申请一个实施例中一种基于Redis的数据读取装置的示意性框图;
图5为本申请一个实施例中计算机设备的结构示意性框图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳 动前提下所获得的所有其他实施例,都属于本申请保护的范围。
附图中所示的流程图仅是示例说明,不是必须包括所有的内容和操作/步骤,也不是必须按所描述的顺序执行。例如,有的操作/步骤还可以分解、组合或部分合并,因此实际执行的顺序有可能根据实际情况改变。
应当理解,在此本申请说明书中所使用的术语仅仅是出于描述特定实施例的目的而并不意在限制本申请。如在本申请说明书和所附权利要求书中所使用的那样,除非上下文清楚地指明其它情况,否则单数形式的“一”、“一个”及“该”意在包括复数形式。
还应当进理解,在本申请说明书和所附权利要求书中使用的术语“和/或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。
下面结合附图,对本申请的一些实施方式作详细说明。在不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。
请参阅图1,图1为本申请一个实施例提供的一种基于Redis的数据读取方法的流程示意图。
如图1所示,该基于Redis的数据读取方法包括步骤S101至步骤S103。
步骤S101、接收数据读取指令,并根据所述数据读取指令在第一数据库中进行查询。
在用户需要进行数据的获取时,需要在相关的系统或者服务器中进行数据的查询和获取,因此在需要进行数据的获取时,发送相关联的数据读取指令至相应的系统或服务器中,以使得系统或服务器根据所接收到的数据读取指令进行查询,以将所得到的数据信息进行反馈。
具体地,在接收到数据读取指令时,将会根据数据读取指令在第一数据库中进行数据的查询,以根据所得到的查询结果进行进一步的操作,比如将进行查询匹配所得到的数据进行反馈。
在一实施例中,该数据读取方法应用于Redis环境下,Redis是一种开源的使用ANSIC语言编写、支持网络、可基于内存亦可持久化的日志型、Key-Value数据库,并提供多种语言的API,简单来说就是一种数据库,但是又有着自身的优点,进而有着更好和更广泛的应用场景。
在实际应用中,该数据读取方法应用于两个Redis服务集群,也就是对于数据库而言,具有两个相互独立的数据库,且两个数据库之间具有一定的网络连 接,进而通过网络连接可以实现信息的交互,比如数据同步。
对于两个Redis服务集群而言,根据其功能的不同可以将其分为主从Redis和集群Redis,也就是第一数据库和第二数据库,其中,在此所描述的第一数据库为集群Redis,而后续所提到的第二数据库为主从Redis。在实际应用中,主从Redis可以满足一定量的业务需求,但是在业务需求量增大时,需要水平扩展Redis的能力,通过集群模式弹性扩容Redis的负载能力,进而满足更大的业务需求。
可以理解的是,主从Redis为服务器的初始数据库,也就是第一数据库为服务器的原始数据库,随着不断的数据写入和记录,以及业务需求的不断提升,使得第一数据库在一定程度上不能很好的满足实际的需求,因此需要扩展第二数据库,实现对更多数据信息的存储。由于服务器数量的增多,会增加不必要的消费,因此在对数据库升级时,也就是从第二数据库升级为第一数据库,还需要将第二数据库中所记录的数据转移至第一数据库中,而利用本方案所描述的方案,可以无感的实现将数据从第二数据库中迁移至第一数据库中。
因此,在接收到数据读取指令时,首先会根据所接收到的数据读取指令在第一数据库中进行查询,若在第一数据库中记录有相关的数据信息,则直接在第一数据库中进行获取并反馈,若在第一数据库中并未记录有相关的数据信息,则将进行进一步的查询获取,具体地,在第二数据库中进行查询。
进一步地,参照图2,图2为本申请一实施例提供的在第一数据库中进行查询的步骤的流程示意图。其中步骤S101包括子步骤S201至子步骤S202。
子步骤S201、接收数据读取指令,并识别所述数据读取指令所包含的数据标识。
其中,数据标识为所需要获取的数据的唯一标识或者标签,或者其他可代表数据信息的标识或标签。
在接收到数据读取指令中,将会根据数据读取指令在第一数据库中进行查询,以确定是否可以得到相应的目标数据。因此,在用户需要进行数据的获取时,需要在相关的服务器或者数据库中进行获取,因此在需要进行数据的获取时,发送相关联的数据读取指令至相应的系统,而系统在接收到数据读取指令之后,识别所接收到的数据读取指令中所包含的数据标识。
在实际应用中,在进行数据查询时,不同的数据查询条件或者查询方式,所得到的相关联的数据会有所不同,每一个数据或者每一类数据都有着各自对 应的查询方式,因此可以根据相关的特征实现对目标数据的查询。
在实际应用中,不同的数据有着自身对应的信息,如Redis中的key/value键值对,对于集群Redis而言,存在有多个不同的Redis用于存储不同的数据,具体如根据数据的不同属性特征进行存储,也就是存储在同一个Redis中的数据有着一定的相关性或者共性,比如key值存在一定的相似或者相同或者相关性,如不同字母开头的key值所对应的数据存储在同一个Redis中。
因此,在接收到数据读取指令时,将会对所接收到的数据读取指令所包含的数据标识进行获取,具体地,所接收到的数据读取指令中可以包含有索要读取的数据所对应的key值,进而根据所得到的key值进行数据信息的获取。
子步骤S202、获取所述第一数据库对应的查询列表,以根据所述查询列表以及所述数据标识,在所述第一数据库对应的第一列表中进行查询,其中,所述查询列表存储在区块链节点中。
在一实施例中,第一数据库为系统中的集群Redis,对于集群Redis而言,其所包含的Redis可以对数据信息进行分类存储,根据数据的不同属性特征,将相同属性特征的数据存储在同一个Redis中。也就是不同的数据具有不同的数据标识,通过数据标识可以获取相关联的数据信息。
在得到所接收到的数据读取指令中所包含的数据标识之后,将会根据所得到的数据标识在第一数据库中进行查询,以确定是否存在相对应的数据。具体地,在识别了数据读取指令所对应的数据标识之后,将获取第一数据库所对应的查询列表,进而根据所得到的查询列表以及所识别得到的数据标识,在第一数据库对应的查询列表中进行查询,以确定在第一数据库中是否存在有相对应的目标数据,其中,所述查询列表存储在区块链节点中。
在实际应用中,所获取的数据标识为所需要读取的数据的key值,而在查询列表中记录有不同的key值与数据之间的对应关系,然后根据所得到的key值根据第一数据库所包含的信息进行数据查询。在进行查询时,所对应的查询结果包括第一数据库中包含有所得到的key值以及第一数据库中不包含有所得到的key值。
在第一数据库中包含有所得到的key值时,确定第一数据库中记录存储有用户所需要的目标数据,那么此时将可以根据key值对目标数据的进行读取,进而将所得到的目标数据进行反馈。
而在第一数据库中不包含有所得到的key值时,确定第一数据库中没有记 录和存储有用户所需要的目标数据,也就是此时将不可以直接在第一数据库中根据key值完成数据的读取,此时将需要进行进一步的操作,以实现对目标出具的获取。
步骤S102、若确定所述第一数据库中不包含有所述数据读取指令对应的目标数据,则控制所述第一数据库基于所述数据读取指令访问第二数据库,并控制所述第一数据库将所述目标数据进行同步,其中所述第一数据库和第二数据库均为Redis数据库。
由上述描述可知,在进行数据信息的读取时,在第一数据库中可能并不存在有当前所接收到的数据读取指令所对应的目标数据,那么此时将会进行进一步的操作,以实现对目标数据的获取。
在一实施例中,在确定第一数据库中不包含有所接收到的数据读取指令所对应的目标数据时,说明当前不能在第一数据库中实现目标数据的获取,此时将会控制第一数据库访问第二数据库,并根据所接收到的数据读取指令在第二数据库中实现数据的查询,以将查询得到的目标数据进行反馈。
第二数据库为系统的主从Redis,对于主从Redis而言只存在一个Redis,而并不是集群Redis,在进行数据信息的存储时,是将所述的数据信息存储在一个Redis中,也就是对所存储的数据不会做如第一数据库那般的分类存储,而是将所有的数据记录存储在一起。
由上述描述可知,在根据所得到的数据标识在第一数据库中进行查询时,所得到的查询结果有两种,一种为第一数据库中包含有数据标识对应的目标数据,另一种为第一数据库中不包含有数据标识对应的目标数据。
当进行查询以确定第一数据库中不包含有数据标识对应的数据时,将会对第二数据库进行访问,以读取得到用户想要的数据。
在实际应用中,在根据所得到的key值进行查询,且在第一数据库中没有查找到此key值时,以在主从Redis中进行数据的查询得到对应的数据。而为了实现第一数据库对第二数据库的访问,此时将会切换API(应用程序接口),以实现集群Redis对主从Redis访问和查询。
另外,在进行查询确定第一数据库中包含有数据标识对应的目标数据时,直接将查询所得到的目标数据进行读取以进行相应的反馈,比如直接显示在相应的显示界面上。
进一步地,参照图3,图3为本申请一实施例提供的访问第二数据库的步骤 的流程示意图。其中步骤S102包括子步骤S301至子步骤S303。
子步骤S301、若确定所述查询列表中不包含有所述数据标识,则调用预设的访问接口,以控制所述第一数据库基于所述访问接口访问第二数据库。
在确定查询列表中不包含有所识别得到的数据标识时,确定第一数据库中不存在有所需要查询的数据,此时将调用预先所设置好的访问接口,进而控制第一数据库根据所调用的访问接口对第二数据看进行访问,以实现数据的查询和获取。
在实际应用中,在对服务器进行访问时,通常是利用相关的接口实现对主从Redis或者集群Redis的访问,进而实现数据的获取。也就是在访问第一数据库中,会使用与第一数据库相对应的访问接口(API),实现对第一数据库的访问和数据的查询,而在第一数据库中不存在有当前所需要的数据库时,将会调用可以实现对第二数据库进行访问的访问接口,实现在第二数据库中的数据查询。
子步骤S302、控制所述第一数据库根据所述数据标识在所述第二数据库中进行查询,以得到对应的目标数据;
在实现对第二数据库的访问时,将会在第二数据库中进行数据信息的查询,具体地,将会根据预先所得到的数据标识在第二数据库中进行查询,利用数据标识的匹配查询,得到当前所需要读取的目标数据。
在一实施例中,在对第二数据库进行访问时,也就是在第二数据库中进行数据的查询获取,以得到对应所需要的目标数据。第二数据库类似于为系统的总数据库,存储着系统中所有的数据,但是由于第二数据库的数据量过大,且数据不具有关联性,使得在一般情况下,不会直接在主从Redis中进行数据的查询,而是首先会在集群Redis中进行查询,只有在集群Redis中不包含所想要的数据时才会在主从Redis中进行查找。
而在访问第二数据库时,可以开启一个新的数据读取线程,以使得可以根据所得到的数据标识在第二数据库中对目标数据进行读取,并在读取了数据标识所对应的目标数据之后,将目标数据放入内存队列Queue中。
在第二数据库中进行查询时,说明当前所想要查询的数据在第一数据库中并不存在,为了使得在下一次的查询时可以直接在第一数据库中获取到,而避免再次对第二数据库的访问,因此在进行数据信息的反馈时,还需要将所得到的数据信息同步至第一数据库中,以实现数据信息的无感迁移。
子步骤S303、根据所述数据标识,将所述目标数据记录在所述第一数据库中,并更新所述查询列表。
在访问第二数据库以得到对应的目标数据时,将所得到的目标数据写入并存储在第一数据库中,以供在进行数据读取时,可以在第一数据库中直接获取相应的数据信息。因此,在得到目标数据时,根据目标数据的数据标识将目标数据存储在第一数据库中,同时还将与第一数据库相对应的查询列表进行更新,以便后续的数据查询。
在实际应用中,将所得到目标数据写入存储在第一数据库中是为了方便后续的数据读取,通过保证第一数据库于第二数据库中数据的统一性,避免频繁对第二数据库进行访问,而增加系统的运行负载,由于第一数据库中对数据进行了一定的处理,比如分类处理,通过将数据库进行划分,使得数据查找时有所要的查找时间变短以及进行数据查找带来的运行负载降低。
在将所得到的目标数据写入存储值第一数据库中时,由于目标数据此时放置在内存队列Queue中,此时将会启动一个数据写入线程,以将目标数据写入到第一数据库中。
在将目标数据写入至第一数据库中时,由于目标数据具有相应的数据标识,且第一数据中是根据数据的相关属性对数据进行分类存储,因此此时也会根据数据标识对目标数据进行存储,以实现将目标数据写入在第一数据库中。
在将所得到的目标数据存储在第一数据库中时,根据目标数据的对应的数据标识进行存储,在实际应用中,数据标识可以为数据对应的key值,也就是通过key值将数据写入至集群Redis中的某一个Redis中。
同样地,在所要读取的数据包含有多个数据标识时,会根据不同的数据标识将数据写入在不同的Redis中。比如根据字母顺序进行划分,将以A/a开头的key值所对应的数据写入在同一个python脚本(Redis)中,将以B/b开头的key值所对应的数据写入在同一个python脚本(Redis)中。
进一步地,为了保证第一数据库和第二数据库的数据一致性,在访问第二数据库以获取相应的目标数据时,可以设置一个数据标识的过期时间,具体地,在获取与数据标识相对应的目标数据时,获取对数据标识key设置一个有效时长TTL(Time To Live,生存时间值),然后在将目标数据写入至第一数据库(主从Redis集群)时,也有着相应的TTL,通过有效时长TTL保证数据的有效性。但是在将目标数据从第二数据库中拷贝至第一数据库的过程涉及到从读取出来 到写入过程,因此也存在有时间的消耗,比如这个中间过程消耗为Internal,那么设置到集群中该key的真实有效时长时,可以设置有效时长为TTL+Interval,也就是两个时长的时间之和为最终的有效时长。
步骤S103、当确定数据同步完成时,控制所述第一数据库相应所述数据读取指令,以将所述目标数据进行反馈。
在得到目标数据之后,由于与用户端所关联的数据读取接口连接着第一数据库,因此首先会将所得到的目标数据写入和存储在第一数据库中,然后在目标数据写入第一数据库完成时,再从第一数据库中实现目标数据的获取,以实现对数据读取指令的响应。而在相应数据读取指令时,会根据所识别得到的数据读取指令所对应的数据标识在第一数据库中进行数据的获取,进而在得到目标数据之后进行相应的反馈。
在数据读取过程中,对用户而言所要的反馈便是将所得到数据进行展示,而对于系统而言,将没有存储在第一数据库中的数据从第二数据库中进行同步以记录在第一数据库中也是一种反馈。在系统根据数据读取指令将目标数据进行反馈的同时也就确定系统以完成目标数据在第一数据库中的同步。
在实际应用中,在进行数据信息的读取时,首先是在第一数据库中进行查询,以实现对目标数据的获取,并在第一数库中不包含有相对应的目标数据时,在第二数据库中实现进一步的查询,通过不断对第一数据库进行数据的读取,可以逐渐完善对第二数据库中所包含的数据的迁移,每一次的对第一数据库不包含的数据的读取,便是一次数据迁移,这种方式避免同一时间大量数据同时进行迁移所带来的系统运行负载,在数据读取的同时完成对数据的迁移,可以实现无感数据迁移。
在一实施例中,在整个的数据读取的过程中,也可以理解为是一种数据迁移的过程,不过并不是一次性的对所有的数据信息进行迁移,而是通过一次又一次的数据读取,将不存在与第一数据库中的数据从第二数据库中进行导入,以实现在实际的使用过程中,在并不干扰服务器的实际使用的情况下,实现数据的迁移。
因此,在数据读取过程中,还可以对第二数据库中所获取的数据进行标记,通过标记确定第二数据库中的所有数据是否已经全部迁移完成。在实际应用中,服务器数量的多少,会对收益产生一定的影响,在第一数据库可以完成实际的业务需求时,若此时依旧对第二数据库进行维护,显然会造成不必要的资源浪 费,因此通过数据的读取,不断的实现数据信息的迁移,进而在第一数据库中的数据全部迁移至第二数据库中时,将访问第二数据库的调用接口无效化,也就是将第二数据库下线,以不再使用第二数据库。
具体地,在控制所述第一数据库根据所述数据标识在所述第二数据库对应的第二列表中进行查询匹配,以得到对应的目标数据之后,还包括:在所述第二数据库中对所述目标数据进行迁移标记,并根据所述迁移标记根据所述第二数据库对应的迁移列表;当确定所述迁移列表中所包含的数据标识都标记有迁移标记时,确定所述第二数据库数据迁移完成。
在对第二数据库进行升级时,也就是将第二数据库升级为第一数据库时,需要将第二数据库中所有的数据迁移至第一数据库,因此,在完成一次从第二数据库中的数据读取时,对所读取的数据进行标记,以标注该数据已经完成数据迁移,此时可以在第二数据库中存储有一个迁移列表,在迁移列表中记录有第二数据库所有数据对应数据标记以及对应的迁移状态。
在完成对某一数据的读取和迁移时,将会在迁移列表中对该数据的状态进行更新,比如从未迁移状态更新为已迁移状态,通过迁移列表对所有数据的状态进行监控,以在所有数据数据完成迁移时,说明第二数据库升级完成。
在上述描述的基于Redis的数据读取方法,在接收到数据读取指令时,对数据读取指令所包含的数据标识进行获取,然后根据所得到的数据标识在第一数据库(也就是集群Redis)中进行查询,以确定是否存在对应的数据,而在确定不存在对应的数据时,切换相应的访问接口API以实现对一数据库对第二数据库(即主从Redis)的访问,以根据所得到数据标识在第二数据库中得到目标数据,最后将所得到的目标数据写入存储在第一数据库中,并在写入完成时相应数据读取指令在第一数据库中实现对目标数据的读取和反馈。实现了在数据读取过程中,在保证数据读取的同时无感的完成数据的迁移,同时避免一次性的数据迁移可以更好的降低大量数据迁移带来的运行负载,在不影响系统运行的同时完成数据迁移。
请参阅图4,图4为本申请一个实施例中一种基于Redis的数据读取装置的示意性框图,该装置用于执行前述的基于Redis的数据读取方法。
如图4所示,该基于Redis的数据读取装置400包括:
指令接收模块401,用于接收数据读取指令,并根据所述数据读取指令在第一数据库中进行查询;
数据查询模块402,用于若确定所述第一数据库中不包含有所述数据读取指令对应的目标数据,则控制所述第一数据库基于所述数据读取指令访问第二数据库,并控制所述第一数据库将所述目标数据进行同步,其中所述第一数据库和第二数据库均为Redis数据库;
数据反馈模块403,用于当确定数据同步完成时,控制所述第一数据库响应所述数据读取指令,以将所述目标数据进行反馈。
进一步地,在一个实施例中,所述指令接收模块401具体还用于:
接收数据读取指令,并识别所述数据读取指令所包含的数据标识;
获取所述第一数据库对应的查询列表,以根据所述查询列表以及所述数据标识,在所述第一数据库对应的第一列表中进行查询其中,所述查询列表存储在区块链节点中。
进一步地,在一个实施例中,所述指令接收模块401具体还用于:
根据所述数据标识在所述查询列表中进行查询,确定所述查询列表中是否包含有所述数据标识;
若确定所述查询列表中不包含有所述数据标识,则确定所述第一数据库不包含有所述目标数据;
若确定所述查询列表中包含的有所述数据标识,则确定所述第一数据库中包含有所述目标数据。
进一步地,在一个实施例中,所述数据查询模块402具体还用于:
若确定所述查询列表中不包含有所述数据标识,则调用预设的访问接口,以控制所述第一数据库基于所述访问接口访问第二数据库;
控制所述第一数据库根据所述数据标识在所述第二数据库对应的第二列表中进行查询匹配,以得到对应的目标数据;
根据所述数据标识,将所述目标数据记录在所述第一数据库中,并更新所述查询列表。
进一步地,在一个实施例中,所述基于Redis的数据读取装置400具体还用于:
当确定所述第一数据库中不包含有所述目标数据时,调用一个数据读取线程以及数据写入线程;
控制所述第一数据库基于所述数据读取线程访问所述第二数据库,以在所述第二数据库中获取对应的目标数据;
控制所述第一数据库基于所述数据写入线程,将所述目标数据写入至所述第一数据库中。
进一步地,在一个实施例中,所述基于Redis的数据读取装置600具体还包括状态更新模块,其中状态更新模块用于:
在所述第二数据库中对所述目标数据进行迁移标记,并根据所述迁移标记根据所述第二数据库对应的迁移列表;
当确定所述迁移列表中所包含的数据标识都标记有迁移标记时,确定所述第二数据库数据迁移完成。
进一步地,在一个实施例中,所述响数据反馈模块403具体还用于:
当确定所述第一数据库中包含有对应的目标数据时,响应所述数据读取指令,并将所述目标数据进行反馈。
需要说明的是,所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的装置和各模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
上述的装置可以实现为一种计算机程序的形式,该计算机程序可以在如图5所示的计算机设备上运行。
请参阅图5,图5为本申请一个实施例中计算机设备的结构示意性框图。该计算机设备可以是服务器。
参阅图5,该计算机设备包括通过系统总线连接的处理器、存储器和网络接口,其中,存储器可以包括非易失性存储介质和内存储器。
非易失性存储介质可存储操作系统和计算机程序。该计算机程序包括程序指令,该程序指令被执行时,可使得处理器执行任意一种基于Redis的数据读取方法。
处理器用于提供计算和控制能力,支撑整个计算机设备的运行。
内存储器为非易失性存储介质中的计算机程序的运行提供环境,该计算机程序被处理器执行时,可使得处理器执行任意一种基于Redis的数据读取方法。
该网络接口用于进行网络通信,如发送分配的任务等。本领域技术人员可以理解,图5中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
应当理解的是,处理器可以是中央处理单元(Central Processing Unit,CPU),该处理器还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。其中,通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
其中,在一个实施例中,所述处理器用于运行存储在存储器中的计算机程序,以实现如下步骤:
接收数据读取指令,并根据所述数据读取指令在第一数据库中进行查询;
若确定所述第一数据库中不包含有所述数据读取指令对应的目标数据,则控制所述第一数据库基于所述数据读取指令访问第二数据库,并控制所述第一数据库将所述目标数据进行同步,其中所述第一数据库和第二数据库均为Redis数据库;
当确定数据同步完成时,控制所述第一数据库响应所述数据读取指令,以将所述目标数据进行反馈。
在一个实施例中,所述处理器在实现所述接收数据读取指令,并根据所述数据读取指令在第一数据库中进行查询时,还用于实现:
接收数据读取指令,并识别所述数据读取指令所包含的数据标识;
获取所述第一数据库对应的查询列表,以根据所述查询列表以及所述数据标识,在所述第一数据库对应的第一列表中进行查询,其中,所述查询列表存储在区块链节点中。
在一个实施例中,所述处理器在实现所述接收数据读取指令,并根据所述数据读取指令在第一数据库中进行查询之后,还用于实现:
根据所述数据标识在所述查询列表中进行查询,确定所述查询列表中是否包含有所述数据标识;
若确定所述查询列表中不包含有所述数据标识,则确定所述第一数据库不包含有所述目标数据;
若确定所述查询列表中包含的有所述数据标识,则确定所述第一数据库中包含有所述目标数据。
在一个实施例中,所述处理器在实现所述若确定所述第一数据库中不包含有所述数据读取指令对应的目标数据,则控制所述第一数据库基于所述数据读 取指令访问第二数据库,并控制所述第一数据库将所述目标数据进行同步时,还用于实现:
若确定所述查询列表中不包含有所述数据标识,则调用预设的访问接口,以控制所述第一数据库基于所述访问接口访问第二数据库;
控制所述第一数据库根据所述数据标识在所述第二数据库对应的第二列表中进行查询匹配,以得到对应的目标数据;
根据所述数据标识,将所述目标数据记录在所述第一数据库中,并更新所述查询列表。
在一个实施例中,所述处理器在实现所述若确定所述第一数据库中不包含有所述数据读取指令对应的目标数据,则控制所述第一数据库基于所述数据读取指令访问第二数据库,并控制所述第一数据库将所述目标数据进行同步时,还用于实现:
当确定所述第一数据库中不包含有所述目标数据时,调用一个数据读取线程以及数据写入线程;
控制所述第一数据库基于所述数据读取线程访问所述第二数据库,以在所述第二数据库中获取对应的目标数据;
控制所述第一数据库基于所述数据写入线程,将所述目标数据写入至所述第一数据库中。
在一个实施例中,所述处理器在实现所述在控制所述第一数据库根据所述数据标识在所述第二数据库对应的第二列表中进行查询匹配,以得到对应的目标数据之后,还用于实现:
在所述第二数据库中对所述目标数据进行迁移标记,并根据所述迁移标记根据所述第二数据库对应的迁移列表;
当确定所述迁移列表中所包含的数据标识都标记有迁移标记时,确定所述第二数据库数据迁移完成。
在一个实施例中,所述处理器在实现所述根据所述数据读取指令,在第一数据库中进行查询之后,还用于实现:
当确定所述第一数据库中包含有对应的目标数据时,响应所述数据读取指令,并将所述目标数据进行反馈。
本申请的实施例中还提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序中包括程序指令,所述处理器执行所 述程序指令,实现本申请实施例提供的任一项基于Redis的数据读取方法。
其中,所述计算机可读存储介质可以是前述实施例所述的计算机设备的内部存储单元,例如所述计算机设备的硬盘或内存。所述计算机可读存储介质也可以是所述计算机设备的外部存储设备,例如所述计算机设备上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。
进一步地,所述计算机可读存储介质可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序等;存储数据区可存储根据区块链节点的使用所创建的数据等。
另外,本申请所指区块链是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式。区块链(Blockchain),本质上是一个去中心化的数据库,是一串使用密码学方法相关联产生的数据块,每一个数据块中包含了一批次网络交易的信息,用于验证其信息的有效性(防伪)和生成下一个区块。区块链可以包括区块链底层平台、平台产品服务层以及应用服务层等。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。

Claims (20)

  1. 一种基于Redis的数据读取方法,其中,所述方法包括:
    接收数据读取指令,并根据所述数据读取指令在第一数据库中进行查询;
    若确定所述第一数据库中不包含有所述数据读取指令对应的目标数据,则控制所述第一数据库基于所述数据读取指令访问第二数据库,并控制所述第一数据库将所述目标数据进行同步,其中所述第一数据库和第二数据库均为Redis数据库;
    当确定数据同步完成时,控制所述第一数据库响应所述数据读取指令,以将所述目标数据进行反馈。
  2. 根据权利要求1所述的方法,其中,所述接收数据读取指令,并根据所述数据读取指令在第一数据库中进行查询,包括:
    接收数据读取指令,并识别所述数据读取指令所包含的数据标识;
    获取所述第一数据库对应的查询列表,以根据所述查询列表以及所述数据标识,在所述第一数据库对应的第一列表中进行查询,其中,所述查询列表存储在区块链节点中。
  3. 根据权利要求2所述的方法,其中,所述接收数据读取指令,并根据所述数据读取指令在第一数据库中进行查询之后,还包括:
    根据所述数据标识在所述查询列表中进行查询,确定所述查询列表中是否包含有所述数据标识;
    若确定所述查询列表中不包含有所述数据标识,则确定所述第一数据库不包含有所述目标数据;
    若确定所述查询列表中包含的有所述数据标识,则确定所述第一数据库中包含有所述目标数据。
  4. 根据权利要求2所述的方法,其中,所述若确定所述第一数据库中不包含有所述数据读取指令对应的目标数据,则控制所述第一数据库基于所述数据读取指令访问第二数据库,并控制所述第一数据库将所述目标数据进行同步时,包括:
    若确定所述查询列表中不包含有所述数据标识,则调用预设的访问接口,以控制所述第一数据库基于所述访问接口访问第二数据库;
    控制所述第一数据库根据所述数据标识在所述第二数据库对应的第二列表 中进行查询匹配,以得到对应的目标数据;
    根据所述数据标识,将所述目标数据记录在所述第一数据库中,并更新所述查询列表。
  5. 根据权利要求4所述的方法,其中,所述若确定所述第一数据库中不包含有所述数据读取指令对应的目标数据,则控制所述第一数据库基于所述数据读取指令访问第二数据库,并控制所述第一数据库将所述目标数据进行同步时,还包括:
    当确定所述第一数据库中不包含有所述目标数据时,调用一个数据读取线程以及数据写入线程;
    控制所述第一数据库基于所述数据读取线程访问所述第二数据库,以在所述第二数据库中获取对应的目标数据;
    控制所述第一数据库基于所述数据写入线程,将所述目标数据写入至所述第一数据库中。
  6. 根据权利要求1所述的方法,其中,所述在控制所述第一数据库根据所述数据标识在所述第二数据库对应的第二列表中进行查询匹配,以得到对应的目标数据之后,还包括:
    在所述第二数据库中对所述目标数据进行迁移标记,并根据所述迁移标记根据所述第二数据库对应的迁移列表;
    当确定所述迁移列表中所包含的数据标识都标记有迁移标记时,确定所述第二数据库数据迁移完成。
  7. 根据权利要求1至6中任一项所述的方法,其中,所述根据所述数据读取指令,在第一数据库中进行查询之后,还包括:
    当确定所述第一数据库中包含有对应的目标数据时,响应所述数据读取指令,并将所述目标数据进行反馈。
  8. 一种基于Redis的数据读取装置,其中,所述装置包括:
    指令接收模块,用于接收数据读取指令,并根据所述数据读取指令在第一数据库中进行查询;
    数据查询模块,用于若确定所述第一数据库中不包含有所述数据读取指令对应的目标数据,则控制所述第一数据库基于所述数据读取指令访问第二数据库,并控制所述第一数据库将所述目标数据进行同步,其中所述第一数据库和第二数据库均为Redis数据库;
    数据反馈模块,用于当确定数据同步完成时,控制所述第一数据库响应所述数据读取指令,以将所述目标数据进行反馈。
  9. 一种计算机设备,其中,包括存储器和处理器:
    所述存储器中存储有计算机可读指令,所述计算机可读指令被所述处理器执行如下步骤:
    接收数据读取指令,并根据所述数据读取指令在第一数据库中进行查询;
    若确定所述第一数据库中不包含有所述数据读取指令对应的目标数据,则控制所述第一数据库基于所述数据读取指令访问第二数据库,并控制所述第一数据库将所述目标数据进行同步,其中所述第一数据库和第二数据库均为Redis数据库;
    当确定数据同步完成时,控制所述第一数据库响应所述数据读取指令,以将所述目标数据进行反馈。
  10. 根据权利要求9所述的计算机设备,其中,所述接收数据读取指令,并根据所述数据读取指令在第一数据库中进行查询,包括:
    接收数据读取指令,并识别所述数据读取指令所包含的数据标识;
    获取所述第一数据库对应的查询列表,以根据所述查询列表以及所述数据标识,在所述第一数据库对应的第一列表中进行查询,其中,所述查询列表存储在区块链节点中。
  11. 根据权利要求10所述的计算机设备,其中,所述接收数据读取指令,并根据所述数据读取指令在第一数据库中进行查询之后,还包括:
    根据所述数据标识在所述查询列表中进行查询,确定所述查询列表中是否包含有所述数据标识;
    若确定所述查询列表中不包含有所述数据标识,则确定所述第一数据库不包含有所述目标数据;
    若确定所述查询列表中包含的有所述数据标识,则确定所述第一数据库中包含有所述目标数据。
  12. 根据权利要求10所述的计算机设备,其中,所述若确定所述第一数据库中不包含有所述数据读取指令对应的目标数据,则控制所述第一数据库基于所述数据读取指令访问第二数据库,并控制所述第一数据库将所述目标数据进行同步时,包括:
    若确定所述查询列表中不包含有所述数据标识,则调用预设的访问接口, 以控制所述第一数据库基于所述访问接口访问第二数据库;
    控制所述第一数据库根据所述数据标识在所述第二数据库对应的第二列表中进行查询匹配,以得到对应的目标数据;
    根据所述数据标识,将所述目标数据记录在所述第一数据库中,并更新所述查询列表。
  13. 根据权利要求12所述的计算机设备,其中,所述若确定所述第一数据库中不包含有所述数据读取指令对应的目标数据,则控制所述第一数据库基于所述数据读取指令访问第二数据库,并控制所述第一数据库将所述目标数据进行同步时,还包括:
    当确定所述第一数据库中不包含有所述目标数据时,调用一个数据读取线程以及数据写入线程;
    控制所述第一数据库基于所述数据读取线程访问所述第二数据库,以在所述第二数据库中获取对应的目标数据;
    控制所述第一数据库基于所述数据写入线程,将所述目标数据写入至所述第一数据库中。
  14. 根据权利要求9所述的计算机设备,其中,所述在控制所述第一数据库根据所述数据标识在所述第二数据库对应的第二列表中进行查询匹配,以得到对应的目标数据之后,还包括:
    在所述第二数据库中对所述目标数据进行迁移标记,并根据所述迁移标记根据所述第二数据库对应的迁移列表;
    当确定所述迁移列表中所包含的数据标识都标记有迁移标记时,确定所述第二数据库数据迁移完成。
  15. 根据权利要求9至14中任一项所述的计算机设备,其中,所述根据所述数据读取指令,在第一数据库中进行查询之后,还包括:
    当确定所述第一数据库中包含有对应的目标数据时,响应所述数据读取指令,并将所述目标数据进行反馈。
  16. 一种计算机可读存储介质,其中,所述计算机可读存储介质存储有计算机程序,所述计算机可读指令被所述处理器执行时实现如下步骤:
    接收数据读取指令,并根据所述数据读取指令在第一数据库中进行查询;
    若确定所述第一数据库中不包含有所述数据读取指令对应的目标数据,则控制所述第一数据库基于所述数据读取指令访问第二数据库,并控制所述第一 数据库将所述目标数据进行同步,其中所述第一数据库和第二数据库均为Redis数据库;
    当确定数据同步完成时,控制所述第一数据库响应所述数据读取指令,以将所述目标数据进行反馈。
  17. 根据权利要求16所述的计算机可读存储介质,其中,所述接收数据读取指令,并根据所述数据读取指令在第一数据库中进行查询,包括:
    接收数据读取指令,并识别所述数据读取指令所包含的数据标识;
    获取所述第一数据库对应的查询列表,以根据所述查询列表以及所述数据标识,在所述第一数据库对应的第一列表中进行查询,其中,所述查询列表存储在区块链节点中。
  18. 根据权利要求17所述的计算机可读存储介质,其中,所述接收数据读取指令,并根据所述数据读取指令在第一数据库中进行查询之后,还包括:
    根据所述数据标识在所述查询列表中进行查询,确定所述查询列表中是否包含有所述数据标识;
    若确定所述查询列表中不包含有所述数据标识,则确定所述第一数据库不包含有所述目标数据;
    若确定所述查询列表中包含的有所述数据标识,则确定所述第一数据库中包含有所述目标数据。
  19. 根据权利要求17所述的计算机可读存储介质,其中,所述若确定所述第一数据库中不包含有所述数据读取指令对应的目标数据,则控制所述第一数据库基于所述数据读取指令访问第二数据库,并控制所述第一数据库将所述目标数据进行同步时,包括:
    若确定所述查询列表中不包含有所述数据标识,则调用预设的访问接口,以控制所述第一数据库基于所述访问接口访问第二数据库;
    控制所述第一数据库根据所述数据标识在所述第二数据库对应的第二列表中进行查询匹配,以得到对应的目标数据;
    根据所述数据标识,将所述目标数据记录在所述第一数据库中,并更新所述查询列表。
  20. 根据权利要求19所述的计算机可读存储介质,其中,所述若确定所述第一数据库中不包含有所述数据读取指令对应的目标数据,则控制所述第一数据库基于所述数据读取指令访问第二数据库,并控制所述第一数据库将所述目 标数据进行同步时,还包括:
    当确定所述第一数据库中不包含有所述目标数据时,调用一个数据读取线程以及数据写入线程;
    控制所述第一数据库基于所述数据读取线程访问所述第二数据库,以在所述第二数据库中获取对应的目标数据;
    控制所述第一数据库基于所述数据写入线程,将所述目标数据写入至所述第一数据库中。
PCT/CN2021/090761 2020-11-06 2021-04-28 基于Redis的数据读取方法、装置、设备及可读存储介质 Ceased WO2022095366A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011232436.5A CN112306993B (zh) 2020-11-06 2020-11-06 基于Redis的数据读取方法、装置、设备及可读存储介质
CN202011232436.5 2020-11-06

Publications (1)

Publication Number Publication Date
WO2022095366A1 true WO2022095366A1 (zh) 2022-05-12

Family

ID=74325237

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/090761 Ceased WO2022095366A1 (zh) 2020-11-06 2021-04-28 基于Redis的数据读取方法、装置、设备及可读存储介质

Country Status (2)

Country Link
CN (1) CN112306993B (zh)
WO (1) WO2022095366A1 (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115544094A (zh) * 2022-10-26 2022-12-30 中国银行股份有限公司 一种数据存储调用方法和装置
CN115617549A (zh) * 2022-11-08 2023-01-17 联仁健康医疗大数据科技股份有限公司 线程解耦方法、装置、电子设备及存储介质
CN117271597A (zh) * 2022-06-14 2023-12-22 顺丰科技有限公司 基于redis的性能调整方法、装置、电子设备和介质
CN117453815A (zh) * 2023-10-16 2024-01-26 深圳市麦谷科技有限公司 轻量级多目标异构数据库的同步方法、终端及存储介质

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112306993B (zh) * 2020-11-06 2024-06-14 平安科技(深圳)有限公司 基于Redis的数据读取方法、装置、设备及可读存储介质
CN114428791A (zh) * 2022-01-14 2022-05-03 浙江吉利控股集团有限公司 一种订单数据查询方法及装置
CN114489907B (zh) * 2022-01-29 2024-03-12 国泰新点软件股份有限公司 系统操作引导方法、设备及存储介质
CN114579513B (zh) * 2022-03-21 2025-02-28 上海爱数信息技术股份有限公司 文件存储系统的在线切换系统、方法、设备及存储介质
CN114598711B (zh) * 2022-03-29 2024-04-16 百果园技术(新加坡)有限公司 一种数据迁移方法、装置、设备及介质
CN115052040B (zh) * 2022-04-26 2024-04-19 浪潮通信技术有限公司 Feed流实现方法、系统、电子设备和存储介质
CN116383291B (zh) * 2023-03-28 2025-12-16 平安科技(深圳)有限公司 基于Redis的数据处理方法、数据分发系统及电子设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150331857A1 (en) * 2014-05-15 2015-11-19 Microsoft Corporation Database migration
CN106855871A (zh) * 2015-12-09 2017-06-16 阿里巴巴集团控股有限公司 一种数据迁移的方法和装置
US10657154B1 (en) * 2017-08-01 2020-05-19 Amazon Technologies, Inc. Providing access to data within a migrating data partition
CN111405019A (zh) * 2020-03-10 2020-07-10 腾讯科技(深圳)有限公司 数据处理方法、装置、计算机设备和存储介质
CN112306993A (zh) * 2020-11-06 2021-02-02 平安科技(深圳)有限公司 基于Redis的数据读取方法、装置、设备及可读存储介质

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110909025A (zh) * 2018-09-17 2020-03-24 深圳市优必选科技有限公司 数据库的查询方法、查询装置及终端
CN110096552A (zh) * 2019-05-07 2019-08-06 广州虎牙信息科技有限公司 一种业务数据的读、写方法、装置、设备和存储介质
CN110750539A (zh) * 2019-10-16 2020-02-04 杭州安恒信息技术股份有限公司 基于Redis数据库的信息查询方法、装置及电子设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150331857A1 (en) * 2014-05-15 2015-11-19 Microsoft Corporation Database migration
CN106855871A (zh) * 2015-12-09 2017-06-16 阿里巴巴集团控股有限公司 一种数据迁移的方法和装置
US10657154B1 (en) * 2017-08-01 2020-05-19 Amazon Technologies, Inc. Providing access to data within a migrating data partition
CN111405019A (zh) * 2020-03-10 2020-07-10 腾讯科技(深圳)有限公司 数据处理方法、装置、计算机设备和存储介质
CN112306993A (zh) * 2020-11-06 2021-02-02 平安科技(深圳)有限公司 基于Redis的数据读取方法、装置、设备及可读存储介质

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117271597A (zh) * 2022-06-14 2023-12-22 顺丰科技有限公司 基于redis的性能调整方法、装置、电子设备和介质
CN115544094A (zh) * 2022-10-26 2022-12-30 中国银行股份有限公司 一种数据存储调用方法和装置
CN115617549A (zh) * 2022-11-08 2023-01-17 联仁健康医疗大数据科技股份有限公司 线程解耦方法、装置、电子设备及存储介质
CN117453815A (zh) * 2023-10-16 2024-01-26 深圳市麦谷科技有限公司 轻量级多目标异构数据库的同步方法、终端及存储介质

Also Published As

Publication number Publication date
CN112306993B (zh) 2024-06-14
CN112306993A (zh) 2021-02-02

Similar Documents

Publication Publication Date Title
WO2022095366A1 (zh) 基于Redis的数据读取方法、装置、设备及可读存储介质
CN110799960B (zh) 数据库租户迁移的系统和方法
CN113468232B (zh) 用于查询时间序列数据的可扩展数据库系统
US9135033B1 (en) Virtual machine storage
US12524373B2 (en) Storing a point in time coherently for a distributed storage system
US20200265017A1 (en) Synchronization of client machines with a content management system repository
EP3688598B1 (en) Method for reading data stored in a non-volatile cache using rdma
CN110096302B (zh) 软件数据储存、升级方法、装置、设备和存储介质
JPWO2011108695A1 (ja) 並列データ処理システム、並列データ処理方法及びプログラム
CN116467275A (zh) 共享远程存储方法、装置、系统、电子设备及存储介质
CN112334891B (zh) 用于搜索服务器的集中式存储
CN119045740A (zh) 一种数据异构存储方法、数据读取方法、装置及电子设备
US11132141B2 (en) System and method for synchronization of data containers
CN118051921A (zh) 本地多租户行表加密
CN108595488B (zh) 数据迁移方法和装置
US11451627B2 (en) System and method for content management with intelligent data store access across distributed stores
CN110096386B (zh) 用于在大数据环境中高效数据复制的方法和系统
CN115576597A (zh) 一种基于版本号关联动态配置的版本控制方法及系统
CN119884058B (zh) 针对高性能计算场景的多域元数据管理方法
US20250117385A1 (en) Database system for querying time-series data stored in a tiered storage using a cloud platform
CN114722020A (zh) 信息获取方法、设备、介质、产品及系统
CN119537481A (zh) 数据库同步方法、装置、设备、介质和程序产品
CN120528779A (zh) 一种nas缓存启用管理方法以及相关设备

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

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

Country of ref document: EP

Kind code of ref document: A1