[go: up one dir, main page]

CN108345516B - Account back-moving method, device and equipment - Google Patents

Account back-moving method, device and equipment Download PDF

Info

Publication number
CN108345516B
CN108345516B CN201810018524.1A CN201810018524A CN108345516B CN 108345516 B CN108345516 B CN 108345516B CN 201810018524 A CN201810018524 A CN 201810018524A CN 108345516 B CN108345516 B CN 108345516B
Authority
CN
China
Prior art keywords
account
migration
weight
migrated
database
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810018524.1A
Other languages
Chinese (zh)
Other versions
CN108345516A (en
Inventor
李立
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Advanced Nova Technology Singapore Holdings Ltd
Original Assignee
Alibaba Group Holding Ltd
Advanced New Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Group Holding Ltd, Advanced New Technologies Co Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN202310092112.3A priority Critical patent/CN116089169A/en
Priority to CN201810018524.1A priority patent/CN108345516B/en
Publication of CN108345516A publication Critical patent/CN108345516A/en
Application granted granted Critical
Publication of CN108345516B publication Critical patent/CN108345516B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • G06F11/1469Backup restoration techniques
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/142Reconfiguring to eliminate the error
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2201/00Indexing scheme relating to error detection, to error correction, and to monitoring
    • G06F2201/80Database-specific techniques

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

本说明书实施例公开了一种账户回迁方法、装置及设备。通过综合用户账户历史交易数据、账户记账模式、账户的账号类别等多方面因素反映账号的记账频繁度和业务重要性,综合得出账号的回迁重要程度,从而按照该重要程度的高低顺序回迁。

Figure 201810018524

The embodiment of this specification discloses an account retrieval method, device and equipment. Reflect the frequency of bookkeeping and business importance of accounts by integrating historical transaction data of user accounts, account bookkeeping modes, account types, etc. move back.

Figure 201810018524

Description

一种账户回迁方法、装置及设备A method, device and equipment for retrieving an account

技术领域technical field

本说明书涉及计算机技术领域,尤其涉及一种账户回迁方法、装置及设备。This specification relates to the field of computer technology, and in particular to an account retrieval method, device and equipment.

背景技术Background technique

数据库意外发生网络故障或被意外异常终止,导致全部服务不可用,称为数据库Failover,简称FO(通常发生在主库上)。将先前处于故障状态的数据库、组件或服务恢复到原始的工作状态,并使备用系统从恢复运行状态恢复到待机状态的过程,称为数据库Failback,简称FB。The database unexpectedly experiences a network failure or is unexpectedly terminated abnormally, resulting in the unavailability of all services, which is called database Failover, or FO for short (usually occurs on the main database). The process of restoring the database, components or services that were previously in a fault state to the original working state, and restoring the standby system from the recovery state to the standby state is called database failback, or FB for short.

在FB过程中,当主库灾难以后,拉起备库一般需要一定的时间,在这段时间内,为保障业务正常进行,账户数据将会写入FO(Failover)库(也可以称为临时主库)。从而在备库拉起之后,需要将FO库中的账户数据再写入主库(备库),称为账户回迁。在账户回迁过程中,出于业务需要,应保证热点账户(交易频繁或者重要度高的账户)优先回迁。In the FB process, after the disaster of the main database, it generally takes a certain amount of time to pull up the standby database. During this period, in order to ensure the normal operation of the business, the account data will be written into the FO (Failover) database (also called the temporary master database). library). Therefore, after the standby database is pulled up, the account data in the FO database needs to be written into the main database (standby database), which is called account transfer. During the process of account relocation, due to business needs, it is necessary to ensure that hot accounts (accounts with frequent transactions or high importance) are relocated first.

基于此,需要一种更有效的账户回迁方法。Based on this, a more effective method for account retrieval is needed.

发明内容Contents of the invention

本说明书实施例提供一种账户回迁方法、装置及设备,用于解决如下问题:以提供一种更有效的账户回迁方法。The embodiment of this specification provides an account retrieval method, device and equipment, which are used to solve the following problem: to provide a more effective account retrieval method.

基于此,本说明书实施例提供一种账户回迁方法,包括:Based on this, the embodiment of this specification provides an account retrieval method, including:

获取待回迁账户的相关信息;Obtain relevant information about the account to be returned;

根据所述相关信息确定各待回迁账户的回迁权重;Determine the relocation weight of each account to be relocated according to the relevant information;

根据所述回迁权重的大小顺序,进行账户回迁;Perform account retrieval according to the order of retrieval weights;

其中所述待回迁账户的相关信息包括待回迁账户历史交易数据的大小、账户记账模式和账号中的至少一种。Wherein, the relevant information of the account to be retrieved includes at least one of the size of historical transaction data of the account to be retrieved, account accounting mode and account number.

同时,本说明书的实施例还提供一种账户回迁装置,包括:At the same time, the embodiment of this specification also provides an account retrieval device, including:

获取模块,获取待回迁账户的相关信息,其中所述待回迁账户的相关信息包括待回迁账户历史交易数据的大小、账户记账模式和账号中的至少一种;An acquisition module that acquires information about the account to be relocated, wherein the information about the account to be relocated includes at least one of the size of the historical transaction data of the account to be relocated, the account accounting mode, and the account number;

确定模块,根据所述相关信息确定各待回迁账户的回迁权重;A determining module, which determines the relocation weight of each account to be relocated according to the relevant information;

回迁模块,根据所述回迁权重的大小顺序,进行账户回迁。The fetching module performs account fetching according to the order of the fetching weights.

对应的,本说明书实施例还提供一种账户回迁设备,包括:Correspondingly, the embodiment of this specification also provides an account retrieval device, including:

存储器,存储有账户回迁程序;The memory stores the account retrieval program;

处理器,调用所述存储器中的账户回迁程序,并执行:The processor calls the account retrieval program in the memory, and executes:

获取待回迁账户的相关信息;Obtain relevant information about the account to be returned;

根据所述相关信息确定各待回迁账户的回迁权重;Determine the relocation weight of each account to be relocated according to the relevant information;

根据所述回迁权重的大小顺序,进行账户回迁;Perform account retrieval according to the order of retrieval weights;

其中所述待回迁账户的相关信息包括待回迁账户历史交易数据的大小、账户记账模式和账号中的至少一种。Wherein, the relevant information of the account to be retrieved includes at least one of the size of historical transaction data of the account to be retrieved, account accounting mode and account number.

对应的,本说明书的实施例还提供一种非易失性计算机存储介质,存储有计算机可执行指令,所述计算机可执行指令设置为:Correspondingly, the embodiments of this specification also provide a non-volatile computer storage medium storing computer-executable instructions, and the computer-executable instructions are set to:

