Data access method and device, electronic equipment and computer storage medium

By prioritizing data retrieval in the relational sub-database when a data access request is received, the database pressure caused by access from multiple business systems is resolved, and data access efficiency is improved.

CN116028539BActive Publication Date: 2026-07-03CHINA CONSTRUCTION BANK +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA CONSTRUCTION BANK
Filing Date
2023-01-04
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

In existing data access methods, when multiple business systems access a large amount of business data, it leads to excessive database access pressure and reduces query efficiency.

Method used

When a data access request is received, the system first queries the target relational sub-database for data. If the data is not found, it queries the relational master database and sends the data. Prioritizing the use of the relational sub-database for data access helps alleviate the pressure on the master database.

Benefits of technology

By prioritizing data queries in relational sub-databases, the access pressure on the main database is alleviated, and the data access efficiency of the business system is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116028539B_ABST
    Figure CN116028539B_ABST
Patent Text Reader

Abstract

This application discloses a data access method, apparatus, electronic device, and computer storage medium. Upon receiving a data access request from a target business server, the method responds by querying a target relational sub-database for data corresponding to the data access request. If the data corresponding to the data access request is found in the target relational sub-database, the retrieved data is sent to the target business server. If the data corresponding to the data access request is not found in the target relational sub-database, the method queries a relational master database for the data access request and sends the retrieved data to the target business server. Thus, by prioritizing data access in the target relational sub-database based on the data access request, the access pressure on the relational master database can be alleviated, thereby improving the efficiency of data access in the business system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of data processing, and in particular relates to a data access method, apparatus, electronic device, and computer storage medium. Background Technology

[0002] With the development of an information-based and networked society, the demand for centralized development, sharing, and service of data resources is becoming increasingly common. Data of various levels and types is becoming increasingly redundant, and a large amount of business data needs to be retrieved. Current data access methods involve business systems accessing data through a single database. When multiple business systems access large amounts of business data, this can lead to excessive database access pressure, thereby reducing database query efficiency. Summary of the Invention

[0003] This application provides a data access method, apparatus, electronic device, and computer storage medium, which can improve the efficiency of data access in business systems.

[0004] In a first aspect, embodiments of this application provide a data access method applied to a data server, the method including:

[0005] Received a data access request from the target business server;

[0006] In response to a data access request, the system queries the target relational sub-database of the data server for the data corresponding to the data access request. The data server also includes a relational master database, which is used to provide data access services to multiple business servers. The target relational sub-database includes at least a portion of the data in the relational master database that is associated with the target business server.

[0007] If data corresponding to the data access request is found in the target relational sub-database, the retrieved data will be sent to the target business server.

[0008] If no data corresponding to the data access request is found in the target relational sub-database, the corresponding data is queried in the relational master database, and the retrieved data is sent to the target business server.

[0009] Secondly, embodiments of this application provide a data access method applied to a target business server, which may include:

[0010] Send a data access request to the data server so that the data server responds to the data access request by querying the data corresponding to the data access request in the target relational sub-database of the data server, and if the data corresponding to the data access request is found in the target relational sub-database, sending the queried data to the target business server; if the data corresponding to the data access request is not found in the target relational sub-database, querying the data corresponding to the data access request in the relational main database, and sending the queried data to the target business server.

[0011] The data server also includes a relational master database, which provides data access services to multiple business servers, and the target relational sub-database includes at least a portion of the data in the relational master database that is associated with the target business server.

[0012] Thirdly, this embodiment provides a data access device applied to a data server, which may include:

[0013] The receiving module is used to receive data access requests sent by the target business server;

[0014] The first query module is used to respond to a data access request by querying the data corresponding to the data access request in the target relational sub-database of the data server. The data server also includes a relational master database, which is used to provide data access services to multiple business servers. The target relational sub-database includes at least a portion of the data in the relational master database that is associated with the target business server.

[0015] The sending module is used to send the queried data to the target business server when the data corresponding to the data access request is found in the target relational sub-database;

[0016] The second query module is used to query the data corresponding to the data access request in the relational main database when the data corresponding to the data access request is not found in the target relational sub-database, and then send the queried data to the target business server.

[0017] Fourthly, this embodiment provides a data access device applied to a target business server, which may include:

[0018] The access request sending module is used to send a data access request to the data server, so that the data server responds to the data access request by querying the data corresponding to the data access request in the target relational sub-database of the data server, and if the data corresponding to the data access request is found in the target relational sub-database, sending the queried data to the target business server; if the data corresponding to the data access request is not found in the target relational sub-database, querying the data corresponding to the data access request in the relational main database, and sending the queried data to the target business server.

[0019] The data server also includes a relational master database, which provides data access services to multiple business servers, and the target relational sub-database includes at least a portion of the data in the relational master database that is associated with the target business server.

[0020] Fifthly, embodiments of this application provide an electronic device, the device comprising:

[0021] processor;

[0022] Memory used to store processor-executable instructions;

[0023] The processor is configured to execute instructions to implement the data access method as shown in any embodiment of the first aspect.

[0024] In a sixth aspect, embodiments of this application provide a computer storage medium on which a computer program is stored, which, when executed by a processor, implements the data access method as shown in any embodiment of the first aspect.

[0025] In a seventh aspect, embodiments of this application also provide a computer program product comprising a computer program stored in a readable storage medium, wherein at least one processor of the device reads from the storage medium and executes the computer program, causing the device to perform the data access method shown in any embodiment of the first aspect.

[0026] This application provides a data access method, apparatus, electronic device, and computer storage medium. Compared with the prior art, this application has the following advantages:

[0027] This application discloses a data access method, apparatus, electronic device, and computer storage medium. Upon receiving a data access request from a target business server, the method responds by querying a target relational sub-database for data corresponding to the data access request. If the data corresponding to the data access request is found in the target relational sub-database, the queried data is sent to the target business server. If the data corresponding to the data access request is not found in the target relational sub-database, the method queries a relational main database for the data corresponding to the data access request and sends the queried data to the target business server.

[0028] In this way, by prioritizing data access in the target relational sub-database based on data access requests, and only accessing the main relational database when the required data is not found in the target relational sub-database, the access pressure on the main relational database can be alleviated, thereby improving the efficiency of data access in the business system. Attached Figure Description

[0029] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0030] Figure 1 This is a schematic diagram of the architecture of a data access system provided in an embodiment of this application;

[0031] Figure 2 This is a flowchart illustrating a data access method provided in an embodiment of this application;

[0032] Figure 3 This is a flowchart illustrating another data access method provided in an embodiment of this application;

[0033] Figure 4 This is a flowchart illustrating another data access method provided in an embodiment of this application;

[0034] Figure 5 This is a flowchart illustrating another data access method provided in an embodiment of this application;

[0035] Figure 6 This is a flowchart illustrating another data access method provided in an embodiment of this application;

[0036] Figure 7 This is a schematic diagram of the structure of a data access device provided in an embodiment of this application;

[0037] Figure 8 This is a schematic diagram of another data access device provided in an embodiment of this application;

[0038] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0039] The features and exemplary embodiments of various aspects of this application will be described in detail below. To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain this application and not to limit it. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples.

[0040] It should be noted that the acquisition, storage, use, and processing of data in the technical solution of this application all comply with the relevant provisions of national laws and regulations.

[0041] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that includes elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.

[0042] As can be seen from the background section, in existing related technologies, business systems access data through a single database. When multiple business systems access a large amount of business data, it can lead to excessive access pressure on the database, thereby reducing the database's query efficiency.

[0043] To address the problems existing in the prior art, embodiments of this application provide a data access method, apparatus, electronic device, and computer storage medium. Upon receiving a data access request from a target business server, the method responds by querying a target relational sub-database for data corresponding to the data access request. If the data corresponding to the data access request is found in the target relational sub-database, the queried data is sent to the target business server. If the data corresponding to the data access request is not found in the target relational sub-database, the method queries a relational master database for the data corresponding to the data access request and sends the queried data to the target business server.

[0044] In this way, by prioritizing data access in the target relational sub-database based on data access requests, and only accessing the main relational database when the required data is not found in the target relational sub-database, the access pressure on the main relational database can be alleviated, thereby improving the efficiency of data access in the business system.

[0045] Specifically, the data access method provided in the embodiments of this application can be based on Figure 1 The data access system shown is implemented.

[0046] like Figure 1 As shown, the data access system 100 includes:

[0047] Data server 110;

[0048] And, business server 120.

