Date switching method, device, electronic device and computer readable medium

By receiving daily broadcast information from the main system and judging whether to perform daily cutting based on its own time point, it solves the problems of message loss and large backtracking transactions in the broadcast-subscription method, and achieves more efficient date synchronization and system availability.

CN113486032BActive Publication Date: 2024-09-24CHINA CONSTRUCTION BANK
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110751985.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-02
Publication Date
2024-09-24
Estimated Expiration
2041-07-02

AI Technical Summary

Technical Problem

In the existing technology, date switching in the broadcast-subscription mode may cause messages to be lost or untimely, causing online transactions to be affected, and the slave system needs to frequently perform backtracking transactions to synchronize dates, which increases complexity and overhead, and reduces fault tolerance.

Method used

By receiving the sun cut broadcast information of the master system, it is judged whether the sun cut time point of the slave system has been reached. If it has not been reached, the sun cut operation will not be performed temporarily unless it needs to be synchronized with the main system or reaches its own sun cut time point to avoid inaccuracies. Necessary day cutting and backdating transactions optimize the date synchronization process from the system.

Benefits of technology

It effectively reduces the volume of backdating transactions from the system, avoids daily delays caused by message loss, improves the availability and fault tolerance of the system, and ensures the accuracy and efficiency of date synchronization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113486032B
    Figure CN113486032B
Patent Text Reader

Abstract

The present invention discloses a date switching method, device, electronic device and computer-readable medium, and relates to the field of computer technology. A specific implementation of the method includes: receiving broadcast information of a first system day switching; judging whether the day switching time point of the second system has been reached; if so, performing a day switching operation so that the date of the second system is synchronized with the date of the first system; if not, continuing pre-batch processing. This implementation can solve the technical problem of a large amount of backtracking transactions from the system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a date switching method, device, electronic device and computer-readable medium. Background Art

[0002] Large banks generally have a "core system" that is responsible for core accounting processing, but in addition to the core system, there are often other systems related to accounting, such as credit card, payment, loan and other systems. There may be transactions between different accounting systems, and when the accounting dates of both parties are different, they will not be allowed to call each other unless the two systems support backdating transactions / reverse date transactions (in some cases, even if the system supports it, transactions with asynchronous dates are not allowed). This will directly lead to temporary unavailability of the system, that is, it will not achieve the effect of 7*24. In order to solve this problem, it is necessary to ensure that the dates between the accounting systems remain "relatively consistent" so that transactions will not be rejected due to inconsistent dates when there are accounting transactions.

[0003] For systems with strong date dependencies and clear master-slave distinction, when the slave system's day-cut and end-of-day batch processing are also relatively simple, the broadcast-subscribe method is used. When the master system performs key operations such as day-cut, it will send a broadcast message, and each slave system will subscribe to the message. When the slave system receives the subscription message, it will perform day-cut processing together with the master system. In this model, the slave system generally does not have its own date plan, but follows the master system completely.

[0004] In the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art:

[0005] Currently, most systems use a broadcast-subscription approach, and broadcast messages may be lost or delayed, which may affect online transactions. Moreover, in this approach, the slave system generally does not have its own date plan, but follows the master system completely, which requires the slave system to prepare for the day switch in advance and be ready to switch at any time. In addition, the day switch time of the master system may deviate too much from the natural date, which not all slave systems can accept or need to pay a high price to be compatible. For example, the slave system may need to design additional backtracking transactions for this purpose, as well as the additional overhead caused by executing backtracking transactions. The more complex the design, the lower the fault tolerance. Even with a complete backtracking logic, it is necessary to minimize the occurrence of backtracking transactions. Summary of the invention

[0006] In view of this, the embodiments of the present invention provide a date switching method, device, electronic device and computer-readable medium to solve the technical problem of a large amount of backtracked transactions from the system.

[0007] To achieve the above object, according to one aspect of an embodiment of the present invention, a date switching method is provided, which is applied to a second system and includes:

[0008] Receive the broadcast information of the first system daily switching;

