CN113486032A - Date switching method and device, electronic equipment and computer readable medium - Google Patents

Date switching method and device, electronic equipment and computer readable medium Download PDF

Info

Publication number
CN113486032A
CN113486032A CN202110751985.1A CN202110751985A CN113486032A CN 113486032 A CN113486032 A CN 113486032A CN 202110751985 A CN202110751985 A CN 202110751985A CN 113486032 A CN113486032 A CN 113486032A
Authority
CN
China
Prior art keywords
date
day
transaction request
daily
batch
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.)
Granted
Application number
CN202110751985.1A
Other languages
Chinese (zh)
Other versions
CN113486032B (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.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
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 China Construction Bank Corp filed Critical China Construction Bank Corp
Priority to CN202110751985.1A priority Critical patent/CN113486032B/en
Priority claimed from CN202110751985.1A external-priority patent/CN113486032B/en
Publication of CN113486032A publication Critical patent/CN113486032A/en
Application granted granted Critical
Publication of CN113486032B publication Critical patent/CN113486032B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2365Ensuring data consistency and integrity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/16Arrangements for providing special services to substations
    • H04L12/18Arrangements for providing special services to substations for broadcast or conference, e.g. multicast

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Finance (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Accounting & Taxation (AREA)
  • Marketing (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Computing Systems (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a date switching method and device, electronic equipment and a computer readable medium, and relates to the technical field of computers. One embodiment of the method comprises: receiving broadcast information of a first system day switch; judging whether the day-to-day time point of the second system is reached; if so, performing daily cutting operation to enable the date of the second system to be synchronous with the date of the first system; if not, continuing to perform the pre-batch processing. The implementation mode can solve the technical problem that backtracking transaction amount of the slave system is large.

Description

Date switching method and device, electronic equipment and computer readable medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a date switching method and apparatus, an electronic device, and a computer-readable medium.
Background
Large banks generally have a "core system" which is responsible for core accounting processing, but often there are other accounting related systems besides the core system, such as credit card, payment, loan and other systems. There may be transactions between different accounting systems and mutual calls will not be allowed when the billing dates of the two parties are different unless the two party systems support backtrack/reverse date transactions (some cases do not allow asynchronous date transactions to occur even if the systems support). This would directly result in the system being temporarily unusable, i.e. not achieving the effect of 7 x 24. In order to solve the problem, it is necessary to ensure that the dates are kept "relatively consistent" among the accounting systems, and the accounting systems are not rejected due to inconsistent dates in the case of accounting transactions.
For systems with strong date dependence and clear master-slave between systems, a broadcast-subscription mode is adopted when the date-to-date and end-of-day batch processing of the slave systems is simple. When key operations such as daily switching are carried out by the main system, broadcast messages are sent out, and all the slave systems subscribe the messages. And after receiving the subscription message, the slave system performs daily switching processing together with the master system. Under this model, the slave system typically does not have its own date plan, but rather follows the master system completely.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
currently, most of the broadcast-subscription methods are adopted, and the broadcast messages may be lost and untimely, so that the online transaction is still affected. Furthermore, in this manner, the slave system does not typically have its own date plan, but rather follows the master system completely, requiring the slave system to be ready for a date cut in advance and in a state ready to wait for a switch. In addition, the master system time-to-day may deviate too much from the natural date and not all slave systems are acceptable or compatible at great expense. Such as the extra design of trace back transactions from the system that may be required for this purpose, and the additional overhead incurred in performing the trace back transactions, more complex designs represent lower fault tolerance capabilities. Even with perfect backtracking logic, backtracking transactions need to be minimized.
Disclosure of Invention
In view of this, embodiments of the present invention provide a date switching method, apparatus, electronic device and computer readable medium to solve the technical problem of large backtracking transaction amount from the system.
To achieve the above object, according to an aspect of the embodiments of the present invention, there is provided a date switching method applied to a second system, including:
receiving broadcast information of a first system day switch;
judging whether the day-to-day time point of the second system is reached;
if so, performing daily cutting operation to enable the date of the second system to be synchronous with the date of the first system;
if not, continuing to perform the pre-batch processing.
Optionally, after receiving the broadcast information of the first system daily cut, the method further includes:
receiving an online transaction request;
and determining whether to perform daily cutting operation according to the type of the online transaction request.
Optionally, determining whether to perform a daily cutting operation according to the type of the online transaction request includes:
if the online transaction request is an accounting transaction request, performing daily cutting operation, and processing the online transaction request after the daily cutting is completed;
and if the online transaction request is a non-financial transaction request, continuing to perform pre-batch processing and processing the online transaction request.
Optionally, a daily cutting operation is performed, comprising:
acquiring 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 switching dates to enable the date of the second system to be synchronous with the date of the first system;
if not, continuing to perform the pre-batch processing.
Optionally, acquiring the date of the first system comprises:
judging whether automatic daily cutting is allowed at present;
if so, calling a first system date query interface to obtain the date of the first system;
if not, continuing to perform the pre-batch processing.
Optionally, after the daily cutting operation is performed, the method further includes:
sending an event request for starting formal batch operation to the job scheduling system so as to carry out the formal batch operation;
or,
and directly starting local formal batch operation.
Optionally, after the daily cutting operation is performed, the method further includes:
updating a locally cached date parameter to synchronize the date parameter with a date of the second system.
In addition, according to another aspect of the embodiments of the present invention, there is provided a date switching apparatus provided in a second system, including:
The receiving module is used for receiving broadcast information of the first system daily cutting;
the day switching module is used for judging whether the day switching time point of the second system is reached or not; if so, performing daily cutting operation to enable the date of the second system to be synchronous with the date of the first system; if not, continuing to perform the pre-batch processing.
Optionally, the daily cutting module is further configured to:
after receiving broadcast information of a first system day switch, receiving an online transaction request;
and determining whether to perform daily cutting operation according to the type of the online transaction request.
Optionally, the daily cutting module is further configured to:
if the online transaction request is an accounting transaction request, performing daily cutting operation, and processing the online transaction request after the daily cutting is completed;
and if the online transaction request is a non-financial transaction request, continuing to perform pre-batch processing and processing the online transaction request.
Optionally, the daily cutting module is further configured to:
acquiring 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 switching dates to enable the date of the second system to be synchronous with the date of the first system;
If not, continuing to perform the pre-batch processing.
Optionally, the daily cutting module is further configured to:
judging whether automatic daily cutting is allowed at present;
if so, calling a first system date query interface to obtain the date of the first system;
if not, continuing to perform the pre-batch processing.
Optionally, the daily cutting module is further configured to:
after the daily cutting operation is carried out, sending an event request for starting formal batch operation to the job scheduling system so as to carry out the formal batch operation; or directly starting the local formal batch operation.
Optionally, the daily cutting module is further configured to:
and after the daily cutting operation is carried out, updating the date parameter of the local cache so as to synchronize the date parameter with the date of the second system.
According to another aspect of the embodiments of the present invention, there is also provided an electronic device, including:
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 of any of the embodiments described above.
According to another aspect of the embodiments of the present invention, there is also provided a computer readable medium, on which a computer program is stored, which when executed by a processor implements the method of any of the above embodiments.
One embodiment of the above invention has the following advantages or benefits: after the broadcast information of the first system is received, if the day-cut time point of the second system is not reached, the day-cut operation is not carried out temporarily unless the second system reaches the time point of the day-cut or the date is synchronized with the first system, so that the technical problem of large backtracking transaction amount of the second system in the prior art is solved. When the second system is not necessarily synchronous with the first system, the second system is not switched every day temporarily, and the second system is not switched every day unless the second system reaches the time point of switching every day or the second system is required to interact with the first system, so that the second system is prevented from being influenced by excessive online transactions, and the problem that the second system cannot be switched every day due to message loss and the like can be avoided; and once the second system is switched daily, whether the time is the ideal daily switching time or not, the subsequent formal batch is automatically triggered, and meaningless waiting is avoided.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of a date switch from a system in the prior art;
FIG. 2 is a schematic diagram of a main flow of a date switching method according to an embodiment of the present invention;
fig. 3 is a schematic diagram of triggering a daily cut upon receiving an accounting type transaction request from a system according to an embodiment of the present invention;
FIG. 4 is a schematic view showing a main flow of a date switching method according to a referential embodiment of the present invention;
FIG. 5 is a schematic diagram of the main blocks of a date switching apparatus according to an embodiment of the present invention;
FIG. 6 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 7 is a schematic block diagram of a computer system suitable for use in implementing a terminal device or server of an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
As shown in fig. 1, the slave system does not generally have its own date plan, but rather follows the master system completely, which may bring a lot of backtracking transactions to the slave system when the master system date point is different from the slave system ideal date point. Therefore, the most ideal state is that when the master system is switching day, the slave system is not switched day by day when the master system does not necessarily need to be synchronized with the master system, unless the slave system is switched day by day when the time point (ideal day switching point, such as 0 point of natural date) of the day switching is reached or the date needs to be synchronized with the master system, so that the slave system is prevented from being influenced by excessive online transactions.
Backtracking transaction/reverse date transaction: when the on-line transaction needs to be carried out when the accounting date is inconsistent with the current accounting date of the system, different banking systems have different processes, but generally involve operations such as interest recalculation, account adjustment, transaction reentry and the like. Typically, such transactions require as little use as possible.
Fig. 2 is a schematic diagram of a main flow of a date switching method according to an embodiment of the present invention. As an embodiment of the present invention, as shown in fig. 2, the date switching method may include:
step 201, receiving broadcast information of a first system day switch.
The second system may have its own complete batch process, including pre-batch and official batch. The prebatch may be performed before the formal batch begins. Before the first system is scheduled, the second system performs everything as usual. When the first system is switched to the second system, the second system receives the broadcast information of the first system, but the second system can select whether to switch to the first system directly according to the self condition. Generally, it is required that the conference billing date is as close as possible to the natural date. Therefore, the second system may choose not to cut the day when the natural date is less than the next day.
Billing date (i.e. accounting date): the date that the financial system is used for billing typically deviates by a small amount from the local natural date.
Pre-batching: the partial batch process is performed in advance before the formal batch process is started (the first aim is to reduce the time window pressure of the formal batch process), the system does not perform daily cutting, the online transaction is not influenced by the preliminary batch process, and the result is invisible to the online transaction. Pre-batching is typically required to be started and stopped (starting and stopping at any time during informal batching).
Optionally, after step 201, the method further includes: receiving an online transaction request; and determining whether to perform daily cutting operation according to the type of the online transaction request. When the second system receives the online transaction request, the second system can still execute normally. And after receiving the online transaction request, the second system determines whether to perform daily cutting operation according to the type of the online transaction request. For example, if the online transaction request needs to call the first system, the daily cut operation is performed, and if the online transaction request does not need to call the first system, the daily cut operation is not performed.
Optionally, determining whether to perform a daily cutting operation according to the type of the online transaction request includes: if the online transaction request is an accounting transaction request, performing daily cutting operation, and processing the online transaction request after the daily cutting is completed; and if the online transaction request is a non-financial transaction request, continuing to perform pre-batch processing and processing the online transaction request. As shown in fig. 3, the first system may be a master system, the second system may be a slave system, where it is noted that, the master system and the slave system generally have a strong association, the master system is generally a core system, for example, for processing a deposit service, an accounting service, and the like, the slave system is generally a non-core system, for example, for processing an account credit service, and service contents to be processed by the master system and the slave system may be determined according to actual needs, and under different service scenarios, the division of the master system and the slave system is not unique, and the embodiment of the present invention does not limit this. Assuming that the slave system has two types of transactions, the type a transaction requires calling the master system (generally, accounting type transaction, requiring entry into the master system) and requires ensuring date synchronization with the master system, and the type B transaction does not require calling the master system (generally, non-accounting type transaction, such as query and maintenance type) and does not require date synchronization with the master system. After the main system starts to switch to the date, the secondary system temporarily switches to the date, and the type B transaction is normally executed. The master system date is queried and a dynamic daily cut is made when a class a transaction request is received from the system. Therefore, the backtracking transaction amount of the slave system can be greatly reduced, and even backtracking transaction is not needed in extreme cases.
Optionally, a daily cutting operation is performed, comprising: acquiring 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 switching dates to enable the date of the second system to be synchronous with the date of the first system; if not, continuing to perform the pre-batch processing. When the second system carries out the day switching operation, the date of the first system is firstly acquired, then whether the date of the first system is one day larger than the date of the second system is judged, and if so, the day switching is indicated to be possible. The second system stops the execution of the pre-batch and performs daily cutting operations, including adjusting the system state, batch phase, etc. And after the state adjustment is completed, the online transaction processing is continued. If not, the pre-batch process continues.
Optionally, acquiring the date of the first system comprises: judging whether automatic daily cutting is allowed at present; if so, calling a first system date query interface to obtain the date of the first system; if not, continuing to perform the pre-batch processing. When the transaction needs to interact with the first system and the date is found to be inconsistent, the second system judges whether automatic daily cutting is allowed currently. If the system date is allowed, the first system date query interface is called to confirm the first system date, and if the first system date is the next day of the second system calendar, the direct day cutting is indicated. The second system stops the execution of the pre-batch and performs daily cutting operations, including adjusting the system state, batch phase, etc. And after the state adjustment is completed, the online transaction processing is continued. If not, the pre-batch process continues.
Optionally, after the daily cutting operation is performed, the method further includes: sending an event request for starting formal batch operation to the job scheduling system so as to carry out the formal batch operation; or directly starting the local formal batch operation. After the daily cutting operation is carried out, the second system sends a signal of starting formal batching to the job scheduling system, or starts a local formal batching flow to directly start the formal batching.
Optionally, after the daily cutting operation is performed, the method further includes: updating a locally cached date parameter to synchronize the date parameter with a date of the second system. After the second system completes the daily cutting operation, the date parameter of the local cache needs to be updated, and the old date parameter is prevented from being used in the transaction.
Step 202, judging whether the day-to-day time point of the second system is reached; if yes, go to step 203; if not, go to step 204.
If the second system does not perform the daily cutting operation after the first system daily cutting, judging whether the second system reaches the time point (an ideal daily cutting point, such as 0 point of a natural date) of the daily cutting, if so, performing the daily cutting operation, and if not, continuing the pre-batch processing.
Step 203, performing a daily cutting operation to synchronize the date of the second system with the date of the first system.
Optionally, a daily cutting operation is performed, comprising: acquiring 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 switching dates to enable the date of the second system to be synchronous with the date of the first system; if not, continuing to perform the pre-batch processing. When the second system carries out the day switching operation, the day of the first system is firstly acquired, then whether the date of the first system is one day larger than that of the second system is judged, and if yes, the day switching is indicated to be possible. The second system stops the execution of the pre-batch and performs daily cutting operations, including adjusting the system state, batch phase, etc. And after the state adjustment is completed, the online transaction processing is continued. If not, the pre-batch process continues.
Optionally, acquiring the date of the first system comprises: judging whether automatic daily cutting is allowed at present; if so, calling a first system date query interface to obtain the date of the first system; if not, continuing to perform the pre-batch processing. When the transaction needs to interact with the first system and the date is found to be inconsistent, the second system judges whether automatic daily cutting is allowed currently. If the system date is allowed, the first system date query interface is called to confirm the first system date, and if the first system date is the next day of the second system calendar, the direct day cutting is indicated. The second system stops the execution of the pre-batch and performs daily cutting operations, including adjusting the system state, batch phase, etc. And after the state adjustment is completed, the online transaction processing is continued. If not, the pre-batch process continues.
Optionally, after the daily cutting operation is performed, the method further includes: sending an event request for starting formal batch operation to the job scheduling system so as to carry out the formal batch operation; or directly starting the local formal batch operation. After the daily cutting operation is carried out, the second system sends a signal of starting formal batching to the job scheduling system, or starts a local formal batching flow to directly start the formal batching.
Optionally, after the daily cutting operation is performed, the method further includes: updating a locally cached date parameter to synchronize the date parameter with a date of the second system. After finishing the daily cutting operation, the date parameter of the local cache is needed to be updated, so that the old date parameter is prevented from being used in the transaction.
After the first system is switched, the second system is not switched as often as necessary but approaches the ideal day switching point of the second system as much as possible, and the day switching is performed only when the first system is in need of synchronization, so that a large amount of unnecessary backtracking/backtracking day transactions are reduced. Before the second system day, the second system performs the pre-batch in advance to reduce the time window pressure of the subsequent batch.
And step 204, continuing to perform the pre-batch processing.
According to the various embodiments described above, it can be seen that, in the embodiments of the present invention, after receiving the broadcast information of the daily cutting of the first system, if the time point of the daily cutting of the second system is not reached, the daily cutting operation is not performed temporarily unless the second system itself has reached the time point of the daily cutting or the date must be synchronized with the first system, thereby solving the technical problem of the prior art that the backtracking transaction amount of the second system is large. When the second system is not necessarily synchronous with the first system, the second system is not switched every day temporarily, and the second system is not switched every day unless the second system reaches the time point of switching every day or the second system is required to interact with the first system, so that the second system is prevented from being influenced by excessive online transactions, and the problem that the second system cannot be switched every day due to message loss and the like can be avoided; and once the second system is switched daily, whether the time is the ideal daily switching time or not, the subsequent formal batch is automatically triggered, and meaningless waiting is avoided.
Fig. 4 is a schematic diagram of a first main flow of a date switching method according to a reference embodiment of the present invention. As still another embodiment of the present invention, as shown in fig. 4, the date switching method may include:
step 401, receiving broadcast information of a first system daily cutting.
The second system may have its own complete batch process, including pre-batch and official batch. The prebatch may be performed before the formal batch begins. Before the first system is scheduled, the second system performs everything as usual. When the first system is switched to the second system, the second system receives the broadcast information of the first system, but the second system can select whether to switch to the first system directly according to the self condition. Generally, it is required that the conference billing date is as close as possible to the natural date. Therefore, the second system may choose not to cut the day when the natural date is less than the next day.
Step 402, receiving an online transaction request, if the online transaction request is a financial transaction request, then step 403 is executed, and if the online transaction request is a non-financial transaction request, then step 404 is executed.
When the second system receives the online transaction request, the second system can still execute normally.
Assuming that the second system has two types of transactions, a type a transaction requires the first system to be invoked (typically an accounting type transaction requiring entry into the first system) and requires date synchronization with the first system, and a type B transaction does not require the first system to be invoked (typically a non-accounting type transaction such as an inquiry or maintenance type) and does not require date synchronization with the first system. After the first system starts the daily switch, the second system temporarily does not switch daily, and the type B transaction is normally executed.
Step 403, performing a daily cutting operation, and processing the online transaction request after the daily cutting is completed.
And when the second system receives the A-type transaction request, inquiring the date of the first system, performing dynamic daily cutting, and processing the transaction request after the daily cutting is completed. Therefore, the backtracking transaction amount of the second system can be greatly reduced, and even backtracking transaction is not needed in an extreme case.
Optionally, a daily cutting operation is performed, comprising: acquiring 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 switching dates to enable the date of the second system to be synchronous with the date of the first system; if not, continuing to perform the pre-batch processing. When the second system carries out the day switching operation, the date of the first system is firstly acquired, then whether the date of the first system is one day larger than the date of the second system is judged, and if so, the day switching is indicated to be possible. The second system stops the execution of the pre-batch and performs daily cutting operations, including adjusting the system state, batch phase, etc. And after the state adjustment is completed, the online transaction processing is continued. If not, the pre-batch process continues.
Optionally, acquiring the date of the first system comprises: judging whether automatic daily cutting is allowed at present; if so, calling a first system date query interface to obtain the date of the first system; if not, continuing to perform the pre-batch processing. When the transaction needs to interact with the first system and the date is found to be inconsistent, the second system judges whether automatic daily cutting is allowed currently. If the system date is allowed, the first system date query interface is called to confirm the first system date, and if the first system date is the next day of the second system calendar, the direct day cutting is indicated. The second system stops the execution of the pre-batch and performs daily cutting operations, including adjusting the system state, batch phase, etc. And after the state adjustment is completed, the online transaction processing is continued. If not, the pre-batch process continues.
Step 404, continuing to perform the pre-batch processing and processing the online transaction request.
When the second system receives the type B transaction request, the daily cutting operation is not performed, the pre-batch processing is continued, and the transaction request is processed.
Step 405, updating the date parameter of the local cache so as to synchronize the date parameter with the date of the second system.
After the second system completes the daily cutting operation, the date parameter of the local cache needs to be updated, and the old date parameter is prevented from being used in the transaction.
Step 406, sending an event request for starting formal batch operation to the job scheduling system to perform the formal batch operation; or directly starting the local formal batch operation.
After the daily cutting operation is carried out, the second system sends a signal of starting formal batching to the job scheduling system, or starts a local formal batching flow to directly start the formal batching.
Step 407, judging whether the time point of day of the second system is reached; if yes, go to step 408; if not, go to step 409.
When the second system reaches the time point of the day switch, the day switch operation is carried out.
Step 408, performing a daily cutting operation to synchronize the date of the second system with the date of the first system.
When the first system is switched to the second system, the second system is not switched to the first system temporarily when the second system does not need to be synchronized with the first system, and the second system is switched to the second system only when the second system reaches the time point (the ideal day switching point, such as 0 point of a natural date), so that the second system is prevented from being influenced by excessive online transactions.
And step 409, continuing to perform the pre-batch processing.
In addition, in one embodiment of the present invention, the detailed implementation of the date switching method is described in detail above, and therefore, the repeated description is not repeated here.
Fig. 5 is a schematic diagram of main blocks of a date switching apparatus according to an embodiment of the present invention, and as shown in fig. 5, the date switching apparatus 500 is provided in a second system and includes a receiving module 501 and a date cutting module 502; the receiving module 501 is configured to receive broadcast information of a first system switching day; the daily cutting module 502 is configured to determine whether the daily cutting time point of the second system is reached; if so, performing daily cutting operation to enable the date of the second system to be synchronous with the date of the first system; if not, continuing to perform the pre-batch processing.
Optionally, the daily cutting module 502 is further configured to:
after receiving broadcast information of a first system day switch, receiving an online transaction request;
and determining whether to perform daily cutting operation according to the type of the online transaction request.
Optionally, the daily cutting module 502 is further configured to:
if the online transaction request is an accounting transaction request, performing daily cutting operation, and processing the online transaction request after the daily cutting is completed;
And if the online transaction request is a non-financial transaction request, continuing to perform pre-batch processing and processing the online transaction request.
Optionally, the daily cutting module 502 is further configured to:
acquiring 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 switching dates to enable the date of the second system to be synchronous with the date of the first system;
if not, continuing to perform the pre-batch processing.
Optionally, the daily cutting module 502 is further configured to:
judging whether automatic daily cutting is allowed at present;
if so, calling a first system date query interface to obtain the date of the first system;
if not, continuing to perform the pre-batch processing.
Optionally, the daily cutting module 502 is further configured to:
after the daily cutting operation is carried out, sending an event request for starting formal batch operation to the job scheduling system so as to carry out the formal batch operation; or directly starting the local formal batch operation.
Optionally, the daily cutting module 502 is further configured to:
and after the daily cutting operation is carried out, updating the date parameter of the local cache so as to synchronize the date parameter with the date of the second system.
According to the various embodiments described above, it can be seen that, in the embodiments of the present invention, after receiving the broadcast information of the daily cutting of the first system, if the time point of the daily cutting of the second system is not reached, the daily cutting operation is not performed temporarily unless the second system itself has reached the time point of the daily cutting or the date must be synchronized with the first system, thereby solving the technical problem of the prior art that the backtracking transaction amount of the second system is large. When the second system is not necessarily synchronous with the first system, the second system is not switched every day temporarily, and the second system is not switched every day unless the second system reaches the time point of switching every day or the second system is required to interact with the first system, so that the second system is prevented from being influenced by excessive online transactions, and the problem that the second system cannot be switched every day due to message loss and the like can be avoided; and once the second system is switched daily, whether the time is the ideal daily switching time or not, the subsequent formal batch is automatically triggered, and meaningless waiting is avoided.
It should be noted that, in the embodiment of the date switching device according to the present invention, the details have been described in detail in the above-mentioned date switching method, and therefore, the description will not be repeated here.
Fig. 6 illustrates an exemplary system architecture 600 of a date switching method or date switching apparatus to which embodiments of the present invention may be applied.
As shown in fig. 6, the system architecture 600 may include terminal devices 601, 602, 603, a network 604, and a server 605. The network 604 serves to provide a medium for communication links between the terminal devices 601, 602, 603 and the server 605. Network 604 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
A user may use the terminal devices 601, 602, 603 to interact with the server 605 via the network 604 to receive or send messages or the like. The terminal devices 601, 602, 603 may have installed thereon various communication client applications, such as shopping applications, web browser applications, search applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 601, 602, 603 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 605 may be a server providing various services, such as a background management server (for example only) providing support for shopping websites browsed by users using the terminal devices 601, 602, 603. The background management server can analyze and process the received data such as the article information query request and feed back the processing result to the terminal equipment.
It should be noted that the date switching method provided by 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.
It should be understood that the number of terminal devices, networks, and servers in fig. 6 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 7, shown is a block diagram of a computer system 700 suitable for use with a terminal device implementing an embodiment of the present invention. The terminal device shown in fig. 7 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 7, the computer system 700 includes a Central Processing Unit (CPU)701, which can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. In the RAM703, various programs and data necessary for the operation of the system 700 are also stored. The CPU 701, the ROM 702, and the RAM703 are connected to each other via a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
The following components are connected to the I/O interface 705: an input portion 706 including a keyboard, a mouse, and the like; an output section 707 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 708 including a hard disk and the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. 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, or the like is mounted on the drive 710 as necessary, so that a computer program read out therefrom is mounted into the storage section 708 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 709, and/or installed from the removable medium 711. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 701.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer programs according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes a receiving module and a daily cutting module, where the names of the modules do not in some cases constitute a limitation on the modules themselves.
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, implement the method of: receiving broadcast information of a first system day switch; judging whether the day-to-day time point of the second system is reached; if so, performing daily cutting operation to enable the date of the second system to be synchronous with the date of the first system; if not, continuing to perform the pre-batch processing.
According to the technical scheme of the embodiment of the invention, after the broadcast information of the date switching of the main first system is received, if the date switching time point of the secondary system is not reached, the date switching operation is not carried out temporarily unless the time point of the date switching is reached from the secondary system or the date is required to be synchronized with the main first system, so that the technical problem of large backtracking transaction amount from the secondary system in the prior art is solved. When the slave second system is not necessarily synchronous with the master first system, the slave second system is not switched every day temporarily, unless the slave second system is switched every day when the slave second system reaches the time point of switching every day or when the slave second system has to interact with the master first system, the slave second system avoids the influence of excessive online transactions, and the slave second system can be prevented from failing to switch every day and every day due to the problems of message loss and the like; moreover, once the second system is switched from the day, whether the time is the ideal day, the subsequent formal batch can be automatically triggered, and meaningless waiting is avoided.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A date switching method applied to a second system comprises the following steps:
receiving broadcast information of a first system day switch;
judging whether the day-to-day time point of the second system is reached;
if so, performing daily cutting operation to enable the date of the second system to be synchronous with the date of the first system;
if not, continuing to perform the pre-batch processing.
2. The method of claim 1, wherein after receiving the broadcast information for the first system time slot, further comprising:
receiving an online transaction request;
and determining whether to perform daily cutting operation according to the type of the online transaction request.
3. The method of claim 2, wherein determining whether to perform a daily cut operation based on the type of the online transaction request comprises:
If the online transaction request is an accounting transaction request, performing daily cutting operation, and processing the online transaction request after the daily cutting is completed;
and if the online transaction request is a non-financial transaction request, continuing to perform pre-batch processing and processing the online transaction request.
4. The method according to any one of claims 1-3, wherein a daily cutting operation is performed, comprising:
acquiring 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 switching dates to enable the date of the second system to be synchronous with the date of the first system;
if not, continuing to perform the pre-batch processing.
5. The method of claim 4, wherein obtaining the date of the first system comprises:
judging whether automatic daily cutting is allowed at present;
if so, calling a first system date query interface to obtain the date of the first system;
if not, continuing to perform the pre-batch processing.
6. The method of claim 1, further comprising, after performing the daily cut operation:
sending an event request for starting formal batch operation to the job scheduling system so as to carry out the formal batch operation;
Or,
and directly starting local formal batch operation.
7. The method of claim 1, further comprising, after performing the daily cut operation:
updating a locally cached date parameter to synchronize the date parameter with a date of the second system.
8. A date switching device, provided in a second system, includes:
the receiving module is used for receiving broadcast information of the first system daily cutting;
the day switching module is used for judging whether the day switching time point of the second system is reached or not; if so, performing daily cutting operation to enable the date of the second system to be synchronous with the date of the first system; if not, continuing to perform the pre-batch processing.
9. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
the one or more programs, when executed by the one or more processors, implement the method of any of claims 1-7.
10. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-7.
CN202110751985.1A 2021-07-02 Date switching method, device, electronic equipment and computer readable medium Active CN113486032B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110751985.1A CN113486032B (en) 2021-07-02 Date switching method, device, electronic equipment and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110751985.1A CN113486032B (en) 2021-07-02 Date switching method, device, electronic equipment and computer readable medium

Publications (2)

Publication Number Publication Date
CN113486032A true CN113486032A (en) 2021-10-08
CN113486032B CN113486032B (en) 2024-09-24

Family

ID=

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114815967A (en) * 2022-05-16 2022-07-29 中国银行股份有限公司 Synchronous switching method and device for accounting date and electronic equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101256662A (en) * 2008-03-11 2008-09-03 中国工商银行股份有限公司 Processing system and method for implementing multiple time zone continuous service
CN104954470A (en) * 2015-06-19 2015-09-30 中国工商银行股份有限公司 On-line transaction processing system and method
CN107453831A (en) * 2016-05-31 2017-12-08 阿里巴巴集团控股有限公司 The method for synchronizing time and device of distributed transaction system
CN110263096A (en) * 2019-06-14 2019-09-20 深圳前海微众银行股份有限公司 Batch processing method, system, device, equipment and medium based on distributed environment
CN111369333A (en) * 2020-02-28 2020-07-03 中国工商银行股份有限公司 Daily cutting cooperative processing method and system for distributed system
CN111813793A (en) * 2020-07-08 2020-10-23 中国建设银行股份有限公司 Method and device for processing daily handover, computer equipment and storage medium
CN111882427A (en) * 2020-07-27 2020-11-03 中国建设银行股份有限公司 Loan system data processing method, loan system data processing device, loan system data processing equipment and loan system data processing storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101256662A (en) * 2008-03-11 2008-09-03 中国工商银行股份有限公司 Processing system and method for implementing multiple time zone continuous service
CN104954470A (en) * 2015-06-19 2015-09-30 中国工商银行股份有限公司 On-line transaction processing system and method
CN107453831A (en) * 2016-05-31 2017-12-08 阿里巴巴集团控股有限公司 The method for synchronizing time and device of distributed transaction system
CN110263096A (en) * 2019-06-14 2019-09-20 深圳前海微众银行股份有限公司 Batch processing method, system, device, equipment and medium based on distributed environment
CN111369333A (en) * 2020-02-28 2020-07-03 中国工商银行股份有限公司 Daily cutting cooperative processing method and system for distributed system
CN111813793A (en) * 2020-07-08 2020-10-23 中国建设银行股份有限公司 Method and device for processing daily handover, computer equipment and storage medium
CN111882427A (en) * 2020-07-27 2020-11-03 中国建设银行股份有限公司 Loan system data processing method, loan system data processing device, loan system data processing equipment and loan system data processing storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
罗泽雄;詹于杭;谭永亮;: "基于TTE端系统的时钟同步设计与实现", 航空电子技术, no. 03, 15 September 2016 (2016-09-15) *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114815967A (en) * 2022-05-16 2022-07-29 中国银行股份有限公司 Synchronous switching method and device for accounting date and electronic equipment

Similar Documents

Publication Publication Date Title
CN111277639B (en) Method and device for maintaining data consistency
CN110888893A (en) Order processing method based on micro-service e-commerce system
CN111881329A (en) Account balance management method and system
CN111881392A (en) Page display method and device
CN111831461A (en) Method and device for processing business process
CN110648216A (en) Wind control method and device
CN111857888A (en) Transaction processing method and device
CN114358921A (en) System switching method, apparatus, device, medium, and program product
CN113760924A (en) Distributed transaction processing method and device
CN112988800B (en) Data processing method and device based on distributed environment
CN113010238A (en) Permission determination method, device and system for micro application call interface
CN111259032A (en) Service processing method and device
CN113486032B (en) Date switching method, device, electronic equipment and computer readable medium
CN112948138A (en) Method and device for processing message
CN113486032A (en) Date switching method and device, electronic equipment and computer readable medium
CN111008202A (en) Distributed transaction processing method and framework
CN111526184B (en) Business auditing method and device
CN111866171B (en) Message processing method, device, electronic equipment and medium
CN112182003A (en) Data synchronization method and device
CN113778959A (en) Data processing method, device, equipment and computer readable medium
CN113486033A (en) Method, apparatus, device and computer readable medium for controlling transaction consistency
CN113486116A (en) Data synchronization method and device, electronic equipment and computer readable medium
CN113760487A (en) Service processing method and device
CN113516523A (en) Order data processing method and order receiving system
CN112950380B (en) Block chain-based transaction consistency processing method and device

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
GR01 Patent grant