获取待回迁账户的相关信息;Obtain relevant information about the account to be returned;

根据所述相关信息确定各待回迁账户的回迁权重;Determine the relocation weight of each account to be relocated according to the relevant information;

根据所述回迁权重的大小顺序,进行账户回迁;Perform account retrieval according to the order of retrieval weights;

其中所述待回迁账户的相关信息包括待回迁账户历史交易数据的大小、账户记账模式和账号中的至少一种。Wherein, the relevant information of the account to be retrieved includes at least one of the size of historical transaction data of the account to be retrieved, account accounting mode and account number.

本说明书实施例采用的上述至少一个技术方案能够达到以下有益效果:The above at least one technical solution adopted in the embodiments of this specification can achieve the following beneficial effects:

通过综合用户账户历史交易数据、账户记账模式、账户的账号类别等多方面因素反映账号的记账频繁度和业务重要性,综合得出账号的回迁重要程度,从而按照该重要程度的高低顺序回迁,减少交易频繁的热点账号在FB阶段的滞留时间,尽量减少受影响的交易数,提高用户体验。Reflect the frequency of bookkeeping and business importance of accounts by integrating historical transaction data of user accounts, account bookkeeping modes, account types, etc. Move back, reduce the retention time of hot accounts with frequent transactions in the FB stage, minimize the number of affected transactions, and improve user experience.

附图说明Description of drawings

图1为本说明书实施例所提供的账户快照数据的示意图;Figure 1 is a schematic diagram of the account snapshot data provided by the embodiment of this specification;

图2为本说明书实施例所涉及的系统架构示意图;FIG. 2 is a schematic diagram of the system architecture involved in the embodiment of this specification;

图3为本说明书实施例所提供的账户回迁方法的流程示意图;Fig. 3 is a schematic flow chart of the account retrieval method provided by the embodiment of this specification;

图4为本说明书实施例所提供的业务流程示意图;FIG. 4 is a schematic diagram of a business process provided by an embodiment of this specification;

图5为本说明书实施例所提供的账户回迁装置的结构示意图。Fig. 5 is a schematic structural diagram of an account retrieval device provided by an embodiment of this specification.

具体实施方式Detailed ways

为使本申请的目的、技术方案和优点更加清楚,下面将结合本申请具体实施例及相应的附图对本申请技术方案进行清楚、完整地描述。显然,所描述的实施例仅是本申请一部分实施例,而不是全部的实施例。基于本说明书中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in conjunction with specific embodiments of the present application and corresponding drawings. Apparently, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in this specification, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present application.

一般而言,长期给应用提供数据库服务的数据库称为主库,与此同时,还会存在一个用于备用的数据库(备库),备库作为主库的备份,通过主备同步保证数据一致行,主库灾难后承担主库职责,成为新主库。与此同时,在一些领域(例如支付领域、金融领域),需要安全级别较高的情形下,还存在一个快照数据库。快照数据库不同于备库,主要用于对主库正常运行时,将账户在主库的数据进行快照备份(例如,用于记录账户余额、日变动、账户资金变动明细等等),如图1所示,图1为本说明书实施例所提供的账户快照数据的示意图。换言之,快照数据库不是一个完全备份,但是它简略的反映了账户历史交易的情形。显然,若硬件能够支持的时候,快照数据库中的历史交易数据可以对更多的记录进行快照,也能更充分的反映一个账户的历史情形。换言之,快照数据是历史交易数据的一种,历史交易数据也可以是其他更详细的交易数据。Generally speaking, the database that provides database services to applications for a long time is called the main database. At the same time, there will also be a database (standby database) for backup. The standby database is used as the backup of the main database, and the data consistency is ensured through the synchronization of the master and the backup. OK, after the disaster of the main library, assume the responsibility of the main library and become the new main library. At the same time, in some fields (such as the payment field and the financial field), there is also a snapshot database when a higher level of security is required. The snapshot database is different from the standby database. It is mainly used for snapshot backup of the data of the account in the main database when the main database is running normally (for example, to record account balance, daily changes, details of account fund changes, etc.), as shown in Figure 1 As shown, FIG. 1 is a schematic diagram of account snapshot data provided by the embodiment of this specification. In other words, the snapshot database is not a full backup, but it briefly reflects the historical transactions of the account. Obviously, if the hardware can support it, the historical transaction data in the snapshot database can take snapshots of more records, and can more fully reflect the historical situation of an account. In other words, snapshot data is a type of historical transaction data, and historical transaction data can also be other more detailed transaction data.

主库灾难时,由于数据同步等原因,拉起备库作为新的主库需要一定时间,为了减少业务损失,FO库承担备库拉起期间的临时主库职责,接收正常的业务请求,进行业务处理,例如,支持FO场景下开户、记账等主业务,保证主库宕机场景下主业务的高度可用。When the main library is in disaster, due to reasons such as data synchronization, it takes a certain amount of time to pull up the standby library as the new main library. In order to reduce business losses, the FO library assumes the role of the temporary main library during the standby library startup period, receives normal business requests, and performs Business processing, for example, supports main businesses such as account opening and bookkeeping in the FO scenario, and ensures high availability of the main business when the main database is down.

在新的主库建立之后(一般是备库启用成功),需要将在FO库做过业务的账户、记账凭证、xts事务等数据回迁至新主库,在这种情形下,出于业务的需要(例如,同一笔记账请求的双方账号,一个账号回迁至新主库完成,另一个未回迁还处于FO库,由于两个账号路由到了两个不同的数据库,请求被事务拦截,导致记账失败,从而用户请求退款),为了尽可能的减少在该阶段的记账失败,降低自动退款的交易数,对于账户的回迁,需要分析其重要程度,保证重要度高的账号快速回迁。After the new main database is established (usually the standby database is activated successfully), it is necessary to move back the data such as accounts, accounting vouchers, and xts transactions that have done business in the FO database to the new main database. In this case, due to business needs (for example, for both accounts requested by the same note account, one account is migrated back to the new main database, and the other is still in the FO database before the migration is completed. Since the two accounts are routed to two different databases, the request is intercepted by the transaction, resulting in account failure, so the user requests a refund), in order to reduce the account failure at this stage as much as possible and reduce the number of transactions that are automatically refunded, it is necessary to analyze the importance of the account transfer to ensure that the account with high importance is quickly move back.

基于前述内容,本说明书实施例提供一种账户回迁方法,通过通过综合用户账户多方面因素,来反映账号的记账频繁度和业务重要性,综合得出账号的回迁权重,从而按照回迁权重的高低顺序回迁,Based on the foregoing, the embodiment of this specification provides an account retrieval method, which reflects the accounting frequency and business importance of the account by integrating various factors of the user account, and obtains the retrieval weight of the account comprehensively, so that according to the retrieval weight high and low order fetch,