[0009] Determining whether the daily switching time point of the second system has been reached;

[0010] If yes, perform a date switching operation so that the date of the second system is synchronized with the date of the first system;

[0011] If not, continue with pre-batch processing.

[0012] Optionally, after receiving the broadcast information of the first system daily switching, the method further includes:

[0013] Receiving online transaction requests;

[0014] Whether to perform a day-cut operation is determined according to the type of the online transaction request.

[0015] Optionally, determining whether to perform a daily cut operation according to the type of the online transaction request includes:

[0016] If the online transaction request is an account transaction request, a daily cut operation is performed, and the online transaction request is processed after the daily cut is completed;

[0017] If the online transaction request is a non-accounting transaction request, the pre-batch processing continues and the online transaction request is processed.

[0018] Optionally, a daily cutting operation is performed, including:

[0019] Obtaining the date of the first system;

[0020] Determine whether the date of the first system is one day greater than the date of the second system;

[0021] If yes, stop the pre-batch processing and perform date switching so that the date of the second system is synchronized with the date of the first system;

[0022] If not, continue with pre-batch processing.

[0023] Optionally, obtaining the date of the first system includes:

[0024] Determine whether automatic daily switching is currently allowed;

[0025] If yes, then calling the first system date query interface to obtain the date of the first system;

[0026] If not, continue with pre-batch processing.

[0027] Optionally, after performing the daily cutting operation, the method further includes:

[0028] Send an event request to start a formal batch operation to the job scheduling system to perform the formal batch operation;

[0029] or,

[0030] Directly start local formal batch operation.

[0031] Optionally, after performing the daily cutting operation, the method further includes:

[0032] The date parameter in the local cache is updated to synchronize the date parameter with the date of the second system.

[0033] In addition, according to another aspect of the embodiment of the present invention, a date switching device is provided, which is arranged in the second system, and includes:

[0034] A receiving module, used for receiving the broadcast information of the first system daily switching;

[0035] The day-cut module is used to determine whether the day-cut time point of the second system has been reached; if so, perform a day-cut operation to synchronize the date of the second system with the date of the first system; if not, continue with the pre-batch processing.

[0036] Optionally, the daily cutting module is further used for:

[0037] After receiving the broadcast information of the first system, receiving the online transaction request;

[0038] Whether to perform a day-cut operation is determined according to the type of the online transaction request.

[0039] Optionally, the daily cutting module is further used for:

[0040] If the online transaction request is an account transaction request, a daily cut operation is performed, and the online transaction request is processed after the daily cut is completed;

[0041] If the online transaction request is a non-accounting transaction request, the pre-batch processing continues and the online transaction request is processed.

[0042] Optionally, the daily cutting module is further used for:

[0043] Obtaining the date of the first system;

[0044] Determine whether the date of the first system is one day greater than the date of the second system;

[0045] If yes, stop the pre-batch processing and perform date switching so that the date of the second system is synchronized with the date of the first system;

[0046] If not, continue with pre-batch processing.

[0047] Optionally, the daily cutting module is further used for:

[0048] Determine whether automatic daily switching is currently allowed;

[0049] If yes, then calling the first system date query interface to obtain the date of the first system;

[0050] If not, continue with pre-batch processing.

[0051] Optionally, the daily cutting module is further used for:

[0052] After the daily cutting operation is performed, an event request for starting the formal batch operation is sent to the job scheduling system to perform the formal batch operation; or, the local formal batch operation is directly started.

[0053] Optionally, the daily cutting module is further used for:

[0054] After performing the date switching operation, the date parameters in the local cache are updated to synchronize the date parameters with the date of the second system.

[0055] According to another aspect of an embodiment of the present invention, there is further provided an electronic device, including:

[0056] one or more processors;

[0057] a storage device for storing one or more programs,

[0058] When the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any one of the above embodiments.

[0059] According to another aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored. When the program is executed by a processor, the method described in any one of the above embodiments is implemented.