[0049] The data server 110 can be composed of one or more sub-servers, capable of establishing data transmission channels with multiple business servers 120 via a network. The data server 110 performs the following operations: receiving a data access request from a target business server; responding to the data access request, querying the target relational sub-database of the data server for data corresponding to the data access request; the data server also includes a relational master database, which provides data access services to multiple business servers, and the target relational sub-database includes at least a portion of the data in the relational master database associated with the target business server; if data corresponding to the data access request is found in the target relational sub-database, sending the queried data to the target business server; if data corresponding to the data access request is not found in the target relational sub-database, querying the relational master database for data corresponding to the data access request, and sending the queried data to the target business server.

[0050] There can be one or more business servers 120. In one example, multiple business servers 120 can be servers corresponding to different business types. The business servers 120 are used to send data access requests to the data server and receive data queried by the data server according to the data access requests.

[0051] Based on the above data access system, the data access method provided in the embodiments of this application will be described below. For example... Figure 2 As shown, the data access method provided in this application includes the following steps:

[0052] S201: The target service server sends a data access request to the data server;

[0053] S202: In response to a data access request, the data server queries the target relational sub-database of the data server for data corresponding to the data access request. The data server also includes a relational master database, which is used to provide data access services to multiple business servers. The target relational sub-database includes at least a portion of the data in the relational master database that is associated with the target business server.

[0054] S203: If the data server finds the data corresponding to the data access request in the target relational sub-database, it will send the retrieved data to the target business server.

[0055] S204: If no data corresponding to the data access request is found in the target relational sub-database, the data server queries the relational master database for the data corresponding to the data access request and sends the queried data to the target business server.

[0056] The above describes a data access method provided in this application embodiment. Upon receiving a data access request from a target business server, the method responds by querying the target relational sub-database for data corresponding to the data access request. If the data corresponding to the data access request is found in the target relational sub-database, the queried data is sent to the target business server. If the data corresponding to the data access request is not found in the target relational sub-database, the method queries the relational main database for data corresponding to the data access request and sends the queried data to the target business server.

[0057] In this way, by prioritizing data access in the target relational sub-database based on data access requests, and only accessing the main relational database when the required data is not found in the target relational sub-database, the access pressure on the main relational database can be alleviated, thereby improving the efficiency of data access in the business system.

[0058] In S201, the target business server sends a data access request to the data server. In one example, the data access request may include fields related to business information.

[0059] In S202, in response to a data access request, data corresponding to the data access request is queried in the target relational sub-database of the data server. The data server also includes a relational master database, which is used to provide data access services to multiple business servers. The target relational sub-database includes at least a portion of the data in the relational master database that is associated with the target business server.

[0060] In one example, a data server may consist of a relational master database and at least one relational sub-database. The relational sub-database is a slave database to the relational master database and may include a portion of the data in the relational master database that is associated with the target business server. This portion of data may be frequently accessed and / or have a large volume. Different business servers can access the relational master database, but the target relational sub-database is accessed by the target business server to which it is associated.

[0061] MySQL is a relational database management system (RDBMS) and one of the most popular. Relational databases store data in different tables, rather than storing all data in one large repository, thus increasing speed and flexibility. The SQL language used by MySQL is the most commonly used standardized language for accessing databases. MySQL software employs a dual-licensing policy, offering both a community edition and a commercial edition. Due to its small size, high speed, low total cost of ownership, and especially its open-source nature, MySQL is generally chosen as the database for small to large websites. In a specific implementation, the data server consists of a MySQL master database and MySQL slave databases.

[0062] In one example, before querying the target relational sub-database of the data server for data access requests, it is first necessary to collect the tables to be used to build the relational sub-database. These tables need to meet the conditions of being frequently retrieved and / or having a large amount of data. Then, corresponding views are built for these tables, and the data used for retrieval from these tables is stored in the relational sub-database.

[0063] In S203, if data corresponding to the data access request is found in the target relational sub-database, the retrieved data is sent to the target business server. In one example, after the target business server sends a data query request to the data server, it first performs a query in the target relational sub-database corresponding to the target business server.

[0064] In S204, if the data corresponding to the data access request is not found in the target relational sub-database, the corresponding data is queried in the relational master database and then sent to the target business server. In one example, when the data server does not find the data corresponding to the data access request in the target relational sub-database corresponding to the target business server, the data server retrieves the corresponding data from the relational master database.

[0065] In one example, data can also be cached in a Redis database, and updated via scheduled tasks. Enterprise-grade search application servers like Solr and Elasticsearch can also be used for data collection and retrieval.