在本说明书的实施例中,所述的账户回迁方法可采用如图2所示的架构,图2为本说明书实施例所涉及的系统架构示意图,下面将基于如图2所示的架构,详细说明本说明书的实施例提供的账户回迁过程,该过程具体包括以下步骤,如图3所示,图3为本说明书实施例所提供的账户回迁方法的流程示意图,包括:In the embodiment of this specification, the account retrieval method can adopt the architecture shown in Figure 2, which is a schematic diagram of the system architecture involved in the embodiment of this specification, and the following will be based on the architecture shown in Figure 2, and the details Describe the account reset process provided by the embodiment of this manual. The process specifically includes the following steps, as shown in Figure 3. Figure 3 is a schematic flow chart of the account reset method provided by the embodiment of this manual, including:

S301,获取待回迁账户的相关信息。S301. Obtain relevant information about the account to be transferred back.

所述待回迁账户的相关信息包括待回迁账户历史交易数据的大小、账户记账模式和账号中的至少一种。The relevant information of the account to be retrieved includes at least one of the size of historical transaction data of the account to be retrieved, account accounting mode and account number.

具体而言,在所述架构中,账户历史交易数据存储于快照数据库中,FO库作为临时主库看从快照数据库可以获得任一账户历史交易快照数据。账户记账模式一般而言是可以根据用户要求自行配置,从FO数据库中即可得到,账号主要用于区分该账户的类别,包括对公账号、对私账号以及内部账号等等,以便根据类别判断该账户的重要程度。Specifically, in the described architecture, the account history transaction data is stored in the snapshot database, and the FO library acts as a temporary master library, and any account history transaction snapshot data can be obtained from the snapshot database. Generally speaking, the account accounting mode can be configured according to the user's requirements, and can be obtained from the FO database. The account number is mainly used to distinguish the category of the account, including public accounts, private accounts, and internal accounts, etc., so that according to the category Determine the importance of the account.

S303,根据所述相关信息确定各待回迁账户的回迁权重。S303. Determine the retrieval weight of each account to be retrieved according to the related information.

基于前述内容,在这个过程中,可以是根据某一个信息进行回迁权重的计算,例如,基于账户历史交易快照数据的大小,直接赋予权重,历史交易快照数据数据越大的给予更高的权重;也可以是综合多个信息进行回迁权重的计算。例如,基于账户记账模式和账户历史交易快照数据的大小,共同确定账户的权重,以便进行账户回迁。Based on the above, in this process, the calculation of the reversion weight can be performed based on a certain information, for example, based on the size of the historical transaction snapshot data of the account, the weight is directly assigned, and the larger the historical transaction snapshot data, the higher the weight; Alternatively, multiple pieces of information may be integrated to calculate the retrieval weight. For example, based on the accounting mode of the account and the size of the historical transaction snapshot data of the account, the weight of the account is jointly determined for account reversion.

S305,根据所述回迁权重的大小顺序,进行账户回迁。S305. Perform account retrieval according to the order of retrieval weights.

通常而言,活跃账户和重要账户会具有更高的权重,账户回迁则按照权重高低顺序进行。Generally speaking, active accounts and important accounts will have higher weights, and account retrieval will be performed in order of weight.

通过综合用户账户历史交易数据,账户记账模式、账户的账号类别等多方面因素反映账号的记账频繁度和业务重要性,综合得出账号的回迁重要程度,从而按照该重要程度的高低顺序回迁,减少交易频繁的热点账号在FB阶段的滞留时间,尽量减少受影响的交易数,提高用户体验。Through comprehensive user account historical transaction data, account bookkeeping mode, account type and other factors to reflect the bookkeeping frequency and business importance of the account, the importance of account relocation is obtained comprehensively, and then the order of the importance is determined. Move back, reduce the retention time of hot accounts with frequent transactions in the FB stage, minimize the number of affected transactions, and improve user experience.

作为一种具体的实施方式,对于所述步骤S303,根据所述相关信息确定各待回迁账户的回迁权重,在根据待回迁账户历史交易数据进行权重计算时,可以采用如下方式:As a specific implementation, for the step S303, the relocation weight of each account to be relocated is determined according to the relevant information, and the following method can be used when calculating the weight based on the historical transaction data of the account to be relocated:

确定账户历史交易数据的平均大小;针对任一待回迁账户,计算该待回迁账户历史交易数据的大小与所述账户历史交易数据的平均大小的比值,生成第一权重因子;根据所述第一权重因子计算该账户的回迁权重。Determine the average size of account historical transaction data; for any account to be relocated, calculate the ratio of the size of the account’s historical transaction data to be relocated to the average size of the account’s historical transaction data, and generate a first weighting factor; according to the first The weight factor calculates the fetch weight of the account.

具体而言,账户历史交易数据的平均大小可以是快照数据库中的所有账户的快照数据的平均大小,也可以是所有待回迁账户的快照数据的平均大小。即,设置第一权重因子α表征账户历史交易数据的重要程度,其中:α=该账户的快照大小/快照数据库的平均快照大小,或者,α=该账户的快照大小/待回迁账户的平均快照大小。一般而言,采用前一种计算方式更为方便,而账户回迁可能是分批进行的,采用后一种计算方式更有针对性。Specifically, the average size of account historical transaction data may be the average size of snapshot data of all accounts in the snapshot database, or the average size of snapshot data of all accounts to be retrieved. That is, the first weighting factor α is set to represent the importance of the historical transaction data of the account, where: α=snapshot size of the account/average snapshot size of the snapshot database, or α=snapshot size of the account/average snapshot of the account to be retrieved size. Generally speaking, it is more convenient to use the former calculation method, and the account reversion may be carried out in batches, and the latter calculation method is more targeted.

作为一种具体的实施方式,对于所述步骤S303,根据所述相关信息确定各待回迁账户的回迁权重,在根据账户记账模式进行权重计算时,可以采用如下方式:As a specific implementation, for the step S303, the relocation weight of each account to be relocated is determined according to the relevant information, and the following method can be used when calculating the weight according to the account bookkeeping mode:

针对任一待回迁账户,根据其账户记账模式确定该账户的第二权重因子;其中,所述记账模式包括实时记账、缓冲记账或者汇总记账;根据所述第二权重因子计算该账户的回迁权重。For any account to be returned, determine the second weight factor of the account according to its account bookkeeping mode; wherein, the bookkeeping mode includes real-time bookkeeping, buffer bookkeeping or summary bookkeeping; calculate according to the second weight factor Feedback weight for this account.