[0060] One embodiment of the above invention has the following advantages or beneficial effects: because after receiving the broadcast information of the first system's daily cut, if the second system's daily cut time has not been reached, the daily cut operation will not be performed temporarily, unless the second system itself has reached the time point when it should be cut or must be synchronized with the first system before the daily cut is performed, so the technical problem of the large amount of backtracking transactions of the second system in the prior art is overcome. When the second system does not need to be synchronized with the first system, the daily cut will not be performed temporarily, unless the second system itself has reached the time point when it should be cut or must be synchronized with the first system before the daily cut is performed, so as to avoid the second system from being affected by too many online transactions, and to avoid the second system from failing to cut in time due to problems such as message loss; moreover, once the second system cuts, the subsequent formal batch will be automatically triggered regardless of whether it is the ideal daily cut time point, so as to avoid meaningless waiting.

[0061] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.

[0063] Figure 1 It is a schematic diagram of date switching from a system in the prior art;

[0064] Figure 2 is a schematic diagram of the main process of the date switching method according to an embodiment of the present invention;

[0065] Figure 3 is a schematic diagram of triggering a daily cut when receiving an account transaction request from a system according to an embodiment of the present invention;

[0066] Figure 4 is a schematic diagram of the main process of a date switching method according to a reference embodiment of the present invention;

[0067] Figure 5 is a schematic diagram of main modules of a date switching device according to an embodiment of the present invention;

[0068] Figure 6 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;

[0069] Figure 7 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION

[0070] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0071] like Figure 1 As shown, the slave system generally does not have its own date plan, but completely follows the master system. When the master system's day-cut time is different from the slave system's ideal day-cut time, it may cause a large number of backdated transactions to the slave system. Therefore, the most ideal state is that when the master system is day-cutting, the slave system will not be day-cutting temporarily when it is not necessary to synchronize with the master system, unless the slave system itself has reached the time point when the day-cutting should be done (the ideal day-cutting point, such as 0 o'clock on the natural date) or must synchronize the date with the master system, so as to avoid the slave system being affected by too many online transactions.

[0072] Backdated transactions / backdated transactions: transactions conducted when the date required for online transactions to be recorded is inconsistent with the current accounting date of the system. Different banking systems have different processing methods, but generally involve operations such as interest recalculation, account adjustment, and transaction re-entry. In general, such transactions are required to be used as little as possible.

[0073] Figure 2 Schematic diagram of the main process of the date switching method according to an embodiment of the present invention. Figure 2 As shown, the date switching method may include:

[0074] Step 201, receiving the broadcast information of the first system daily switching.

[0075] The second system can have its own complete batch processing, including pre-approval and formal batch. Before the formal batch begins, the pre-approval can be performed first. Before the first system is switched daily, the second system will continue to operate as usual. When the first system is switched daily, the second system will receive the broadcast information of the first system's daily switch, but the second system can choose whether to switch directly according to its own situation. In general, it is required that the accounting date is as close to the natural date as possible. Therefore, when the natural date does not reach the next day, the second system can choose not to switch daily.

[0076] Bookkeeping date (i.e. accounting date): The date used by the financial system for bookkeeping, which generally deviates slightly from the local natural date.

[0077] Pre-approval: refers to the partial batch processing before the formal batch processing begins (the primary purpose is to reduce the time window pressure of the formal batch processing). At this time, the system has not yet been cut daily. The pre-approval process does not affect the online transaction and the result is not visible to the online transaction. Pre-approval generally requires immediate start and stop (it can be started and stopped at any time during the informal batch processing).

[0078] Optionally, after step 201, the process further includes: receiving an online transaction request; and determining whether to perform a day-cut operation according to the type of the online transaction request. When the second system receives the online transaction request, it can still execute normally. After the second system receives the online transaction request, it determines whether to perform a day-cut operation according to the type of the online transaction request. For example, if the online transaction request needs to call the first system, the day-cut operation is performed; if the online transaction request does not need to call the first system, the day-cut operation is not performed.

[0079] Optionally, determining whether to perform a daily cut operation according to the type of the online transaction request includes: if the online transaction request is an account transaction request, performing a daily cut operation and processing the online transaction request after the daily cut is completed; if the online transaction request is a non-account transaction request, continuing pre-batch processing and processing the online transaction request. Figure 3 As shown, the first system can be the master system, and the second system can be the slave system. It should be pointed out that there is usually a strong association between the master and slave systems. The master system is generally a core system, such as for processing deposit business, bookkeeping business, etc. The slave system is generally a non-core system, such as for processing personal loan business. The business content to be processed by the master and slave systems can be determined according to actual needs. In different business scenarios, the division of the master and slave systems is not unique, and the embodiment of the present invention does not limit this. Assuming that there are two types of transactions in the slave system, Class A transactions need to call the master system (generally account transactions, which need to be entered into the main system), and require synchronization with the date of the main system, and Class B transactions do not need to call the main system (generally non-account transactions, such as query and maintenance), and do not require synchronization with the date of the main system. After the master system starts day cutting, the slave system does not cut day temporarily, and Class B transactions are executed normally during this period. When the slave system receives a Class A transaction request, it queries the date of the main system and performs dynamic day cutting. In this way, the amount of backtracking transactions in the slave system can be greatly reduced, and in extreme cases, there is no need for backtracking transactions.

[0080] Optionally, performing a day-cut operation includes: obtaining the date of the first system; determining whether the date of the first system is one day greater than the date of the second system; if so, stopping the pre-batch processing and performing date switching so that the date of the second system is synchronized with the date of the first system; if not, continuing the pre-batch processing. When the second system performs a day-cut operation, it first obtains the date of the first system, and then determines whether the date of the first system is one day greater than the date of the second system. If so, it indicates that the day-cut can be performed directly. The second system stops the execution of the pre-batch and performs the day-cut operation, including adjusting the system state, batch stage, etc. After completing the state adjustment, continue the online transaction processing. If not, continue the pre-batch processing.

[0081] Optionally, obtaining the date of the first system includes: determining whether automatic day-cutting is currently allowed; if so, calling the first system date query interface to obtain the date of the first system; if not, continuing pre-batch processing. When the transaction needs to interact with the first system and finds that the date is inconsistent, the second system determines whether automatic day-cutting is currently allowed. If allowed, the first system date query interface is called to confirm the first system date. If the first system date is the next day of the second system calendar, it means that direct day-cutting is possible. The second system stops the execution of pre-approval and performs day-cutting operations, including adjusting the system status, batch stage, etc. After completing the status adjustment, continue online transaction processing. If not allowed, continue pre-batch processing.

[0082] Optionally, after performing the daily cutting operation, the process further includes: sending an event request for starting a formal batch operation to the job scheduling system to perform the formal batch operation; or directly starting a local formal batch operation. After performing the daily cutting operation, the second system sends a signal for starting a formal batch to the job scheduling system, or starts a local formal batch process to directly start the formal batch.

[0083] Optionally, after performing the day-cut operation, the method further includes: updating the date parameters in the local cache to synchronize the date parameters with the date of the second system. After the second system completes the day-cut operation, it is also necessary to update the date parameters in the local cache to avoid using old date parameters in transactions.

[0084] Step 202, determine whether the daily switching time point of the second system has been reached; if so, execute step 203; if not, execute step 204.

[0085] If the second system has not performed the day-cut operation after the first system has done the day-cut, determine whether the second system itself has reached the time point when the day-cut should be made (the ideal day-cut point, such as 0 o'clock on the natural date). If so, perform the day-cut operation; if not, continue with the pre-batch processing.

[0086] Step 203: Perform a date switching operation to synchronize the date of the second system with the date of the first system.

[0087] Optionally, performing a day-cut operation includes: obtaining the date of the first system; determining whether the date of the first system is one day greater than the date of the second system; if so, stopping the pre-batch processing and performing date switching so that the date of the second system is synchronized with the date of the first system; if not, continuing the pre-batch processing. When the second system performs a day-cut operation, it first obtains the date of the first system, and then determines whether the date of the first system is one day greater than the date of the second system. If so, it indicates that the day-cut can be performed directly. The second system stops the execution of the pre-batch and performs the day-cut operation, including adjusting the system state, batch stage, etc. After completing the state adjustment, continue the online transaction processing. If not, continue the pre-batch processing.

[0088] Optionally, obtaining the date of the first system includes: determining whether automatic day-cutting is currently allowed; if so, calling the first system date query interface to obtain the date of the first system; if not, continuing pre-batch processing. When the transaction needs to interact with the first system and finds that the date is inconsistent, the second system determines whether automatic day-cutting is currently allowed. If allowed, the first system date query interface is called to confirm the first system date. If the first system date is the next day of the second system calendar, it means that direct day-cutting is possible. The second system stops the execution of pre-approval and performs day-cutting operations, including adjusting the system status, batch stage, etc. After completing the status adjustment, continue online transaction processing. If not allowed, continue pre-batch processing.

[0089] Optionally, after performing the daily cutting operation, the process further includes: sending an event request for starting a formal batch operation to the job scheduling system to perform the formal batch operation; or directly starting a local formal batch operation. After performing the daily cutting operation, the second system sends a signal for starting a formal batch to the job scheduling system, or starts a local formal batch process to directly start the formal batch.

[0090] Optionally, after performing the day-cut operation, the method further includes: updating the date parameters in the local cache so that the date parameters are synchronized with the date of the second system. After completing the day-cut operation, the date parameters in the local cache need to be updated to avoid using old date parameters in transactions.

[0091] After the first system is cut daily, the second system will not cut daily unless necessary, but try to get close to the ideal cut-off point of the second system, and only cut daily when it is necessary to synchronize with the first system, thereby reducing a large number of unnecessary backtracking / reverse daily transactions. Before the second system is cut daily, the second system will pre-approval in advance to reduce the time window pressure of subsequent batches.

[0092] Step 204, continue pre-batch processing.

[0093] According to the various embodiments described above, it can be seen that after receiving the broadcast information of the daily cut of the first system, if the daily cut time of the second system has not been reached, the daily cut operation will not be performed temporarily, unless the second system itself has reached the time point when it should be cut or must synchronize the date with the first system. The technical means for daily cut solves the technical problem of large backtracking transaction volume of the second system in the prior art. The second system will not be cut temporarily when it is not necessary to synchronize with the first system, unless the second system itself has reached the time point when it should be cut or must interact with the first system. This can avoid the second system from being affected by too many online transactions, and can also avoid the second system from failing to cut in time due to problems such as message loss; moreover, once the second system cuts, the subsequent formal batch will be automatically triggered regardless of whether it is the ideal time point for cutting, avoiding meaningless waiting.

[0094] Figure 4 is a schematic diagram of the first major process of a date switching method according to a reference embodiment of the present invention. As another embodiment of the present invention, Figure 4 As shown, the date switching method may include:

[0095] Step 401, receiving the broadcast information of the first system daily switching.

[0096] The second system can have its own complete batch processing, including pre-approval and formal batch. Before the formal batch begins, the pre-approval can be performed first. Before the first system is switched daily, the second system will continue to operate as usual. When the first system is switched daily, the second system will receive the broadcast information of the first system's daily switch, but the second system can choose whether to switch directly according to its own situation. In general, it is required that the accounting date is as close to the natural date as possible. Therefore, when the natural date does not reach the next day, the second system can choose not to switch daily.

[0097] Step 402, receiving an online transaction request. If the online transaction request is an accounting transaction request, then executing step 403; if the online transaction request is a non-accounting transaction request, then executing step 404.

[0098] When the second system receives an online transaction request, it can still execute normally.

[0099] Assume that the second system has two types of transactions. Type A transactions need to call the first system (generally accounting transactions, which need to be recorded in the first system) and require synchronization with the first system date. Type B transactions do not need to call the first system (generally non-accounting transactions, such as query and maintenance), and do not require synchronization with the first system date. After the first system starts the day-cut, the second system will not be cut for the time being, and type B transactions will be executed normally during this period.

[0100] Step 403, perform a daily cut operation, and process the online transaction request after the daily cut is completed.

[0101] When the second system receives a Class A transaction request, it queries the date of the first system and performs a dynamic day-cut, and processes the transaction request after the day-cut is completed. This can greatly reduce the amount of backtracking transactions in the second system, and in extreme cases, there is no need for backtracking transactions.

[0102] Optionally, performing a day-cut operation includes: obtaining the date of the first system; determining whether the date of the first system is one day greater than the date of the second system; if so, stopping the pre-batch processing and performing date switching so that the date of the second system is synchronized with the date of the first system; if not, continuing the pre-batch processing. When the second system performs a day-cut operation, it first obtains the date of the first system, and then determines whether the date of the first system is one day greater than the date of the second system. If so, it indicates that the day-cut can be performed directly. The second system stops the execution of the pre-batch and performs the day-cut operation, including adjusting the system state, batch stage, etc. After completing the state adjustment, continue the online transaction processing. If not, continue the pre-batch processing.

[0103] Optionally, obtaining the date of the first system includes: determining whether automatic day-cutting is currently allowed; if so, calling the first system date query interface to obtain the date of the first system; if not, continuing pre-batch processing. When the transaction needs to interact with the first system and finds that the date is inconsistent, the second system determines whether automatic day-cutting is currently allowed. If allowed, the first system date query interface is called to confirm the first system date. If the first system date is the next day of the second system calendar, it means that direct day-cutting is possible. The second system stops the execution of pre-approval and performs day-cutting operations, including adjusting the system status, batch stage, etc. After completing the status adjustment, continue online transaction processing. If not allowed, continue pre-batch processing.

[0104] Step 404, continue pre-batch processing and process the online transaction request.

[0105] When the second system receives a Class B transaction request, it does not perform a daily cut operation, but continues to perform pre-batch processing and processes the transaction request.

[0106] Step 405: Update the date parameters in the local cache to synchronize the date parameters with the date of the second system.

[0107] After the second system completes the day-cut operation, it is also necessary to update the locally cached date parameters to avoid transactions using old date parameters.

[0108] Step 406: Send an event request for starting a formal batch operation to the job scheduling system to perform the formal batch operation; or directly start a local formal batch operation.

[0109] After the daily cutting operation is performed, the second system sends a signal for the start of the formal batch to the job scheduling system, or starts the local formal batch process to directly start the formal batch.

[0110] Step 407, determine whether the daily switching time point of the second system has been reached; if so, execute step 408; if not, execute step 409.

[0111] If the second system itself has reached the point where it should be cut off daily, the daily cutting operation will be carried out.

[0112] Step 408: Perform a date switching operation to synchronize the date of the second system with the date of the first system.

[0113] When the first system is switched daily, the second system will not be switched daily unless it is necessary to synchronize with the first system. This is because the second system will not be switched daily until it reaches the ideal switching point (such as 0 o'clock on a natural date) to prevent the second system from being affected by too many online transactions.

[0114] Step 409, continue pre-batch processing.

[0115] In addition, the specific implementation content of the date switching method in a reference embodiment of the present invention has been described in detail in the date switching method described above, so the repeated content will not be described here.

[0116] Figure 5 Schematic diagram of the main modules of the date switching device according to an embodiment of the present invention. Figure 5 As shown, the date switching device 500 is arranged in the second system, including a receiving module 501 and a day switching module 502; wherein the receiving module 501 is used to receive the broadcast information of the day switching of the first system; the day switching module 502 is used to determine whether the day switching time point of the second system has been reached; if so, the day switching operation is performed to synchronize the date of the second system with the date of the first system; if not, the pre-batch processing is continued.

[0117] Optionally, the daily cutting module 502 is further used for:

[0118] After receiving the broadcast information of the first system, receiving the online transaction request;

[0119] Whether to perform a day-cut operation is determined according to the type of the online transaction request.

[0120] Optionally, the daily cutting module 502 is further used for:

[0121] If the online transaction request is an account transaction request, a daily cut operation is performed, and the online transaction request is processed after the daily cut is completed;

[0122] If the online transaction request is a non-accounting transaction request, the pre-batch processing continues and the online transaction request is processed.

[0123] Optionally, the daily cutting module 502 is further used for:

[0124] Obtaining the date of the first system;

[0125] Determine whether the date of the first system is one day greater than the date of the second system;

[0126] If yes, stop the pre-batch processing and perform date switching so that the date of the second system is synchronized with the date of the first system;

[0127] If not, continue with pre-batch processing.

[0128] Optionally, the daily cutting module 502 is further used for:

[0129] Determine whether automatic daily switching is currently allowed;

[0130] If yes, then calling the first system date query interface to obtain the date of the first system;

[0131] If not, continue with pre-batch processing.

[0132] Optionally, the daily cutting module 502 is further used for:

[0133] After the daily cutting operation is performed, an event request for starting the formal batch operation is sent to the job scheduling system to perform the formal batch operation; or, the local formal batch operation is directly started.

[0134] Optionally, the daily cutting module 502 is further used for:

[0135] After performing the date switching operation, the date parameters in the local cache are updated to synchronize the date parameters with the date of the second system.

[0136] According to the various embodiments described above, it can be seen that after receiving the broadcast information of the daily cut of the first system, if the daily cut time of the second system has not been reached, the daily cut operation will not be performed temporarily, unless the second system itself has reached the time point when it should be cut or must synchronize the date with the first system. The technical means for daily cut solves the technical problem of large backtracking transaction volume of the second system in the prior art. The second system will not be cut temporarily when it is not necessary to synchronize with the first system, unless the second system itself has reached the time point when it should be cut or must interact with the first system. This can avoid the second system from being affected by too many online transactions, and can also avoid the second system from failing to cut in time due to problems such as message loss; moreover, once the second system cuts, the subsequent formal batch will be automatically triggered regardless of whether it is the ideal time point for cutting, avoiding meaningless waiting.

[0137] It should be noted that the specific implementation content of the date switching device of the present invention has been described in detail in the date switching method described above, so the repeated content will not be described again here.

[0138] Figure 6 An exemplary system architecture 600 to which the date switching method or date switching device according to the embodiment of the present invention can be applied is shown.

[0139] like Figure 6 As shown, system architecture 600 may include terminal devices 601, 602, 603, network 604 and server 605. Network 604 is used to provide a medium for communication links between terminal devices 601, 602, 603 and server 605. Network 604 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0140] Users can use terminal devices 601, 602, and 603 to interact with server 605 through network 604 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 601, 602, and 603, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only examples).

[0141] The terminal devices 601 , 602 , and 603 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers, etc.

[0142] The server 605 may be a server that provides various services, such as a backend management server (for example only) that provides support for shopping websites browsed by users using the terminal devices 601, 602, and 603. The backend management server may analyze and process the received data such as the item information query request, and feed back the processing results to the terminal device.

[0143] It should be noted that the date switching method provided in the embodiment of the present invention is generally executed by the server 605 , and accordingly, the date switching device is generally disposed in the server 605 .

[0144] It should be understood that Figure 6 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0145] Reference below Figure 7 , which shows a schematic diagram of the structure of a computer system 700 of a terminal device suitable for implementing an embodiment of the present invention. Figure 7 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0146] like Figure 7 As shown, the computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage part 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the system 700 are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0147] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, a mouse, etc.; an output section 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, a modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed, so that a computer program read therefrom is installed into the storage section 708 as needed.

