Heterogeneous data storage and operation method, device and system and electronic equipment
By adding database engines and building mapping rules for multiple different types of data storage services, unified storage and operation of heterogeneous data are achieved, solving the problems of low data storage and operation efficiency and high error rate in the existing technology, and improving Data consistency and performance guarantee.
Patent Information
- Application Number
- CN202410806663.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-21
- Publication Date
- 2024-09-10
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing technology makes it difficult to effectively manage and operate different types of data storage services, resulting in low business data storage and operation efficiency, high error probability, and difficulty in achieving data consistency and performance guarantees between different data storage services.
Propose a storage and operation method for heterogeneous data. By adding database engines to multiple different types of data storage services, mapping rules between business data and data storage services are constructed, and all types of business data are uniformly operated based on the database engine. Implement cross-type data storage and operations.
It improves the storage and operation efficiency of business data, reduces repeated operations and errors, realizes unified management and operation of different types of data storage services, and improves data consistency and performance guarantee.
Smart Images

Figure CN118626490A
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a method, device, system and electronic device for storing and operating heterogeneous data. Background Art
[0002] The Internet industry has a large number of business projects. Each business project generates its own corresponding data that needs to be stored in the data storage service. The more data storage services a business project needs, the more similar codes there are for different business projects to operate various data storage services, and the higher the probability of errors. Moreover, business data stored in different data storage services need to use different operation plans, and the operation efficiency of business data is relatively low. Summary of the invention
[0003] The main purpose of the embodiments of the present application is to provide a method, device, system and electronic device for storing and operating heterogeneous data, so as to efficiently store and operate the business data of various business projects.
[0004] To achieve the above purpose, one aspect of an embodiment of the present application provides a method for storing and operating heterogeneous data, the method comprising:
[0005] Add database engines to multiple different types of data storage services;
[0006] Constructing mapping rules between business data of multiple business projects and each of the data storage services;
[0007] Acquire the business data of each of the business items;
[0008] According to the mapping rule, storing each type of business data in the corresponding data storage service;
[0009] Based on the database engine, various types of business data in each of the data storage services are uniformly operated.
[0010] In some embodiments, the data storage service includes a cache service, a relational database, and a NoSQL database;
[0011] The adding of database engines to multiple different types of data storage services respectively includes:
[0012] Add any one of SQLite, LevelDB or RocksDB to the cache service as the database engine;
[0013] the database engine adding key-value pairs to the relational database;
[0014] The database engine for adding full-text search and SQL query to the cache service and the relational database.
[0015] In some embodiments, before adding database engines to multiple different types of data storage services respectively, the method further includes:
[0016] Acquire each of the data storage services through a service discovery protocol, or acquire each of the data storage services from monitoring information of the data storage services;
[0017] Configure routing, access rights, data desensitization, access protocols for each of the data storage services, combine to form chain services, configure data operation rules according to geographic location, access flow control, fuse backup and read-only operations;
[0018] The step of configuring the routes for each of the data storage services includes: configuring the routes according to the order of the business items;
[0019] The step of configuring the access rights for each of the data storage services includes: obtaining the access rights configured by the user through a user interface of a communication protocol;
[0020] The step of configuring the data desensitization for each of the data storage services includes: encapsulating the authentication and connection operations of the execution terminal of the business project to each of the data storage services through a preset communication protocol, determining the account and IP address allowed to access each of the data storage services, and setting the access rights of each of the data storage services, the data tables of each of the data storage services, and the fields of each of the data tables;
[0021] The step of configuring the access protocol for each of the data storage services includes: using a preset proxy client to communicate with the proxy service according to the access protocol of each of the data storage services, encapsulating the request for each of the data storage services and parsing the response;
[0022] The step of combining the data storage services to form the chain service includes: combining a plurality of different types of data storage services to form the chain service;
[0023] The step of configuring the data operation rules for each of the data storage services according to the geographical location includes: forwarding, copying or writing the data that needs to be operated determined by each of the data storage services to the data storage service at the target geographical location;
[0024] The step of configuring the access flow limiting for each of the data storage services includes: obtaining the flow limiting conditions configured by the user through the user interface, and limiting the flow of the corresponding data storage service when the flow limiting conditions are triggered; recommending to the user the access volume threshold that triggers the flow limiting according to the response performance, resource consumption and stability of each of the data storage services; dynamically limiting the access volume of the data storage service for each of the data storage service instances, tables, statements corresponding to operations and the business items according to the corresponding triggering conditions;
[0025] The step of configuring the fuse backup for each of the data storage services includes: configuring a fuse condition for triggering the fuse, fuse-breaking the corresponding data storage service when the fuse condition is triggered, and backing up the data of the blown data storage service to other data storage services that meet the preset performance conditions;
[0026] The step of configuring the read-only operation for each of the data storage services includes: configuring a preset read-only condition, and when the read-only condition is triggered, configuring the corresponding data storage service to only accept the read-only operation;
[0027] Obtain access topology and access data from the business project to various data storage services.
[0028] In some embodiments, storing the various types of business data in the corresponding data storage service according to the mapping rule includes:
[0029] According to the sharding rules in the mapping rules, the specified data in each type of business data is stored in the specified data storage service.
[0030] In some embodiments, after storing the various types of business data in the corresponding data storage service according to the mapping rule, the method further includes:
[0031] Preloading a preset range of data through the cache according to the type, priority and historical access frequency of each type of business data;
[0032] Synchronously writing various types of business data to other data storage services;
[0033] Expand the persistence layer framework of the data storage service to save part or all of the business data of the same business project to different types of data storage services;
[0034] The cache data corresponding to all the business data in the data storage service is saved through a Bloom or Cuckoo filter.
[0035] In some embodiments, the unified operation of various types of business data in various data storage services based on the database engine includes:
[0036] Based on the database engine, various types of business data in each of the data storage services are uniformly migrated, distributed, updated, expanded or queried.
[0037] In some embodiments, the method further comprises:
[0038] Recording the operation information of each type of business data in each of the data storage services;
[0039] The large language model is used to parse the operation statements for operating various types of business data and generate parsed text.
[0040] To achieve the above-mentioned purpose, another aspect of the embodiment of the present application provides a storage and operation device for heterogeneous data, the device comprising:
[0041] A storage service configuration unit, used to add database engines to multiple different types of data storage services respectively;
[0042] A mapping rule building unit, used to build mapping rules between the business data of multiple business items and each of the data storage services;
[0043] A business data acquisition unit, used to acquire the business data of each of the business items;
[0044] A storage service storage unit, used to store various types of business data in the corresponding data storage service according to the mapping rule;
[0045] The storage service operation unit is used to uniformly operate various types of business data in each of the data storage services based on the database engine.
[0046] To achieve the above-mentioned purpose, another aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the above-mentioned method for storing and operating heterogeneous data is implemented.
[0047] To achieve the above-mentioned purpose, another aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned method for storing and operating heterogeneous data is implemented.
[0048] The embodiments of the present application include at least the following beneficial effects:
[0049] The embodiments of the present application can add database engines to multiple different types of data storage services respectively; construct mapping rules between the business data of multiple business projects and each data storage service; obtain the business data of each business project; store each type of business data in the corresponding data storage service according to the mapping rules; and uniformly operate the various types of business data in each data storage service based on the database engine. The embodiments of the present application can add database engines to different types of data storage services, so that different types of data storage services have the ability to respond to unified instructions. After storing the data of each business project in each data storage service according to the mapping rules, the embodiments of the present application can uniformly operate the various types of business data in the different types of data storage services, realizing unified operation of heterogeneous data, which can improve the storage and operation efficiency of business data, reduce repeated operations and reduce the occurrence of errors. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0051] Figure 1 A schematic diagram of a flow chart of a method for storing and operating heterogeneous data provided in an embodiment of the present application;
[0052] Figure 2 Provided in the embodiments of this application Figure 1 The step flow chart of S100;
[0053] Figure 3 A flowchart of the steps for integrating different types of data storage services provided in an embodiment of the present application;
[0054] Figure 4 An example flow chart of integrating different types of data storage services provided in an embodiment of the present application;
[0055] Figure 5 A flowchart of the steps for simplifying database development provided in an embodiment of the present application;
[0056] Figure 6 An example flowchart of simplified database development provided by an embodiment of the present application;
[0057] Figure 7 A flowchart of the steps for monitoring the status of each data storage service provided in an embodiment of the present application;
[0058] Figure 8A schematic diagram of the structure of a heterogeneous data storage and operation device provided in an embodiment of the present application;
[0059] Fig. 9 An example framework diagram of a heterogeneous data storage and operation system provided in an embodiment of the present application;
[0060] Fig.10 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0061] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below in conjunction with the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present application. They are only examples of devices and methods consistent with some aspects of the embodiments of the present application as detailed in the attached claims.
[0062] It is understood that the terms "first", "second", etc. used in this application can be used to describe various concepts in this article, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another concept. For example, without departing from the scope of the embodiment of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein can be interpreted as "at the time of" or "when" or "in response to determination".
[0063] The terms "at least one", "multiple", "each", "any", etc. used in this application, at least one includes one, two or more, multiple includes two or more, each refers to each of the corresponding multiple, and any refers to any one of the multiple.
[0064] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0065] Before describing the embodiments of the present application in detail, some related technologies that may be involved in the embodiments of the present application are first described as follows:
[0066] Many Internet business projects use different data storage services, including relational databases, cache services, full-text search services, non-relational databases NoSQL, etc. In business project development, it is usually necessary to operate each data storage service separately through the business project terminal tools of each data storage service. For example, when improving the query performance of relational databases through Redis, Memcached, etc., it is usually necessary to first check whether the required data has been cached. If not, query the relational database first and then cache the data.
[0067] The more data storage services a business project requires, the more similar codes different business projects use to operate various data storage services, and the higher the probability of errors. Similarly, the consistency, service performance, and reliability of the same business data between different data storage services also need to be handled separately. Any omission or inappropriateness in any link may affect the normal operation of the business project, as well as the progress and quality of business project development. In addition, cache and some data storage services have a large demand for memory or hard disks, resulting in high storage costs and low storage utilization.
[0068] "CN110209719A, a unified access system and method for multiple databases based on microservice architecture" discovers, registers, manages different databases and pre-establishes database connections through microservices, then obtains statements, instructions and parameters for operating the database through the HTTP protocol, and then returns the results to the business system via HTTP after accessing each database through a unified gateway. Because its gateway has a single function and is mainly used for data transmission and conversion, this solution cannot integrate and make up for the differences between different types of data storage services. Various types of databases are essentially still completely independent of each other, resulting in the inability to meet different business needs and different storage requirements for different types of data. It is also impossible to operate multiple databases at once according to business needs, and it is not thorough in integrating and simplifying the development of heterogeneous databases. In addition, due to the large differences in performance and throughput between HTTP-based microservices and high-performance data services, the gateway easily constitutes a performance bottleneck.
[0069] "CN109347936A, Implementation method, system, storage medium and electronic device of Redis proxy business project terminal" obtains and sets the load balancing strategy when the business project terminal is initialized, and then uses the proxy server to control the access ratio or fuse of different Redis services, thereby realizing the dynamic expansion of Redis. This can avoid the problem of having to modify the Redis Server when dynamically expanding the proxy service like Codis.
[0070] Similarly, in the database field, there are also solutions that use database proxies to organize different database instances of the same type into a cluster to provide centralized services to applications. Currently, such solutions can only be applied to some databases of the same type and cannot meet business needs that require different types of databases.
[0071] Therefore, the embodiments of the present application provide a method, device, system and electronic device for storing and operating heterogeneous data. The technical solution of the present application includes: adding database engines to multiple different types of data storage services respectively; constructing mapping rules between the business data of multiple business projects and each data storage service; obtaining the business data of each business project; storing various types of business data in the corresponding data storage service according to the mapping rules; and uniformly operating various types of business data in various data storage services based on the database engine. The embodiments of the present application can add database engines to various different types of data storage services, so that different types of data storage services have the ability to respond to unified instructions. After storing the data of each business project in each data storage service according to the mapping rules, the embodiments of the present application can uniformly operate various types of business data in various different types of data storage services, realizing unified operation of heterogeneous data, which can improve the storage and operation efficiency of business data, reduce repeated operations and reduce the occurrence of errors.
[0072] The embodiment of the present application provides a storage and operation method for heterogeneous data, which relates to the field of data processing technology. The storage and operation method provided in the embodiment of the present application can be applied to a terminal, can also be applied to a server, and can also be software running in a terminal or a server. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, and a car terminal, etc., but is not limited to this; the server side can be configured as an independent physical server, or it can be configured as a server cluster or distributed system composed of multiple physical servers, and can also be configured to provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms and other basic cloud computing services. The server can also be a node server in a blockchain network; the software can be an application that implements the storage and operation method, etc., but is not limited to the above forms.
[0073] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0074] Reference Figure 1 The embodiment of the present application provides a storage and operation method for heterogeneous data, which can be applied to a unified operation proxy service terminal. The method may include but is not limited to S100 to S140, which are as follows:
[0075] S100: adding database engines to multiple different types of data storage services respectively.
[0076] Due to the diverse data processing and storage requirements of large-scale and complex business projects, such as requirements for high-performance response and accuracy in massive data processing, the essence of the requirements is different for data storage services. Considering that the technical advantages and costs of different types of storage such as memory, hard disks (such as solid-state drives), and cloud databases are also quite different, the embodiments of the present application technically integrate or combine different data storage services so that different types of data storage services can operate in a unified manner and provide better data storage service functions and features.
[0077] It should be noted that the data storage service of the embodiment of the present application may include multiple types of data storage services such as cache service, relational database, NoSQL database service, full-text search service, etc.
[0078] Reference Figure 2 , further, S100 may include S101 to S103:
[0079] S101: Add any one of SQLite, LevelDB or RocksDB to the cache service as the database engine.
[0080] Specifically, in this embodiment, new plug-ins or new modules can be developed and added to the cache service, and then the cache service can be operated through the SQL language like operating a database, so that the development of the cache service and the database development are consistent, and the cache service and the database can be operated simultaneously through the SQL language. For example, multiple SQL statements can be used to batch operate cache services and databases located on different types of data storage service instances through a unified operation proxy service. According to the needs of the business system to operate the data storage service and the functional differences of different data services, targeted SQL dialect support is provided in addition to standard SQL, so that corresponding operations can be easily completed through SQL. Batch data operations through the SQL language can also be more intuitive than cache commands, so that cache data can be efficiently copied and migrated.
[0081] The specific implementation of adding a data engine may include: providing support files or KV (key-value pair) database engine capabilities for cache services such as Redis or Memcached, so that new support operation instructions can be added to the cache service. The main functions provided include using SQL language to create a database, insert, update, and delete cache data or databases in the cache service, providing secondary index support to improve query performance, and using algorithms such as zstd to compress database data stored in a tree data structure to save storage. The database engine embedded in the cache service can be SQLite, LevelDB, or RocksDB, etc. In addition to the advantages of the cache itself, the new cache service obtained in this embodiment can also have high-speed database operation performance and throughput that traditional relational databases do not have, support for new custom communication protocols or data formats, convenient for fast operations through SQL, and convenient for fast migration as a file, etc. Functions or features, can meet the needs of some business scenarios in a lightweight and flexible manner.
[0082] S102: The database engine adds key-value pairs to the relational database.
[0083] Specifically, this embodiment can add high-performance data access capabilities to the relational database, including using the support capabilities of the open source relational database for different database engines to provide a cache-like service based on a memory or KV (key-value pair) database to operate, store, and manage data content, so that the read and write performance of the relational database can be greatly improved. The performance of the new relational database after the transformation is between the traditional cache service and the traditional relational database, and can meet some business needs that do not have as stringent performance requirements as the cache.
[0084] S103: Adding the database engine for full-text search and SQL query to the cache service and the relational database.
[0085] This embodiment can further integrate inverted index technology to provide full-text search capabilities for cache services and relational databases, allowing users to specify which attributes of which business data provide full-text search support; vice versa, SQL support is provided for full-text search services, so that full-text search can be implemented through SQL and a result set can be obtained.
[0086] Different types of data storage services are integrated to gain convenience in data operations, as well as new data storage services with stronger non-functional features such as functionality, reliability, security, and scalability. The unified operation proxy service can be deployed as a cluster service or directly embedded in actual projects as a library file of a supported platform, which helps avoid performance and throughput losses or bottlenecks that may be caused by independent data proxy services.
[0087] Next, the implementation method of integrating different types of data storage services is described. Figure 3 (The embodiment of the present application may also include S301 to S303. It should be noted that the embodiment of the present application does not strictly limit the execution order of each step. The specific execution order can be adjusted accordingly according to actual needs. Figure 3 This embodiment provides a flowchart of steps for integrating different types of data storage services. Figure 4 An example flow chart for integrating different types of data storage services, combined with Figure 3 and Figure 4 The instructions are as follows:
[0088] S301: Acquire each of the data storage services through a service discovery protocol, or acquire each of the data storage services from monitoring information of the data storage services.
[0089] Specifically, based on the unified operation proxy service, the automatic discovery, registration, management and monitoring of various types of data storage services in the same network are realized: if the devices where various types of data storage services are located support the service discovery protocol, the data information stored in the device containing the database service is checked through the discovery protocol, and detailed data storage service information can also be discovered from the monitoring information of the data storage service, and then all discovered data storage services are recorded and managed, and then the corresponding type of instructions are used to verify and monitor whether the service is running normally, and verify the consistency and specific differences of data between different data storage service instances. When it is found that the data storage service instance is running abnormally (including abnormal operation results, slow access, access errors) or fails, the corresponding event is automatically recorded as data for evaluating the throughput, performance and stability of the corresponding data storage service, and then the user is warned and the user's pre-defined actions including deactivating the faulty data storage service are executed. The instructions of the corresponding data storage service are executed for each discovered data storage service instance to obtain and save more information, including the role of the data storage service, the roles of other instances in the cluster or master-slave service where the data storage service is located, the server configuration, etc., and the dynamically changing data can be updated regularly.
[0090] S302: configuring routing, access rights, data desensitization, access protocols for each of the data storage services, combining to form chain services, configuring data operation rules according to geographic location, access flow limiting, fuse backup and read-only operations.
[0091] Exemplarily, the implementation method of configuring access rights may include: the unified operation proxy service provides a UI (user interface) based on the HTTP protocol, supporting users to configure which back-end data storage service instances each business project is allowed to access and which back-end data storage service instances different business data are stored in.
[0092] S303: Obtain access topology and access data of the business project to various data storage services.
[0093] This embodiment can add new data storage service instances or remove existing data storage service instances and access security configurations, view the access topology and access data of business projects to different data storage services, including the number of visits, chronic performance, various error types and error amounts within a certain period of time, and save user settings in the proxy local database.
[0094] S302 also includes: ① providing three-level security protection for various types of data storage services; ② increasing the reliability and performance of comprehensive data storage services. Specifically, this embodiment can also provide security protection, access control and data desensitization services to different (types) data storage service instances based on the unified operation proxy service. Even if the underlying data storage service does not support these security mechanisms, this embodiment can establish or improve the relevant deficiencies of the underlying data service: by default, the connection account and password of each underlying data storage service is no longer distributed to each business system, and the authentication and connection operation of the business system to the data storage service is encapsulated through the SSL protocol. Synchronously, based on the proxy, a blacklist and whitelist of accounts or IP addresses for accessing the underlying data storage service or the specific database instance therein are provided, and different access control rights for the database, table and field at three levels are established. It supports the setting of encryption and decryption and transformation rules for all or a specified part of the data of any type of field in both the storage and acquisition directions when necessary, which is used to control the actual storage value and the actual result returned to the business system, thereby establishing an independent and strict advance data security control system outside each data service.
[0095] When it is necessary to directly open the underlying data storage service to the business system, for the sake of security, the connection information of the business project to each data storage service can still be managed through the unified operation proxy service, thereby providing a link for users to control which libraries, tables, data that meet certain rules or conditions in the underlying data storage service can be accessed by different business systems and different source IPs according to actual needs. The specific information to be managed can be the account and password for accessing the data storage service for the original data storage service. For the improved data storage service, there are more options. The connection information can be assembled and encrypted according to the requirements of the data storage service and then passed to the business project terminal. When the business project terminal connects, the data storage service terminal decrypts and verifies it, or the password can be directly encrypted and passed to the business project terminal. When the business project terminal needs to access the data storage service, the business project terminal first requests the unified operation proxy service to obtain the assembled connection information, and then the business project terminal uses the obtained connection information to directly connect to the underlying data storage service. After the connection is successful, the operation required by the business project can be initiated. After the operation is completed, the business project is responsible for closing the connection to the data storage service.
[0096] The unified operation proxy service controls the set of operations that are allowed or not allowed for business projects to perform on some or all database instances, including the types of commands, statements, and operations. It can also be based on the above-mentioned instructions or operations newly added after the enhancement of different types of databases, including operating multiple database instances of the same or different types with one command. The functions of all commands and operations can be derived from the needs of database functions and features, database service operation and maintenance, and monitoring. The scope of application includes some combinations of different types of databases or application to all data.
[0097] Configure access protocols: The unified operation proxy service provides unified and flexible access protocols for business projects to support business projects to access various underlying data storage services, including providing a dedicated proxy client to communicate with the proxy service according to the supported protocols, encapsulate the requests for operating various types of underlying databases, parse the responses and other details, so that the unified operation proxy service can meet the data storage access needs of various business projects built on different technology platforms. Supported communication protocols include:
[0098] 1. According to the different access requirements of data storage services and the specific usage environment, there are multiple options. When Java language is widely used to develop business projects, the unified operation proxy service can be built as an RPC service based on Netty and provide data operation services to the business system through the JDBC protocol. In this way, each business project can continue to operate different types of databases through ORM tools such as MyBatis and Hibernate in the usual way. Similarly, ODBC protocol support can be provided on another port;
[0099] 2. The RPC service can also support other data access protocols through different ports, including the connection protocol open to MySQL for different databases;
[0100] 3. Support access to different underlying data storage services through the RESP protocol through a dedicated port, and can be expanded to support more database access protocols when needed.
[0101] This embodiment can also organize different types of underlying data storage services into new cluster services through a unified operation proxy service and provide comprehensive data access services to the business system. When necessary, it can record the routes of various business data stored in different data storage service instances through the proxy local data storage service, and automatically enable the routing information when operating different data storage services through the unified operation proxy service.
[0102] According to different business data storage and operation requirements, this embodiment can have multiple combinations, which can be used alone or combined to form a chain service. The call location can be selected from it according to the needs, and the development convenience, performance and reliability requirements of different businesses when accessing various types of data storage services can be flexibly met. It includes combining local cache, cache service (such as Memcached), lightweight database (such as SQLite, RocksDB, etc.) NoSQL column storage in order to establish a multi-level cache of intermediate and final operation results for the underlying database, breaking through the memory limit of the server to establish a data storage service that supports SQL operations, so that local memory and hard disk, external data storage services with different types and characteristics can be used to automatically operate different (types) of data storage services for a business operation according to the principles of optimal performance, convenient and fast calculation, simplified data processing and simple development, and solving the inherent deficiencies of some data storage services, including pushing intermediate results to the destination in advance according to needs, selecting appropriate technologies including different technologies to establish relatively independent data objects or services to avoid performance and data processing problems caused by heavy reliance on specific data sources, and determining the operation route in a certain order from the business, respectively according to the query or pre-calculated result cache, more For new data, when the business obtains data, it will directly return the result from any cache, otherwise it will query the next level of cache step by step until the underlying database, and then use the underlying database to return the result to update the cache at all levels; it can also support data storage services operated by SQL, so that the cache can be operated by SQL, and automatically expand to use remote storage based on SSD, hard disk or S3 protocol when the memory is insufficient; assemble the relational database and ES to support automatic creation, update or query of full-text index when operating the database through ORM tools such as MyBatis or Hibernate; assemble a relational database and multiple different cache services or NoSQL services to automatically update or query from multiple related databases (including cache) when operating the database through ORM tools; assemble different cache clusters or database clusters such as MySQLMGR through a unified operation agent like ordinary data storage services to provide data storage services for business projects, etc.
[0103] This embodiment can realize or improve the availability guarantee of various underlying data storage services based on the unified operation proxy service, solve the general deficiencies of the underlying data storage services in terms of security, and reduce, delay or avoid the failure of the underlying data storage services and corresponding business projects. Supported safeguards may include configuring access flow limiting, fuse backup, and read-only operations. Examples of implementation methods of each configuration are as follows:
[0104] a) This embodiment can limit access to various types of data storage services and their objects and operations, and data storage services for business projects at the unified operation proxy service level. It supports users to configure which business projects and which databases automatically enable flow control for data storage service access operations when certain conditions are met through the UI of the unified operation proxy service. It supports recommending access volume thresholds that trigger flow control to users based on historical operating quality data such as the response performance, resource consumption, and stability of the data storage service. It supports limiting access to data storage service instances, tables, statements for operating data storage services (such as certain SQL statements, some cache instructions, etc.), and data storage service access for business projects at any time according to their respective triggering conditions. After flow control is enabled, the user will be prompted and notified on the UI. After the setting is enabled, each unified operation proxy service instance automatically accumulates and merges the access volume of the flow control object, returns a flow control prompt for requests that meet the flow control conditions, and no longer initiates operations to the back-end data storage service.
[0105] b) This embodiment can support the circuit breaking operation of various underlying data storage services from the unified operation proxy service layer and its underlying data storage services. During the circuit breaking period, the UI of the unified operation proxy service can provide a special function to explain the specific objects that are fused. The response prompt for the subsequent request is the result provided by the circuit breaking service. It includes integrating the monitoring results of the data storage service, supplementing the corresponding quality data of the underlying data storage service from the proxy layer, and triggering the circuit breaker before the database access volume, response performance and stability of the data storage service deteriorate in combination with the historical time of the data storage service. It allows ① users to configure the circuit breaker conditions for the underlying database instance or cluster, and allows users to configure cache services, relational and non-relational databases as cache data storage services for any type of data storage service as backup after the circuit breaker; ② According to the routing of each business data between different database instances set by the user, use other underlying databases to respectively establish the shadow of each business data, and can use the data accessed within a certain period of time or all data as shadow data. When the circuit breaker is broken, the shadow data is used to provide the operation results to the business system through the unified operation proxy service. After the circuit breaker is over, the data update is synchronized to the source database as needed; ③ When the proxy service automatically migrates data between different data storage services according to the requirements of access frequency, performance and storage, it supports automatically establishing multiple copies of shadow data for the data, but allows users to configure the data range of such operation, which is used when the source database is broken. When the database service fails, the proxy service can automatically enable the backup database according to the settings here, that is, automatically forward the database operation request of the business project to the backup database, which helps to eliminate or greatly reduce the impact of database failure;
[0106] c) When the preset read-only conditions are met (including poor write performance, databases that cannot write stably or even normally, and the need to fully utilize the resources of the slave database, etc.), some data storage service instances are converted to read-only services. If the read-only data storage service needs to synchronize data, the unified operation proxy service forwards the write request to the read-only database, supporting users to adjust the read and write status of the underlying database instance online and apply it. The unified operation proxy service supports the execution of query and analysis read requests by the slave data storage service, avoiding the situation where the slave service is rarely used, while providing overall reliability.
[0107] d) Supports the deployment of different database instances to multiple geographic regions through a unified operation proxy service, so that business data can be stored in multiple copies in different regions. The database proxy service accessed by the business automatically selects the proxy that needs to automatically forward and copy the write data request to the database service in the target area. When the business accesses the database, it supports accessing the nearest database storage service based on the user's source IP or the business service instance IP. At the same time, it supports automatic downgrade to access database services in other regions when the database service in the local or nearby business is abnormal, so as to achieve high performance, high availability and easy expansion and contraction of database services. Supports automatic recommendation of relevant request and data routing information based on the deployment area of the business instance and the total amount of business data through a unified operation proxy service and allows users to adjust.
[0108] S110: Constructing mapping rules between business data of multiple business items and each of the data storage services.
[0109] The mapping rules may include which data storage service the business data is stored in or which business data is stored in which data storage service at which time. For example, different types of business data of the same business project in this embodiment may be stored in various data storage services.
[0110] At present, there are still many development frameworks that do not support multiple data sources or are extremely inconvenient. There are also other database development burdens. For example, different projects of the same product develop their own database access logic, including business-independent basic tools, which is equivalent to storing and operating part or all of the data of the same business requirement in different databases. When the database service is abnormal, the affected business projects need to be checked one by one temporarily. Based on the above solution, the embodiment of the present application can also be Figure 5 ( Figure 5 The solution shown in S501 to S504) can be included to simplify database development, and more powerful functions or features than a single type of database service can be obtained through operations oriented to a conventional single database. Figure 6 The example flow chart for simplifying database development provided in this embodiment is combined with Figure 5 and Figure 6 The instructions are as follows:
[0111] S501: preloading a preset range of data through a cache according to the type, priority and historical access frequency of each type of business data.
[0112] This embodiment can support a single request to operate different heterogeneous databases for data operations executed through a unified operation proxy service: support detection and extraction of request data from requests by a unified operation proxy service based on the data storage operation requirements of the business system, including support for specifying operation objects in SQL statements in a progressive manner according to the fields of data service instance, database, and data object, and then obtaining specific operation objects through SQL parsing and splitting data into different database instances for execution. When acquiring data, data is automatically acquired from the corresponding instance and then merged and returned to the business project.
[0113] Data preloading: It supports automatically preloading a certain range of data through cache during the startup of the unified operation proxy service according to the type of business data (such as some users or businesses, etc.), priority, historical access frequency and other characteristics. This range supports user adjustment and configuration, and the cache content can be dynamically updated according to changes in access data and new user configurations. It can not only solve the problem of slow performance when accessing these data for the first time, but also avoid the steps of checking whether the data has been cached first and querying the database before caching if it has not been cached during development.
[0114] S502: Synchronously write various types of business data to other data storage services.
[0115] This embodiment can perform synchronous multi-writes on different types of data storage services based on the unified operation proxy service, automatically maintain data consistency, and automatically implement data backup and synchronization, including cross-computer room data synchronization. Technically, the business project still sends requests to the unified operation proxy service of the local database normally, and then the unified operation proxy service automatically obtains the multi-write requirements, processes them one by one after caching in the internal queue, and writes the requests to other database proxy instances corresponding to each multi-write destination. After receiving the requests, the new unified operation proxy instance caches them in the local queue first and then writes them one by one to the corresponding backend database instance.
[0116] During the synchronization process, if you need to write to multiple data storage services synchronously, distributed transaction support is automatically enabled at the proxy layer. If a write fails, the request and its failed instance, detailed prompts, and a retry mechanism are recorded. If you need to update the cache, always update other databases first, then delete the corresponding cached data, and then write the new data to the cache.
[0117] S503: Expand the persistence layer framework of the data storage service to save part or all of the business data of the same business project to different types of data storage services.
[0118] This embodiment can also expand the database persistence layer framework of the business project to support various types of data development for unified operation proxy services, so that part or all of the business data of the same business project can be saved to different types of data storage services, solving the problem that the current persistence layer framework can only operate a single type of database or can only operate relational databases.
[0119] Taking the persistence layer development based on the Spring framework as an example, a two-layer design strategy can be provided according to its layered design principle: ① A database service query can be set for the service layer and DAO respectively to query which specific objects of which encapsulated databases, or the proxy service can execute the query routing and whether to enable distributed transactions by default; ② Further, the business entity class and its attributes can be set to cache which fields and support full-text retrieval respectively, and the proxy service can save the distribution of the same business data among different databases. For example, the data of a business entity is saved in which tables of which databases, and at the same time, a database table can save the primary key of the corresponding table in another database in a similar way to a foreign key to associate data between different objects.
[0120] S504: Save cache data corresponding to all the business data in the data storage service through a Bloom or Cuckoo filter.
[0121] In this embodiment, the unified operation proxy service can also comprehensively utilize various types of back-end database services to eliminate the cache penetration, cache breakdown and cache avalanche problems that cannot be avoided by the huge and costly cache service: the unified operation proxy service saves the data of the cache part corresponding to all the data in the database through Bloom or Cuckoo filter. Before the unified operation proxy service detects that a certain request has not queried data from the cache and then checks the database, it first queries the filter whether the data exists and returns the response of the request when the query returns that it does not exist; if the query filter returns that the data exists, the back-end database is continued to be queried, and then the unified operation proxy service checks whether the query result is empty. If it is empty, the corresponding query condition-related data is saved based on the proxy service and directly returns that the data does not exist before the next query cache, avoiding continuing to execute the corresponding data cache facing the cache and database. When the database must be queried, the unified operation proxy service automatically extracts the request parameters and batch queries the relational database or NoSQL according to the mapping relationship of the business data in different databases, and then uses the query results to update the cache, and then returns the results to the business project. In this process, the corresponding request is automatically intercepted and made to wait for the return result. If the request volume here is large, the above-mentioned database-oriented current limiting measures are automatically enabled.
[0122] To monitor the status of each data storage service, refer to Figure 7 This embodiment may further include S701-S702:
[0123] S701: Recording operation information of each type of business data in each data storage service;
[0124] S702: Utilize the large language model to parse the operation statements for operating the various types of business data, and generate parsed text.
[0125] Specifically, this embodiment can provide operation monitoring and monitoring and optimization functions of SQL and other statements for all types of data storage services based on a unified operation proxy service, automatically record operations that cause errors, abnormal responses, and slow performance, and the corresponding various statements, and the IP addresses of source business project instances, automatically record data whose access frequency after caching is lower than a preset value, its storage ratio, and source projects, automatically record various types of relationships that should be cached and the database objects, statements, and projects to which specific operations of NoSQL databases belong, support pre-analysis of execution plans of related SQL statements, support the use of the BERT model to explain the problems of SQL statements in text form according to the analysis results of the execution plan, and continuously fine-tune and optimize the output results of the BERT model in a semi-supervised manner combined with manual correction.
[0126] S120: Acquire the business data of each of the business items.
[0127] It is understandable that this embodiment can obtain data generated during the development, operation, use, maintenance, etc. of a business project and use it as the business data of this embodiment.
[0128] S130: Storing each type of the business data in the corresponding data storage service according to the mapping rule.
[0129] Further, S130 may include:
[0130] According to the sharding rules in the mapping rules, the specified data in each type of business data is stored in the specified data storage service.
[0131] Specifically, this embodiment can provide customized data sharding support across heterogeneous data services to each business project based on the unified operation proxy service level, support the definition of different sharding rules from dimensions such as different business data or different data storage service instances for the same business project, and allow the sharded data to be only part of the source data. For example, old data from different periods can be stored in different types of data storage services according to the time of the data, and data with a certain access frequency can be cached at the same time. The unified operation proxy service can control the data segmentation and request routing and response processing between various data storage services according to the sharding rules, and can avoid the storage of too much data in a larger cache or data cluster, resulting in insufficient capacity, reduced operating performance or unstable cluster services, and the need to split the cluster for a long time or secondary development, which may have a significant impact on the business. Figure 4 The steps of cross-database custom sharding shown can refer to the implementation of this embodiment.
[0132] S140: uniformly operating the various types of business data in the data storage services based on the database engine.
[0133] It is understandable that after adding the database engine, various heterogeneous databases can be integrated, and then the unified operation proxy service can uniformly operate various business data in various data storage services, and realize batch operation to edit various heterogeneous data in one go.
[0134] Furthermore, S140 may include:
[0135] Based on the database engine, various types of business data in each of the data storage services are uniformly migrated, distributed, updated, expanded or queried.
[0136] Exemplarily, the implementation method of unified migration of this embodiment is described below, and the implementation methods of unified distribution, update or query can be referred to accordingly.
[0137] Specifically, this embodiment can integrate the unified operation proxy service and various types of data storage services, and support the automatic migration of data between different data storage service instances in combination with the hardware configuration of the underlying data storage service cluster, whether to expand capacity and the expansion plan. It can realize the trigger conditions for automatic migration, the objects of migration, the source and destination of the migration operation based on the unified operation proxy service, for example: automatic migration of data belonging to different times and having partial characteristics between different types of data storage services. Support the user to specify and adjust the corresponding migration rules, including migrating the data that meets the migration rules within a certain business project or storage cluster to other different types of data storage services; when the relevant original data changes, the unified operation proxy service controls the automatic update of the corresponding cache data and other migrated data. The unified operation proxy service automatically records the newly added data service operation migration route for the business project and controls the routing of subsequent data service operation requests from the business project accordingly. When the source data changes, the unified operation proxy service is responsible for updating the data. Support the recording of relevant event summaries through the UI and operation log of the unified operation proxy service. The scenarios in which automatic migration can be achieved in this embodiment include but are not limited to:
[0138] 1. Based on the unified operation proxy service, the target data storage service and response of each request are automatically analyzed, the amount of data in the cache database that has not been accessed for a certain period of time, its storage occupancy and the business project to which it belongs are accumulated and recorded, and the data that meets the preset rules is asynchronously and automatically migrated by the unified operation proxy service to other NoSQL, relational databases that have undergone performance upgrades, or other types of databases. The preset rules may include the activity of the cached data or the size of the cached data, such as the access frequency within a certain period of time is lower than a certain value, the key or value size exceeds a certain value, the cumulative storage occupancy of a certain range of one or part of the business projects reaches a certain value, and other conditions or a combination of conditions.
[0139] 2. The unified operation proxy service analyzes and summarizes data storage service operations whose performance exceeds the set threshold but is not cached. When the access frequency of such operations reaches a certain value within a certain period of time, the proxy service controls the results of such operations to automatically enable query cache support through cache or NoSQL service cache. Subsequently, the cache is queried first before querying the data storage service. At the same time, when the relevant data changes, the corresponding cache data is automatically updated through proxy control, making up for the deficiencies in cache planning during the research and development process.
[0140] 3. The unified operation proxy service can be configured with two-way or multi-way parallel writing for specific business data. It can write specific business data into one or more other local data storage services, or write the specified business data into a specified table of a specified data storage service through a unified operation proxy service in another computer room. When the unified operation proxy service intercepts operations such as adding, deleting, and modifying specified business data, it automatically responds to write operation requests based on the asynchronous routing configuration of the business multi-write.
[0141] This embodiment can efficiently utilize different types of storage and different types of data storage services to process large-scale data read and write requests for complex Internet business projects, and various types of data processing and analysis requests in the OLTP and OLAP fields can be completed in parallel and efficiently without affecting each other. Moreover, the architecture based on this embodiment can simplify the design and development of architecture data processing and analysis operations.
[0142] The beneficial effects of the embodiments of the present application may include:
[0143] 1) Business projects can conveniently operate different types of underlying data storage services at the same time, reducing the workload of database development and simplifying database development work. It can enable various OLTP and OLAP requests of various business projects of a complex business to be executed in parallel and efficiently, helping to eliminate data inconsistency between cache and business data, cache penetration, cache breakdown, and cache avalanche.
[0144] 2) Support automatic division of the database to which the data belongs according to the different storage requirements and update frequency of business data combined with the expansion requirements and planning of the database cluster, automatically establish the mapping relationship between business data and storage database, and automatically execute query routing through the unified storage proxy service, which helps to continuously achieve a balance between maintaining high query performance, good data storage service stability and controlling storage costs;
[0145] 3) Based on the TCP protocol, it supports the operation of different types of underlying data storage services (including cache and NoSQL) through SQL on one port, supports the automatic implementation of flow control on any database service and its tables and statements from outside the database service independently of the business system, supports the fuse of the database, supports read-only control of database instances and automatically uses read-only databases to carry non-write requests, and supports the establishment of backup chains between databases, which helps to greatly reduce database failures and their impact on the business;
[0146] 4) Provides a database-oriented system security access control mechanism, which fills the gaps or deficiencies in the security control mechanism of some underlying data storage services;
[0147] 5) In response to the shortcomings of cache services and relational databases in the application process, starting from the common needs of business systems for data storage services, a series of solutions are provided to enhance the functions and features of some categories of databases, further enable multiple categories of databases to cooperate with each other and then improve the overall service capabilities through unified operation proxy services.
[0148] Reference Figure 8 The embodiment of the present application further provides a storage and operation device for heterogeneous data, which can implement the above storage and operation method, and the device includes:
[0149] A storage service configuration unit, used to add database engines to multiple different types of data storage services respectively;
[0150] A mapping rule building unit, used to build mapping rules between the business data of multiple business items and each of the data storage services;
[0151] A business data acquisition unit, used to acquire the business data of each of the business items;
[0152] A storage service storage unit, used to store various types of business data in the corresponding data storage service according to the mapping rule;
[0153] The storage service operation unit is used to uniformly operate various types of business data in each of the data storage services based on the database engine.
[0154] The embodiment of the present application also provides a storage and operation system for heterogeneous data, the system comprising a plurality of business project terminals, a unified operation agent service terminal and a plurality of data storage service terminals;
[0155] Wherein, each of the business item terminals is used to obtain corresponding business data;
[0156] The unified operation proxy service terminal is used to execute a storage and operation method for heterogeneous data as described in an embodiment of the present application;
[0157] Each of the data storage service terminals is used to store the business data.
[0158] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0159] Next, the solution of the embodiment of the present application will be described in detail and explained in conjunction with specific application examples:
[0160] Reference Fig. 9, this embodiment provides an example framework diagram of a heterogeneous data storage and operating system.
[0161] In view of the commonalities among the different database technology solutions in the industry, including caching, in terms of supported data types, SQL support, etc., as well as the universal development and reliability requirements of business projects for data storage services, this embodiment proposes a system that can uniformly operate different types of data storage services for business projects on various technology platforms. The system may include a proxy client (i.e., a business project terminal), a unified operation proxy service for heterogeneous databases (i.e., a unified operation proxy service terminal), and different types of underlying database services (i.e., an output storage service terminal).
[0162] The proxy client is similar to a common database driver or cache client. It is a development library that facilitates business projects to connect and operate the unified operation proxy service of heterogeneous databases. The proxy client and the unified operation proxy service of heterogeneous databases communicate with each other through the TCP protocol through the HAProxy service. Multiple instances of the unified operation proxy service of heterogeneous databases can be deployed in one computer room, and they can call each other. The unified operation proxy service of heterogeneous databases supports the management and operation of different types of caches (including Redis, Memcached, etc.), relational databases, NoSQL services, and caches or database clusters encapsulated by other unified operation proxy services of heterogeneous databases. It supports databases that have been upgraded and transformed based on the technology of open source databases themselves, supports initiating connections and executing data access operations according to the protocols required by the underlying database, and supports migrating, distributing, updating, expanding, and querying data between different (types) of data service instances through the unified operation proxy service of heterogeneous databases.
[0163] The storage and operation of heterogeneous data provided in this embodiment may include the following implementation steps:
[0164] 1) Complete the enhancement and deployment of the functions and features of various types of data storage services such as cache services and relational databases;
[0165] 2) Deploy the heterogeneous database unified operation proxy service of this embodiment;
[0166] 3) Configure the database monitoring system for external use and specify the server IP range to be scanned;
[0167] 4) The unified operation proxy service for heterogeneous databases finds various types of data storage services based on the server IP range discovery records, and the technical staff reviews and confirms the information on adjusting the data storage services;
[0168] 5) Optionally, based on the unified operation proxy service of heterogeneous databases, the configuration of the background data storage service can be adjusted or added, and the automatic data migration rules can be set for business projects or data storage services at the same time;
[0169] 6) Build a mapping of business data of business projects between different data storage service instances, including but not limited to which tables are saved to which data storage services, allocation rules, backup order of data storage services, etc.;
[0170] 7) Business projects use proxy clients to complete the development and debugging of the persistence layer (database access layer);
[0171] 8) After the business project is deployed online, different data storage services are operated through the unified operation proxy service of heterogeneous databases;
[0172] 9) When the number of visits increases to a certain level, the corresponding data storage service is expanded based on the actual operation quality of the unified operation proxy service of heterogeneous databases;
[0173] 10) Based on the monitoring data, complete the operations required for daily operation and maintenance of the data storage service when necessary, including data backup / recovery, capacity expansion, etc.
[0174] This embodiment can achieve the following technical effects:
[0175] 1) For business projects, the unified operation proxy service of heterogeneous databases encapsulates the access operations of different types of data storage services, including cache, relational database, NoSQL service and full-text search service, etc. It can be expanded to support more databases and support a database operation initiated from the business system to operate different types of underlying databases at the same time;
[0176] 2) Support automatic storage of data cluster specified processing results to different types of data storage service instances according to different business requirements, data access performance requirements, data storage requirements, data update frequency, etc., support collaborative pre- or real-time calculations in different links of the request processing process, and support automatic merging and returning results when business projects obtain data;
[0177] 3) Provide flexible access methods and access control for business projects, including direct connection and direct operation of specific database services, support for simultaneous operation of different databases through SQL, operation of different database services through a unified RPC protocol, current limiting for specific database instances, and data service fuses based on heterogeneous databases, etc., to improve data service reliability;
[0178] 4) Based on the unified operation proxy service of heterogeneous databases, provide simplified development, security control and other services to various databases, including but not limited to managing the mapping of business data in different database instances, data migration and consistency of multiple write operations to different databases, data synchronization, etc.
[0179] Compared with existing independent cache services or database services, this embodiment improves the functionality and reliability of the data storage service, which is beneficial to reducing the downtime of complex business projects such as the Internet and finance, improving the sustainable service capabilities of business projects for users, and helping to reduce storage costs; it helps to simplify the development of various types of databases for business projects, allowing developers to focus mainly on the analysis and development of business logic, facilitating the rapid development and launch of business projects, and helping to reduce and eliminate common problems such as configuring multiple data sources in a project, developing code for operating different databases separately, causing duplication of work and many errors; it helps to divide the work and cooperate between different professional teams such as business project development, general data storage services for different business projects, and related operations and maintenance, and helps to build and maintain a more powerful and stable data storage service.
[0180] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above storage and operation method when executing the computer program. The electronic device can be any smart terminal including a tablet computer, a car computer, etc.
[0181] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0182] See also Fig.10 , Fig.10 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:
[0183] The processor 1001 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0184] The memory 1002 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1002 can store an operating system and other application programs. When the technical solution provided in the embodiments of this specification is implemented by software or firmware, the relevant program code is stored in the memory 1002, and the processor 1001 calls and executes the storage and operation method of the embodiments of this application;
[0185] Input / output interface 1003, used to implement information input and output;
[0186] The communication interface 1004 is used to realize the communication interaction between the device and other devices. The communication can be realized through a wired manner (such as USB, network cable, etc.) or a wireless manner (such as mobile network, WIFI, Bluetooth, etc.);
[0187] A bus 1005 , which transmits information between various components of the device (e.g., the processor 1001 , the memory 1002 , the input / output interface 1003 , and the communication interface 1004 );
[0188] The processor 1001 , the memory 1002 , the input / output interface 1003 and the communication interface 1004 are connected to each other in communication within the device via the bus 1005 .
[0189] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned storage and operation method is implemented.
[0190] It can be understood that the contents of the above method embodiments are all applicable to the present storage medium embodiments, the functions specifically implemented by the present storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0191] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0192] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0193] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0194] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0195] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0196] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0197] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0198] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0199] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0200] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0201] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.
[0202] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. A method for storing and operating heterogeneous data, characterized in that: Applied to unified operation proxy data storage service, the method comprises the following steps: Add database engines to multiple different types of data storage services; Constructing mapping rules between business data of multiple business projects and each of the data storage services; Acquire the business data of each of the business items; According to the mapping rule, storing each type of business data in the corresponding data storage service; Based on the database engine, various types of business data in each of the data storage services are uniformly operated.
2. A method for storing and operating heterogeneous data according to claim 1, characterized in that: The data storage services include cache services, relational databases and NoSQL databases; The step of adding database engines to multiple different types of data storage services respectively includes the following steps: Add any one of SQLite, LevelDB or RocksDB to the cache service as the database engine; the database engine adding key-value pairs to the relational database; The database engine for adding full-text search and SQL query to the cache service and the relational database.
3. A method for storing and operating heterogeneous data according to claim 1, characterized in that: Before respectively adding database engines to multiple different types of data storage services, the method further includes the following steps: Acquire each of the data storage services through a service discovery protocol, or acquire each of the data storage services from monitoring information of the data storage services; Configure routing, access rights, data desensitization, access protocols for each of the data storage services, combine to form chain services, configure data operation rules according to geographic location, access flow control, fuse backup and read-only operations; The step of configuring the routes for each of the data storage services includes: configuring the routes according to the order of the business items; The step of configuring the access rights for each of the data storage services includes: obtaining the access rights configured by the user through a user interface of a communication protocol; The step of configuring the data desensitization for each of the data storage services includes: encapsulating the authentication and connection operations of the execution terminal of the business project to each of the data storage services through a preset communication protocol, determining the account and IP address allowed to access each of the data storage services, and setting the access rights of each of the data storage services, the data tables of each of the data storage services, and the fields of each of the data tables; The step of configuring the access protocol for each of the data storage services includes: using a preset proxy client to communicate with the proxy service according to the access protocol of each of the data storage services, encapsulating the request for each of the data storage services and parsing the response; The step of combining the data storage services to form the chain service includes: combining a plurality of different types of data storage services to form the chain service; The step of configuring the data operation rules for each of the data storage services according to the geographical location includes: forwarding, copying or writing the data that needs to be operated determined by each of the data storage services to the data storage service at the target geographical location; The step of configuring the access flow limiting for each of the data storage services includes: obtaining the flow limiting conditions configured by the user through the user interface, and limiting the flow of the corresponding data storage service when the flow limiting conditions are triggered; recommending to the user the access volume threshold that triggers the flow limiting according to the response performance, resource consumption and stability of each of the data storage services; dynamically limiting the access volume of the data storage service for each of the data storage service instances, tables, statements corresponding to operations and the business items according to the corresponding triggering conditions; The step of configuring the fuse backup for each of the data storage services includes: configuring a fuse condition for triggering the fuse, fuse-breaking the corresponding data storage service when the fuse condition is triggered, and backing up the data of the blown data storage service to other data storage services that meet the preset performance conditions; The step of configuring the read-only operation for each of the data storage services includes: configuring a preset read-only condition, and when the read-only condition is triggered, configuring the corresponding data storage service to only accept the read-only operation; Obtain access topology and access data from the business project to various data storage services.
4. The method for storing and operating heterogeneous data according to claim 1, characterized in that: Storing the various types of business data in the corresponding data storage service according to the mapping rule comprises the following steps: According to the sharding rules in the mapping rules, the specified data in each type of business data is stored in the specified data storage service.
5. The method for storing and operating heterogeneous data according to claim 1, characterized in that: After storing the various types of business data in the corresponding data storage service according to the mapping rule, the method further includes the following steps: Preloading a preset range of data through the cache according to the type, priority and historical access frequency of each type of business data; Synchronously writing various types of business data to other data storage services; Expand the persistence layer framework of the data storage service to save part or all of the business data of the same business project to different types of data storage services; The cache data corresponding to all the business data in the data storage service is saved through a Bloom or Cuckoo filter.
6. A method for storing and operating heterogeneous data according to claim 1, characterized in that: The unified operation of various types of business data in various data storage services based on the database engine includes the following steps: Based on the database engine, various types of business data in each of the data storage services are uniformly migrated, distributed, updated, expanded or queried.
7. A method for storing and operating heterogeneous data according to any one of claims 1 to 6, characterized in that: The method further comprises the following steps: Recording the operation information of each type of business data in each of the data storage services; The large language model is used to parse the operation statements for operating various types of business data and generate parsed text.
8. A storage and operation device for heterogeneous data, characterized in that: The device comprises: A storage service configuration unit, used to add database engines to multiple different types of data storage services respectively; A mapping rule building unit, used to build mapping rules between the business data of multiple business items and each of the data storage services; A business data acquisition unit, used to acquire the business data of each of the business items; A storage service storage unit, used to store various types of business data in the corresponding data storage service according to the mapping rule; The storage service operation unit is used to uniformly operate various types of business data in each of the data storage services based on the database engine.
9. A storage and operation system for heterogeneous data, characterized in that: The system includes a plurality of business project terminals, a unified operation agent service terminal and a plurality of data storage service terminals; Wherein, each of the business item terminals is used to obtain corresponding business data; The unified operation proxy service terminal is used to execute the storage and operation method of heterogeneous data according to any one of claims 1 to 7; Each of the data storage service terminals is used to store the business data.
10. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements a heterogeneous data storage and operation method as described in any one of claims 1 to 7 when executing the computer program.
Citation Information
Patent Citations
Standard-SQL-based method for implementing dual-engine database system
CN106844545A
Method and device for providing micro-service based on data service platform, and storage medium
CN110149364A
Cross-platform software design method
CN111240643A
System and method for realizing strong consistency of transactions across different database engines
CN112182082A
Method and system for distributed integration of multi-source heterogeneous data based on unified access
CN113641862A
Cited By
Method and system for collecting, storing and reading multi-source heterogeneous data for supercomputing platform
CN119003599A
Distributed rapid and secure configuration deployment system
CN119496780A
Data synchronization method and device of virtual simulation platform and computer equipment
CN119513208A
Memory database starting method, system and equipment and medium
CN120407543A
Unified label data processing method and system based on multi-source data environment
CN120763243A