具体而言,在支付应用中,一般的记账账户,均支持三种记账模式:实时记账、汇总记账或者缓冲记账。记账模式可以预先根据账户的实际需求进行设置。Specifically, in payment applications, general bookkeeping accounts support three bookkeeping modes: real-time bookkeeping, summary bookkeeping, or buffer bookkeeping. The accounting mode can be set in advance according to the actual needs of the account.

实时记账,顾名思义,就是账户记账完成后余额实时变动。汇总记账,与实时记账相反,即账户记账完成后仅记录汇总记账明细,不修改账户余额,待日切时再汇总整体变动额,一次体现到余额上。缓冲记账,是实时记账和汇总记账的折中结果,配置缓冲记账的账户,记账完成时同样仅记录缓冲记账明细,待缓冲记账恢复定时任务来取指定数量明细,计算本次变动额后,一次体现到余额上,此时账号余额的变动频率取决于定时任务的频率。Real-time bookkeeping, as the name suggests, means that the balance of the account changes in real time after the bookkeeping is completed. Summary bookkeeping is the opposite of real-time bookkeeping, that is, after the account bookkeeping is completed, only the summary bookkeeping details are recorded, and the account balance is not modified. When the day is cut, the overall change is summarized and reflected in the balance at one time. Buffer bookkeeping is a compromise result of real-time bookkeeping and summary bookkeeping. The account for buffer bookkeeping is configured. When bookkeeping is completed, only the details of buffer bookkeeping are recorded. When the buffer bookkeeping resumes the scheduled task, the specified quantity details are calculated. After this change, it will be reflected in the balance once. At this time, the change frequency of the account balance depends on the frequency of the scheduled task.

换言之,需要设置汇总记账或者缓冲记账的账户,通常为易热点账户,其账号交易量较多,账号较重要。因此,应给汇总记账或者缓冲记账的账户给予较高的权重因子。In other words, the accounts that need to be set up for aggregate bookkeeping or buffer bookkeeping are usually Yihotspot accounts, which have a large amount of transactions and are more important. Therefore, a higher weight factor should be given to the accounts of summary bookkeeping or buffer bookkeeping.

例如,设置第二权重因子β表征账户记账模式的重要程度,其中:若当前账户配置了汇总记账或者缓冲记账,则β=0.6;若当前账户记账模式为实时记账,则β=0.4。For example, setting the second weight factor β to represent the importance of the account accounting mode, wherein: if the current account is configured with summary accounting or buffer accounting, then β=0.6; if the current account accounting mode is real-time accounting, then β = 0.4.

作为一种具体的实施方式,对于所述步骤S303,根据所述相关信息确定各待回迁账户的回迁权重,在根据用户账号进行权重计算时,可以采用如下方式:As a specific implementation manner, for the step S303, the relocation weight of each account to be relocated is determined according to the relevant information, and the following method can be used when calculating the weight according to the user account:

针对任一待回迁账户,获取其账号中的指定字段;根据所述指定字段的值,确定该账户的第三权重因子;根据所述第三权重因子计算该账户的回迁权重。For any account to be retrieved, obtain a specified field in the account; determine a third weight factor of the account according to the value of the specified field; calculate the retrieve weight of the account according to the third weight factor.

如前所述,客户账的账号,主要分类对公账号、对私账号和部分内部账号,对公账号即包括公司、商户账户,对私账号即用户的余额户(包含买家和卖家);对上述不同类别的账号,通常通过在账号编码的指定字段上进行区分。As mentioned above, the accounts of customer accounts are mainly classified into public accounts, private accounts and some internal accounts. Public accounts include company and merchant accounts, and private accounts are users' balance accounts (including buyers and sellers); For the above-mentioned different types of accounts, it is usually distinguished by specifying the field of the account code.

例如,编码21881XXXXXXXXXXXXXX为商户账户,21882XXXXXXX XXXXXXX为个人余额户,21883XXXXXXXXXXXXXX为内部账户,通过开头的前5位确定不同的账户类别。For example, the code 21881XXXXXXXXXXXXXX is a merchant account, 21882XXXXXXXXXXXXXX is a personal balance account, and 21883XXXXXXXXXXXXXX is an internal account. Different account types are determined by the first 5 digits at the beginning.

一般而言,商户账户转账、放款、退款等业务量均大于个人余额户;少量的内部户通常为过渡户、担保户等,记账量也远大于个人余额户。基于此,可预先给内部账户或者商户账户给予较高的权重因子。Generally speaking, the business volume of transfers, loans, and refunds of merchant accounts is greater than that of personal balance accounts; a small number of internal accounts are usually transitional accounts, guarantee accounts, etc., and the amount of bookkeeping is also much larger than that of personal balance accounts. Based on this, a higher weight factor can be given to internal accounts or merchant accounts in advance.

例如,设置第三权重因子γ表征账户类别的重要程度,其中:若当前账户为21881、21883开头账户,则γ=0.6,若当前账户为21882开头账户,则γ=0.4。For example, the third weight factor γ is set to represent the importance of the account category, where: if the current account is an account starting with 21881 or 21883, then γ=0.6; if the current account is an account starting with 21882, then γ=0.4.

上述的第二权重因子β和第三权重因子γ可基于经验人为设定,还可以在实际应用中根据回迁业务结果进行动态调整。The above-mentioned second weight factor β and third weight factor γ can be set artificially based on experience, and can also be dynamically adjusted according to the retrieval business results in practical applications.

如前所述,对于待回迁账户的回迁权重,可以是基于某一个权重因子,也可以是基于若干个权重因子的联合计算得到,例如,设置当前账号的回迁权重为:回迁权重Weight(account)=α*β*γ*100。显然,具体的计算公式可根据实际情形进行调整,并不限制于上述公式。As mentioned above, the retrieval weight of the account to be retrieved can be based on a certain weight factor, or based on the joint calculation of several weight factors. For example, the retrieval weight of the current account is set as: retrieval weight Weight(account) =α*β*γ*100. Obviously, the specific calculation formula can be adjusted according to the actual situation, and is not limited to the above formula.

上述的回迁权重计算可以是即时进行的,作为一种具体的实施方式,前述方法还包括:存储所述回迁权重至本地。此处的本地指的是充当临时主库的FO数据库,例如,将该值赋予FO记录表(ip_failover_record)中,需要进行账户回迁时按照回迁权重的大小顺序进行即可,预先存储回迁权重值可以进行定时任务制定,更加方便,且提高效率。在根据回迁权重进行账号回迁的具体应用中,其流程图如图4所示,图4为本说明书实施例所提供的业务流程示意图。The above calculation of the retrieval weight may be performed in real time. As a specific implementation manner, the aforementioned method further includes: storing the retrieval weight locally. The local here refers to the FO database that acts as the temporary master database. For example, assign this value to the FO record table (ip_failover_record). When it is necessary to perform account reversion, it can be performed in the order of the reversion weight. Pre-stored reversion weight values can be It is more convenient and efficient to make scheduled tasks. In the specific application of account fetching based on the fetching weight, its flow chart is shown in FIG. 4 , which is a schematic diagram of the business process provided by the embodiment of this specification.