[0066] To further reduce and alleviate the access pressure on the relational master database and improve the efficiency of data access in business systems, such as Figure 3 As shown, the database server also includes a target non-relational database, which is associated with a target relational sub-database, and the target non-relational database includes at least a portion of the data in the target relational sub-database; the method further includes the following steps:

[0067] S301: Obtain the data access volume of the target relational sub-database;

[0068] S302: If the data access volume is greater than or equal to the preset access volume, in response to the data access request, query the data corresponding to the data access request in the target non-relational database;

[0069] Accordingly, S203 may include:

[0070] S303: If the data access volume is less than the preset access volume, in response to the data access request, query the data corresponding to the data access request in the target relational sub-database of the data server.

[0071] By obtaining the data access volume of the target relational sub-database, the system selects to query the data corresponding to the data access request in either the target non-relational database or the target relational sub-database based on the data access volume.

[0072] In S301, the data access volume of the target relational sub-database is obtained. In one example, the data access volume at this time can be determined by the response speed of the target relational sub-database.

[0073] In S302, if the data access volume is greater than or equal to a preset access volume, in response to the data access request, the system queries the target non-relational database for the data corresponding to the data access request. The preset access volume can be set according to actual needs. In one example, when the data access volume is greater than N, the system queries the target non-relational database based on the data access request. In one example, the target non-relational database could be a MongoDB database.

[0074] MongoDB is a database based on distributed file storage. It is written in C++ and aims to provide scalable, high-performance data storage solutions for web applications. MongoDB is a product between relational and non-relational databases, and among non-relational databases, it is the most feature-rich and most relational database-like. It supports a very flexible data structure, using a JSON-like BSON format, allowing it to store relatively complex data types. MongoDB's greatest strength lies in its powerful query language, whose syntax is somewhat similar to object-oriented query languages. It can perform almost all the functions of single-table queries in relational databases and also supports indexing.

[0075] Querying using non-relational databases allows for rapid searching of large amounts of unstructured text data, offering high storage and retrieval efficiency. Furthermore, querying using relational databases preserves the advantages of structured data.

[0076] To synchronize data between a non-relational database and a target relational sub-database, such as Figure 4 As shown, before S302, the following steps may also be included:

[0077] S401: Obtain the first statement corresponding to at least a portion of the data in the target relational sub-database associated with the target non-relational database, wherein the first statement is a statement used by the target relational sub-database to describe the data;

[0078] S402: Convert the first statement corresponding to at least a portion of the data into a second statement, where the second statement is a statement used by the target non-relational database to describe the data;

[0079] S403: Store at least a portion of the data corresponding to the second statement in the target NoSQL database.

[0080] By converting a first statement corresponding to at least a portion of the data in the target relational sub-database into a second statement used by the target non-relational database to describe the data, data in the target relational sub-database can be synchronized to the target non-relational database.

[0081] In step S401, a first statement corresponding to at least a portion of the data in the target relational sub-database associated with the target non-relational database is obtained. This first statement is a statement used by the target relational sub-database to describe the data. In a specific embodiment, the MySQL database uses SQL, while the MongoDB database (the target non-relational database) uses a Java-like programming language. This is achieved by obtaining the binlog logs from the MySQL slave database (the target relational sub-database), where the MySQL binlog is a binary log file.

[0082] In S402, the first statement corresponding to at least a portion of the data is converted into a second statement, which is a statement used by the target non-relational database to describe the data. In a specific embodiment, after obtaining the binlog logs from the MySQL slave database (target relational sub-database) in S401, the Java project searches for insert, update, delete, and other statements in the binlog logs, and then converts these statements into mongo statements.

[0083] In S403, the second statement corresponding to at least a portion of the data is stored in the target non-relational database. In a specific embodiment, the mongo statement obtained in S402 is inserted into the MongoDB database.

[0084] To ensure timely data synchronization between the target relational sub-database and the primary relational database, and to guarantee the accuracy of the data in the target relational sub-database, such as... Figure 5 As shown, after S203, the following steps may also be included:

[0085] S501: Control the target relational sub-database to periodically pull and save the first updated data from the relational master database. The first updated data is the data in the relational master database that has reached a preset access frequency.

[0086] By periodically fetching and saving the first updated data from the relational master database, the data in the target relational sub-database and the relational master database can be synchronized in a timely manner, thus ensuring the accuracy of the data in the target relational sub-database.

