An account back migration method, device and equipment

By calculating account migration weights, important accounts are prioritized for migration based on historical transaction data, accounting methods, and account categories. This solves the problem of long delays in the account data migration process and improves the user experience.

CN116089169BActive Publication Date: 2026-02-10ADVANCED NOVA TECH (SINGAPORE) PTE LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310092112.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-01-09
Publication Date
2026-02-10
Estimated Expiration
2038-01-09

AI Technical Summary

Technical Problem

After a database failover, during the account data migration process, existing technologies cannot effectively guarantee the priority migration of frequently used accounts, resulting in long delays for accounts with frequent transactions and impacting user experience.

Method used

By obtaining information such as the size of historical transaction data, account accounting mode, and account category of the accounts to be relocated, the relocation weight of the accounts is calculated, and the accounts are relocated in order of weight to ensure that important accounts are relocated first.

Benefits of technology

This reduces the time frequently traded, high-trading accounts spend in the failback phase, lowers the transaction failure rate, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116089169B_ABST
    Figure CN116089169B_ABST
Patent Text Reader

Abstract

The embodiment of the specification discloses an account back migration method, device and equipment. The account back migration importance degree of an account is comprehensively obtained by comprehensively reflecting the account number accounting frequency and business importance of the account number through user account historical transaction data, account accounting mode, account number category and other factors, so that the account is back migrated according to the high-low order of the importance degree.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of Chinese patent application CN108345516A, the original application was filed on January 9, 2018; the application number is 201810018524.1; the invention title is: A method, apparatus and equipment for account relocation. Technical Field

[0002] This specification relates to the field of computer technology, and in particular to an account relocation method, apparatus and equipment. Background Technology

[0003] When a database experiences an unexpected network failure or is terminated abnormally, resulting in the unavailability of all services, this is called a database failover, or FO for short (usually occurring on the primary database). The process of restoring a previously failed database, component, or service to its original working state, and bringing the standby system back from a recovered running state to a standby state, is called a database failback, or FB for short.

[0004] In Facebook's process, after a primary database failure, it typically takes some time to build up the standby database. During this period, to ensure normal business operations, account data will be written to the FO (Failover) database (also known as the temporary primary database). Therefore, after the standby database is up and running, the account data in the FO database needs to be written back to the primary database (standby database), a process known as account migration. During account migration, for business needs, frequently accessed accounts (accounts with frequent transactions or high importance) should be migrated first.

[0005] Therefore, a more effective method for account relocation is needed. Summary of the Invention

[0006] This specification provides an account relocation method, apparatus, and device to address the following problem: to provide a more effective account relocation method.

[0007] Based on this, embodiments of this specification provide an account relocation method, including:

[0008] Obtain relevant information about the accounts to be relocated;

[0009] The relocation weight of each account to be relocated is determined based on the aforementioned relevant information;

[0010] Accounts are transferred back according to the order of their transfer weights.

[0011] The relevant information of the accounts to be relocated includes at least one of the following: the size of the historical transaction data of the accounts to be relocated, the account accounting mode, and the account number.

[0012] Additionally, embodiments of this specification also provide an account transfer device, comprising:

[0013] The acquisition module acquires relevant information about the account to be relocated, wherein the relevant information about the account to be relocated includes at least one of the following: the size of the historical transaction data of the account to be relocated, the account accounting mode, and the account number.

[0014] The determination module determines the relocation weight of each account to be relocated based on the relevant information.

[0015] The migration module performs account migration according to the order of the migration weights.

[0016] Correspondingly, this specification also provides an account transfer device, comprising:

[0017] The memory contains the account rollback program;

[0018] The processor calls the account rollback program in the memory and executes it:

[0019] Obtain relevant information about the accounts to be relocated;

[0020] The relocation weight of each account to be relocated is determined based on the aforementioned relevant information;

[0021] Accounts are transferred back according to the order of their transfer weights.

[0022] The relevant information of the accounts to be relocated includes at least one of the following: the size of the historical transaction data of the accounts to be relocated, the account accounting mode, and the account number.