下边给出一个具体应用的示例,以使本说明书实施例的方案更加的浅显明白。An example of a specific application is given below to make the solution of the embodiment of this specification more clear.

在一个示例性的回迁方案中,事先确定账号的回迁权重采用如下计算方式:回迁权重Weight(account)=α*β*γ*100。其中,第一权重因子α=该账户的快照大小/快照数据库的平均快照大小,当前快照数据库的平均快照大小为50K;若当前账户配置了汇总记账或者缓冲记账,则第二权重因子β=2;若当前账户记账模式为实时记账,则第二权重因子β=1;若当前账户为21881或者21883开头账户,则第三权重因子γ=0.6,若当前账户为21882开头账户,则第三权重因子γ=0.4。In an exemplary fetching scheme, the fetching weight of an account determined in advance is calculated as follows: fetching weight Weight(account)=α*β*γ*100. Among them, the first weight factor α=the snapshot size of the account/the average snapshot size of the snapshot database, and the average snapshot size of the current snapshot database is 50K; if the current account is configured with summary accounting or buffer accounting, the second weighting factor β =2; if the current account bookkeeping mode is real-time bookkeeping, then the second weight factor β=1; if the current account is an account starting with 21881 or 21883, then the third weight factor γ=0.6, if the current account is an account starting with 21882, Then the third weighting factor γ=0.4.

现有两个账户,A账户为21883XXXXXXXXXXXXXX,采用汇总记账,该账户的快照大小为150K;B账户为21882XXXXXXXXXXXXXX,采用实时记账,该账户快照大小为500K。通过上述回迁方案可得:对于A账户而言,其α=3,β=2,γ=0.6,从而回迁权重Weight(A)=3*2*0.6*100=360,对于B账户而言,其α=10,β=1,γ=0.4,从而回迁权重Weight(B)=10*1*0.4*100=400。即,从回迁权重上反映出B账户是一个更为活跃、交易更为频繁的账户,应优先对B账户进行回迁。There are two accounts, account A is 21883XXXXXXXXXXXXXX, which adopts aggregate bookkeeping, and the snapshot size of this account is 150K; account B is 21882XXXXXXXXXXXXXX, which uses real-time bookkeeping, and the snapshot size of this account is 500K. Through the above retrieving scheme, it can be obtained: for account A, its α=3, β=2, γ=0.6, so the retrieving weight Weight(A)=3*2*0.6*100=360, for account B, Its α=10, β=1, γ=0.4, so the recall weight Weight(B)=10*1*0.4*100=400. That is to say, it is reflected from the reversion weight that account B is a more active account with more frequent transactions, and account B should be relocated first.

基于同样的思路,本发明还提供一种账户回迁装置,如图5所示,图5为本说明书实施例所提供的账户回迁装置的结构示意图,包括:Based on the same idea, the present invention also provides an account retrieval device, as shown in Figure 5, which is a schematic structural diagram of the account retrieval device provided by the embodiment of this specification, including:

获取模块501,获取待回迁账户的相关信息,其中所述待回迁账户的相关信息包括待回迁账户历史交易数据的大小、账户记账模式和账号中的至少一种;Obtaining module 501, acquiring relevant information of the account to be relocated, wherein the relevant information of the account to be relocated includes at least one of the size of historical transaction data of the account to be relocated, account accounting mode, and account number;

确定模块503,根据所述相关信息确定各待回迁账户的回迁权重;Determining module 503, determining the relocation weight of each account to be relocated according to the relevant information;

回迁模块505,根据所述回迁权重的大小顺序,进行账户回迁。The fetching module 505 performs account fetching according to the order of the fetching weights.

进一步地,所述确定模块503,确定账户历史交易数据的平均大小;针对任一待回迁账户,计算该待回迁账户历史交易数据的大小与所述账户历史交易数据的平均大小的比值,生成第一权重因子;根据所述第一权重因子计算该账户的回迁权重。Further, the determination module 503 determines the average size of account historical transaction data; for any account to be relocated, calculate the ratio of the size of the account’s historical transaction data to be relocated to the average size of the account’s historical transaction data, and generate the first A weight factor; calculate the recall weight of the account according to the first weight factor.

进一步地,所述确定模块503,针对任一待回迁账户,根据其账户记账模式确定该账户的第二权重因子;根据所述第二权重因子计算该账户的回迁权重;其中,所述记账模式包括实时记账、缓冲记账或者汇总记账。Further, the determination module 503, for any account to be returned, determines the second weight factor of the account according to its account bookkeeping mode; calculates the return weight of the account according to the second weight factor; wherein, the bookkeeping Accounting modes include real-time accounting, buffer accounting or summary accounting.

进一步地,所述确定模块503,针对任一待回迁账户,获取其账号中的指定字段;根据所述指定字段的值,确定该账户的第三权重因子;根据所述第三权重因子计算该账户的回迁权重;其中,所述指定字段用于区分账户类别。Further, the determination module 503, for any account to be relocated, obtains the specified field in the account; according to the value of the specified field, determines the third weight factor of the account; calculates the third weight factor according to the third weight factor. Feedback weight of an account; wherein, the specified field is used to distinguish account categories.

进一步地,所述装置还包括存储模块507,存储所述回迁权重至本地。Further, the device further includes a storage module 507, which stores the retrieved weight locally.

对应的,本申请实施例还提供一种账户回迁设备,所述设备包括:Correspondingly, the embodiment of the present application also provides an account retrieval device, the device includes:

存储器,存储有账户回迁程序;The memory stores the account retrieval program;

处理器,调用所述存储器中的账户回迁程序,并执行:The processor calls the account retrieval program in the memory, and executes:

获取待回迁账户的相关信息;Obtain relevant information about the account to be returned;

根据所述相关信息确定各待回迁账户的回迁权重;Determine the relocation weight of each account to be relocated according to the relevant information;

根据所述回迁权重的大小顺序,进行账户回迁;Perform account retrieval according to the order of retrieval weights;

其中所述待回迁账户的相关信息包括待回迁账户历史交易数据的大小、账户记账模式和账号中的至少一种。Wherein, the relevant information of the account to be retrieved includes at least one of the size of historical transaction data of the account to be retrieved, account accounting mode and account number.