[0148] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 709, and / or installed from the removable medium 711. When the computer program is executed by the central processing unit (CPU) 701, the above-mentioned functions defined in the system of the present invention are executed.

[0149] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0150] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0151] The modules involved in the embodiments of the present invention may be implemented by software or hardware. The modules described may also be set in a processor, for example, it may be described as: a processor includes a receiving module and a daily cutting module, wherein the names of these modules do not constitute a limitation on the modules themselves in some cases.

[0152] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device implements the following method: receiving broadcast information of the day switching of the first system; determining whether the day switching time point of the second system has been reached; if so, performing the day switching operation so that the date of the second system is synchronized with the date of the first system; if not, continuing the pre-batch processing.

[0153] According to the technical solution of the embodiment of the present invention, after receiving the broadcast information of the daily cut of the main first system, if the daily cut time of the slave second system has not been reached, the daily cut operation will not be performed temporarily, unless the slave second system itself has reached the time point when the daily cut should be made or the date must be synchronized with the main first system. Therefore, the technical problem of the large amount of backtracking transactions of the slave second system in the prior art is overcome. When the slave second system does not need to be synchronized with the main first system, the daily cut will not be performed temporarily, unless the slave second system itself has reached the time point when the daily cut should be made or the date must be synchronized with the main first system. The slave second system can avoid being affected by too many online transactions of the slave second system, and can also avoid the failure of the slave second system to cut in time due to problems such as message loss. Moreover, once the slave second system cuts the day, the subsequent formal batch will be automatically triggered regardless of whether it is the ideal daily cut time point, avoiding meaningless waiting.