[0087] In S501, the target relational sub-database periodically retrieves and saves the first updated data from the relational master database. This first updated data is data from the relational master database whose access frequency reaches a preset frequency. In a specific embodiment, the MySQL slave database retrieves view data from the MySQL master database via a scheduled polling method. When the required view data is collected, it is inserted into the dataset table of the MySQL slave database. Specific scheduled polling settings include: # Query whether the scheduled task is enabled: show variables like 'event_scheduler'; # Enable the scheduled task: set global event_scheduler = 1. This utilizes MySQL's Federated Learning technology. After configuration in my.cnf, the database is started to configure the MySQL slave database to access the MySQL master database. Specific settings include: # Query whether the engine is enabled: show engines; # If the support field is yes, it indicates that the engine is enabled.

[0088] Hadoop is a distributed system infrastructure developed by the Apache Software Foundation. Users can develop distributed programs without understanding the underlying details of distributed systems, fully leveraging the power of clusters for high-speed computation and storage. Hadoop implements a distributed file system, one component of which is HDFS (Hadoop Distributed File System). HDFS is highly fault-tolerant and designed to be deployed on low-cost hardware; it also provides high throughput access to application data, making it suitable for applications with very large datasets. HDFS relaxes POSIX requirements, allowing streaming access to data in the file system. The core design of the Hadoop framework consists of HDFS and MapReduce. HDFS provides storage for massive amounts of data, while MapReduce provides computation for massive amounts of data.

[0089] Hive is a data warehouse tool based on Hadoop, used for data extraction, transformation, and loading. It's a mechanism for storing, querying, and analyzing large-scale data stored in Hadoop. Hive data warehouse tools can map structured data files to database tables and provide SQL query functionality, transforming SQL statements into MapReduce tasks for execution. Hive's advantages include a low learning curve, enabling fast MapReduce statistics through SQL-like statements, simplifying MapReduce without requiring the development of dedicated MapReduce applications. Hive is well-suited for statistical analysis of data warehouses.

[0090] In one example, data retrieved from a target relational sub-database can be archived using a Hive and Hadoop solution. The specific steps include: installing and configuring the Hive database; successfully starting the Hive database; exporting data from MySQL to a preset address, ensuring that data is separated by spaces; creating database tables in Hive; and then loading the file from the preset address into the database tables. This leverages the low-cost hardware and high throughput of Hadoop's HDFS to access application data. It is suitable for archiving extremely large datasets. Hadoop's master-slave architecture ensures data stability.

[0091] To improve data access efficiency, frequently accessed data should be added to the target relational sub-database. Figure 6 As shown, after S204, the following steps may also be included:

[0092] S601: When the number of times the business server accesses the second updated data in the relational master database reaches the preset number of accesses, the second updated data will be synchronized to the target relational sub-database. The second updated data can be any data in the relational master database.

[0093] Adding data from the relational master database to the target relational sub-database based on the number of times the business server accesses the data in the relational master database can improve the efficiency of data access.

[0094] In S601, when the number of times the business server accesses the second updated data in the relational master database reaches a preset number of accesses, the second updated data is synchronized to the target relational sub-database. The second updated data can be any data in the relational master database. In one example, the business server records the data that needs to be accessed. When the number of times the business server accesses the data in the relational master database reaches a preset threshold, the record is sent to the data server so that the data server can synchronize the data to the target relational sub-database.

[0095] Based on the data access method provided in the above embodiments, correspondingly, such as Figure 7 As shown, this application embodiment provides a data access device 700, applied to a data server, the device comprising:

[0096] The receiving module 701 is used to receive data access requests sent by the target business server;

[0097] The first query module 702 is used to respond to a data access request by querying the data corresponding to the data access request in the target relational sub-database of the data server. The data server also includes a relational master database, which is used to provide data access services to multiple business servers. The target relational sub-database includes at least a portion of the data in the relational master database that is associated with the target business server.

[0098] The sending module 703 is used to send the queried data to the target business server when the data corresponding to the data access request is found in the target relational sub-database;

[0099] The second query module 704 is used to query the data corresponding to the data access request in the relational main database when no data corresponding to the data access request is found in the target relational sub-database, and then send the queried data to the target business server.