基于同样的发明思路,本申请实施例还提供了对应的一种非易失性计算机存储介质,存储有计算机可执行指令,所述计算机可执行指令设置为:Based on the same inventive idea, the embodiment of the present application also provides a corresponding non-volatile computer storage medium, which stores computer executable instructions, and the computer executable instructions are set to:

获取待回迁账户的相关信息;Obtain relevant information about the account to be returned;

根据所述相关信息确定各待回迁账户的回迁权重;Determine the relocation weight of each account to be relocated according to the relevant information;

根据所述回迁权重的大小顺序,进行账户回迁;Perform account retrieval according to the order of retrieval weights;

其中所述待回迁账户的相关信息包括待回迁账户历史交易数据的大小、账户记账模式和账号中的至少一种。Wherein, the relevant information of the account to be retrieved includes at least one of the size of historical transaction data of the account to be retrieved, account accounting mode and account number.

本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置、设备和介质类实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可,这里就不再一一赘述。Each embodiment in this specification is described in a progressive manner, the same and similar parts of each embodiment can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, as for the apparatus, equipment and medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple. For the relevant parts, please refer to the description of the method embodiments, and details will not be repeated here.

上述对本说明书特定实施例进行了描述。其它实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作或步骤或模块可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或者可能是有利的。The foregoing describes specific embodiments of this specification. Other implementations are within the scope of the following claims. In some cases, the actions or steps or modules recited in the claims may be performed in an order different from that in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. Multitasking and parallel processing are also possible or may be advantageous in certain embodiments.

在20世纪90年代,对于一个技术的改进可以很明显地区分是硬件上的改进(例如,对二极管、晶体管、开关等电路结构的改进)还是软件上的改进(对于方法流程的改进)。然而,随着技术的发展,当今的很多方法流程的改进已经可以视为硬件电路结构的直接改进。设计人员几乎都通过将改进的方法流程编程到硬件电路中来得到相应的硬件电路结构。因此,不能说一个方法流程的改进就不能用硬件实体模块来实现。例如,可编程逻辑器件(Programmable Logic Device,PLD)(例如现场可编程门阵列(Field Programmable GateArray,FPGA))就是这样一种集成电路,其逻辑功能由用户对器件编程来确定。由设计人员自行编程来把一个数字系统“集成”在一片PLD上,而不需要请芯片制造厂商来设计和制作专用的集成电路芯片。而且,如今,取代手工地制作集成电路芯片,这种编程也多半改用“逻辑编译器(logic compiler)”软件来实现,它与程序开发撰写时所用的软件编译器相类似,而要编译之前的原始代码也得用特定的编程语言来撰写,此称之为硬件描述语言(Hardware Description Language,HDL),而HDL也并非仅有一种,而是有许多种,如ABEL(Advanced Boolean Expression Language)、AHDL(Altera Hardware DescriptionLanguage)、Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL(Java Hardware Description Language)、Lava、Lola、MyHDL、PALASM、RHDL(RubyHardware Description Language)等,目前最普遍使用的是VHDL(Very-High-SpeedIntegrated Circuit Hardware Description Language)与Verilog。本领域技术人员也应该清楚,只需要将方法流程用上述几种硬件描述语言稍作逻辑编程并编程到集成电路中,就可以很容易得到实现该逻辑方法流程的硬件电路。In the 1990s, the improvement of a technology can be clearly distinguished as an improvement in hardware (for example, improvements in circuit structures such as diodes, transistors, and switches) or improvements in software (improvement in method flow). However, with the development of technology, the improvement of many current method flows can be regarded as the direct improvement of the hardware circuit structure. Designers almost always get the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that the improvement of a method flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (Programmable Logic Device, PLD) (such as a Field Programmable Gate Array (Field Programmable Gate Array, FPGA)) is such an integrated circuit, and its logic function is determined by programming the device by a user. It is programmed by the designer to "integrate" a digital system on a PLD, instead of asking a chip manufacturer to design and make a dedicated integrated circuit chip. Moreover, nowadays, instead of making integrated circuit chips by hand, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when writing programs, but before compiling The original code of the computer must also be written in a specific programming language, which is called a hardware description language (Hardware Description Language, HDL), and there is not only one kind of HDL, but many kinds, 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, RHDL (Ruby Hardware Description Language), etc., currently the most commonly used is VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. It should also be clear to those skilled in the art that only a little logical programming of the method flow in the above-mentioned hardware description languages and programming into an integrated circuit can easily obtain a hardware circuit for realizing the logic method flow.

控制器可以按任何适当的方式实现,例如,控制器可以采取例如微处理器或处理器以及存储可由该(微)处理器执行的计算机可读程序代码(例如软件或固件)的计算机可读介质、逻辑门、开关、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程逻辑控制器和嵌入微控制器的形式,控制器的例子包括但不限于以下微控制器:ARC 625D、Atmel AT91SAM、Microchip PIC18F26K20以及Silicone Labs C8051F320,存储器控制器还可以被实现为存储器的控制逻辑的一部分。本领域技术人员也知道,除了以纯计算机可读程序代码方式实现控制器以外,完全可以通过将方法步骤进行逻辑编程来使得控制器以逻辑门、开关、专用集成电路、可编程逻辑控制器和嵌入微控制器等的形式来实现相同功能。因此这种控制器可以被认为是一种硬件部件,而对其内包括的用于实现各种功能的装置也可以视为硬件部件内的结构。或者甚至,可以将用于实现各种功能的装置视为既可以是实现方法的软件模块又可以是硬件部件内的结构。The controller may be implemented in any suitable way, for example the controller may take the form of a microprocessor or processor and a computer readable medium storing computer readable program code (such as software or firmware) executable by the (micro)processor , logic gates, switches, Application Specific Integrated Circuit (ASIC), 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 Silicone Labs C8051F320, the memory controller can also be implemented as part of the memory's control logic. Those skilled in the art also know that, in addition to realizing the controller in a purely computer-readable program code mode, it is entirely possible to make the controller use logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded The same function can be realized in the form of a microcontroller or the like. Therefore, such a controller can be regarded as a hardware component, and the devices included in it for realizing various functions can also be regarded as structures within the hardware component. Or even, means for realizing various functions can be regarded as a structure within both a software module realizing a method and a hardware component.

上述实施例阐明的系统、装置、模块或单元,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为计算机。具体的,计算机例如可以为个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件设备、游戏控制台、平板计算机、可穿戴设备或者这些设备中的任何设备的组合。The systems, devices, modules, or units described in the above embodiments can be specifically implemented by computer chips or entities, or by products with certain functions. A typical implementing device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or Combinations of any of these devices.

