Daily cutting method and device for banking system
By obtaining and modifying the date information of the banking system and obtaining the next date of the system based on the pre-established relationship, the problem that the banking system cannot automatically switch discontinuous dates is solved, and the testing efficiency and coverage rate are improved.
Patent Information
- Application Number
- CN202110683641.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-21
- Publication Date
- 2025-02-21
- Estimated Expiration
- 2041-06-21
AI Technical Summary
The banking system cannot realize automatic switching for discontinuous dates, resulting in the inability to cover all test scenarios in the test environment and low testing efficiency.
By obtaining the modified date, current system date and natural day date, obtaining the system date date based on the pre-established relationship between the natural day date and the system date date, and modifying the current system date to the system date date to achieve Automatic switching of discontinuous dates.
It realizes automatic daily cutting of the banking system in the case of discontinuous dates, meets the requirements of various test scenarios, and improves the coverage and flexibility of daily cutting of the test environment.
Smart Images

Figure CN113254348B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of financial technology, and in particular to a daily cutting method and device for a banking system. Background Art
[0002] This section is intended to provide a background or context to the embodiments of the invention recited in the claims. No admission is made that the description herein is prior art by inclusion in this section.
[0003] Many functions in the banking system rely on the system date of the banking system to execute, such as generating a report when the system date is May 30, 2021. Before the various functions of the banking system are actually put into use (i.e. applied in the production environment), they must first be tested in the test environment to determine whether each function can be executed normally. Because the test time is limited, the system date of the banking system can only be switched according to continuous dates when it is automatically switched (referred to as day switching). Therefore, the test environment can only test the execution of the function under some system dates, but each function may have different processing rules for different system dates. Therefore, the test environment cannot perform comprehensive and accurate tests on each function. Therefore, in the test environment, discontinuous dates need to be set. When the banking system is switched, the system date is manually switched to a date that is discontinuous with the current system date, thereby ensuring that more test scenarios are covered. There are problems such as inflexible system day switching methods and low testing efficiency. Summary of the invention
[0004] The embodiment of the present invention provides a day switching method for a banking system, which is used to solve the problem that the banking system in the prior art cannot realize automatic switching for discontinuous dates. In order to ensure that the test environment can contain test scenarios corresponding to more dates, discontinuous dates need to be set and manually switched, resulting in low test efficiency. The method includes:
[0005] Get the modification date, the current system date of the bank system, and the current natural date; the modification date is the natural date when the bank system is switched;
[0006] When the modification date is inconsistent with the current natural date and the date-cutting method is applied in a test environment, the system next date is obtained according to the current natural date and the pre-established association relationship between the natural date and the system next date;
[0007] Change the current system date to the system date, and change the modification date to the current natural date.
[0008] The embodiment of the present invention further provides a day switching device for a banking system, which is used to solve the problem that the banking system in the prior art cannot realize automatic switching for discontinuous dates. In order to ensure that the test environment can contain test scenarios corresponding to more dates, discontinuous dates need to be set and manually switched, resulting in low test efficiency. The device includes:
[0009] The acquisition module is used to acquire the modification date, the current system date of the bank system, and the current natural date; wherein the modification date is the natural date when the bank system date is cut;
[0010] A first processing module is used to obtain the system next date according to the current natural date and the pre-established association relationship between the natural date and the system next date when the modification date is inconsistent with the current natural date and the date cutting method is applied in the test environment;
[0011] The second processing module is used to modify the current system date to the next system date, and modify the modification date to the current natural date.
[0012] An embodiment of the present invention further provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the daily cutting method of the banking system when executing the computer program.
[0013] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for executing the daily cutting method of the banking system.
[0014] In an embodiment of the present invention, repeated date cutting is avoided based on whether the modification date is consistent with the current natural date. When the modification date is inconsistent with the current natural date and the date cutting method is applied in a test environment, the system date can be obtained based on the pre-established association relationship between the natural date and the system date, and the current system date is modified to the system date, so that the bank system can automatically cut the date when the date is discontinuous, thereby meeting the requirements of various test scenarios, improving the coverage of the test environment for the test scenarios, and the flexibility of the bank system day cutting. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0016] Figure 1A flowchart of a daily cutting method for a banking system provided in an embodiment of the present invention;
[0017] Figure 2 This is an example diagram of a system operation table provided in an embodiment of the present invention;
[0018] Figure 3 An example diagram of an association relationship between a pre-established natural date and a current system date and a next system date provided in an embodiment of the present invention;
[0019] Figure 4 A schematic diagram of a daily cutting device for a banking system provided in an embodiment of the present invention;
[0020] Figure 5 A schematic diagram of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0021] To make the purpose, technical solution and advantages of the embodiments of the present invention more clear, the embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings. Here, the exemplary embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.
[0022] The term "and / or" herein only describes an association relationship, indicating that three relationships may exist. For example, A and / or B may represent the following three situations: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C may represent including any one or more elements selected from the set consisting of A, B, and C.
[0023] In the description of this specification, the terms "include", "including", "have", "contain", etc. are all open terms, which mean including but not limited to. The descriptions with reference to the terms "one embodiment", "a specific embodiment", "some embodiments", "for example", etc. mean that the specific features, structures or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures or characteristics described may be combined in a suitable manner in any one or more embodiments or examples. The order of steps involved in each embodiment is used to schematically illustrate the implementation of the present application, and the order of steps is not limited and can be appropriately adjusted as needed.
[0024] After research, it was found that the system date of the banking system can only be switched according to consecutive dates when it is automatically switched (referred to as daily switching). However, the same function corresponds to different processing rules under different system dates (for example, a certain function is to generate a business report on the 29th of each month, but because there is no 29th in February of an ordinary year, the business report is generated on the 28th in February of an ordinary year. Therefore, when the system date is February 28, 2021, a business report needs to be generated). During testing, it is necessary to include various different processing rules for the function to be tested in the test environment, that is, to include various Therefore, when the test time is limited and the bank system can only be switched according to consecutive dates, the test environment will not be able to cover the system dates corresponding to the various processing rules of the function to be tested. For example, the system date and date switching sequence that the function to be tested needs to test are: February 29, 2020, February 28, 2021. After the bank system automatically switches from February 29, 2020, it will directly switch the system date to March 1, 2020, and cannot directly switch to February 28, 2021, which is not in line with expectations. Therefore, in order to cover more test scenarios (i.e., system dates corresponding to various processing rules), it is necessary to manually switch the system date to a discontinuous preset date when the bank system is switched. In summary, the existing bank system switching method is not flexible enough, resulting in low testing efficiency for various functions that rely on system dates.
[0025] In view of the above research, the inventor proposes a daily cutting method for the banking system. Figure 1 As shown, the daily cutting method comprises:
[0026] S101: Acquire the modification date, the current system date of the bank system, and the current natural date; wherein the modification date is the natural date when the bank system is switched;
[0027] S102: when the modification date is inconsistent with the current natural date and the date switching method is applied in a test environment, obtaining the system next date according to the current natural date and the pre-established association relationship between the natural date and the system next date;
[0028] S103: Modify the current system date to the system next date, and modify the modification date to the current natural date.
[0029] The embodiment of the present invention avoids repeated date cutting by checking whether the modification date is consistent with the current natural date. When the modification date is inconsistent with the current natural date and the date cutting method is applied in a test environment, the system date can be obtained according to the pre-established association relationship between the natural date and the system date, and the current system date is modified to the system date, so that the bank system can automatically cut the date when the date is discontinuous, thereby meeting the requirements of various test scenarios, improving the coverage of the test environment to the test scenarios, and the flexibility of the day cutting of the bank system.
[0030] The daily cutting method provided by the above embodiment of the present invention is described in detail below.
[0031] The banking system described in the embodiment of the present invention includes, for example: a banking peripheral system, a banking core business system, etc.
[0032] The daily cutting process of the daily cutting method described in the embodiment of the present invention can be performed according to Figure 2 The system operation table shown is switched, and the system operation table includes, for example: current system date, next system date, previous system date, and modification date; among which, NOW_SYS_DATE represents the current system date, PRE_SYS_DATE represents the previous system date, NXT_SYS_DATE represents the next system date, and MODIRY_TIME represents the modification date. When the banking system performs a daily cut, the system previous date is modified to the current system date, the current system date is modified to the system next date, the modification date is modified to the current natural date, and then the system next date is determined according to the execution environment of the daily cut method (such as a test environment or a production environment). For example, the system previous date of the banking system is December 1, 2020, the current system date is December 2, 2020, the system next date is December 3, 2020, the modification date is December 2, 2020, and the current natural date is December 3, 2020. During the daily cut, the system previous date is modified to December 2, 2020, the current system date is modified to December 3, 2020, the modification date is modified to December 3, 2020, and the new system next date is determined according to the execution environment of the daily cut method.
[0033] Here, the modification date is set to avoid the bank system from repeating the daily cutting action during daily cutting. If the modification date is consistent with the current natural date, it means that the bank system has already executed the daily cutting action. If the modification date is inconsistent with the current natural date, it means that the bank system has not yet executed the daily cutting action.
[0034] With respect to the above S101, when obtaining the modification date, the current system date of the bank system, and the current natural day date, the modification date, the current system date, and the current natural day date can be obtained, for example, according to a scheduled task; wherein the scheduled task is, for example, to start a query program at a preset time, and obtain the modification date, the bank system date, and the current natural day date through the query program; illustratively, the modification date, the current system date of the bank system, and the current natural day date are obtained at 0:0:00 of every natural day.
[0035] In addition, because the banking system may fail to perform the day-cutting action at the preset time or fail to perform the day-cutting action, for example, after reaching the preset time, it is possible to determine whether the modified date is consistent with the current natural date at every preset time interval;
[0036] (1) When the modification date is consistent with the current date, it means that the day-cutting action corresponding to the preset time has been executed, and the day-cutting is stopped, and the determination of whether the modification date is consistent with the current natural day is stopped every preset time interval.
[0037] (2) When the modification date is inconsistent with the current date, it means that the day-cutting action corresponding to the preset time has not been executed, and the day-cutting operation continues to be executed, and whether the modification date is consistent with the current natural day date continues to be determined at every preset time interval.
[0038] In this way, the timed cycle task can ensure that the daily cutting action can be successfully executed at the preset time, thereby improving the success rate of daily cutting in the banking system.
[0039] When it is determined that the modification date is inconsistent with the current natural date, continue to perform the day-cutting operation: determine the execution environment of the day-cutting method.
[0040] The execution environment of the daily cutting method can be determined by, for example, reading the value of a switch in a system configuration file. When the value of the switch is a first preset value, it is determined that the daily cutting method is applied in a test environment. Here, the switch represents that the current execution environment is a test environment or a production environment. When the value of the switch is a second preset value, it is determined that the daily cutting method is applied in a production environment. The first preset value and the second preset value include, for example, characters, numbers, character strings, a combination of numbers and characters, etc., which can be set according to actual application conditions and are not limited here.
[0041] When the date cutting method described in the embodiment of the present invention is applied in a test environment, when S101 obtains the current system date, for example, any of the following methods A and B may be used, but not limited to:
[0042] A: According to the current natural date and the pre-established association between the natural date and the current system date, the current system date is obtained; for example, Figure 3 As shown, it is an example diagram of an association relationship between a pre-established natural date and the current system date and the next system date provided by an embodiment of the present invention, wherein NATURAL_DAY represents the natural date, NOW_SYS_DATE represents the current system date, and NXT_SYS_DATE represents the next system date. When the natural date is February 14, 2020 (2020 / 2 / 14), the current system date is February 1, 2025 (2025 / 2 / 1), and the next system date is February 2, 2025 (2025 / 2 / 2); when the natural date is February 15, 2020 (2020 / 2 / 15), the current system date is February 2, 2025 (2025 / 2 / 2), and the next system date is February 2, 2025 (2025 / 2 / 2). When the natural date is February 16, 2020 (2020 / 2 / 16), the current system date is February 2, 2025 (2025 / 2 / 2), and the next system date is February 3, 2025 (2025 / 2 / 3); when the natural date is February 17, 2020 (2020 / 2 / 17), the current system date is February 2, 2025 (2025 / 2 / 2), and the next system date is February 10, 2025 (2025 / 2 / 10); when the natural date is February 18, 2020 (2020 / 2 / 18), the current system date is February 3, 2025 (2025 / 2 / 3), and the next system date is February 20, 2025 (2025 / 2 / 20). Specifically, according to the current natural date, the current system date corresponding to the natural date that is consistent with the current natural date is obtained. For example, if the current natural date is February 14, 2020, the current system date obtained is February 1, 2025.
[0043] Here, the relationship between the natural date and the current system date and the next system date is set by the tester according to the requirements of the test scenario. Different test scenarios can set different relationships between the natural date and the current system date and the next system date. Figure 3 This is just a specific example.
[0044] B: Get the current system date based on the system operation table.
[0045] For the above S102 to S103, the bank system date cutting method described in the embodiment of the present invention is applied in a test environment; for the above S102, after obtaining the current system date, the system next date is obtained according to the current natural date and the pre-established association between the natural date and the system next date; for example, Figure 3 As shown, according to the current natural date, the system next date corresponding to the natural date consistent with the current natural date is obtained. For example, if the current natural date is February 14, 2020, the next system date obtained is February 2, 2025.
[0046] In this way, the next system date is determined according to the pre-established association between the natural date and the next system date. The determined next system date may be a date that is discontinuous with the current system date, such as Figure 3 When the current natural date is February 17, 2020, the current system date is determined to be February 2, 2025, and the next system date is February 10, 2025. This is more flexible than the prior art in which the banking system can only automatically determine the next system date as a date continuous with the current system date.
[0047] With respect to the above S103, after determining the next system date according to the association relationship between the pre-established natural date and the next system date, the current system date is modified to the next system date, so that even when the current system date and the next system date are not continuous, the bank system can automatically switch dates, and after the current date is modified to the next system date, the modified date is modified to the current natural date, indicating that the current date switching action is successfully executed.
[0048] In this way, testers can establish the association between natural dates and system dates according to actual test requirements, thereby covering more test scenarios corresponding to system dates.
[0049] In another embodiment of the present invention, when the day-cut method described in the embodiment of the present invention is applied in a production environment, for S101, when obtaining the current system date, the current system date is obtained according to the system operation table. After obtaining the current system date, the current natural date is determined to be the system next date, and then the current system date is modified to the system next date, that is, the current system date is modified to the current natural date, and the modified date is modified to the current natural date, indicating that the day-cut action is successfully executed.
[0050] In this way, the execution environment of the day-cutting method is determined by reading the value of the switch in the system configuration file, and then different methods for determining the system date are executed for different execution environments. That is, the day-cutting method provided by the embodiment of the present invention can perform day-cutting actions of different strategies according to different execution environments. In a test environment, automatic switching is achieved for discontinuous dates, and in a production environment, the day-cutting is performed according to the transformation sequence of the natural date. The application is flexible and has a wide range of applicability.
[0051] In another embodiment of the present invention, when the bank system is a distributed system, the day-cut method is executed by a node in the distributed system that obtains a distributed lock; here, the distributed system includes, for example: multiple nodes with the same configuration and capable of providing the same service. When the bank system performs day-cut, it only needs to ensure that the day-cut action is successfully executed once. If multiple nodes in the distributed system perform the day-cut action at the same time, it will cause an error in the day-cut result. Therefore, when performing day-cut, only one node is given a distributed lock, and the node that obtains the distributed lock performs the day-cut action: the system's previous date is modified to the current system date, and the current system date is modified to the system's next date; thereby ensuring that the day-cut action is executed once at the same time. Among them, the current system date is stored in the database and shared by each node in the distributed system.
[0052] The distributed locks herein include, for example, any of the following (a) to (c):
[0053] (a) Database-based distributed locks, such as pessimistic locks and optimistic locks.
[0054] (b) Cache-based distributed locks, such as: Redis-based distributed locks, Memcached-based distributed locks, and Tair-based distributed locks.
[0055] (c) Distributed lock based on Zookeeper.
[0056] Exemplarily, create a directory mylock; the banking system contains multiple nodes with the same configuration and can provide the same service, such as node a, node b, node c, etc.; if node a wants to obtain the lock, it creates a temporary sequence node 1 corresponding to node a in the mylock directory; node a obtains all temporary sequence nodes in the mylock directory, and then obtains a temporary sequence node with a sequence number smaller than that of temporary sequence node 1. If it does not exist, it means that the sequence number of temporary sequence node 1 is the smallest, and the lock is obtained; if there is a temporary sequence node with a sequence number smaller than that of temporary node 1 (such as temporary sequence node 2 corresponding to node b), monitor temporary sequence node 2; after node b processes and deletes the corresponding temporary sequence node 2, node a monitors this change event and continues to determine whether the sequence number of temporary sequence node 1 is the smallest, and if so, the lock is obtained.
[0057] In this way, when the bank system performs daily cutting, it only allocates a distributed lock to one node, and the node that obtains the distributed lock executes the daily cutting method described in the embodiment of the present invention, thereby ensuring that the bank system only performs the daily cutting action once at a preset time point, ensuring the accuracy of the daily cutting operation, and improving the universality of the daily cutting method.
[0058] The present invention also provides a daily cutting device for a bank system, as described in the following embodiments. Since the principle of the device to solve the problem is similar to the daily cutting method of the bank system, the implementation of the device can refer to the implementation of the daily cutting method of the bank system, and the repeated parts will not be repeated.
[0059] like Figure 4 FIG. 4 is a schematic diagram of a daily cutting device for a banking system provided by an embodiment of the present invention, comprising: an acquisition module 401, a first processing module 402, and a second processing module 403; wherein,
[0060] The acquisition module 401 is used to acquire the modification date, the current system date of the bank system, and the current natural date; wherein the modification date is the natural date when the bank system date is switched;
[0061] The first processing module 402 is used to obtain the system next date according to the current natural date and the pre-established association relationship between the natural date and the system next date when the modification date is inconsistent with the current natural date and the date cutting method is applied in the test environment;
[0062] The second processing module 403 is used to modify the current system date to the next system date, and modify the modification date to the current natural date.
[0063] In a possible implementation, the acquisition module is specifically configured to acquire the modification date, the current system date, and the current natural date according to the scheduled task.
[0064] In a possible implementation, the acquisition module is specifically configured to acquire the current system date according to the current natural date and a pre-established association relationship between the natural date and the current system date.
[0065] In a possible implementation, it also includes: a third processing module, used to read the value of the switch in the system configuration file, and when the value of the switch is a first preset value, it is determined that the daily switching method is applied in a test environment, and the switch represents that the current execution environment is a test environment or a production environment; when the value of the switch is a second preset value, it is determined that the daily switching method is applied in a production environment.
[0066] In a possible implementation, the second processing module is further used to modify the current system date to the current natural date and the modification date to the current natural date when the modification date is inconsistent with the current natural date and the date cutting method is applied in a production environment.
[0067] In a possible implementation, the banking system is a distributed system, and the daily cutting device is a node in the distributed system that obtains a distributed lock.
[0068] In a possible implementation, the second processing module is further used to determine whether the modification date is consistent with the current natural date at every preset time interval after reaching the preset time; when the modification date is consistent with the current natural date, stop day cutting and stop determining whether the modification date is consistent with the current date; when the modification date is inconsistent with the current natural date, continue to determine whether the modification date is consistent with the current natural date at every preset time interval.
[0069] Based on the above invention concept, Figure 5 As shown, the present invention also proposes a computer device 500, including a memory 510, a processor 520, and a computer program 530 stored in the memory 510 and executable on the processor 520, wherein the processor 520 implements the daily cutting method of the aforementioned banking system when executing the computer program 530.
[0070] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for executing the daily cutting method of the banking system.
[0071] The day-cutting method, device, computer equipment and storage medium of the banking system in the embodiment of the present invention are compared with the prior art in which the banking system cannot realize automatic switching for discontinuous dates. In order to ensure that the test environment can contain more test scenarios corresponding to dates, it is necessary to set discontinuous dates and perform manual switching. When the modified date is inconsistent with the current natural date and the day-cutting method is applied in the test environment, the system next date can be obtained according to the pre-established association relationship between the natural date and the system next date, and the current system date is modified to the system next date, so that the banking system can automatically cut the date when the date is discontinuous, thereby meeting the requirements of various test scenarios and improving the coverage of the test environment for the test scenarios.
[0072] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0073] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0074] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0075] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0076] The specific embodiments described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A daily cutting method for a banking system, characterized in that: include: Get the modification date, the current system date of the bank system, and the current natural date; the modification date is the natural date when the bank system is switched; When the modification date is inconsistent with the current natural date and the date-cutting method is applied in a test environment, the system next date is obtained according to the current natural date and the pre-established association relationship between the natural date and the system next date; Change the current system date to the next system date, and change the modification date to the current natural date; Among them, get the modification date, current system date, and current natural date, including: According to the scheduled task, obtain the modification date, current system date, and current natural date; The scheduled tasks include: Start a query program at a preset time point, and obtain the modification date, bank system date, and current calendar date through the query program; Also includes: When the modification date is inconsistent with the current natural date and the date switching method is applied in a production environment, the current system date is modified to the current natural date, and the modification date is modified to the current natural date.
2. The daily cutting method according to claim 1, characterized in that: Get the current system date, including: The current system date is obtained according to the current natural date and the pre-established association between the natural date and the current system date.
3. The daily cutting method according to claim 1, characterized in that: Also includes: Reading a switch value in a system configuration file, and when the switch value is a first preset value, determining that the daily switching method is applied in a test environment, and the switch represents that the current execution environment is a test environment or a production environment; When the value of the switch is the second preset value, it is determined that the daily switching method is applied in a production environment.
4. The daily cutting method according to any one of claims 1 to 3, characterized in that: The banking system is a distributed system, and the daily cutting method is executed by a node that obtains a distributed lock in the distributed system.
5. The daily cutting method according to any one of claims 1 to 3, characterized in that: Also includes: After reaching the preset time, determine whether the modified date is consistent with the current natural date at every preset time interval; When the modification date is consistent with the current natural date, stop the date switching and stop determining whether the modification date is consistent with the current date; When the modification date is inconsistent with the current natural date, whether the modification date is consistent with the current natural date is determined at every preset time interval.
6. A daily cutting device for a banking system, characterized in that: include: The acquisition module is used to acquire the modification date, the current system date of the bank system, and the current natural date; wherein the modification date is the natural date when the bank system date is cut; A first processing module is used to obtain the system next date according to the current natural date and the pre-established association relationship between the natural date and the system next date when the modification date is inconsistent with the current natural date and the date cutting method is applied in the test environment; The second processing module is used to modify the current system date to the next system date, and modify the modification date to the current natural date; The acquisition module is specifically used to acquire the modification date, the current system date, and the current natural date according to the scheduled task; The scheduled tasks include: Start a query program at a preset time point, and obtain the modification date, bank system date, and current calendar date through the query program; The second processing module is further used to modify the current system date to the current natural date and modify the modification date to the current natural date when the modification date is inconsistent with the current natural date and the date switching method is applied in a production environment.
7. The daily cutting device according to claim 6, characterized in that: The acquisition module is specifically used to acquire the current system date according to the current natural date and the pre-established association relationship between the natural date and the current system date.
8. The daily cutting device according to claim 6, characterized in that: Also includes: The third processing module is used to read the value of the switch in the system configuration file. When the value of the switch is a first preset value, it is determined that the daily switching method is applied in a test environment, and the switch represents that the current execution environment is a test environment or a production environment; when the value of the switch is a second preset value, it is determined that the daily switching method is applied in a production environment.
9. The daily cutting device according to any one of claims 6 to 8, characterized in that: The bank system is a distributed system, and the daily cutting device is a node in the distributed system that obtains a distributed lock.
10. The daily cutting device according to any one of claims 6 to 8, characterized in that: The second processing module is further used to determine whether the modified date is consistent with the current natural date at every preset time interval after reaching the preset time; When the modification date is consistent with the current natural date, stop the date switching and stop determining whether the modification date is consistent with the current date; When the modification date is inconsistent with the current natural date, whether the modification date is consistent with the current natural date is determined at every preset time interval.
11. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the daily cutting method of the banking system described in any one of claims 1 to 8 is implemented.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the daily cutting method of the banking system described in any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Method and device for adjusting system running time, computer equipment and storage medium
CN111078525A