[0023] Correspondingly, embodiments of this specification also provide a non-volatile computer storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured as follows:

[0024] Obtain relevant information about the accounts to be relocated;

[0025] The relocation weight of each account to be relocated is determined based on the aforementioned relevant information;

[0026] Accounts are transferred back according to the order of their transfer weights.

[0027] The relevant information of the accounts to be relocated includes at least one of the following: the size of the historical transaction data of the accounts to be relocated, the account accounting mode, and the account number.

[0028] The above-described at least one technical solution adopted in the embodiments of this specification can achieve the following beneficial effects:

[0029] By comprehensively considering factors such as user account historical transaction data, account accounting patterns, and account category, the frequency of account accounting and business importance are reflected. This comprehensive assessment determines the importance of account migration, and migration is then carried out in descending order of importance. This reduces the time that frequently traded accounts spend in the Facebook phase, minimizes the number of affected transactions, and improves the user experience. Attached Figure Description

[0030] Figure 1 This is a schematic diagram of the account snapshot data provided in the embodiments of this specification;

[0031] Figure 2 This is a schematic diagram of the system architecture involved in the embodiments of this specification;

[0032] Figure 3 This is a flowchart illustrating the account relocation method provided in the embodiments of this specification;

[0033] Figure 4 This is a schematic diagram of the business process provided in the embodiments of this specification;

[0034] Figure 5 This is a schematic diagram of the account transfer device provided in the embodiments of this specification. Detailed Implementation

[0035] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments in this specification without creative effort are within the scope of protection of this application.

[0036] Generally, the database that provides database services to applications long-term is called the primary database. Simultaneously, a backup database (standby database) exists. The standby database acts as a backup of the primary database, ensuring data consistency through primary-standby synchronization. After a primary database failure, it assumes the primary database's responsibilities and becomes the new primary database. Meanwhile, in some fields (such as payment and finance) where a high level of security is required, a snapshot database also exists. The snapshot database differs from the standby database; it is primarily used to take snapshots of the account data on the primary database while it is running normally (e.g., to record account balances, daily changes, account fund transaction details, etc.). Figure 1 As shown, Figure 1This is a schematic diagram of the account snapshot data provided in the embodiments of this specification. In other words, the snapshot database is not a complete backup, but it briefly reflects the account's historical transactions. Obviously, if the hardware supports it, the historical transaction data in the snapshot database can be snapshotted for more records, and can more fully reflect the historical situation of an account. In other words, snapshot data is one type of historical transaction data, and historical transaction data can also be other more detailed transaction data.

[0037] In the event of a primary database disaster, due to data synchronization and other reasons, it takes a certain amount of time to bring up the standby database as the new primary database. In order to reduce business losses, the FO database assumes the role of a temporary primary database during the standby database startup period, receiving normal business requests and performing business processing. For example, it supports the main business of account opening and accounting in the FO scenario, ensuring the high availability of the main business in the event of a primary database failure.

[0038] After the new primary database is established (usually after the standby database is successfully activated), it is necessary to migrate data such as accounts, accounting vouchers, and XTS transactions that have been used in the FO database back to the new primary database. In this situation, due to business needs (for example, two accounts making the same accounting request, one account is migrated back to the new primary database and the other is still in the FO database, and because the two accounts are routed to two different databases, the request is intercepted by the transaction, resulting in accounting failure and the user requesting a refund), in order to minimize accounting failures at this stage and reduce the number of automatic refund transactions, it is necessary to analyze the importance of accounts for migration and ensure that accounts with high importance are migrated back quickly.

[0039] Based on the foregoing, this specification provides an account migration method that comprehensively considers various factors of a user account to reflect the frequency of account entries and the importance of business transactions, thereby determining the migration weight of the account and migrating accounts in descending order of migration weight.

