Data processing method and device, electronic equipment and medium
By acquiring system and account status and combining it with routing strategies to determine the database, batch database migration was implemented, which solved the problem of significant business impact during database migration and ensured business continuity and user experience.
Patent Information
- Application Number
- CN202511713332.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-20
- Publication Date
- 2026-02-10
AI Technical Summary
Existing technologies have several drawbacks during database migration, including the large scope of business impact and high risk caused by a one-time switch after downtime, the inability to switch accounts individually, and the inability to support switching of other business elements.
By acquiring the system's switching status and account status, and combining this with the account's routing status, a routing strategy is used to determine the database where the data to be processed resides, enabling data processing operations. This supports batch database migration, ensuring uninterrupted business operations.
Data processing can be completed without downtime, ensuring the normal execution of related business operations, improving user experience, and reducing the risks and impacts of database switching.
Smart Images

Figure CN121501769A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, in particular to a data processing method and device, electronic equipment and medium. BACKGROUND
[0002] With the development of business and technology update, information systems face the challenge of replacing the database in the running cycle. For the core system supporting the operation of the bank, due to the high importance, large amount of data, complex business scenarios, the system response time and system availability and other parameters are more sensitive. In the related technology, in the database migration process of the system, the strategy of switching the database once after shutdown is adopted, which faces many risks such as large business impact range, insufficient verification of the ability of the new database to bear the business. SUMMARY
[0003] The main purpose of the present application is to provide a data processing method, device, electronic equipment and medium, so as to at least solve the problem of affecting business caused by data migration in the prior art.
[0004] In order to achieve the above purpose, according to one aspect of the present application, a data processing method is provided, which comprises: acquiring the switching state of the system and the account state of the target account to which the to-be-processed data belongs; determining the routing state according to whether the target account is in the routing list; wherein the routing list is the account list of the to-be-switched database; determining the database where the to-be-processed data is located by routing strategy according to at least one of the switching state, the account state or the routing state; and performing data processing operation based on the database to obtain processing result. The present application determines the database where the to-be-processed data is located by combining the switching state of the system and the account state of the account with the routing state of the account, and then performs data processing operation based on the database. The present application can realize data processing without shutdown, ensure the normal execution of related business, and is beneficial to improving user experience.
[0005] Optionally, the determining the database where the to-be-processed data is located by routing strategy according to at least one of the switching state, the account state or the routing state comprises:
[0006] In the case that the switching state is completed database switching, the database where the to-be-processed data is located is determined as the target database;
[0007] In the case that the routing state is not in the list, the database where the to-be-processed data is located is determined as the original database;
[0008] In the case that the account state is completed data migration or new account opening on the target database, the database where the to-be-processed data is located is determined as the target database.
[0009] Optionally, the account state comprises an account switch date, and the database where the data to be processed is located is determined according to at least one of the switch state, the account state or the routing state by a routing strategy, comprising:
[0010] In the case that the switch state is not completed database switch, the routing state is in the list, the account state is not completed data migration, and the account switch date is after the current date, an error reminder is sent, and the data processing operation is stopped;
[0011] In the case that the switch state is not completed database switch, the routing state is in the list, the account state is initial state or in switch, and the account switch date is before the current date, the database where the data to be processed is located is determined as the original database;
[0012] In the case that the switch state is not completed database switch, the routing state is in the list, and the account switch date is the current date, the database where the data to be processed is located is determined according to the switch state.
[0013] Optionally, the database where the data to be processed is located is determined according to the switch state, comprising:
[0014] In the case that the switch state is in the stopped database switch, if the data processing operation is a query operation, the database where the data to be processed is located is determined as the original database; if the data processing operation is not a query operation, the data processing operation is stopped;
[0015] In the case that the switch state is in the non-stopped database switch, if the data processing operation is a query operation, the database where the data to be processed is located is determined as the original database; if the data processing operation is not a query operation, the data processing operation is executed, and the target account is removed from the routing list.
[0016] Optionally, the method further comprises:
[0017] obtaining a business element; the business element comprises input information required by the data processing operation;
[0018] performing database switch operation on the system in batches according to the business element.
[0019] Optionally, the method further comprises:
[0020] establishing the account state system and the switch state system; wherein the account state comprises initial state, in switch, completed data migration, and newly opened account on the target database; and the switch state comprises to-be-executed database switch, in non-stopped database switch, in stopped database switch, and completed database switch.
[0021] real-time detecting the system and the target account, marking the switching state and the account state.
[0022] Optionally, the real-time detecting the system and the target account, marking the switching state comprises:
[0023] In the case of performing the non-stop switching, determining the switching state as in non-stop database switching;
[0024] After completing the current batch of switching, determining the switching state as waiting for performing database switching;
[0025] After completing all switching of the system, determining the switching state as having completed database switching.
[0026] To achieve the above object, according to another aspect of the present application, a data processing apparatus is provided, comprising:
[0027] an acquisition module, configured to acquire a switching state of a system and an account state of a target account to which to-be-processed data belongs;
[0028] a routing module, configured to determine a routing state according to whether the target account is in a routing list, wherein the routing list is an account list to be switched to a database;
[0029] a strategy module, configured to determine a database in which to-be-processed data is located according to at least one of the switching state, the account state or the routing state, through a routing strategy;
[0030] a processing module, configured to perform a data processing operation based on the database, to obtain a processing result.
[0031] According to another aspect of the present application, an electronic device is provided, comprising a memory and a processor, the memory stores a computer program, and the processor is configured to execute the above-mentioned data processing method through the computer program.
[0032] According to another aspect of the present application, a computer readable storage medium is provided, comprising a stored program, wherein when the program runs, the computer readable storage medium controls the device in which the computer readable storage medium is located to execute the above-mentioned data processing method.
[0033] By applying the technical solution of the present application, the database in which to-be-processed data is located is determined through the switching state of the system and the account state of the account, combined with the routing state of the account, and then the data processing operation is performed based on the database. The present application can realize data processing without stopping, guaranteeing the normal execution of related businesses and being beneficial to improving user experience. BRIEF DESCRIPTION OF DRAWINGS
[0034] The drawings constituting a part of the specification illustrate the present application, the exemplary embodiments of the present application and the description thereof serve to explain the present application, and do not constitute an improper limitation on the present application. In the drawings:
[0035] Figure 1 A schematic diagram of an application scenario of a data processing method provided in an embodiment of the present application is shown;
[0036] Figure 2 A schematic diagram of a flow of a data processing method provided in an embodiment of the present application is shown;
[0037] Figure 3 A schematic diagram of a state of a non-stop switching provided in an embodiment of the present application is shown;
[0038] Figure 4 A schematic diagram of a state of a stop switching provided in an embodiment of the present application is shown;
[0039] Figure 5 A schematic diagram of a flow of a routing strategy provided in an embodiment of the present application is shown;
[0040] Among the above drawings, the following reference signs are included:
[0041] 102, processor; 104, memory; 106, transmission device; 108, input and output device. DETAILED DESCRIPTION
[0042] It should be noted that the embodiments and the features in the embodiments in the present application can be combined with each other without conflict. The present application will be described in detail below with reference to the drawings and in combination with the embodiments.
[0043] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should fall within the scope of protection of the present application.
[0044] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not necessarily limit to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0045] First, the terms related to the present application are explained:
[0046] Business element dimension: refers to the key input information on which the system executes transactions, which can usually be converted into the primary key field of the storage and access data table, such as account, customer, institution, etc.
[0047] Automatic routing: there are old database X and new database Y during database replacement, and it is decided whether to access X or Y this time according to the business element and the related state.
[0048] As introduced in the background, in the related art:
[0049] In the life cycle of information system, due to factors such as enterprise strategy adjustment, business development, architecture update, information system inevitably faces the challenge of replacing data. For the core system of important financial institutions such as banks, since it carries key businesses such as bank account processing, the system reliability requirement is extremely high, and it is required that the risk is controllable and the business impact is minimized during database replacement. It is not appropriate to adopt the one-time switching strategy after shutdown, but to adopt the batch switching strategy with two databases in parallel, and the key is to select the correct database for business development according to the switching progress.
[0050] Therefore, the following problems exist in the related art:
[0051] (1) One-time switching after shutdown, large impact range, high transaction loss rate and high risk.
[0052] (2) Does not support account-by-account switching and does not support switching of other business element dimensions.
[0053] (3) Cannot one-key rollback.
[0054] To address the aforementioned issues, embodiments of this application provide a data processing method. By combining the system's switching state and the account's account status with the account's routing state, the database containing the data to be processed is determined, and then data processing operations are performed based on that database. This application enables data processing without system downtime, ensuring the normal execution of related business operations and improving user experience.
[0055] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
[0056] The methods and embodiments provided in this application can be executed on a mobile terminal, computer terminal, or similar computing device. Taking running on a mobile terminal as an example, Figure 1 This is a hardware structure block diagram of a mobile terminal for a data processing method according to an embodiment of the present invention. Figure 1 As shown, a mobile terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. The mobile terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the mobile terminal described above. For example, the mobile terminal may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0057] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the data processing method in this embodiment of the invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. The transmission device 106 is used to receive or send data via a network. Specific examples of the aforementioned networks may include wireless networks provided by the mobile terminal's communication provider. In one example, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0058] This embodiment provides a data processing method that runs on a mobile terminal, computer terminal, or similar computing device. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Also, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0059] It should be noted that in all specific embodiments of this application, when processing data related to user identity or characteristics, such as user information, user behavior data, user historical data, and user location information, user permission or consent is obtained first. Furthermore, the collection, use, and processing of this data comply with relevant laws, regulations, and standards. In addition, when embodiments of this application require access to sensitive personal information of users, separate permission or consent from the user is obtained through pop-ups or redirection to confirmation pages. Only after obtaining the user's separate permission or consent is the necessary user-related data required for the proper functioning of these embodiments acquired.
[0060] Figure 2 This is a flowchart illustrating a data processing method according to an embodiment of this application. The data processing method includes:
[0061] Step S100: Obtain the system's switching status and the account status of the target account to which the data to be processed belongs;
[0062] Step S200: Determine the routing status based on whether the target account is in the routing list; wherein, the routing list is a list of accounts in the database to be switched.
[0063] Step S300: Based on at least one of the switching status, account status, or routing status, determine the database where the data to be processed is located using the routing policy;
[0064] Step S400: Perform data processing operations based on the database to obtain the processing results.
[0065] This application pertains to the system where the account resides, a system requiring data migration. The target account is the account to be processed, and the data to be processed can include basic account information, information stored in the account, etc. The switching status in this application includes pending database switching, database switching in progress without downtime, database switching in progress with downtime, and database switching completed. Account status includes initial state, switching in progress, data migration completed, and a newly opened account on the target database. Routing status includes being on the list and not on the list. The routing strategy determines the database where the target account resides based on at least one of the switching status, account status, or routing status. The processing operations in this application can be query operations, account information transfer operations, or account information update operations; this application does not limit the specific type of processing operation.
[0066] Optionally, based on at least one of the switching status, account status, or routing status, the database containing the data to be processed is determined using a routing strategy, including:
[0067] If the database switch is complete when the switch status is in progress, the database containing the data to be processed is identified as the target database.
[0068] If the routing status is not in the list, determine that the database where the data to be processed is located is the original database;
[0069] If the account status is either "data migration completed" or "new account opened on the target database", then identify the database containing the data to be processed as the target database.
[0070] If the database switch is complete when the switch status is in progress, the database containing the data to be processed is identified as the target database.
[0071] If the database switch is not completed in the switch state, determine the database where the data to be processed is located based on the account status or routing status.
[0072] Specifically, if the switch status is not "database switch completed" and the routing status is "not in the list", the database containing the data to be processed is determined to be the original database.
[0073] In this application, the target database is the new database after migration, and the original database is the old database before migration.
[0074] Optionally, the account status includes the account switch date. Based on at least one of the switch status, account status, or routing status, the database where the data to be processed resides is determined using a routing strategy, including:
[0075] If the database switch is not completed in the switch status, the route status is in the list, the account status is not completed in the data migration, or the account switch date is after the current date, an error message will be issued and the data processing operation will be stopped.
[0076] If the database switch is not completed in the switching status, the routing status is in the list, the account status is in the initial state or in the process of switching, or the account switch date is before the current date, the database where the data to be processed is located is determined to be the original database.
[0077] If the database switch is not completed in the switch status, the routing status is in the list, and the account switch date is the current date, determine the database where the data to be processed is located based on the switch status.
[0078] Optionally, based on the switching state, the database containing the data to be processed can be determined, including:
[0079] When the switching status is a database switchover in progress, if the data processing operation is a query operation, the database containing the data to be processed is determined to be the original database; if the data processing operation is not a query operation, the data processing operation is stopped.
[0080] When the switch status is a non-stop database switch, if the data processing operation is a query operation, determine that the database containing the data to be processed is the original database; if the data processing operation is not a query operation, execute the data processing operation and remove the target account from the routing list.
[0081] Of course, the above routing strategy is an example. Those skilled in the art can set up routing strategies according to actual needs to realize the search of the database and perform data processing on the data to be processed through the searched database.
[0082] Optionally, the method further includes:
[0083] Obtain business elements; business elements include the input information required for data processing operations.
[0084] Based on business requirements, the database switchover operation was carried out in batches.
[0085] This application achieves phased database migration of the system through the analysis and processing of business elements, ensuring uninterrupted business migration and improving user experience.
[0086] Optionally, the method further includes:
[0087] Establish an account status system and a switchover status system; the account status includes initial state, switching in progress, data migration completed, and new account opened on the target database; the switchover status includes database switchover pending, database switchover in progress without downtime, database switchover in progress with downtime, and database switchover completed.
[0088] Perform real-time monitoring of the system and target accounts, and mark the switch status and account status.
[0089] Those skilled in the art can determine the specific types of account systems and switching systems based on the specific logic of the system and business, and then, based on the established account status system and switching status system, perform database searches for the data to be processed and realize business-related data processing.
[0090] Optionally, the system and target account can be monitored in real time, and the switching status can be marked, including:
[0091] In the case of performing a non-disruptive switchover, the switchover status is determined to be a non-disruptive database switchover in progress;
[0092] After completing this batch of switchovers, the switchover status is set to pending database switchover.
[0093] After completing all system switches, the switch status is confirmed as "database switch completed".
[0094] To achieve the above objectives, according to another aspect of this application, a data processing apparatus is provided, comprising:
[0095] The acquisition module is used to acquire the system's switching status and the account status of the target account to which the data to be processed belongs;
[0096] The routing module is used to determine the routing status based on whether the target account is in the routing list; wherein, the routing list is a list of accounts in the database to be switched.
[0097] The strategy module is used to determine the database where the data to be processed is located based on at least one of the switching state, the account state, or the routing state, through a routing strategy.
[0098] The processing module is used to perform data processing operations based on the database to obtain processing results.
[0099] According to another aspect of this application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to execute the data processing method described above through the computer program.
[0100] According to another aspect of this application, a computer-readable storage medium is provided, including a stored program, wherein, when the program is executed, it controls the device where the computer-readable storage medium is located to perform the above-described data processing method.
[0101] To enable those skilled in the art to better understand the technical solution of this application, the implementation process of the data processing method of this application will be described in detail below with reference to specific embodiments.
[0102] With business development and technological updates, information systems face the challenge of replacing databases during their operational cycles. For core systems supporting bank operations, due to their high importance, large transaction volumes, and complex business scenarios, they are more sensitive to parameters such as system response time and system availability. Adopting a strategy of switching the database all at once after system downtime carries numerous risks, including a large-scale impact on business operations and insufficient verification of the new database's capacity to handle business needs. This invention provides a method for automatically routing data between databases based on business elements. This method supports the system in migrating data in batches and gradually according to business element dimensions, shielding the system users from the impact of database replacement, effectively controlling database switching risks, and ultimately achieving a smooth switchover that is seamless for both customers and business operations.
[0103] 6.1 Dictionary Description;
[0104] X database: The original database, which is also the default database. Y database: The target database.
[0105] The system status values are shown in Table 1:
[0106]
[0107] Table 1
[0108] When performing a non-stop switchover, the system status changes from 0 to L. After the switchover of this batch is completed, the status changes from L back to 0. When performing a shutdown switchover, the system status changes from 0 to P. After the switchover of this batch is completed, the status changes from P back to 0. After the system completes all switchover work, the X database goes offline, and the system status changes from 0 to SUCC.
[0109] Using the account as the switching dimension, the account status values are shown in Table 2:
[0110]
[0111] Table 2
[0112] 6.2 Account switching process without system shutdown;
[0113] (1) Accounts participating in the switch on the same day first enter the routing list, and the initial state is C.
[0114] (2) The system status changes to L, and the account switching begins one by one.
[0115] Reference Figure 3 The state transition process for each account is as follows: when it's the account's turn to switch, the account state changes from C to B; after the switch is complete, the state changes from B to A. During the switch, the account can execute transaction requests normally. NULL in the diagram indicates that the account has been removed from the routing list and the migration of that account has been abandoned.
[0116] 6.3 Account Switching Procedure During System Shutdown;
[0117] (1) Accounts participating in the switch on the same day first enter the routing list, and the initial state is C.
[0118] (2) The system status changes to P, and the account switching begins one by one.
[0119] Reference Figure 4 The state transition process for each account is as follows: when it's the account's turn to switch, the account state changes from C to B; after the switch is complete, the state changes from B to A. Non-query transactions for the account are suspended during the switch. The shutdown switch blocks all non-query operations; therefore, there is no operation to remove the account from the routing list.
[0120] 6.4 Routing Policy, refer to Figure 5 :
[0121] (1) First, determine whether the system status is SUCC. If it is SUCC, it means that the system has completed all database switching work and selects database Y as the data source for executing business logic. If the system has not yet switched to SUCC, then check whether the account is in the routing list.
[0122] (2) If the account is not in the routing list, it means that the account has not yet participated in the switch. Select X as the data source for executing business logic.
[0123] (3) If the routing list contains the account, determine whether the account status is N.
[0124] (4) If the account status is N, it means that the account was opened in database Y, and database Y is selected as the data source for executing business logic.
[0125] (5) If the account status is not N, it means that the account is the original account of the X database and has participated in or has participated in the switch. It is necessary to determine the account switch date.
[0126] (6) If the account switching date is earlier than the current date, it means that the account has already participated in the switching. If the account status is not B or C, it means that the account switching was successful, and database Y is selected as the data source for executing business logic. If the account status is B or C, it means that the switching was unsuccessful, and database X is still selected as the data source.
[0127] (7) If the account switching date is later than the current date, it is considered abnormal and the transaction will be terminated.
[0128] (8) If the account date is equal to the current date, it means that the account is participating in the same day's switching batch and a more detailed routing strategy needs to be implemented. It is necessary to determine the current system status.
[0129] (9) If the system status is P, it means that a shutdown switch is being performed. The transaction type needs to be determined. If the transaction is a query transaction, the data source points to the X database; if the transaction is a non-query transaction, the transaction is blocked.
[0130] (10) If the system status is not P, the system may be in a non-stop switching process or in normal operation without switching operations. At this time, if the account status is A, it means that the account has completed the switching and the Y database is used as the data source; if the account status is B or C, it means that the account is in the process of switching, has not yet started switching, or has failed to switch. It is necessary to determine the transaction type. If the transaction type is a query transaction, it will directly point to the X data source; if the transaction type is a non-query transaction, it is necessary to combine the system status routing. If the system status is 0, it means that the account has not yet started switching, or has finished switching but failed to switch successfully, and the data source still points to X; if the system status is L, it means that the system is still in the switching process. At this time, the account is still allowed to execute non-query transactions, but the account must be removed from the routing list, the switching of the account is abandoned, and the transaction results are guaranteed to be consistent.
[0131] This application supports routing at the data source level, without affecting the transaction entry point, thus shielding the upper layers from the impact of switching. It supports batch switching and both offline and non-offline switching modes, allowing for control over the scope of the switch's impact as needed. It supports switching based on account business elements, effectively controlling switching risks. It also supports quick rollback.
[0132] This application supports routing at the data source level, without affecting the transaction entry point, thus shielding the upper layers from the impact of switching. It supports batch switching and both offline and non-offline switching modes, allowing for control over the scope of the switch's impact as needed. It supports switching based on account business elements, effectively controlling switching risks. It also supports quick rollback.
[0133] It should be noted that the above are merely illustrative examples and do not specifically limit the implementation logic.
[0134] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those described herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.
[0135] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0136] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0137] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0138] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process.Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0139] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0140] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, like read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0141] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0142] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0143] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0144] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A data processing method, characterized in that, The data processing method includes: Obtain the system's switching status and the account status of the target account to which the data to be processed belongs; The routing status is determined based on whether the target account is in the routing list; wherein, the routing list is a list of accounts whose databases are to be switched. Based on at least one of the switching status, the account status, or the routing status, the database where the data to be processed is located is determined through a routing strategy; Data processing operations are performed based on the database to obtain the processing results.
2. The data processing method according to claim 1, characterized in that, The step of determining the database containing the data to be processed based on at least one of the switching state, the account state, or the routing state, through a routing strategy, includes: If the database switch is completed in the switching state, the database containing the data to be processed is determined as the target database. If the routing status is not in the list, the database where the data to be processed is located is determined to be the original database; If the account status is either "data migration completed" or "new account opened on the target database", then the database containing the data to be processed is identified as the target database.
3. The data processing method according to claim 1, characterized in that, The account status includes the account switching date. The step of determining the database containing the data to be processed based on at least one of the switching status, the account status, or the routing status, using a routing strategy, includes: If the switching status is not a completed database switch, the routing status is on the list, the account status is not a completed data migration, or the account switch date is after the current date, an error message will be issued and data processing operations will be stopped. If the switching status is not a completed database switch, the routing status is in the list, the account status is in the initial state or switching in progress, and the account switch date is before the current date, then the database where the data to be processed is located is determined to be the original database. If the switching status is not a completed database switch, the routing status is within the list, and the account switch date is the current date, the database containing the data to be processed is determined based on the switching status.
4. The data processing method according to claim 3, characterized in that, The step of determining the database containing the data to be processed based on the switching state includes: When the switching state is a database switching operation in a shutdown state, if the data processing operation is a query operation, the database containing the data to be processed is determined to be the original database; if the data processing operation is not a query operation, the data processing operation is stopped. If the switching state is a non-stop database switching process, and the data processing operation is a query operation, the database containing the data to be processed is determined to be the original database; if the data processing operation is not a query operation, the data processing operation is executed, and the target account is removed from the routing list.
5. The data processing method according to claim 1, characterized in that, The method further includes: Obtain business elements; the business elements include the input information required for data processing operations; Based on the aforementioned business elements, the database switching operation will be performed on the system in batches.
6. The data processing method according to claim 2, characterized in that, The method further includes: Establish an account status system and a switching status system; wherein, the account status includes initial state, switching in progress, data migration completed, and new account opened on the target database; the switching status includes database switching to be performed, database switching in progress without downtime, database switching in progress with downtime, and database switching completed; The system and the target account are monitored in real time, and the switching status and the account status are marked.
7. The data processing method according to claim 6, characterized in that, The step of real-time detection of the system and the target account, and marking the switching status, includes: In the case of performing a non-stop switchover, the switchover status is determined to be a non-stop database switchover in progress; After completing this batch of switching, the switching status is determined to be a database switching to be performed. After all system switches are completed, the switch status is determined to be "database switch completed".
8. A data processing apparatus, characterized in that, The data processing device includes: The acquisition module is used to acquire the system's switching status and the account status of the target account to which the data to be processed belongs; The routing module is used to determine the routing status based on whether the target account is in the routing list; wherein, the routing list is a list of accounts in the database to be switched. The strategy module is used to determine the database where the data to be processed is located based on at least one of the switching state, the account state, or the routing state, through a routing strategy. The processing module is used to perform data processing operations based on the database to obtain processing results.
9. An electronic device, characterized in that, The electronic device includes: A memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the data processing method of any one of claims 1 to 7 via the computer program.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein, when the program is executed, it controls the device on which the computer-readable storage medium is located to perform the data processing method according to any one of claims 1 to 7.