为了描述的方便,描述以上装置时以功能分为各种单元分别描述。当然,在实施本说明书的实施例时可以把各单元的功能在同一个或多个软件和/或硬件中实现。For the convenience of description, when describing the above devices, functions are divided into various units and described separately. Of course, when implementing the embodiments of this specification, the functions of each unit can be implemented in one or more pieces of software and/or hardware.

本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present invention may be provided as methods, systems, or computer program products. Accordingly, the present invention can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may 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.) having computer-usable program code embodied therein.

本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present 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 should be understood that each procedure and/or block in the flowchart and/or block diagram, and a combination of procedures and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions may be provided to a general purpose computer, special purpose computer, embedded processor, or processor of other programmable data processing equipment to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing equipment produce a An apparatus for realizing the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.

这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the instructions The device realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.

这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device, causing a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, thereby The instructions provide steps for implementing the functions specified in the flow chart or blocks of the flowchart and/or the block or blocks of the block diagrams.

在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.

内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。Memory may include non-permanent storage in computer readable media, in the form of random access memory (RAM) and/or nonvolatile memory such as read only memory (ROM) or flash RAM. Memory is an example of computer readable media.

计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信编号和载波。Computer-readable media, including both permanent and non-permanent, removable and non-removable media, can be implemented by any method or technology for storage of information. Information may be computer readable instructions, data structures, modules of a program, 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 technology, Compact Disc Read-Only Memory (CD-ROM), Digital Versatile Disc (DVD) or other optical storage, Magnetic tape cartridge, tape magnetic disk storage or other magnetic storage device or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include transitory media, such as modulated data signal numbers and carrier waves.

还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。It should also be noted that the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus comprising a set of elements includes not only those elements, but also includes Other elements not expressly listed, or elements inherent in the process, method, commodity, or apparatus are also included. Without further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising said element.

本领域技术人员应明白,本说明书中一个或多个的实施例可提供为方法、系统或计算机程序产品。因此,本说明书的实施例可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的形式。而且,本说明书的实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that one or more of the embodiments in this specification may be provided as a method, system or computer program product. Accordingly, the embodiments of the present specification may take the form of an entirely hardware embodiment, an entirely software embodiment or a combination of software and hardware aspects. Furthermore, embodiments of the present specification may 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.) having computer-usable program code embodied therein. .

本说明书的实施例可以在由计算机执行的计算机可执行指令的一般上下文中描述,例如程序模块。一般地,程序模块包括执行特定事务或实现特定抽象数据类型的例程、程序、对象、组件、数据结构等等。也可以在分布式计算环境中实践本说明书的实施例,在这些分布式计算环境中,由通过通信网络而被连接的远程处理设备来执行事务。在分布式计算环境中,程序模块可以位于包括存储设备在内的本地和远程计算机存储介质中。Embodiments of the specification may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular transactions or implement particular abstract data types. Embodiments of the present specification may also be practiced in distributed computing environments where transactions are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including storage devices.

Claims (11)

1. An account migration method comprising:
acquiring relevant information of an account to be migrated back before a main database is in network failure or is abnormally terminated accidentally and a standby database is started;
determining the migration weight of each account to be migrated according to the related information; the migration weight is used for reflecting the importance degree of the migration of the account to be migrated;
according to the size sequence of the migration weight, carrying out account migration, wherein the account migration refers to writing account data generated from a network fault or unexpected abnormal termination time point of a main database to a standby database pull-up time point into the main database;
the related information of the account to be moved back comprises at least one of the size of historical transaction data of the account to be moved back, an account billing mode and an account number;
and the historical transaction data of the account to be migrated back is stored in a snapshot database.
2. The method according to claim 1, wherein determining a migration weight of each account to be migrated back according to the related information comprises:
determining an average size of historical transaction data of the account;
for any account to be returned, calculating the ratio of the historical transaction data of the account to be returned to the average size of the historical transaction data of the account to be returned to generate a first weight factor;
and calculating the back migration weight of the account according to the first weight factor.
3. The method of claim 1, wherein determining a migration weight for each account to be migrated according to the relevant information comprises:
for any account to be migrated, determining a second weight factor of the account according to the account billing mode of the account;
calculating the back-migration weight of the account according to the second weight factor;
wherein the accounting mode comprises real-time accounting, buffer accounting or summary accounting.
4. The method of claim 1, wherein determining a migration weight for each account to be migrated according to the relevant information comprises:
aiming at any account to be migrated, acquiring a specified field in the account number of the account to be migrated;
determining a third weight factor of the account according to the value of the designated field;
calculating the back migration weight of the account according to the third weight factor;
wherein the designated field is used to distinguish between account categories.
5. The method according to claim 1, after determining the migration weight of each account to be migrated according to the related information, further comprising:
and storing the backtracking weight to the local.
6. An account migration apparatus comprising:
the system comprises an acquisition module, a storage module and a management module, wherein the acquisition module is used for acquiring the relevant information of an account to be returned when a network fault or unexpected abnormal termination occurs in a main database and before a standby database is started, wherein the relevant information of the account to be returned comprises at least one of the size of historical transaction data of the account to be returned, an account billing mode and an account number;
the determining module is used for determining the migration weight of each account to be migrated according to the related information; the migration weight is used for reflecting the importance degree of the migration of the account to be migrated;
the migration module carries out account migration according to the sequence of the migration weights; the account migration refers to writing account data generated from a network fault or unexpected abnormal termination time point of a main database to a standby database pull-up time point into the main database;
and the historical transaction data of the account to be migrated back is stored in a snapshot database.
7. The apparatus of claim 6, the determination module to determine an average size of the account historical transaction data; for any account to be returned, calculating the ratio of the historical transaction data of the account to be returned to the average size of the historical transaction data of the account to be returned to generate a first weight factor; and calculating the back migration weight of the account according to the first weight factor.
8. The apparatus of claim 6, the determining module determines, for any account to be migrated, the second weighting factor for the account according to its account billing mode; calculating the back migration weight of the account according to the second weight factor; wherein the accounting mode comprises real-time accounting, buffer accounting or summary accounting.
9. The apparatus of claim 6, the determining module obtains a designated field in an account number of any account to be migrated; determining a third weight factor of the account according to the value of the designated field; calculating the back-migration weight of the account according to the third weight factor; wherein the designated field is used to distinguish between account categories.
10. The apparatus of claim 6, further comprising a storage module that stores the backover weight locally.
11. An account migration apparatus comprising:
a memory storing an account migration program;
the processor calls the account back-migration program in the memory and executes:
acquiring relevant information of an account to be migrated back before a main database is in network failure or is abnormally terminated accidentally and a standby database is started;
determining the migration weight of each account to be migrated according to the related information; the migration weight is used for reflecting the importance degree of the migration of the account to be migrated;
according to the sequence of the migration weight, account migration is carried out; the account migration refers to writing account data generated from a network fault or unexpected abnormal termination time point of a main database to a standby database pull-up time point into the main database;
the information related to the account to be migrated back comprises at least one of the size of the historical transaction data of the account to be migrated back, an account billing mode and an account number; and the historical transaction data of the account to be migrated back is stored in a snapshot database.
CN201810018524.1A 2018-01-09 2018-01-09 Account back-moving method, device and equipment Active CN108345516B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202310092112.3A CN116089169A (en) 2018-01-09 2018-01-09 Account returning method, device and equipment
CN201810018524.1A CN108345516B (en) 2018-01-09 2018-01-09 Account back-moving method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810018524.1A CN108345516B (en) 2018-01-09 2018-01-09 Account back-moving method, device and equipment

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202310092112.3A Division CN116089169A (en) 2018-01-09 2018-01-09 Account returning method, device and equipment