[0040] In the embodiments of this specification, the account relocation method may be adopted as follows: Figure 2 The architecture shown Figure 2 This is a schematic diagram of the system architecture involved in the embodiments of this specification. The following will be based on... Figure 2 The architecture shown illustrates the account migration process provided by the embodiments in this specification, which specifically includes the following steps, such as... Figure 3 As shown, Figure 3 A flowchart illustrating the account relocation method provided in the embodiments of this specification includes:

[0041] S301, obtain relevant information about the account to be relocated.

[0042] The relevant information of the accounts to be relocated includes at least one of the following: the size of the historical transaction data of the accounts to be relocated, the account accounting mode, and the account number.

[0043] Specifically, in this architecture, historical transaction data for an account is stored in a snapshot database. The FO database, acting as a temporary master database, can retrieve historical transaction snapshot data for any account from the snapshot database. The account accounting mode can generally be configured according to user requirements and can be obtained from the FO database. Accounts are primarily used to distinguish account categories, including corporate accounts, personal accounts, and internal accounts, etc., to determine the importance of the account based on its category.

[0044] S303, determine the relocation weight of each account to be relocated based on the aforementioned relevant information.

[0045] Based on the foregoing, this process can involve calculating the migration weight based on a single piece of information. For example, weights can be directly assigned based on the size of the account's historical transaction snapshot data, with larger snapshots receiving higher weights. Alternatively, multiple pieces of information can be combined to calculate the migration weight. For instance, the account's weight can be determined based on both the account's accounting style and the size of its historical transaction snapshot data to facilitate account migration.

[0046] S305, Account migration is performed according to the order of migration weights.

[0047] Generally speaking, active and important accounts have higher weight, and account migration is carried out in descending order of weight.

[0048] By comprehensively considering factors such as user account historical transaction data, account accounting patterns, and account category, the frequency of account accounting and business importance are reflected. This comprehensive assessment determines the importance of account migration, and migration is then carried out in descending order of importance. This reduces the time that frequently traded accounts spend in the Facebook phase, minimizes the number of affected transactions, and improves the user experience.

[0049] As a specific implementation method, for step S303, determining the relocation weight of each account to be relocated based on the relevant information, the following method can be used when calculating the weight based on the historical transaction data of the accounts to be relocated:

[0050] Determine the average size of the account's historical transaction data; for any account to be migrated back, calculate the ratio of the size of the account's historical transaction data to the average size of the account's historical transaction data to generate a first weighting factor; calculate the account's migration weight based on the first weighting factor.

[0051] Specifically, the average size of the account's historical transaction data can be the average size of the snapshot data of all accounts in the snapshot database, or the average size of the snapshot data of all accounts to be migrated back. That is, a first weighting factor α is set to characterize the importance of the account's historical transaction data, where: α = the snapshot size of the account / the average snapshot size of the snapshot database, or α = the snapshot size of the account / the average snapshot size of the accounts to be migrated back. Generally, the former calculation method is more convenient, while account migration may be carried out in batches, making the latter calculation method more targeted.

[0052] As a specific implementation method, for step S303, determining the relocation weight of each account to be relocated based on the relevant information, the following method can be used when calculating the weight according to the account accounting mode:

[0053] For any account to be relocated, a second weighting factor is determined based on its accounting mode; wherein, the accounting mode includes real-time accounting, buffered accounting, or summary accounting; and the relocation weight of the account is calculated based on the second weighting factor.

[0054] Specifically, in payment applications, most accounting accounts support three accounting modes: real-time accounting, summary accounting, or buffered accounting. The accounting mode can be preset according to the actual needs of the account.

[0055] Real-time accounting, as the name suggests, means that the account balance changes immediately after accounting entries are completed. Summary accounting, the opposite of real-time accounting, only records summary accounting details after accounting entries are completed, without modifying the account balance. The overall change is then summarized and reflected in the balance at the end of the day. Buffered accounting is a compromise between real-time and summary accounting. For accounts configured with buffered accounting, only buffer accounting details are recorded upon completion of accounting entries. The buffered accounting resumes its scheduled task to retrieve a specified number of details, calculate the change, and then reflect it in the balance at once. In this case, the frequency of account balance changes depends on the frequency of the scheduled task.