[0154] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A date switching method, characterized in that: Applicable to the second system, including: Receiving broadcast information of a first system daily switch; wherein the first system is a master system and the second system is a slave system; Determining whether the daily switching time point of the second system has been reached; If yes, perform a date switching operation so that the date of the second system is synchronized with the date of the first system; If not, continue with pre-batch processing; After receiving the broadcast information of the first system daily switching, the method further includes: Receiving online transaction requests; Determining whether to perform a daily cut operation according to the type of the online transaction request; Determining whether to perform a daily cut operation according to the type of the online transaction request includes: If the online transaction request is an account transaction request, a daily cut operation is performed, and the online transaction request is processed after the daily cut is completed; If the online transaction request is a non-accounting transaction request, the pre-batch processing continues and the online transaction request is processed.

2. The method according to claim 1, characterized in that Perform daily cutting operations, including: Obtaining the date of the first system; Determine whether the date of the first system is one day greater than the date of the second system; If yes, stop the pre-batch processing and perform date switching so that the date of the second system is synchronized with the date of the first system; If not, continue with pre-batch processing.

3. The method according to claim 2, characterized in that Get the date of the first system, including: Determine whether automatic daily switching is currently allowed; If yes, then calling the first system date query interface to obtain the date of the first system; If not, continue with pre-batch processing.

4. The method according to claim 1, characterized in that: After the daily cutting operation, it also includes: Send an event request to start a formal batch operation to the job scheduling system to perform the formal batch operation; or, Directly start local formal batch operation.

5. The method according to claim 1, characterized in that After the daily cutting operation, it also includes: The date parameter in the local cache is updated to synchronize the date parameter with the date of the second system.

6. A date switching device, characterized in that: Set in the second system, including: A receiving module, used to receive the broadcast information of the first system daily switching; wherein the first system is a master system and the second system is a slave system; A day-cut module, used to determine whether the day-cut time point of the second system has been reached; if so, perform a day-cut operation to synchronize the date of the second system with the date of the first system; if not, continue pre-batch processing; The daily cutting module is also used for: After receiving the broadcast information of the first system, receiving the online transaction request; Determining whether to perform a daily cut operation according to the type of the online transaction request; The daily cutting module is also used for: If the online transaction request is an account transaction request, a daily cut operation is performed, and the online transaction request is processed after the daily cut is completed; If the online transaction request is a non-accounting transaction request, the pre-batch processing continues and the online transaction request is processed.

7. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 5.

8. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.