[0100] This application provides a data access device 700. A receiving module 701 receives a data access request from a target business server. A first query module 702 responds to the data access request by querying the target relational sub-database of the data server for data corresponding to the data access request. A sending module 703, if it finds data corresponding to the data access request in the target relational sub-database, sends the queried data to the target business server. A second query module 704, if it does not find data corresponding to the data access request in the target relational sub-database, queries the main relational database for data corresponding to the data access request and sends the queried data to the target business server.

[0101] In this way, by prioritizing data access in the target relational sub-database based on data access requests, and only accessing the main relational database when the required data is not found in the target relational sub-database, the access pressure on the main relational database can be alleviated, thereby improving the efficiency of data access in the business system.

[0102] As another embodiment of this application, in order to further reduce and alleviate the access pressure on the relational master database and improve the efficiency of data access in the business system, the alarm device may further include:

[0103] The data acquisition module is used to acquire the data access volume of the target relational sub-database;

[0104] The first data query module is used to respond to data access requests and query the data corresponding to the data access request in the target non-relational database when the data access volume is greater than or equal to the preset access volume.

[0105] The sending module can be specifically used for:

[0106] If the data access volume is less than the preset access volume, in response to the data access request, query the data corresponding to the data access request in the target relational sub-database of the data server.

[0107] As another embodiment of this application, in order to synchronize data between a non-relational database and a target relational sub-database, the alarm device may further include:

[0108] The statement acquisition module is used to acquire the first statement corresponding to at least a portion of the data in the target relational sub-database associated with the target non-relational database. The first statement is a statement used by the target relational sub-database to describe the data.

[0109] The statement conversion module is used to convert at least a portion of the data into a second statement, where the second statement is the statement used by the target non-relational database to describe the data.

[0110] The statement storage module is used to store the second statement corresponding to at least a portion of the data into the target non-relational database.

[0111] As another embodiment of this application, in order to synchronize the data between the target relational sub-database and the relational master database in a timely manner and to ensure the accuracy of the data in the target relational sub-database, the alarm device may further include:

[0112] The data retrieval module is used to control the target relational sub-database to periodically retrieve and save the first updated data from the relational master database. The first updated data is the data in the relational master database that has reached a preset access frequency.

[0113] As another embodiment of this application, in order to add frequently accessed data to the target relational sub-database to improve data access efficiency, the alarm device may further include:

[0114] The data update module is used to synchronize the second updated data to the target relational sub-database when the number of accesses of the second updated data in the relational master database by the business server reaches the preset number of accesses. The second updated data can be any data in the relational master database.

[0115] like Figure 8 As shown, this application embodiment provides a data access device 800, applied to a target business server, the device comprising:

[0116] The access request sending module 801 is used to send a data access request to the data server so that the data server responds to the data access request by querying the data corresponding to the data access request in the target relational sub-database of the data server, and if the data corresponding to the data access request is found in the target relational sub-database, sending the queried data to the target business server; if the data corresponding to the data access request is not found in the target relational sub-database, querying the data corresponding to the data access request in the relational main database, and sending the queried data to the target business server.

[0117] The data server also includes a relational master database, which provides data access services to multiple business servers, and the target relational sub-database includes at least a portion of the data in the relational master database that is associated with the target business server.

[0118] Based on the data access methods and apparatus provided in the above embodiments, this application also provides an electronic device 900, such as... Figure 9 As shown:

[0119] It includes a processor 901, a memory 902, and a computer program stored in the memory 902 and executable on the processor 901. When the computer program is executed by the processor 901, it implements the various processes of the above-described data access method embodiments and achieves the same technical effect.

[0120] Specifically, the processor 901 may include a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.

[0121] Memory 902 may include mass storage for data or instructions. For example, and not limitingly, memory 902 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 902 may include removable or non-removable (or fixed) media. Where appropriate, memory 902 may be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, memory 902 is non-volatile solid-state memory.

[0122] In certain embodiments, the memory may include read-only memory (ROM), random access memory (RAM), disk storage media devices, optical storage media devices, flash memory devices, and electrical, optical, or other physical / tangible memory storage devices. Thus, typically, memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to one aspect of this application.

[0123] The processor 901 implements any of the data access methods described in the above embodiments by reading and executing computer program instructions stored in the memory 902.

[0124] In one example, the electronic device may also include a communication interface 903 and a bus 910. As an example, such as... Figure 9 As shown, the processor 901, memory 902, and communication interface 903 are connected through bus 910 and complete communication with each other.

[0125] The communication interface 903 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.