[0056] In other words, accounts that require summary or buffer accounting are typically high-traffic accounts, meaning they have a large transaction volume and are considered important. Therefore, accounts using summary or buffer accounting should be given a higher weighting factor.

[0057] For example, a second weighting factor β is set to represent the importance of the account's accounting mode, where: if the current account is configured with summary accounting or buffered accounting, then β = 0.6; if the current account's accounting mode is real-time accounting, then β = 0.4.

[0058] As a specific implementation method, for step S303, determining the relocation weight of each account to be relocated based on the relevant information, the following method can be used when calculating the weight based on user accounts:

[0059] For any account to be relocated, obtain a specified field from its account information; determine the third weighting factor for the account based on the value of the specified field; calculate the relocation weight for the account based on the third weighting factor.

[0060] As mentioned earlier, customer accounts are mainly classified into corporate accounts, personal accounts, and some internal accounts. Corporate accounts include company and merchant accounts, while personal accounts are the user's balance accounts (including buyers and sellers). These different types of accounts are usually distinguished by a specified field in the account code.

[0061] For example, code 21881XXXXXXXXXXXXXX is a merchant account, 21882XXXXXXX XXXXXXX is a personal balance account, and 21883XXXXXXXXXXXXXX is an internal account. The first 5 digits determine the different account categories.

[0062] Generally speaking, merchant accounts handle more transactions such as transfers, loans, and refunds than personal balance accounts; a small number of internal accounts, usually transitional or guarantor accounts, also have a much larger transaction volume than personal balance accounts. Therefore, internal accounts or merchant accounts can be assigned a higher weighting factor in advance.

[0063] For example, a third weighting factor γ is set to represent the importance of the account category, where: if the current account starts with 21881 or 21883, then γ = 0.6; if the current account starts with 21882, then γ = 0.4.

[0064] The aforementioned second weighting factor β and third weighting factor γ can be set manually based on experience, and can also be dynamically adjusted according to the results of the migration business in actual applications.

[0065] As mentioned earlier, the migration weight for an account to be migrated back can be based on a single weighting factor or a combination of several weighting factors. For example, the migration weight for the current account can be set as: Migration Weight (account) = α * β * γ * 100. Clearly, the specific calculation formula can be adjusted according to the actual situation and is not limited to the formula described above.

[0066] The aforementioned migration weight calculation can be performed in real time. As a specific implementation, the method further includes storing the migration weight locally. Here, "local" refers to the FO database acting as a temporary master database. For example, the value can be assigned to the FO record table (ip_failover_record). When account migration is required, it can be performed in order of migration weight. Pre-storing the migration weight value allows for scheduled task creation, which is more convenient and improves efficiency. The flowchart for a specific application of account migration based on migration weight is as follows: Figure 4 As shown, Figure 4 This is a schematic diagram of the business process provided in the embodiments of this specification.

[0067] The following is a specific application example to make the solutions of the embodiments in this specification clearer.

[0068] In an exemplary migration scheme, the migration weight of an account is pre-determined and calculated as follows: Migration Weight (account) = α * β * γ * 100. Wherein, the first weight factor α = the snapshot size of the account / the average snapshot size of the snapshot database, where the current average snapshot size of the snapshot database is 50K; if the current account is configured with summary accounting or buffered accounting, then the second weight factor β = 2; if the current account's accounting mode is real-time accounting, then the second weight factor β = 1; if the current account starts with 21881 or 21883, then the third weight factor γ = 0.6; if the current account starts with 21882, then the third weight factor γ = 0.4.

[0069] There are two accounts: Account A (21883XXXXXXXXXXXXXX) uses summary accounting, and its snapshot size is 150KB; Account B (21882XXXXXXXXXXXXXX) uses real-time accounting, and its snapshot size is 500KB. Using the migration plan described above, we can derive the following: For Account A, α = 3, β = 2, γ = 0.6, resulting in a migration weight (Weight(A)) of 3 * 2 * 0.6 * 100 = 360. For Account B, α = 10, β = 1, γ = 0.4, resulting in a migration weight (Weight(B)) of 10 * 1 * 0.4 * 100 = 400. This indicates that Account B is a more active account with more frequent transactions, and therefore should be prioritized for migration.

