Business system date management and control method, device and equipment and storage medium
By deploying the business system date data with the business data, each branch saves the current date and obtains it according to the request and day-cutting flag processing date, the problem of date reading hotspots and single-point risks in the existing technology is solved. Highly available date data management is achieved.
Patent Information
- Application Number
- CN202411425119.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-12
- Publication Date
- 2025-02-14
AI Technical Summary
The dates of the existing business system are stored in the cache or database, resulting in the date reading forming a hot spot, which is prone to problems such as data out of synchronization, reading failure and data reading failure, affecting the global business.
Deploy the business system date data with the business data in multiple databases. Each business system divides the database to save the corresponding business system's current date. It determines whether the date acquisition conditions are met through the detection date acquisition request and the current day-cutting flag. If it meets the date, it outputs the business system. Current date.
It avoids the data hotspots when a large number of date read requests, reduces the risk of single points, improves the reliability and security of date reading of business systems, and ensures the high availability of date data in business systems.
Smart Images

Figure CN119441178A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of electronic data processing, and in particular to a business system date control method, device, equipment and storage medium. Background Art
[0002] In many industries in the financial field, such as banking, securities, and insurance, the corresponding business backend systems usually use a globally unified business processing date.
[0003] However, since the dates of existing business systems are usually stored in a cache or database, hot spots often form when reading business system dates, which can easily lead to data asynchrony, reading failure, and data reading failure when switching dates. Once an abnormality occurs in the business system date, it will affect the overall situation and cause unbearable business losses.
[0004] Therefore, how to implement date switching in the business system with high assurance and meet a large number of date reading requests has become an urgent problem to be solved. Summary of the invention
[0005] The main purpose of this application is to provide a business system date control method, device, equipment and storage medium, aiming to solve the technical problem of how to achieve business system date switching with high assurance and meet a large number of date reading requests.
[0006] To achieve the above purpose, the present application proposes a business system date control method, which is applied to any business system sub-library, and each of the business system sub-libraries respectively stores the current date of the corresponding business system. The method includes:
[0007] When a date acquisition request is detected, a current date switching flag is acquired; the current date switching flag represents the date switching state of the current business system sub-library;
[0008] Determining whether a date acquisition condition is met according to the date acquisition request and the current date flag;
[0009] If the date acquisition condition is met, the current date of the business system is output.
[0010] In one embodiment, the method further comprises:
[0011] When the preset switching time is reached, the current date switching flag is set to the date switching process, and it is determined whether the source date acquisition status is normal;
[0012] If the source date acquisition status is normal, determine whether the preset switching condition is met according to the database machine date, the current date of the business system and the source date;
[0013] If the preset switching condition is met, the current date of the business system is switched according to the source date, and the current switching date flag is set to indicate that the date switching is completed when the date switching is completed.
[0014] In one embodiment, the step of determining whether the preset switching condition is met according to the database machine date, the business system current date and the source date comprises:
[0015] Determining whether the source date is normal based on the current date of the business system;
[0016] If the source date is normal, determine whether it meets the preset switching conditions based on the database machine date and the source date.
[0017] In one embodiment, after determining whether the source date is normal based on the current date of the business system, the method further includes:
[0018] If the source date is abnormal, determining whether the source date is a switching date;
[0019] If the source date is a switching date, it is determined that the preset switching condition is not met, and switching abnormality information is output.
[0020] In one embodiment, after determining whether the source date acquisition status is normal, the method further includes:
[0021] If the source date acquisition status is abnormal, the current date of the business system is switched according to the database machine date.
[0022] In one embodiment, the step of judging whether the date acquisition condition is met according to the date acquisition request and the current date flag includes:
[0023] Determine whether the current business system sub-library is in the date switching process according to the current switching flag;
[0024] If the current business system sub-database is not in the date switching process, it is determined that the date acquisition condition is met.
[0025] In one embodiment, the step of judging whether the current business system sub-library is in the process of date switching according to the current switching flag further includes:
[0026] If the current business system sub-library is in the date switching process, obtaining the transaction type of the transaction business corresponding to the date acquisition request;
[0027] When it is detected that the transaction service corresponding to the date acquisition request is a switching prohibited transaction, it is determined that the date acquisition condition is not met.
[0028] In addition, to achieve the above purpose, the present application also proposes a business system date control device, the business system date control device comprising:
[0029] A flag monitoring module is used to obtain the current date flag when a date acquisition request is detected;
[0030] A date monitoring module, used to determine whether the date acquisition condition is met according to the date acquisition request and the current date switching flag; the current date switching flag represents the date switching state of the current business system sub-library;
[0031] The date transmission module is used to output the current date of the business system if the date acquisition condition is met.
[0032] In addition, to achieve the above-mentioned purpose, the present application also proposes a business system date control device, the device including: a memory, a processor, and a business system date control program stored in the memory and executable on the processor, the business system date control program being configured to implement the steps of the business system date control method as described above.
[0033] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a storage medium on which a business system date control program is stored. When the business system date control program is executed by the processor, the steps of the business system date control method as described above are implemented.
[0034] The present application provides a business system date control method, device, equipment and storage medium. The method is applied to any business system sub-library, and each business system sub-library respectively stores the corresponding current date of the business system. The method includes: when a date acquisition request is detected, the current date switching flag is obtained; the current date switching flag represents the date switching state of the current business system sub-library; whether the date acquisition condition is met according to the date acquisition request and the current date switching flag; if the date acquisition condition is met, the current date of the business system is output. In the present application, date data is deployed in multiple sub-libraries along with business data, and each business system sub-library respectively stores the corresponding current date of the business system, thereby avoiding data hotspots when there are a large number of date reading requests and avoiding single point risks; in addition, the present application processes the business system date access according to business characteristics and the current date switching flag, avoiding the situation in which the business data date is inconsistent due to reading the business system date when the business system date is switched, improving the reliability and security of the business system date reading, thereby ensuring the high availability of the business system date data. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0036] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0037] Figure 1 This is a first flow chart of the first embodiment of the date control method of the business system of this application;
[0038] Figure 2 This is a schematic diagram of the request forwarding process of the first embodiment of the date control method of the business system of this application;
[0039] Figure 3 This is a second flow chart of the first embodiment of the date control method of the business system of this application;
[0040] Figure 4 This is a first flow chart of the second embodiment of the date control method of the business system of this application;
[0041] Figure 5 This is a schematic diagram of the date switching process of the second embodiment of the business system date control method of the present application;
[0042] Figure 6 This is a second flow chart of the second embodiment of the date control method of the business system of this application;
[0043] Figure 7 This is a schematic diagram of the date switching process of the second embodiment of the date control method of the business system of this application;
[0044] Figure 8 This is a business system date control architecture diagram of the second embodiment of the business system date control method of this application;
[0045] Fig. 9 This is a schematic diagram of the module structure of the date control device of the business system of the embodiment of the present application;
[0046] Fig.10 This is a schematic diagram of the device structure of the hardware operating environment involved in the business system date control method in the embodiment of the present application.
[0047] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0048] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0049] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0050] The main solution of this application is: business system date data is deployed in multiple sub-databases along with business data, and each business system sub-database stores the current date of the corresponding business system. When any business system sub-database detects a date acquisition request, it obtains the current date switching flag; the current date switching flag represents the date switching state of the current business system sub-database; it determines whether the date acquisition conditions are met based on the date acquisition request and the current date switching flag; if the date acquisition conditions are met, the current date of the business system is output.
[0051] At present, the dates of existing business systems are usually stored in cache or database. Therefore, hot spots are often formed when obtaining business system dates, which easily leads to various risks and challenges when updating and reading business system dates. Existing data access high-security solutions often adopt solutions based on cache and database service degradation, but there are the following disadvantages:
[0052] 1) The cache is facing a failure, which causes data inconsistency between the cache and the database, resulting in data asynchrony;
[0053] 2) If the cache is unavailable and downgraded to the database, if another failure occurs, it will cause downgrade failure and read failure;
[0054] 3) If the recovery mechanism fails during downgrade recovery, it will have a direct impact on the database and cause data reading failures.
[0055] That is, most current system date switching data access relies on cache or database persistence. When a failure occurs, the business can only proceed after the cache and database are restored or downgraded to take effect, resulting in a single point of risk. At the same time, if the downgrade fails or the downgrade recovery is abnormal, the downgrade is useless and the business system date data cannot be read. Once the business system date is abnormal, it will affect the overall situation and bring unbearable business losses.
[0056] To solve the above problems, date data in this application is deployed in multiple databases along with business data, and each business system database stores the current date of the corresponding business system, thereby avoiding data hotspots when there are a large number of date reading requests and avoiding single point risks; in addition, this application processes the business system date access according to business characteristics and the current date cut flag, thereby avoiding the situation where the business system date is read when the business system date is switched, resulting in inconsistent business data dates, thereby improving the reliability and security of business system date reading and ensuring high availability of business system date data.
[0057] It should be noted that the execution subject of this embodiment can be a business system date control system corresponding to any business system sub-library, or a computing service device with data processing, network communication and program running functions corresponding to any business system sub-library, such as a tablet computer, personal computer, mobile phone, etc., or a business system date control device corresponding to any business system sub-library that can realize the above functions, etc., and this embodiment does not make specific limitations on this. The following takes the business system date control device (referred to as the control device) as the execution subject as an example to illustrate this embodiment and the following embodiments.
[0058] Based on this, the present application embodiment provides a business system date control method, referring to Figure 1 , Figure 1 This is a first flow chart of the first embodiment of the date control method of the business system of the present application.
[0059] In this embodiment, the business system date control method is applied to any business system sub-database, and each business system sub-database stores the current date of the corresponding business system. The method includes steps S10 to S30:
[0060] Step S10, when a date acquisition request is detected, a current date switching flag is acquired; the current date switching flag represents the date switching state of the current business system sub-library;
[0061] Step S20, judging whether a date acquisition condition is met according to the date acquisition request and the current date flag;
[0062] Step S30: If the date acquisition condition is met, the current date of the business system is output.
[0063] It should be understood that compared with the prior art, in this embodiment, the business system date data is no longer cached in the same database or server for storage and reading. Instead, the date data is deployed in multiple sub-databases along with the business data. That is, each business system has a corresponding business system sub-database, and each business system sub-database stores the current date of the corresponding business system, thereby avoiding data hotspots when there are a large number of date reading requests, and avoiding single point risks after the failure of a single business data sub-database.
[0064] It is understandable that the above date acquisition request can be forwarded by the gateway service to the control device corresponding to the business system sub-library when the external service needs to query the business system date, so as to read the business system date. In this embodiment, when forwarding the date acquisition request, the gateway service can forward it according to the business characteristics corresponding to each business system sub-library.
[0065] For ease of understanding, Figure 2 Take this as an example to illustrate: Figure 2This is a schematic diagram of the request forwarding process of the first embodiment of the business system date control method of this application. Figure 2 As shown, when an external service needs to query the business system date, it can send a date acquisition request to the gateway service, and the gateway service can analyze the date acquisition request to determine whether it contains a sub-library feature. If so, the date acquisition request is forwarded to the business system sub-library corresponding to the sub-library feature; if there is no sub-library feature, since the current date of the business system stored in each business system sub-library is consistent, it can be randomly routed to a certain sub-library to obtain the business system date. The specific means can be to take any 2-digit integer random number (configurable) in the gateway service to specify the sub-library information, and then forward it to the specified sub-library to obtain the current date of the business system, so as to avoid data hotspots and improve the availability of business system date data. In addition, Figure 2 As shown, for the end-of-day batch service within the business system, the current date of the business system can also be obtained according to the business flag or randomly designated sub-database, while for the online service, it can be directly routed to the corresponding sub-database to obtain the current date of the business system.
[0066] Therefore, in this implementation, when there are a large number of date acquisition requests at the same time, there is no need to access the same cache or database uniformly. Instead, the corresponding business system sub-library is accessed according to business characteristics or a business system sub-library is accessed at any time to avoid data hotspots and improve the availability of business system dates.
[0067] It should be noted that in order to avoid inconsistent business data dates, in this embodiment, when switching or updating the business system date, the business system sub-library can reject external transactions. Specifically, when any business system sub-library detects a date acquisition request, it can obtain its own current date switching flag, which represents the date switching status of the current business system sub-library.
[0068] In a first possible implementation, refer to Figure 3 , Figure 3 This is a second flow chart of the first embodiment of the date control method of the business system of this application. In this embodiment, step S20 may include steps A1 to A2:
[0069] Step A1, judging whether the current business system sub-library is in the date switching process according to the current switching flag;
[0070] Step A2: If the current business system sub-database is not in the date switching process, it is determined that the date acquisition condition is met.
[0071] It is easy to understand that in this embodiment, the current date switching flag can be that the date switching is in progress, and the corresponding date switching state can be that the current business system is in the date switching process; the current date switching flag can also be that the date switching is completed, and the corresponding date switching state can be that the current business system is not in the date switching process. If the current business system sub-library is not in the date switching process, the business system sub-library can directly determine that the date acquisition condition is met, and output the current date of the business system saved by itself to the gateway service to forward to the corresponding external service or online service, or output the current date value of the business system saved by itself to the corresponding end-of-day batch service.
[0072] In a second feasible implementation manner, in this embodiment, step S20 may further include steps A3 to A4:
[0073] Step A3: if the current business system sub-database is in the date switching process, then obtaining the transaction type of the transaction business corresponding to the date acquisition request;
[0074] Step A4: when it is detected that the transaction service corresponding to the date acquisition request is a switching prohibited transaction, it is determined that the date acquisition condition is not met.
[0075] It is understandable that if the current business system sub-library is judged to be in the date switching process according to the current switching flag, it can be further judged whether the transaction business corresponding to the date acquisition request belongs to the business type that can be performed in the business system date switching process. At this time, if it is detected that the transaction business corresponding to the date acquisition request is a switching prohibited transaction, then the transaction business corresponding to the date acquisition request cannot be performed during the business system date switching process. The control device corresponding to the current business system sub-library can determine that it does not meet the date acquisition conditions, and Figure 2 As shown, rejecting this transaction means rejecting the output of the current date of the corresponding business system to the external service, thereby avoiding the situation in which the business data date is inconsistent due to reading the business system date when the business system date is switched, and improving the reliability of reading the business system date.
[0076] The above are only two feasible implementations of step S20 provided in this embodiment, and this embodiment does not specifically limit the specific implementation of step S20.
[0077] In summary, if Figure 2 As shown, in this embodiment, the date reading of the business system can be returned through the gateway service, and the request characteristics are judged at the gateway layer, and the access is performed according to the business characteristics. Specifically, after the date acquisition request containing sub-library information is forwarded to the corresponding sub-library, the sub-library obtains the current date of the business system, and outputs it after judging the validity of the date; for requests without sub-library information, the gateway takes an integer (configurable) random number to specify the sub-library information, and then forwards it to the specified sub-library to obtain the current date of the business system.
[0078] At the same time, during the date switching period, for special transaction requests (i.e., switching prohibited transaction requests), it is determined whether the date switching is being processed. If it is in the date switching, the transaction is rejected, otherwise it is allowed.
[0079] Therefore, this embodiment can deploy date data in multiple databases along with business data and avoid data hotspots, effectively avoiding single point risk problems caused by cache failure or database failure, and improving the availability of business system date data; at the same time, this embodiment can avoid the situation where reading the business system date when the business system date is switched leads to inconsistent business data dates, thereby improving the reliability of business system date reading.
[0080] This embodiment provides a business system date control method, which is applied to any business system sub-library, and each business system sub-library respectively stores the current date of the corresponding business system. The method includes: when a date acquisition request is detected, the current date switching flag is obtained; the current date switching flag represents the date switching state of the current business system sub-library; according to the current switching flag, whether the current business system sub-library is in the date switching process; if the current business system sub-library is not in the date switching process, it is determined that the date acquisition condition is met. If the current business system sub-library is in the date switching process, the transaction type of the transaction business corresponding to the date acquisition request is obtained; when it is detected that the transaction business corresponding to the date acquisition request is a switching prohibited transaction, it is determined that the date acquisition condition is not met. If the date acquisition condition is met, the current date of the business system is output. In this embodiment, date data is deployed in multiple sub-databases along with business data, and each business system sub-database stores the current date of the corresponding business system, thereby avoiding data hotspots when there are a large number of date reading requests and avoiding single point risks. In addition, this embodiment processes the business system date access according to business characteristics and the current date switching flag, thereby avoiding the situation in which the business data date is inconsistent due to reading the business system date when the business system date is switched, thereby improving the reliability and security of the business system date reading, thereby ensuring the high availability of the business system date data.
[0081] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction and will not be repeated later.
[0082] It should be understood that one reason for the poor availability of dates in existing business systems is that data consistency between the cache and the database is guaranteed by complex mechanisms. Therefore, when a failure occurs on either side, it is easy to cause data inconsistency between the cache and the database. In order to solve this problem, in addition to deploying date data with business data in multiple sub-databases, this application can also perform scheduled date switching or updates on each business system sub-database that stores the current date of the business system, and perform simple and easy-to-operate data consistency checks during updates to improve the reliability of business system date data.
[0083] Therefore, based on the first embodiment, please refer to Figure 4 , Figure 4 This is a first flow chart of the second embodiment of the business system date control method of the present application. In this embodiment, the business system date control method further includes steps S40 to S60:
[0084] Step S40, when the preset switching time is reached, the current date switching flag is set to the date switching process, and it is determined whether the source date acquisition state is normal;
[0085] Step S50, if the source date acquisition status is normal, determine whether the preset switching condition is met according to the database machine date, the current date of the business system and the source date;
[0086] Step S60: If the preset switching condition is met, the current date of the business system is switched according to the source date, and when the date switching is completed, the current date switching flag is set to the date switching completed.
[0087] It is easy to understand that the above-mentioned preset switching time in this application can be a preset business system date switching time, such as 23:59 every day. Each business system sub-library can automatically switch the time when it detects that the time reaches the preset switching time. Specifically, the control device corresponding to any business system sub-library in this embodiment can be divided into three groups, group 1, group 2 and group 3, for serial execution when executing the business system date switching function. For ease of understanding, Figure 5 Take this as an example to illustrate: Figure 5 This is a schematic diagram of the date switching process of the second embodiment of the business system date control method of this application. Figure 5As shown, when each business system sub-library performs date switching, the control device can perform date switching control marking-date switching in progress based on group 1 (single task), that is, control and initialize the current date switching mark to be in the date switching process, and all business transaction requests determine the date switching; Group 2 (multi-sub-library single task) is responsible for the date switching of each sub-library business system and the date switching consistency check; Group 3 (single task) can perform date switching control marking-date switching completion, that is, when the date switching of each business system sub-library is completed, the current date switching mark is updated to date switching completed, and transactions are allowed.
[0088] It should be noted that the above-mentioned source date can be the date of the source or benchmark reference system, which can be represented by T; the current date of the business system is the current date corresponding to when each business system sub-library uses the system to handle business, which can be represented by T2, and the previous date of the business system can be represented by T1; and the database machine date can refer to the date of the database itself corresponding to each business system sub-library, which can be represented by T3, where the database also stores the business system date.
[0089] It can be understood that the present embodiment can be divided into two types of switching during the date switching process: normal situation and abnormal situation. Under normal circumstances, the T date is normal, and the T1 and T2 dates are normal, that is, the corresponding source date acquisition status is normal. At this time, Group 2 can judge whether it meets the preset switching conditions according to the database machine date, the current date of the business system and the source date, and switch the business system sub-library date according to the preset switching condition judgment result.
[0090] In one possible implementation, refer to Figure 6 , Figure 6 This is a second flow chart of the second embodiment of the date control method of the business system of the present application. In this embodiment, step S50 may include steps B1 to B2:
[0091] Step B1, judging whether the source date is normal based on the current date of the business system;
[0092] Step B2: If the source date is normal, determine whether it meets the preset switching conditions based on the database machine date and the source date.
[0093] It is understandable that in this embodiment, when the control device can normally obtain the source date, it can further determine whether the source date is normal based on the current date of the business system. Specifically, if T==T2+1, the source date is determined to be normal, and further determination is made based on the database machine date T3.
[0094] At this time, if T3 != T and T3 != T - 1, the early warning information can be registered and followed up by the date monitor to confirm whether it can be ignored (possibly a clock problem). After registering the log without interrupting the process, it is determined that the preset switching condition is met, and the date switch is executed, that is, the current date of the business system is switched to the source date. If T3 == T or T3 == T - 1, the control device directly determines that the preset switching condition is met and executes the date switch.
[0095] In another feasible embodiment, in this embodiment, step S50 may further include steps B3 to B4:
[0096] Step B3, if the source date is abnormal, determine whether the source date is the switching date;
[0097] Step B4, if the source date is the switching date, determine that the preset switching condition is not met, and output a switching exception message.
[0098] It is easy to understand that if T == T2 + 1, it can be determined that the source date is abnormal, and further determine whether the source date is the switching date. Specifically, if T == T2, it is determined that the source date has not been switched. The source date can be waited for according to the preset waiting time, and then the source date is obtained again. When the number of times of obtaining the source date exceeds the preset number of times, an early warning is given. If the source date still has not been switched after waiting and trying many times, a switching exception message can be output, that is, the process reports an error and interrupts the date switching process, and the date monitor intervenes manually to perform the business system switch to quickly solve the date switching problem.
[0099] If T > T2 + 1 or T < T2, it can be determined that the source date is the switching date, but a switching exception occurs. At this time, it can be directly determined that the preset switching condition is not met, and a switching exception message is output.
[0100] In a feasible embodiment, in this embodiment, after step S40, step S51 may further be included:
[0101] Step S51, if the source date acquisition status is abnormal, perform a date switch on the current date of the business system according to the database machine date.
[0102] It can be understood that if the source date acquisition status is abnormal, that is, the control device detects that the source date T service cannot be accessed or can be accessed but the task scheduling system does not return the source date, it can be downgraded to T3, and the date monitor user manually confirms whether the actual source date has been switched. If there is indeed an abnormality in the source and it cannot be obtained, the downgrade switch can be turned on and retried, and the database machine date of the sub-library is obtained as the data source of the date, and the current date of the business system is switched according to the database machine date.
[0103] If the database date T3 is also abnormal, that is, the database is down, then the switching abnormality information can also be output, that is, the process error is reported and the date switching process is interrupted, and the date monitoring personnel manually intervene to switch the business system to quickly solve the date switching problem. The entire process of performing a specific date switching in this embodiment can be as follows Figure 7 As shown, Figure 7 This is a schematic diagram of the date switching process of the second embodiment of the date control method of the business system of this application. Figure 7 The specific operation steps are as shown above and will not be repeated here.
[0104] Therefore, this embodiment can perform a three-dimensional verification based on the source date, business system date, and machine date when the business system sub-database switches the date, strictly preventing any party from suddenly abnormally affecting the link of date data update, improving the reliability and security of the business system date data, and ensuring the high availability of the business system date data.
[0105] In summary, this embodiment proposes a business system date control method, combined with Figure 8 This article gives an example to illustrate the date control process of the entire business system. Figure 8 This is a business system date control architecture diagram of the second embodiment of the business system date control method of this application. Figure 8 As shown, in this embodiment, the business system date data is deployed in multiple sub-libraries along with the business data, and the date is written into each sub-library through a scheduled task. The task is completed when all sub-libraries are successfully distributed, and finally each sub-library has a copy of the same date data. Among them, business requests with sub-library characteristics obtain the required date data according to the sub-library to avoid concentrated hot spots, and requests without sub-library characteristics randomly access the sub-library, thereby improving the availability of business system date data.
[0106] In addition, business requests can accurately control transactions during the switching period through the current switching date flag, preventing date inconsistencies with downstream business systems, which in turn cause inconsistent business data and improve the security of business system date data.
[0107] Finally, in the date switching process of the business system sub-library, this embodiment can perform a three-dimensional verification of the source date, business system date, and machine date on the date of execution of the switch to strictly prevent any sudden abnormality from affecting the link of date data update, and the update processing operation is equipped with a retry mechanism. After the maximum number of retries is reached, an early warning service is initiated, and a robot is used to remind the date detection personnel to perform manual processing as soon as possible.
[0108] Therefore, this embodiment can perform date refresh, consistency verification, and monitoring alarms through scheduled tasks, process the access date according to business characteristics, and ensure high availability of business system date data.
[0109] This embodiment discloses that when the preset switching time is reached, the current date switching flag is set to the date switching process, and it is judged whether the source date acquisition state is normal; if the source date acquisition state is normal, it is judged whether the source date is normal based on the current date of the business system; if the source date is normal, it is judged whether it meets the preset switching conditions according to the database machine date and the source date. If the source date is abnormal, it is judged whether the source date is the switching date; if the source date is the switching date, it is determined that it does not meet the preset switching conditions, and the switching abnormality information is output; if it meets the preset switching conditions, the current date of the business system is switched according to the source date, and the current date switching flag is set to the date switching is completed at the end of the date switching. If the source date acquisition state is abnormal, the current date of the business system is switched according to the database machine date. Therefore, this embodiment can perform a three-dimensional integrated verification based on the source date, the business system date, and the machine date when the business system sub-library performs date switching, strictly prevent any party from suddenly abnormally affecting the link of date data update, improve the reliability and security of the business system date data, and ensure the high availability of the business system date data.
[0110] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the date control method of the business system of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0111] This application also provides a business system date control device, please refer to Fig. 9 , Fig. 9 This is a schematic diagram of the module structure of the business system date control device in the embodiment of the present application. In this embodiment, the business system date control device includes:
[0112] The flag monitoring module T1 is used to obtain the current date flag when a date acquisition request is detected;
[0113] The date monitoring module T2 is used to determine whether the date acquisition condition is met according to the date acquisition request and the current date switching flag; the current date switching flag represents the date switching state of the current business system sub-library;
[0114] The date transmission module T3 is used to output the current date of the business system if the date acquisition condition is met.
[0115] As a feasible implementation method, in this embodiment, the date monitoring module T2 is also used to set the current date switching flag to the date switching process when the preset switching time is reached, and determine whether the source date acquisition state is normal;
[0116] The date monitoring module T2 is further used to determine whether the preset switching condition is met according to the database machine date, the current date of the business system and the source date if the source date acquisition state is normal;
[0117] The date monitoring module T2 is also used to switch the current date of the business system according to the source date if the preset switching conditions are met, and set the current date switching flag to complete the date switching when the date switching is completed.
[0118] As a possible implementation method, in this embodiment, the date monitoring module T2 is also used to determine whether the source date is normal based on the current date of the business system;
[0119] The date monitoring module T2 is also used to determine whether the preset switching condition is met according to the database machine date and the source date if the source date is normal.
[0120] As a possible implementation method in this embodiment, the date monitoring module T2 is also used to determine whether the source date is a switching date if the source date is abnormal;
[0121] The date monitoring module T2 is also used to determine that the source date does not meet the preset switching conditions if it is a switching date, and output switching abnormality information.
[0122] As a feasible implementation method in this embodiment, the date monitoring module T2 is also used to switch the current date of the business system according to the database machine date if the source date acquisition state is abnormal.
[0123] As a possible implementation method, in this embodiment, the date monitoring module T2 is also used to determine whether the current business system sub-library is in the date switching process according to the current switching flag;
[0124] The date monitoring module T2 is also used to determine whether the date acquisition condition is met if the current business system sub-database is not in the date switching process.
[0125] As a feasible implementation method in this embodiment, the date monitoring module T2 is further used to obtain the transaction type of the transaction business corresponding to the date acquisition request if the current business system sub-library is in the date switching process;
[0126] The date monitoring module T2 is further configured to determine that the date acquisition condition is not met when it is detected that the transaction service corresponding to the date acquisition request is a switching prohibited transaction.
[0127] The business system date control device provided by the present application adopts the business system date control method in the above embodiment, which can solve the technical problem of business system date control. Compared with the prior art, the beneficial effects of the business system date control device provided by the present application are the same as the beneficial effects of the business system date control method provided by the above embodiment, and other technical features in the business system date control device are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0128] The present application provides a business system date control device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the business system date control method in the above-mentioned embodiment one.
[0129] Reference below Fig.10 , which shows a schematic diagram of the structure of a business system date control device suitable for implementing the embodiment of the present application. The business system date control device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig.10 The business system date control 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 application.
[0130] like Fig.10As shown, the business system date control device may include a processing device 1001 (such as a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the business system date control device are also stored. The processing device 1001, ROM1002 and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the business system date control device to communicate wirelessly or wired with other devices to exchange data. Although the figure shows a business system date control device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or provided instead.
[0131] In particular, according to the embodiments disclosed in the present application, the process described with reference to the flowchart above can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a business system date control program product, which includes a business system date control program carried on a computer-readable medium, and the business system date control program contains program code for executing the method shown in the flowchart. In such an embodiment, the business system date control program can be downloaded and installed from the network through a communication device, or installed from a storage device 1003, or installed from ROM 1002. When the business system date control program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0132] The business system date control device provided by the present application adopts the business system date control method in the above embodiment, which can solve the technical problems of business system date control. Compared with the prior art, the beneficial effects of the business system date control device provided by the present application are the same as the beneficial effects of the business system date control method provided by the above embodiment, and the other technical features in the business system date control device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0133] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0134] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0135] The present application provides a storage medium having computer-readable program instructions (i.e., a business system date control program) stored thereon, wherein the computer-readable program instructions are used to execute the business system date control method in the above-mentioned embodiment.
[0136] The storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of 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 this embodiment, the 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, system or device. The program code contained on the storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0137] The above storage medium may be included in the business system date control device; or it may exist independently without being assembled into the business system date control device.
[0138] The storage medium carries one or more programs. When the one or more programs are executed by the business system date control device, the business system date control device performs: business system date control.
[0139] The business system date control program code for performing the operations of the present application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, using an Internet service provider to connect through the Internet).
[0140] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and business system date control program product according to various embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the 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 and / or the flowchart, and the combination of the boxes in the block diagram and / or the flowchart 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.
[0141] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0142] The readable storage medium provided in this application is a storage medium, which stores computer-readable program instructions (i.e., business system date control program) for executing the above-mentioned business system date control method, and can solve the technical problems of business system date control. Compared with the prior art, the beneficial effects of the storage medium provided in this application are the same as the beneficial effects of the business system date control method provided in the above-mentioned embodiment, and will not be repeated here.
[0143] The above are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect application in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A business system date control method, characterized in that: The method is applied to any business system sub-database, and each business system sub-database stores the current date of the corresponding business system. The method includes: When a date acquisition request is detected, a current date switching flag is acquired; the current date switching flag represents the date switching state of the current business system sub-library; Determining whether a date acquisition condition is met according to the date acquisition request and the current date flag; If the date acquisition condition is met, the current date of the business system is output.
2. The business system date control method according to claim 1, characterized in that: The method further comprises: When the preset switching time is reached, the current date switching flag is set to the date switching process, and it is determined whether the source date acquisition status is normal; If the source date acquisition status is normal, determine whether the preset switching condition is met according to the database machine date, the current date of the business system and the source date; If the preset switching condition is met, the current date of the business system is switched according to the source date, and the current switching date flag is set to indicate that the date switching is completed when the date switching is completed.
3. The business system date control method according to claim 2, characterized in that: The step of judging whether the preset switching condition is met according to the database machine date, the current date of the business system and the source date comprises: Determining whether the source date is normal based on the current date of the business system; If the source date is normal, determine whether it meets the preset switching conditions based on the database machine date and the source date.
4. The business system date control method according to claim 3, characterized in that: After judging whether the source date is normal based on the current date of the business system, the method further includes: If the source date is abnormal, determining whether the source date is a switching date; If the source date is a switching date, it is determined that the preset switching condition is not met, and switching abnormality information is output.
5. The business system date control method according to claim 2, characterized in that: After determining whether the source date acquisition status is normal, the method further includes: If the source date acquisition status is abnormal, the current date of the business system is switched according to the database machine date.
6. The business system date control method according to claim 1, characterized in that: The step of judging whether the date acquisition condition is met according to the date acquisition request and the current date cut flag comprises: Determine whether the current business system sub-library is in the date switching process according to the current switching flag; If the current business system sub-database is not in the date switching process, it is determined that the date acquisition condition is met.
7. The business system date control method according to claim 1, characterized in that: The step of judging whether the current business system sub-library is in the date switching process according to the current switching mark also includes: If the current business system sub-library is in the date switching process, obtaining the transaction type of the transaction business corresponding to the date acquisition request; When it is detected that the transaction service corresponding to the date acquisition request is a switching prohibited transaction, it is determined that the date acquisition condition is not met.
8. A business system date control device, characterized in that: The business system date control device comprises: A flag monitoring module is used to obtain the current date flag when a date acquisition request is detected; A date monitoring module, used to determine whether the date acquisition condition is met according to the date acquisition request and the current date switching flag; the current date switching flag represents the date switching state of the current business system sub-library; The date transmission module is used to output the current date of the business system if the date acquisition condition is met.
9. A business system date control device, characterized in that: The device includes: a memory, a processor, and a business system date control program stored in the memory and executable on the processor, wherein the business system date control program is configured to implement the steps of the business system date control method as described in any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium stores a business system date control program, and when the business system date control program is executed by the processor, the steps of the business system date control method according to any one of claims 1 to 7 are implemented.