Publications (2)

Publication Number Publication Date
CN108345516A CN108345516A (en) 2018-07-31
CN108345516B true CN108345516B (en) 2023-02-21

Family

ID=62960609

Family Applications (2)

Application Number Title Priority Date Filing Date
CN201810018524.1A Active CN108345516B (en) 2018-01-09 2018-01-09 Account back-moving method, device and equipment
CN202310092112.3A Pending CN116089169A (en) 2018-01-09 2018-01-09 Account returning method, device and equipment

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN202310092112.3A Pending CN116089169A (en) 2018-01-09 2018-01-09 Account returning method, device and equipment

Country Status (1)

Country Link
CN (2) CN108345516B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102450052A (en) * 2010-06-02 2012-05-09 华为技术有限公司 Method, equipment and system for processing data gateway load
CN104303197A (en) * 2012-03-19 2015-01-21 派奈特支付网络有限责任公司 Systems and methods for real-time account access
CN106201354A (en) * 2016-07-12 2016-12-07 乐视控股(北京)有限公司 Date storage method and system
CN106970915A (en) * 2016-01-13 2017-07-21 阿里巴巴集团控股有限公司 A kind of processing method and processing device of operation system Data Migration

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103699548B (en) * 2012-09-27 2016-12-21 阿里巴巴集团控股有限公司 A kind of method and apparatus being recovered database data by usage log
US9842321B2 (en) * 2013-11-15 2017-12-12 Clickswitch, Llc Centralized financial account migration system
CN105677675B (en) * 2014-11-20 2019-08-27 阿里巴巴集团控股有限公司 Method for processing business and device
CN105677673B (en) * 2014-11-20 2019-01-04 阿里巴巴集团控股有限公司 Method for processing business, apparatus and system
US9881038B2 (en) * 2015-04-20 2018-01-30 International Business Machines Corporation Archive migration system
US10109022B2 (en) * 2015-10-22 2018-10-23 Quest Software Inc. Email and identity migration based on multifactor relationship data provided by users and systems
CN105391654A (en) * 2015-11-26 2016-03-09 中国建设银行股份有限公司 Account activeness-based system resource allocation method and device
CN106919473B (en) * 2015-12-28 2020-10-30 创新先进技术有限公司 Data disaster backup system and service processing method
CN106953736B (en) * 2016-01-07 2020-02-18 阿里巴巴集团控股有限公司 Fault switching method and device
CN105868054A (en) * 2016-03-28 2016-08-17 上海上讯信息技术股份有限公司 Method and device for data backup in dual-computer system environment
CN107015876B (en) * 2016-10-10 2020-07-28 阿里巴巴集团控股有限公司 Service request processing method and device
CN106383756A (en) * 2016-10-12 2017-02-08 郑州云海信息技术有限公司 Method for realizing disaster recovery switching of storage without interrupting Linux system service
CN106878052B (en) * 2016-12-21 2020-04-03 新华三技术有限公司 User migration method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102450052A (en) * 2010-06-02 2012-05-09 华为技术有限公司 Method, equipment and system for processing data gateway load
CN104303197A (en) * 2012-03-19 2015-01-21 派奈特支付网络有限责任公司 Systems and methods for real-time account access
CN106970915A (en) * 2016-01-13 2017-07-21 阿里巴巴集团控股有限公司 A kind of processing method and processing device of operation system Data Migration
CN106201354A (en) * 2016-07-12 2016-12-07 乐视控股(北京)有限公司 Date storage method and system

Also Published As

Publication number Publication date
CN116089169A (en) 2023-05-09
CN108345516A (en) 2018-07-31

Similar Documents

Publication Publication Date Title
TWI752118B (en) A blockchain consensus method and device
CN110008018B (en) Batch task processing method, device and equipment
WO2018214835A1 (en) Block chain service acceptance and consensus method and device
WO2019196551A1 (en) Payment process configuration and execution method, apparatus and device
TWI684944B (en) Accounting method and device
CN108415792B (en) Disaster recovery system, method, device and equipment
CN109902077B (en) Service request processing method, device and equipment
WO2019179243A1 (en) Information display method, apparatus and device
CN114817978B (en) Data access method and system, hardware unloading device, electronic device and medium
WO2019085601A1 (en) Task execution method and apparatus
CN108346039B (en) Business processing method, device and equipment of Internet financial settlement system
CN110389989B (en) Data processing method, device and equipment
CN116304226A (en) Information query method, device, equipment and medium
CN111402058A (en) Data processing method, device, equipment and medium
CN110782253A (en) Blockchain-based transaction processing method, device and device
TW202016737A (en) Disaster recovery data processing method, device and system
CN108345516B (en) Account back-moving method, device and equipment
CN114862380B (en) Quota sharing processing method and device
US11870706B2 (en) Method and system for allocating and managing cloud resources
WO2024055779A1 (en) Bill processing method and apparatus
CN110489392A (en) Data access method, device, system, storage medium and equipment between multi-tenant
CN115271963A (en) Resource settlement method and device, service cycle switching method and device
CN115034902A (en) Accounting processing method and device
CN117193670B (en) A method, device, storage medium and electronic device for clearing cache
US12405865B1 (en) Recovery of a target database system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20201020

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Advanced innovation technology Co.,Ltd.

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Applicant before: Alibaba Group Holding Ltd.

Effective date of registration: 20201020

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant before: Advanced innovation technology Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20240307

Address after: 128 Meizhi Road, Guohao Times City # 20-01, Singapore 189773

Patentee after: Advanced Nova Technology (Singapore) Holdings Ltd.

Country or region after: Singapore

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Patentee before: Innovative advanced technology Co.,Ltd.

Country or region before: Cayman Islands

TR01 Transfer of patent right