[0070] Based on the same idea, the present invention also provides an account relocation device, such as... Figure 5 As shown, Figure 5 A schematic diagram of the account transfer device provided in the embodiments of this specification, including:

[0071] The acquisition module 501 acquires relevant information about the account to be relocated, wherein the relevant information about the account to be relocated includes at least one of the following: the size of the historical transaction data of the account to be relocated, the account accounting mode, and the account number.

[0072] The determination module 503 determines the relocation weight of each account to be relocated based on the relevant information.

[0073] The migration module 505 performs account migration according to the order of the migration weights.

[0074] Further, the determining module 503 determines the average size of the account's historical transaction data; for any account to be migrated back, it calculates the ratio of the size of the account's historical transaction data to the average size of the account's historical transaction data to generate a first weighting factor; and calculates the account's migration weight based on the first weighting factor.

[0075] Furthermore, the determining module 503, for any account to be relocated, determines a second weighting factor for the account based on its accounting mode; and calculates the relocation weight of the account based on the second weighting factor; wherein the accounting mode includes real-time accounting, buffered accounting, or summary accounting.

[0076] Furthermore, the determining module 503, for any account to be relocated, obtains a specified field in its account; determines the third weighting factor of the account based on the value of the specified field; and calculates the relocation weight of the account based on the third weighting factor; wherein, the specified field is used to distinguish account categories.

[0077] Furthermore, the device also includes a storage module 507 for storing the migration weight locally.

[0078] Correspondingly, this application embodiment also provides an account transfer device, the device comprising:

[0079] The memory contains the account rollback program;

[0080] The processor calls the account rollback program in the memory and executes it:

[0081] Obtain relevant information about the accounts to be relocated;

[0082] The relocation weight of each account to be relocated is determined based on the aforementioned relevant information;

[0083] Accounts are transferred back according to the order of their transfer weights.

[0084] The relevant information of the accounts to be relocated includes at least one of the following: the size of the historical transaction data of the accounts to be relocated, the account accounting mode, and the account number.

[0085] Based on the same inventive concept, this application also provides a corresponding non-volatile computer storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured as follows:

[0086] Obtain relevant information about the accounts to be relocated;

[0087] The relocation weight of each account to be relocated is determined based on the aforementioned relevant information;

[0088] Accounts are transferred back according to the order of their transfer weights.

[0089] The relevant information of the accounts to be relocated includes at least one of the following: the size of the historical transaction data of the accounts to be relocated, the account accounting mode, and the account number.

[0090] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on its differences from other embodiments. In particular, for embodiments involving apparatus, devices, and media, since they are fundamentally similar to the method embodiments, the descriptions are relatively simple, and relevant details can be found in the descriptions of the method embodiments; they will not be elaborated upon here.

[0091] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions, steps, or modules recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired results. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0092] In the 1990s, improvements to a technology could be clearly distinguished as either hardware improvements (e.g., improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the methodology). However, with technological advancements, many methodological improvements today can be considered direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved methodology into the hardware circuit. Therefore, it cannot be said that a methodological improvement cannot be implemented using hardware physical modules. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logic function is determined by the user programming the device. Designers can program and "integrate" a digital system onto a PLD themselves, without needing chip manufacturers to design and manufacture dedicated integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing integrated circuit chips, this programming is mostly implemented using "logic compiler" software. Similar to the software compiler used in program development, the original code before compilation must also be written in a specific programming language, called a Hardware Description Language (HDL). There are many HDLs, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, and RHDL (Ruby Hardware Description Language). Currently, the most commonly used are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also understand that by simply performing some logic programming on the method flow using one of these hardware description languages ​​and programming it into an integrated circuit, the hardware circuit implementing the logical method flow can be easily obtained.