[0126] Bus 910 includes hardware, software, or both, that couples components of an online data traffic metering device together. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 910 may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, this application contemplates any suitable bus or interconnect.

[0127] This application also provides a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the various processes of the above-described data access method embodiments and achieves the same technical effects. To avoid repetition, it will not be described again here. The computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0128] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.

[0129] The functional blocks shown in the above block diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.

[0130] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.

[0131] The aspects of this application have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus, and computer program products according to embodiments of this application. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by dedicated hardware performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.

[0132] The above are merely specific embodiments of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.

Claims

1. A data access method, characterized by, Applications to data servers include: Received a data access request from the target business server; In response to the data access request, data corresponding to the data access request is queried in the target relational sub-database of the data server. The data server also includes a relational master database and a target non-relational database. The relational master database is used to provide data access services to multiple business servers, which correspond to different business types. The target relational sub-database includes at least a portion of the data in the relational master database associated with the target business server. This portion of data is data filtered from the relational master database based on access frequency and / or data volume, and is used to enable the target relational sub-database to provide data access services to the associated business servers. The target non-relational database is associated with the target relational sub-database, and the target non-relational database includes data after data transformation of at least a portion of the data in the target relational sub-database, used to provide unstructured query services to the target relational sub-database. If data corresponding to the data access request is found in the target relational sub-database, the found data is sent to the target business server. If no data corresponding to the data access request is found in the target relational sub-database, the corresponding data is queried in the relational main database, and the queried data is sent to the target business server.

2. The method of claim 1, wherein, The method further includes: Obtain the data access volume of the target relational sub-database; If the data access volume is greater than or equal to the preset access volume, in response to the data access request, query the target non-relational database for the data corresponding to the data access request; The step of responding to the data access request by querying the target relational sub-database of the data server for data corresponding to the data access request includes: If the data access volume is less than the preset access volume, in response to the data access request, the system queries the target relational sub-database of the data server for the data corresponding to the data access request.

3. The method of claim 2, wherein, Before querying the target non-relational database for data corresponding to the data access request in response to the data access request, the method further includes: Obtain a first statement corresponding to at least a portion of the data in the target relational sub-database associated with the target non-relational database, wherein the first statement is a statement used by the target relational sub-database to describe the data; The first statement corresponding to at least a portion of the data is converted into a second statement, wherein the second statement is a statement used by the target non-relational database to describe the data; Store at least a portion of the data corresponding to the second statement in the target non-relational database.

4. The method of claim 1, wherein, After the step of sending the retrieved data to the target business server after finding data corresponding to the data access request in the target relational sub-database, the method further includes: The target relational sub-database is controlled to periodically pull and save the first updated data from the relational master database. The first updated data is data in the relational master database that has been accessed at a preset frequency.

5. The method of claim 1, wherein, After querying the relational master database for the data corresponding to the data access request and sending the queried data to the target business server, the process further includes: When the number of times the business server accesses the second updated data in the relational master database reaches the preset number of accesses, the second updated data is synchronized to the target relational sub-database, where the second updated data is any data in the relational master database.

6. A data access device, characterized by Applications to data servers include: The receiving module is used to receive data access requests sent by the target business server; A first query module is configured to respond to the data access request by querying data corresponding to the data access request in the target relational sub-database of the data server. The data server further includes a relational master database and a target non-relational database. The relational master database is used to provide data access services to multiple business servers, which correspond to different business types. The target relational sub-database includes at least a portion of the data in the relational master database associated with the target business server. This portion of data is data filtered from the relational master database based on access frequency and / or data volume, enabling the target relational sub-database to provide data access services to the associated business servers. The target non-relational database is associated with the target relational sub-database and includes data after data transformation of at least a portion of the data in the target relational sub-database, used to provide unstructured query services to the target relational sub-database. The sending module is used to send the queried data to the target business server when the data corresponding to the data access request is found in the target relational sub-database; The second query module is used to query the main relational database for data corresponding to the data access request when no data corresponding to the data access request is found in the target relational sub-database, and then send the queried data to the target business server.

7. An electronic device, comprising: The device includes: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, it implements the data access method as described in any one of claims 1-5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions that, when executed by a processor, implement the data access method as described in any one of claims 1-5.

9. A computer program product, characterised in that, When the instructions in the computer program product are executed by the processor of the electronic device, the electronic device performs the data access method as described in any one of claims 1-5.