Data processing method and device, electronic equipment and storage medium
By determining the processing mode based on the mapping information and identity in the database system, and routing the request to the target database system, it solves the problem that the database deployment solution cannot meet different business needs, achieves flexible access strategies and efficient data processing, and avoids Business loss and cluster intrusion.
Patent Information
- Application Number
- CN202410760806.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-13
- Publication Date
- 2024-09-03
AI Technical Summary
Existing database deployment solutions cannot meet the flexibility requirements of different data processing businesses for response speed and data consistency. Especially when network delays are large, they may lead to business logic problems, and the cluster management and control strategies are complex, and have high requirements on the built database. Upgrading and integrating clusters requires invasive operations, resulting in business losses.
The target processing mode is determined by mapping information and the identity in the request to be processed, and the target database system is determined from multiple database systems according to the operation category, and the request to be processed is routed to the target database system for data processing, achieving flexibility across database systems. Access policies separate storage and routing engines to avoid intrusion into existing clusters.
It realizes the cross-database system access capability of the database deployment solution, has higher flexibility, supports the configuration of different business needs, avoids business logic problems and losses caused by cluster upgrades, and is suitable for cloud solutions with multiple database systems, especially suitable for Private cloud environment.
Smart Images

Figure CN118585586A
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing technology, in particular to the field of big data. More specifically, the present disclosure provides a data processing method, device, electronic device, storage medium and computer program product. Background Art
[0002] In the cloud database construction plan, different data processing businesses require different data access strategies in different database systems. For example, some data processing businesses require fast response speed but low requirements for data consistency, others require high data consistency but do not require millisecond-level responses, and still others require high requirements for both consistency and response speed. However, the current database deployment plan cannot meet the needs of data processing businesses. Summary of the invention
[0003] The present disclosure provides a data processing method, apparatus, electronic device, storage medium, and computer program product.
[0004] According to one aspect of the present disclosure, a data processing method is provided, comprising: in response to receiving a request to be processed, determining a target processing mode corresponding to the request to be processed according to mapping information and an identity identifier in the request to be processed; wherein the mapping information represents a correspondence between an object identity and a processing mode; determining a target database system from a plurality of database systems according to an operation category and a target processing mode in the request to be processed; and routing the request to be processed to the target database system for data processing.
[0005] According to another aspect of the present disclosure, a data processing device is provided, comprising: a mode determination module, a system determination module and a routing module. The mode determination module is used to determine, in response to receiving a pending request, a target processing mode corresponding to the pending request according to mapping information and an identity identifier in the pending request; wherein the mapping information represents the correspondence between the object identity and the processing mode. The system determination module is used to determine a target database system from a plurality of database systems according to an operation category and a target processing mode in the pending request. The routing module is used to route the pending request to the target database system for data processing.
[0006] According to another aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method provided by the present disclosure.
[0007] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable a computer to execute the method provided by the present disclosure.
[0008] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the method provided by the present disclosure is implemented.
[0009] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0011] Figure 1 is a schematic diagram of an application scenario of a data processing method and device according to an embodiment of the present disclosure;
[0012] Figure 2 is a schematic flow chart of a data processing method according to an embodiment of the present disclosure;
[0013] Figure 3 is a schematic diagram of a data processing method according to another embodiment of the present disclosure;
[0014] Figure 4 is a schematic diagram of a data processing method according to another embodiment of the present disclosure;
[0015] Figure 5 is a schematic diagram of a data processing method according to another embodiment of the present disclosure;
[0016] Figure 6 is a schematic structural block diagram of a data processing device according to an embodiment of the present disclosure; and
[0017] Figure 7 It is a structural block diagram of an electronic device used to implement the data processing method of the embodiment of the present disclosure. DETAILED DESCRIPTION
[0018] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0019] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0020] In the technical solution of the present disclosure, the user's authorization or consent is obtained before obtaining or collecting the user's personal information.
[0021] In some embodiments, there may be two database systems, namely a first database system and a second database system, each database system including an agent module and multiple database instances.
[0022] The cross-database system reading solution can be to build a cross-database system database cluster, the database instances in the first database system and the second database system are clusters with the same master-slave relationship, the proxy module maintains the IP addresses of different database systems, and the identities for accessing database instances are not repeated in different database systems. After the proxy module obtains the pending request of the application, the proxy module identifies the identity of the application and reads the data nearby based on the control application.
[0023] The above technical solution has the following defects:
[0024] First, the read strategies of the identities of different database systems are the same, and different flexible read strategies cannot be implemented in different database systems, for example, it is impossible to read data in the first database system and write data in the second database system. This will cause business logic problems when there is a large network delay between different database systems, especially when the business system does not require a high speed response for a single transaction, but has a high requirement for data consistency.
[0025] Secondly, the cluster management strategy is complex, and different database systems need to build a unified set of database clusters. For example, the database instances of the first database system and the second database system are the same.
[0026] Furthermore, if database clusters of different database systems have already been built, the above technical solution will invade the already built database clusters of different database systems when the two clusters need to be integrated into one cluster. For example, in the process of upgrading the cluster, it is necessary to change the management and control, cluster configuration, and network-related configurations across database systems. From the perspective of actual operation and maintenance, business losses are irreversible within the operation window.
[0027] This embodiment aims to provide a data processing method, which can determine the target processing mode corresponding to the pending request according to the mapping information and the identity identifier in the pending request, and then determine the target database system from multiple database systems according to the operation category and the target processing mode in the pending request, and route the pending request to the target database system for data processing. It can be seen that this method essentially separates routing access from data storage, similar to the design of separating computing from storage, and combines the storage engine with the routing engine.
[0028] The technical solution provided by the embodiments of the present disclosure has the following technical effects:
[0029] First, the database deployment solution has the ability to access data across database systems, and can configure flexible access policies according to the needs of different upper-level businesses, which is more flexible. For example, by configuring mapping information, data can be read in the first database system and written in the second database system.
[0030] Secondly, database instances of different database systems belong to different clusters and can have different data scales and data contents, or they can have consistent data. For example, one database system can have 1,000 tables, and another database system can synchronize only 100 of the more important tables, and not synchronize the remaining 900 tables.
[0031] Furthermore, in the process of implementing routing, by adding a layer of routing strategy, there is no intrusion into the existing database clusters of different database systems, and there is no need to upgrade the existing database clusters. In addition, the expansion and reduction of each database system does not require the update of the IP segment settings related to the nearest network access.
[0032] The technical solution provided by the present disclosure can be applied to cloud solutions for building multi-database systems, especially private cloud solutions. Different database systems can deploy private cloud control modules, which frequently access the meta-information library. A large number of control modules have different access methods and requirements for metadata. Meta-information libraries across database systems can be deployed using this solution.
[0033] The technical solution provided by the present disclosure will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0034] Figure 1 It is a schematic diagram of an application scenario of the data processing method and device according to an embodiment of the present disclosure.
[0035] It should be noted that Figure 1 What is shown is merely an example of a system architecture to which the embodiments of the present disclosure can be applied, in order to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.
[0036] like Figure 1 As shown, the system architecture 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired and / or wireless communication links, etc.
[0037] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Terminal devices 101, 102, 103 can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptops, desktop computers, etc.
[0038] The server 105 may be a server that provides various services, such as a background management server (only an example) that provides support for websites browsed by users using the terminal devices 101, 102, and 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as data read from the pending request database, etc.) to the terminal device.
[0039] It should be noted that the data processing method provided in the embodiment of the present disclosure can generally be executed by the server 105. Accordingly, the data processing device provided in the embodiment of the present disclosure can generally be set in the server 105. The data processing method provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105. Accordingly, the data processing device provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105.
[0040] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.
[0041] Figure 2 is a schematic flow chart of a data processing method according to an embodiment of the present disclosure.
[0042] like Figure 2 As shown, the data processing method 200 may include operations S210 to S230.
[0043] In operation S210, in response to receiving a request to be processed, a target processing mode corresponding to the request to be processed is determined according to mapping information and an identity in the request to be processed.
[0044] For example, the pending request may be sent by an application installed on the electronic device.
[0045] For example, the pending request includes an identity identifier, and the account used to log in to the application can be used as the identity identifier. The same application can correspond to multiple login accounts. The pending request can carry the identity identifier in the form of a comment or in the form of a protocol. This embodiment does not limit the way in which the identity identifier is carried in the pending request.
[0046] For example, the pending request also includes an operation category, and the operation category may include a write operation and a read operation. The write operation may include an insert operation, a delete operation, and an update operation, and the read operation may include a select operation.
[0047] For example, the mapping information represents the correspondence between the object identity and the processing mode, and the mapping information may be pre-configured according to actual needs. The mapping information may be recorded in the form of a data table, a key-value pair, or other methods.
[0048] For example, the processing mode may indicate that operations of a predetermined category are routed to corresponding database systems, such as routing read operations to one database system and routing write operations to another database system.
[0049] In operation S220 , a target database system is determined from a plurality of database systems according to the operation category and the target processing mode in the request to be processed.
[0050] For example, each database system corresponds to a region, for example, one database system is deployed in Beijing and another database system is deployed in Guangzhou.
[0051] For example, if the operation category in the pending request is a read operation, and the target processing mode requires that the read operation be routed to the first database system, then the first database system is the target database system. For another example, if the operation category in the pending request is a write operation, and the target processing mode requires that the read operation be routed to the second database system, then the second database system is the target database system.
[0052] In operation S230 , the request to be processed is routed to the target database system for data processing.
[0053] For example, the pending request is forwarded to the target database system, thereby reading or writing data in the database instance of the target database system.
[0054] According to the technical solution provided by the embodiment of the present disclosure, the mapping information can characterize the correspondence between the identity identifier, the operation category and the database system. The target database system corresponding to the read / write operation of a certain identity identifier can be determined through the mapping information. For example, the read operation of the first identity identifier corresponds to one database system, and the write operation of the second identity identifier corresponds to another database system. Therefore, the database deployment solution has the ability to access across database systems, and can configure flexible access strategies according to the needs of different upper-level businesses, which is more flexible.
[0055] In addition, database instances of different database systems belong to different clusters and can have different data scales and data contents, or they can have consistent data, so the data consistency requirements for different database systems are relatively low. In addition, in the process of implementing routing, by adding a layer of routing strategy, there is no intrusion into the existing database clusters that have been built by different database systems, and there is no need to upgrade the existing database clusters. In addition, the expansion and reduction of each database system does not require updating the IP segment settings related to the nearest network access.
[0056] According to another embodiment of the present disclosure, the processing mode represents the correspondence between the operation category and the database system.
[0057] For example, symbols such as 0, 1, 2, and 3 may be used to represent processing modes, and the meaning of each symbol may be preconfigured. Taking a plurality of database systems including a first database system and a second database system as an example, 0 may represent a first processing mode, that is, write operations are routed to the first database system, and read operations are routed to the second database system. 1 may represent a second processing mode, and both write operations and read operations are routed to the first database system. 2 may represent a third processing mode, that is, both write operations and read operations are routed to the second database system. 3 may represent a fourth processing mode, that is, read operations are routed to the first database system, and write operations are routed to the second database system. It is understandable that the processing mode may include at least one of the above-mentioned first processing mode, second processing mode, third processing mode, and fourth processing mode.
[0058] In this embodiment, the mapping information includes multiple processing modes, so the requests to be processed can be flexibly routed, thereby improving the flexibility of accessing data.
[0059] It should be noted that this embodiment takes a database system with a master-slave architecture as an example to illustrate the processing mode. In other embodiments, multiple database systems may adopt other architectures, and accordingly, the number of multiple database systems may be more than 2, and the processing mode may also include other modes.
[0060] Figure 3is a schematic diagram of a data processing method according to another embodiment of the present disclosure.
[0061] In this embodiment, the data processing system includes a routing module and multiple database systems.
[0062] The multiple routing modules include, for example, routing modules 330 and 340. The multiple database systems include, for example, a first database system 310 and a second database system 320. Each database system corresponds to a region, for example, the first database system 310 is deployed in Beijing, and the second database system 320 is deployed in Guangzhou. Each database system may include a proxy module and multiple database instances, and data is stored in the database instances. For example, the first database system 310 may include a proxy module 311 and a database instance 312, and the second database system 320 may include a proxy module 321 and a database instance 322. The routing modules may correspond one to one with the database systems, for example, one routing module 320 corresponds to the first database system 310, and another routing module 340 corresponds to the second database system 320. Alternatively, multiple database systems may correspond to one routing module.
[0063] After the routing module obtains the pending request, it can route the pending request to the corresponding database system based on the mapping information. For example, the routing module 330 forwards the pending request to the proxy module 311 in the first database system 310. Then the proxy module 311 in the first database system 310 can determine the target database instance from the multiple database instances 312 in the target database system based on the operation category and the data to be operated in the pending request, and read or write the data to be operated in the target database instance based on the operation category. The proxy module 311 can read and write data from other database systems without crossing regions. The proxy module 311 only reads and writes data in the database instance in the first database system 310 where it is located. In addition, it can be understood that, taking reading data as an example, sometimes reading one database instance can obtain the required data, and sometimes it is necessary to read multiple database instances to obtain the required data. This embodiment does not limit the number of database instances read.
[0064] Figure 4 is a schematic diagram of a data processing method according to another embodiment of the present disclosure.
[0065] In this embodiment, the data processing system includes a routing module 430 and multiple database systems.
[0066] The multiple database systems include, for example, a first database system 410 and a second database system 420. Each database system corresponds to a region, for example, the first database system 410 is deployed in Beijing, and the second database system 420 is deployed in Guangzhou. Each database system may include a proxy module and multiple database instances, and data is stored in the database instances. For example, the first database system 410 may include a proxy module 411 and a database instance 412, and the second database system 420 may include a proxy module 421 and a database instance 422. The routing module 430 may correspond to the database system one by one, or multiple database systems may correspond to one routing module 430.
[0067] The implementation of the routing module 430 is to configure the correspondence between the identity and the processing mode through dynamic regulation, and perform routing control on the read and write operations of the identity. The routing module 430 maintains mapping information 431, and the mapping information 431 in the routing module 430 can be dynamically loaded, dynamically modified, fully replaced, and incrementally replaced, such as replacing an empty routing table with a 10-line full routing table, and multiple lines of routing can also be added on this basis.
[0068] The mapping information 431 represents the correspondence between the identity identifier and the processing mode, and the processing mode can be represented by 0, 1, 2, and 3. 0 can represent that the write operation is routed to the first database system 410, and the read operation is routed to the second database system 420. 1 can represent that both the write operation and the read operation are routed to the first database system 410. 2 can represent that both the write operation and the read operation are routed to the second database system 420. 3 can represent that the read operation is routed to the first database system 410, and the write operation is routed to the second database system 420.
[0069] For example, when the identity (such as an account) used by the first application is logical_w, the routing module 430 can query the processing mode of the identity based on the mapping information 431 to be 0, indicating read-write separation, and route the write operation to the first database system 410, and route the read operation to the second database system 420, wherein the write operation may include the insert operation, the delete operation, and the update operation, and the read operation may include the select operation. The routing module 430 will identify the pending requests of the first application, and then route the pending requests including the insert operation, the delete operation, and the update operation to the first database system 410, which will be distributed to the specific database instance by the middleware of the first database system 410. And the pending requests including the select operation will be routed to the second database system 420, which will be distributed to the specific database instance by the middleware of the second database system 420.
[0070] For example, when the identity used by the first application is neu_w, the routing module 430 can query the processing mode of the identity based on the mapping information 431 to be 1, so that the pending request including any one of the select operation, insert operation, delete operation and update operation will be routed to the middleware of the first database system 410.
[0071] For example, when the identity used by the third application is aim_w, the routing module 430 can query the processing mode of the identity based on the mapping information 431 to be 2, so that the pending request including any one of the select operation, insert operation, delete operation and update operation will be routed to the second database system 420.
[0072] In this embodiment, the routing module 430 parses and identifies the pending request, and establishes different connections with the database instance in the database system according to the identity identifier, operation category and mapping information 431 in the pending request. In actual applications, the processing mode in the mapping information 431 can be configured according to actual business needs, so as to control the pending request of the application to read nearby or remotely access the remote database system, and the mapping information 431 can be dynamically modified according to the data characteristics, so as to change the data routing strategy.
[0073] It is understandable that whether the pending request is to read locally or to access a remote database system is determined according to actual business needs. For example, the identity of an application corresponds to the first region, and the data update frequency required is low. The application writes data to the second database system 420 in the second region. The data update interval between the first region and the second region is 100ms. Some businesses can accept a data difference of 100ms, but cannot accept a data delay of 100ms. In this case, data can be read directly from the first database system 410 in the first region.
[0074] Figure 5 is a schematic diagram of a data processing method according to another embodiment of the present disclosure.
[0075] In this embodiment, the data processing system includes a routing module and multiple database systems.
[0076] The multiple routing modules include, for example, routing modules 530 and 540. The multiple database systems include, for example, a first database system 510 and a second database system 520. Each database system corresponds to a region, for example, the first database system 510 is deployed in Beijing, and the second database system 520 is deployed in Guangzhou. Each database system may include a proxy module and multiple database instances, and data is stored in the database instances. For example, the first database system 510 may include a proxy module 511 and a database instance 512, and the second database system 520 may include a proxy module 521 and a database instance 522. The routing modules may correspond one to one with the database systems, or multiple database systems may correspond to one routing module, for example, one routing module 520 corresponds to the first database system 510, and another routing module 540 corresponds to the second database system 520.
[0077] Database instances of different database systems belong to different clusters and can have different data scales and data contents, or they can have consistent data. Data can be synchronized or not between different database systems. Next, we will explain the data synchronization methods of database instances of different database systems.
[0078] In one example, a cloud-native method can be used for data synchronization. This method uses a master-slave approach for master-slave synchronization. Full data or incremental data can be synchronized. The synchronization process can be real-time synchronization.
[0079] In another example, a data transfer tool can be used for data synchronization. The tool can be configured to synchronize only certain fields of certain tables, which is highly flexible. The full data can be synchronized, as well as incremental data. The synchronization process can be real-time synchronization.
[0080] In another example, the T+N synchronization method can be used. In this method, statistical data, report data, and data from different database systems may not be synchronized in real time. For example, when T+1 is used, the full or incremental data of a database system can be synchronized to other database systems on the next day. This synchronization method is suitable for data analysis scenarios.
[0081] In another example, 0+delay synchronization can be used to keep the data of the two database systems a set time difference. For example, the incremental data of one database system can be synchronized to other database systems at a predetermined time interval, and the predetermined time interval can be in seconds or minutes. This synchronization method is suitable for real-time synchronization scenarios. In addition, the synchronization mechanism can be turned off, so that the two database systems are no longer synchronized, and the data of the two database systems can be completely different.
[0082] Through the above data synchronization method, the application can access data from different database systems more flexibly. It only needs to configure the identity identifier and the mapping information of the corresponding database system in the routing module to meet the data access needs of the application.
[0083] Figure 6 It is a schematic structural block diagram of a data processing device according to an embodiment of the present disclosure.
[0084] like Figure 6 As shown, the data processing device 600 may include a mode determination module 610 , a system determination module 620 and a routing module 630 .
[0085] The mode determination module 610 is used to determine the target processing mode corresponding to the request to be processed in response to receiving the request to be processed, according to the mapping information and the identity identifier in the request to be processed; wherein the mapping information represents the correspondence between the object identity and the processing mode.
[0086] The system determination module 620 is used to determine a target database system from a plurality of database systems according to the operation category and the target processing mode in the request to be processed.
[0087] The routing module 630 is used to route the pending request to the target database system for data processing.
[0088] According to an embodiment of the present disclosure, a processing mode represents a correspondence between an operation category and a database system.
[0089] According to an embodiment of the present disclosure, the plurality of database systems include a first database system and a second database system, the operation categories include write operations and read operations, and the processing modes in the mapping information include at least one of a first processing mode, a second processing mode, a third processing mode, and a fourth processing mode. The first processing mode represents that the write operation is routed to the first database system, and the read operation is routed to the second database system. The second processing mode represents that both the write operation and the read operation are routed to the first database system. The third processing mode represents that both the write operation and the read operation are routed to the second database system. The fourth processing mode represents that the read operation is routed to the first database system, and the write operation is routed to the second database system.
[0090] According to an embodiment of the present disclosure, the routing module includes: a first determining submodule, a second determining submodule and a read-write submodule. The first determining submodule is used to forward the pending request to the target database system. The second determining submodule is used for the target database system to determine the target database instance from multiple database instances in the target database system based on the operation category and the data to be operated in the pending request. The read-write submodule is used to read or write the data to be operated in the target database instance.
[0091] According to an embodiment of the present disclosure, each database system corresponds to a region.
[0092] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, comprising at least one processor; and a memory communicatively connected to the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned data processing method.
[0093] According to an embodiment of the present disclosure, the present disclosure further provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the above data processing method.
[0094] According to an embodiment of the present disclosure, the present disclosure further provides a computer program product, including a computer program, and the computer program implements the above data processing method when executed by a processor.
[0095] Figure 7 1 is a block diagram of an electronic device for implementing the data processing method of an embodiment of the present disclosure. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0096] like Figure 7 As shown, the device 700 includes a computing unit 701, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 702 or a computer program loaded from a storage unit 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the device 700 can also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0097] A number of components in the device 700 are connected to the I / O interface 705, including: an input unit 706, such as a keyboard, a mouse, etc.; an output unit 707, such as various types of displays, speakers, etc.; a storage unit 708, such as a disk, an optical disk, etc.; and a communication unit 709, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 709 allows the device 700 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0098] The computing unit 701 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 701 performs the various methods and processes described above, such as data processing methods. For example, in some embodiments, the data processing method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 708. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 700 via the ROM 702 and / or the communication unit 709. When the computer program is loaded into the RAM 703 and executed by the computing unit 701, one or more steps of the data processing method described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to perform the data processing method in any other appropriate manner (e.g., by means of firmware).
[0099] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0100] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0101] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0102] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0103] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0104] A computer system may include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship to each other.
[0105] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0106] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A data processing method, comprising: In response to receiving a pending request, determining a target processing mode corresponding to the pending request according to mapping information and an identity identifier in the pending request; wherein the mapping information represents a correspondence between an object identity and a processing mode; Determining a target database system from a plurality of database systems according to the operation category in the request to be processed and the target processing mode; and The pending request is routed to the target database system for data processing.
2. The method according to claim 1, wherein: The processing mode represents the correspondence between the operation category and the database system.
3. The method according to claim 2, wherein: The multiple database systems include a first database system and a second database system, the operation category includes a write operation and a read operation, and the processing mode in the mapping information includes at least one of the following: In a first processing mode, write operations are routed to a first database system and read operations are routed to a second database system; A second processing mode routes both write operations and read operations to the first database system; A third processing mode routes both write operations and read operations to the second database system; as well as In a fourth processing mode, read operations are routed to the first database system, and write operations are routed to the second database system.
4. The method according to claim 1, wherein: The routing of the pending request to the target database system for data processing comprises: forwarding the pending request to the target database system; The target database system determines a target database instance from a plurality of database instances in the target database system based on the operation category and the data to be operated in the request to be processed; and The data to be operated is read or written in the target database instance.
5. The method according to claim 1, wherein: Each database system corresponds to a region.
6. A data processing device, comprising: A mode determination module, configured to, in response to receiving a request to be processed, determine a target processing mode corresponding to the request to be processed according to mapping information and an identity identifier in the request to be processed; wherein the mapping information represents a correspondence between an object identity and a processing mode; a system determination module, configured to determine a target database system from a plurality of database systems according to the operation category in the request to be processed and the target processing mode; and A routing module is used to route the pending request to the target database system for data processing.
7. The device according to claim 6, wherein: The processing mode represents the correspondence between the operation category and the database system.
8. The device according to claim 7, wherein: The multiple database systems include a first database system and a second database system, the operation category includes a write operation and a read operation, and the processing mode in the mapping information includes at least one of the following: In a first processing mode, write operations are routed to a first database system and read operations are routed to a second database system; A second processing mode routes both write operations and read operations to the first database system; A third processing mode routes both write operations and read operations to the second database system; as well as In a fourth processing mode, read operations are routed to the first database system, and write operations are routed to the second database system.
9. The device according to claim 6, wherein: The routing module includes: A first determining submodule, configured to forward the request to be processed to the target database system; A second determination submodule, configured for the target database system to determine a target database instance from a plurality of database instances in the target database system based on the operation category and the data to be operated in the request to be processed; and The read-write submodule is used to read or write the data to be operated in the target database instance.
10. The device according to claim 6, wherein: Each database system corresponds to a region.
11. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 5.
12. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 5.
13. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Systems and methods for database proxy request switching
CN103403707A
Master-slave backup system of database
CN114253770A
Integrated access device controller
CN1435036A
Cloud database connection multiplexing
US20150095343A1
System and method for heterogeneous data migration in real-time
WO2004077216A2
Cited By
Data processing method and equipment of energy storage system, medium and data processing system
CN120996981A