[0093] The controller can be implemented in any suitable manner. For example, it can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicon Labs C8051F320. A memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also recognize that, in addition to implementing the controller in purely computer-readable program code form, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, ASICs, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.

[0094] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.

[0095] For ease of description, the above apparatus is described by dividing it into various functional units. Of course, in implementing the embodiments of this specification, the functions of each unit can be implemented in one or more software and / or hardware.

[0096] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention 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.

[0097] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. 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 illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0098] 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.

[0099] 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.

[0100] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0101] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0102] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information by 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, magnetic magnetic 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.

[0103] 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 a process, method, article, or apparatus. Without further limitation, 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 said element.

[0104] Those skilled in the art will understand that one or more embodiments of this specification can be provided as a method, system, or computer program product. Therefore, embodiments of this specification can take the form of a completely hardware embodiment, a completely software embodiment, or a combination of software and hardware aspects. Furthermore, embodiments of this specification can take the form of a computer program product implemented 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.

[0105] The embodiments described in this specification can be described in the general context of computer-executable instructions, such as program modules, that are executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific transactions or implement specific abstract data types. The embodiments of this specification can also be practiced in distributed computing environments where transactions are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

Claims

1. An account relocation method, comprising: Obtain relevant information about the accounts to be relocated, including at least historical transaction data stored in the snapshot database; The relocation weight of each of the accounts to be relocated is determined based on the relevant information; the relocation weight is used to reflect the importance of the relocation of the accounts to be relocated. According to the order of the migration weights, the account data generated by the account to be migrated from the time of the primary database failure to the time of the standby database startup is written into the startup database after startup. The account data is stored in a temporary primary database, which is used to assume the temporary primary database responsibilities during the standby database startup period.

2. The method as described in claim 1, wherein determining the relocation weight of each of the accounts to be relocated based on the relevant information includes: Determine the average size of the account's historical transaction data; For any of the aforementioned accounts to be relocated, calculate the ratio of the size of the historical transaction data of the account to the average size of the historical transaction data of the account, and generate a first weighting factor; The relocation weight of the account to be relocated is calculated based on the first weighting factor.

3. The method as described in claim 2, wherein the historical transaction data of the account to be relocated and the historical transaction data of the account are both stored in a snapshot database.

4. The method as described in claim 1, wherein determining the relocation weight of each of the accounts to be relocated based on the relevant information includes: For any of the aforementioned accounts to be relocated, a second weighting factor for the account to be relocated is determined based on the accounting model of the account to be relocated. The relocation weight of the account to be relocated is calculated based on the second weighting factor.

5. The method as described in claim 4, wherein the accounting mode includes real-time accounting, buffered accounting, or summary accounting.

6. The method as described in claim 1, wherein determining the relocation weight of each of the accounts to be relocated based on the relevant information includes: For any of the accounts to be relocated, obtain a specified field from the account number of the account to be relocated; Based on the value of the specified field, determine the third weighting factor for the account to be relocated; The relocation weight of the account to be relocated is calculated based on the third weighting factor. The specified field is used to distinguish account categories.

7. The method as described in claim 1, wherein the relevant information of the account to be relocated includes at least one of the following: the size of the historical transaction data of the account to be relocated, the accounting mode, and the account number.

8. The method as described in claim 7, wherein the size of the historical transaction data of the account to be relocated is used to calculate the first weighting factor, the accounting mode of the account to be relocated is used to calculate the second weighting factor, and the account number of the account to be relocated is used to calculate the third weighting factor.

9. The method of claim 8, wherein the transition weight is a weight obtained by jointly calculating a weight factor based on any combination of the first weight factor, the second weight factor, and the third weight factor.

10. The method as described in claim 1, wherein the method is applied to a temporary master database; After determining the relocation weight of each of the accounts to be relocated based on the relevant information, the process further includes: Store the migration weights in the temporary master database.

11. The method as described in claim 10, further comprising, before writing the account data generated during the period from the time the primary database fails to the time the standby database is started, into the standby database after it is started: During the period from the time the primary database fails until the time the backup database is started, the temporary primary database is used to receive the account data. The step of writing the account data generated by the account to be migrated during the period from the time of the primary database failure to the time of the standby database startup into the startup database specifically includes: The account data is written from the temporary primary database to the backup database after it is started.

12. An account relocation device, comprising: The acquisition module is used to acquire relevant information about the account to be relocated, and the relevant information includes at least historical transaction data stored in the snapshot database; The determination module is used to determine the relocation weight of each of the accounts to be relocated based on the relevant information; the relocation weight is used to reflect the importance of the relocation of the accounts to be relocated. The writing module is used to write the account data generated by the account to be migrated from the time of failure of the primary database to the time of backup database startup, according to the order of the migration weights, into the backup database after startup. The account data is stored in a temporary primary database, which is used to assume the role of a temporary primary database during the backup database startup period.

13. The apparatus of claim 12, wherein the determining module comprises: The first determining unit is used to determine the average size of the account's historical transaction data; The first calculation unit is used to calculate, for any of the accounts to be relocated, the ratio of the size of the historical transaction data of the account to the average size of the historical transaction data of the account, and generate a first weighting factor. The second calculation unit is used to calculate the relocation weight of the account to be relocated based on the first weighting factor.

14. The apparatus of claim 13, wherein the historical transaction data of the account to be relocated and the historical transaction data of the account are respectively stored in a snapshot database.

15. The apparatus of claim 12, wherein the determining module comprises: The second determining unit is used to determine a second weighting factor for any of the accounts to be relocated, based on the accounting mode of the accounts to be relocated. The third calculation unit is used to calculate the relocation weight of the account to be relocated based on the second weighting factor.

16. The apparatus of claim 15, wherein the accounting mode includes real-time accounting, buffered accounting, or summary accounting.

17. The apparatus of claim 12, wherein the determining module comprises: The acquisition unit is used to acquire a specified field from the account number of any of the accounts to be relocated. The third determining unit is used to determine the third weighting factor of the account to be relocated based on the value of the specified field. The fourth calculation unit is used to calculate the relocation weight of the account to be relocated based on the third weighting factor. The specified field is used to distinguish account categories.

18. The apparatus of claim 12, wherein the relevant information of the account to be relocated includes at least one of the following: the size of the historical transaction data of the account to be relocated, the accounting mode, and the account number.

19. The apparatus of claim 18, wherein the size of the historical transaction data of the account to be relocated is used to calculate a first weighting factor, the accounting mode of the account to be relocated is used to calculate a second weighting factor, and the account number of the account to be relocated is used to calculate a third weighting factor.

20. The apparatus of claim 19, wherein the transition weight is a weight obtained by jointly calculating a weight factor based on any combination of the first weight factor, the second weight factor, and the third weight factor.

21. The apparatus of claim 12, wherein the apparatus is applied to a temporary master warehouse, further comprising: A storage module is used to store the migration weights to the temporary master database.

22. The apparatus of claim 21, further comprising: The receiving module is used to receive the account data using the temporary primary database from the time when the primary database fails until the time when the backup database is started. The writing module specifically includes: The writing unit is used to write the account data from the temporary primary database to the backup database after it is started.

23. An account transfer device, comprising: The memory contains the account rollback program; The processor calls the account rollback program in the memory and executes it: Obtain relevant information about the accounts to be relocated, including at least historical transaction data stored in the snapshot database; The relocation weight of each of the accounts to be relocated is determined based on the relevant information; the relocation weight is used to reflect the importance of the relocation of the accounts to be relocated. According to the order of the migration weights, the account data generated by the account to be migrated from the time of the primary database failure to the time of the standby database startup is written into the startup database after startup. The account data is stored in a temporary primary database, which is used to assume the temporary primary database responsibilities during the standby database startup period.

Citation Information

Patent Citations

  • Business processing method, device and system

    CN105677673A

  • Method and device for processing data migration of business system

    CN106970915A