Replay method, device, equipment and medium for fund settlement scenario
Through the combination of scene marking and playback components, the risk problem of computing logic modification in the financial computing system is solved, and accurate playback and accurate verification of the fund settlement scenario is achieved, reducing the time of the verification process.
Patent Information
- Application Number
- CN202111031177.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-03
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2041-09-03
AI Technical Summary
In financial-level large data computing systems, modification of calculation logic can easily lead to capital losses, and the existing technology is difficult to cover various computing logic scenarios evenly, resulting in a high risk of modification errors.
By obtaining the fund settlement request, calling the scene initialization interface to determine the target scene, perform calculations according to the calculation rules, and store the input parameters and results as calculation cases for scene marking. When replaying the requirements, select a case that meets the needs according to the marking to replay them. Compute to verify logic.
It realizes accurate replay of the fund settlement scenario, reduces the risk of calculation logic modification, improves the accuracy of verification results, and shortens the verification process.
Smart Images

Figure CN113706296B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to computer data processing technology, and in particular to a playback method, device, equipment and medium for a fund settlement scenario. Background Art
[0002] In the financial industry, there are many computing requirements in business scenarios, such as calculating repayment interest in loan business, and each computing requirement requires corresponding computing logic to process. In a financial-level large data computing system, every small change in computing logic may have a huge impact, especially in financial business, which may cause financial losses.
[0003] At present, the common practice in the industry is to collect a batch of calculation case data according to the established routing rules when the calculation system is running normally, save the request parameters and calculation results of the calculation case, and store them in the case library. After modifying a certain calculation logic of the system, the collected calculation cases are recalculated in batches using the new calculation logic. The results of the unmodified calculation cases calculated by the new calculation logic must be completely consistent with the results of the old calculation logic, indicating that the new calculation logic modification is correct and safe, thereby controlling the modification risk of the calculation logic.
[0004] However, the collected calculation cases are difficult to evenly cover the scenarios corresponding to various calculation logics. The calculation logic of some unpopular business scenarios has not been effectively replayed, resulting in a high risk of calculation logic modification errors. Summary of the invention
[0005] The embodiments of the present invention provide a method, device, equipment and medium for replaying a fund settlement scenario, so as to accurately control the replay of the fund settlement scenario and improve the security of risk control.
[0006] In a first aspect, an embodiment of the present invention provides a replay method for a fund settlement scenario, comprising:
[0007] Get fund settlement request;
[0008] Calling a scenario initialization interface, and determining a target scenario corresponding to the funds settlement request from among multiple scenarios listed in the scenario initialization interface according to input parameters specified in the funds settlement request;
[0009] Calculating the funds settlement based on the input parameters in the funds settlement request according to the calculation rules of the target scenario;
[0010] Taking the input parameters and calculation results of the fund settlement request as calculation cases, and using the target scenario to mark the calculation cases, and storing the calculation case library;
[0011] When a replay demand is generated, determining at least one to-be-replayed scene that needs to be replayed according to the scene demand;
[0012] According to the scenario to be replayed, a computing case that meets the requirements of the scenario to be replayed is selected from a computing case library according to the scenario tag;
[0013] The replay component is used to replay the calculation case to verify the calculation logic.
[0014] In a second aspect, an embodiment of the present invention further provides a playback device for a fund settlement scenario, the device comprising:
[0015] A settlement request acquisition module is used to obtain fund settlement requests;
[0016] A scenario initialization module, used to call a scenario initialization interface, and determine a target scenario corresponding to the fund settlement request from among multiple scenarios listed in the scenario initialization interface according to input parameters specified in the fund settlement request;
[0017] A fund settlement module, configured to calculate fund settlement based on the input parameters in the fund settlement request according to the calculation rules of the target scenario;
[0018] A scenario marking module, used to use the input parameters and calculation results of the fund settlement request as calculation cases, and use the target scenario to mark the calculation cases, and store the calculation case library;
[0019] A scene replay module, used to determine at least one to-be-replayed scene to be replayed according to the scene requirement when a replay requirement is generated;
[0020] A case selection module, used to select a computing case that meets the requirements of the scenario to be replayed from a computing case library according to the scenario to be replayed and according to the scenario tag;
[0021] The logic verification module is used to use a replay component to replay the calculation case to verify the calculation logic.
[0022] In a third aspect, an embodiment of the present invention further provides a playback device for a fund settlement scenario, the device comprising:
[0023] one or more processors;
[0024] A storage device for storing one or more programs;
[0025] When the one or more programs are executed by the one or more processors, the one or more processors implement the replay method of the funds settlement scenario provided by the embodiment of the present invention.
[0026] In a fourth aspect, an embodiment of the present invention further provides a replay medium for a funds settlement scenario, on which a computer program is stored, wherein the program, when executed by a processor, implements a replay method for a funds settlement scenario provided by an embodiment of the present invention.
[0027] The embodiment of the present invention provides a replay method, device, equipment and medium for a fund settlement scenario. The method calls the input parameters of the fund settlement request by calling the scenario initialization interface, obtains the calculation results according to the input parameters and the calculation rules of the target scenario corresponding to the fund settlement request, and saves the input parameters and the calculation results as cases under the target scenario to the case library. While collecting cases, the input parameters corresponding to the cases are analyzed, mapped to the target scenarios corresponding to the cases through the case input parameters, and the target scenarios are marked. Thus, when verifying the scenario calculation logic, cases can be obtained in a targeted manner according to the scenario tags, without blindly obtaining a sufficient number of cases from the case library for replay without distinguishing between scenarios. The embodiment of the present invention uses the above technical solution to clearly define the scenarios covered by the replayed cases, realizes the clear perception of the coverage of each scenario case, and the cases can find the corresponding calculation rules through the scenario tags during the replay verification process, so that the replay verification results are more accurate. The problem that the verification results generated when replaying and verifying the cases after modifying the collection of fund settlement scenario cases is inaccurate and the collection routing logic needs to be modified or the time for saving data in the case pool is increased, resulting in a greatly lengthened verification process is solved. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 A flowchart of a replay method for a fund settlement scenario provided in Embodiment 1 of the present invention;
[0029] Figure 2 A flow chart of a calculation method for an interface bill calculation scenario provided in Embodiment 1 of the present invention;
[0030] Figure 3 A flowchart of the replay calculation operation in the replay method of the fund settlement scenario provided in the second embodiment of the present invention;
[0031] Figure 4 A flowchart of target scenario collection corresponding to a fund settlement request calculation case provided in Embodiment 3 of the present invention;
[0032] Figure 5 This is a structural block diagram of a fund settlement scene playback device provided in Embodiment 4 of the present invention;
[0033] Figure 6 A schematic diagram of the structure of a playback device for a fund settlement scenario provided in Embodiment 5 of the present invention. DETAILED DESCRIPTION
[0034] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0035] Example 1
[0036] Figure 1 The flowchart of a method for replaying a fund settlement scenario provided in the first embodiment of the present invention is applicable to the case of effectively collecting cases of fund settlement scenarios and replaying the cases. It is mainly used to determine the target scenario of fund settlement according to the input parameters in the fund settlement request, and calculate the fund settlement for the input parameters in the fund settlement request according to the calculation rules under the target scenario, and store the input parameters and calculation results as cases under the target scenario in the case library; when the replay verification requirement is generated, the key parameters in the case input parameters are mapped to the scenario tags, the calculation rules of the target scenario are found according to the scenario tags, and the input parameters in the case are replayed and calculated according to the calculation rules to verify the calculation logic. However, the application scenario is not limited to this. The method can be executed by a replay device for the fund settlement scenario, and the replay device for the fund settlement scenario can be implemented by software and / or hardware. The replay device for the fund settlement scenario can be configured on a computing device, such as a server of a financial system or a terminal device of a financial system, and specifically includes the following steps:
[0037] S110: Obtain fund settlement request.
[0038] Specifically, the fund settlement request may be obtained through a component in a server of the financial system.
[0039] Among them, the server of the financial system can provide users with financial network services such as loans and repayments. Users can generally access the services provided by the server through clients, web pages or other methods. There are various fund settlement needs in financial services. Fund settlement refers to the monetary collection and payment behavior caused by economic transactions such as commodity transactions and labor services between units or individuals. Fund settlement requests can be service requests provided by banks to users based on the user's cash flow, including account management, down payment settlement and fund flow settlement. In different financial business scenarios, there will be various fund settlement needs, which are initiated by users or automatically initiated by the system.
[0040] S120, calling a scenario initialization interface, and determining a target scenario corresponding to the funds settlement request from among multiple scenarios listed in the scenario initialization interface according to input parameters specified in the funds settlement request;
[0041] The scenario includes various target scenarios corresponding to the fund settlement request, such as a repayment scenario, a loan scenario, or an interface bill calculation scenario, etc., which are not limited in the embodiment of the present invention. The server is pre-set with a scenario initialization interface for initializing and declaring various scenarios, and the scenarios can be continuously updated in the scenario initialization interface as the business develops. Preferably, all scenarios can be declared and listed.
[0042] Among them, the input parameters are key parameters in the fund settlement process, which can be used to determine which settlement strategy to use, calculation rules, and parameters used in the settlement process. For example, in the fund settlement of repayment and / or loan, the input parameters may include repayment and / or loan related information, such as repayment and / or loan interest rate, repayment and / or loan principal, repayment and / or loan time, or repayment and / or loan amount, etc. In different business scenarios and fund settlement requests, the input parameters may be different, and the embodiments of the present invention do not limit this.
[0043] Among them, the scene initialization interface is called to record various scenarios. The interface function can be implemented through code or algorithm. The scene initialization interface can determine which target scene to input into the current fund settlement request from all scenarios based on input parameters.
[0044] S130, performing fund settlement calculation based on the input parameters in the fund settlement request according to the calculation rule of the target scenario;
[0045] It should be noted that the fund settlement request in this embodiment is a calculation case under the target scenario.
[0046] Specifically, each target scenario has its corresponding calculation rules. If there are multiple business channels in the scenario, each channel will correspond to the same or different calculation rules. After obtaining the input parameters in the fund settlement request through the scenario initialization interface, the calculation rules of the target scenario can be further obtained according to the input parameters. Then, the server can calculate the fund settlement for the input parameters in the fund settlement request based on the calculation rules and obtain the calculation results of the fund settlement.
[0047] Specifically, the above operations may include:
[0048] Calling information parameters of the target scenario through a service system, wherein the information parameters include data of the interface bill calculation scenario;
[0049] The service system may be a financial service system, and the target scenario may be: an interface bill calculation scenario, an interface bill loan scenario, and an interface bill settlement interest scenario. For example, the data of the interface bill calculation scenario may be: loan amount, loan time, interest rate, and repayment time, etc.
[0050] By adding the configuration of the target scene to the service system, a calculation rule of the target scene is added to the service system; wherein each target scene corresponds to a calculation rule, and a scene tag is set for each target scene where the calculation rule is located;
[0051] Among them, adding the configuration of the target scene to the service system can be implemented by code, and adding the calculation rules of the target scene in the service system can be implemented by an algorithm. For example, the above algorithm can be an independent component analysis algorithm. Set an ID for each target scene as the scene tag of the target scene, each ID can be mapped to one or more information parameters, and the information parameters that can be mapped are used as key parameters; and each key parameter can only be mapped to the ID of one target scene.
[0052] If there is a key parameter in the input parameters that hits the scene mark of the target scene, funds settlement is performed on the input parameters in the funds settlement request according to the calculation rules corresponding to the target scene.
[0053] Exemplarily, the scenario tag ID of the interface bill calculation scenario can be mapped to the information parameter of repayment time. The calculation rules of the interface bill calculation scenarios corresponding to different repayment times are different. In this embodiment, the scenario tag ID of the interface bill calculation scenario can be mapped to the repayment time, and the repayment time is the key parameter. The repayment time parameter exists in the input parameters of the funds settlement request, and the repayment time is 2022. The repayment time of 2022 in the input parameters can be mapped to the scenario tag ID with a repayment time of 2022, and the calculation rules of the funds settlement request with a repayment time of 2022 in the target scenario are obtained through the scene tag. Through the above calculation rules, funds are settled for the input parameters in the funds settlement request.
[0054] S140, using the input parameters and calculation results of the fund settlement request as calculation cases, and using the target scenario to mark the calculation cases, and storing the calculation case library;
[0055] Among them, the calculation result of the funds settlement is obtained through the input parameters in the funds settlement request and the calculation rules of the target scenario, and then the input parameters and calculation results of the funds settlement request are used as calculation cases. The input parameters of the funds settlement request and the initialization channels of the input parameters are compared with the listed initialization channels to determine the target scenario corresponding to the funds settlement request, and the target scenario is stored in the scene list in the server.
[0056] The above calculation cases can be marked according to the target scenario, and the calculation case can be marked as an implementation case under the target scenario. The scenario marking method can add corresponding tags to the calculation case, or the cases of different scenarios can be stored in different areas of the case library to distinguish the scenarios.
[0057] Preferably, after obtaining the calculation result of the funds settlement, it is further determined whether the case status under the target scenario corresponding to the funds settlement request is not collected. If so, the corresponding channel and corresponding scenario of the funds settlement request case are updated to collected, and the replayed case is saved in the case library.
[0058] After obtaining the case under the target scenario, if the case has not been collected under the target scenario, the above-mentioned fund settlement request calculation case is saved in the calculation case library, and the corresponding channel of the fund settlement request case is updated to the target scenario as collected. Among them, the calculation case library can be a database, and the calculation case library stores the cases to be replayed. Of course, if the case status under the target scenario corresponding to the fund settlement request is collected, it is not necessary to repeatedly collect the cases under this scenario. Usually, a set number of cases for each scenario can be collected.
[0059] For example, take an interface bill calculation scenario as an example. Figure 2 As shown, service A needs to call the expectCalc interface of the settlement system to calculate the expected repayment order data. The expected repayment order data is used as the fund settlement request of this case, that is, settlement service B, and its input parameters include principal, interest rate, loan date and repayment time. The above interface bill calculation scenario was planned in the production environment for the first time, and the expected repayment order data input parameters hit the case collection rules of the interface bill calculation scenario, that is, the interface bill calculation scenario has its corresponding initialization channel and initialization calculation rules, and the expected repayment order data input parameters hit the initialization channel corresponding to the interface bill calculation scenario. The calculation rules of the interface bill calculation scenario are obtained according to the input parameters, and the calculation results of the interface bill calculation scenario are obtained. The loan date is selected as the request parameter to mark the case and the target scenario, and the expected repayment order data input parameters and calculation results are put into the calculation case library.
[0060] S150, when a playback demand is generated, determining at least one to-be-played scene that needs to be played back according to the scene demand;
[0061] Exemplarily, the cases that meet the replay requirements are stored in the calculation case library. Figure 2 Taking the interface bill calculation scenario shown as an example, the replay requirement may be due to the subsequent modification of the calculation rules of the interface bill calculation, and the interface bill calculation case in the calculation case library is used to verify whether the case can hit the new calculation rules. The scenario requirement at this time is the interface bill calculation scenario.
[0062] S160, according to the scene to be replayed, selecting a computing case that meets the requirements of the scene to be replayed from the computing case library according to the scene tag;
[0063] Specifically, determine the target scenario of the funds settlement request to be replayed, the target scenario corresponds to a case to be replayed, obtain the input parameters and calculation results of the case to be replayed from the calculation case library; hit the scene mark through the request parameters of the case to be replayed, select the calculation scene that meets the requirements of the case to be replayed according to the scene mark, and obtain the calculation rules under the scenario.
[0064] For example, Figure 2 Taking the interface bill calculation scenario shown as an example, the calculation rules of the interface bill calculation were subsequently modified. When replaying and verifying the cases in the calculation case library, the input parameters and calculation results of the calculation cases of the interface bill calculation scenario were obtained from the case library. The input parameters of the calculation case may include principal, interest rate, loan date and repayment time. The loan date may be set as a request parameter in the server, and the request parameters and calculation results of the case may be put into a message queue. The calculation may be replayed according to the calculation rules before the modification through the key parameters in the message queue.
[0065] Specifically, the request parameters in the message queue hit the scene tag parameters of the target scene. According to the scene tag, the scene tag may be the loan date, and the calculation rule of the scene under the time state of the loan date is selected for case replay calculation.
[0066] S170. Use a replay component to replay the calculation case to verify the calculation logic.
[0067] The replay component may be a component in a server, and the replay component may implement a function of replaying calculations on cases to be replayed in a calculation case library, and the function may be implemented by software or hardware.
[0068] Specifically, according to the calculation rules of the target scenario of the fund settlement request, the calculation result of the replay verification is calculated through the input parameters of the case to be replayed; the calculation result of the replay verification is compared with the expected result. If the calculation result is consistent with the expected result, the calculation logic is correct. Among them, the expected result is the case calculation result stored in the calculation case library before the case is replayed and verified.
[0069] For example, Figure 2Taking the interface bill calculation scenario shown as an example, when performing case replay verification, select the calculation rule that meets the requirements of the case to be replayed through the request parameters and scenario tags, input the case parameters of the interface bill calculation scenario into the selected calculation rule for calculation, and obtain the calculation result under the replayed case. Compare the calculation result under the replayed case with the expected result. If the calculation result is consistent with the expected result, the verification result is that the calculation logic is correct.
[0070] Based on the above technical solution, the case replay calculation can preferably use a replay component to replay the calculation case. The replay component is used to analyze at least one calculation service required to be called by the calculation case; for the input parameters in the calculation case, the calculation service is generalized and called, the calculation case is replayed, and the calculation result is obtained.
[0071] The advantage of setting up case replay calculation in this way is that after the calculation rules are modified, when the calculation cases in the database are replayed for verification, the calculation rules of the cases can be hit through the request parameters of the cases, the calculation service can be generalized, and the case replay calculation results can be obtained through the calculation rules, thus shortening the entire replay verification process.
[0072] This embodiment provides a replay method for a fund settlement scenario, which calls the input parameters of the fund settlement request by calling the scenario initialization interface, obtains the calculation results according to the input parameters and the calculation rules of the target scenario corresponding to the fund settlement request, and saves the input parameters and the calculation results as cases under the target scenario to the case library. And while collecting cases, the input parameters corresponding to the cases are analyzed, mapped to the target scenarios corresponding to the cases through the case input parameters, and the target scenarios are marked. Thus, when verifying the scenario calculation logic, cases can be obtained in a targeted manner according to the scenario tags, without blindly obtaining a sufficient number of cases from the case library for replay without distinguishing between scenarios. The embodiment of the present invention utilizes the above technical solution to clearly define the scenarios covered by the replayed cases, realizes the clear perception of the coverage of each scenario case, and the cases can find the corresponding calculation rules through the scenario tags during the replay verification process, so that the replay verification results are more accurate. It solves the problem that after modifying the case collection rules for fund settlement scenarios, the verification results generated when replaying the cases are inaccurate, and the need to modify the collection routing logic or increase the time for saving data in the case pool leads to a significant lengthening of the verification process.
[0073] Embodiment 2
[0074] Figure 3 This is a flowchart of the replay calculation operation in the replay method of the fund settlement scenario provided in the second embodiment of the present invention. The technical solution of this embodiment is further refined on the basis of the above technical solution. Specifically, Figure 3As shown, this embodiment uses a replay component to replay the calculation case to verify the calculation logic.
[0075] Optional, such as Figure 3 As shown, the replay method of the fund settlement scenario provided in this embodiment may include the following steps:
[0076] S210, using a replay component to replay the calculation case to obtain a calculation result;
[0077] Specifically, the replay component can be implemented by software or hardware, obtains at least one calculation case to be replayed in a fund settlement scenario from the case library, obtains the details of the service corresponding to the calculation case requirement that need to be executed, and the details to be executed include the input parameters and original calculation results of the replay case stored in the case library, and the corresponding calculation rules, and defines the original calculation result of the replay calculation case as the expected result;
[0078] Analyze the calculation case to be replayed, obtain the input parameters and original calculation results of the calculation case to be replayed; hit the scenario tag through the request parameters of the case to be replayed, select the fund settlement scenario that meets the requirements of the case to be replayed according to the scenario tag, and obtain the calculation rules under the scenario; according to the calculation rules under the scenario, obtain the calculation results under replay verification through the input parameters of the case to be replayed.
[0079] S220, comparing the calculation result with the existing calculation result in the calculation case; if the comparison is consistent, the replay state of the update case is consistent; if the comparison is inconsistent, the replay state of the update case is inconsistent;
[0080] Specifically, the calculation result under replay verification is compared with the expected result. If the calculation result is consistent with the expected result, the replay status of the updated case is consistent. If the calculation result is inconsistent with the expected result, the replay status of the updated case is inconsistent. If the replay status of the case is inconsistent, the replay status of the case can be updated. For example, other input parameters in the replay calculation case can be selected as request parameters and then replay verification can be performed until the replay status is consistent and the replay status of the updated case is consistent.
[0081] Specifically, if the calculation result under the replay verification is inconsistent with the expected result, the method further includes:
[0082] Determine whether the configuration of the computing service is correct;
[0083] Among them, the configuration of the computing service may be inaccurate selection of request parameters.
[0084] Alerts are issued on the correctness of the calculation logic based on whether the calculation results can be obtained, whether the calculation results are consistent, and whether the configuration is correct.
[0085] S230, verifying the calculation logic based on whether the calculation results are consistent.
[0086] Specifically, if the calculation result is consistent with the expected result, the calculation logic is verified to be correct.
[0087] The technical solution of this embodiment is to replay the calculation case through the replay component. If the key parameters in the replay case hit the calculation rules of the scenario corresponding to the replay case, the case can be replayed according to the calculation rules, and while the case is being replayed, it is verified whether the calculation logic is wrong or the configuration of the calculation service is wrong, which solves the problem of consuming a lot of time in replaying a large number of cases and achieves the effect of shortening the verification process.
[0088] Embodiment 3
[0089] Figure 4 A flowchart of collecting target scenarios corresponding to a fund settlement request calculation case provided in the third embodiment of the present invention. The technical solution of this embodiment is further refined on the basis of the above technical solution, that is, after determining the target scenario corresponding to the fund settlement request, various scenarios are further collected. Specifically, Figure 4 As shown, this embodiment provides a detailed explanation of the collection process for executing the fund settlement scenario.
[0090] Optional, such as Figure 4 As shown, the replay method of the fund settlement scenario provided in this embodiment may include the following steps:
[0091] S310, determining a corresponding channel according to input parameters of the fund settlement request; wherein the channels are classified according to the settlement requirements of the fund settlement party;
[0092] The input parameters of the fund settlement request include repayment and / or loan related information, such as repayment and / or loan interest rate, repayment and / or loan principal, repayment and / or loan time, or repayment and / or loan amount, etc., which are not limited in the embodiment of the present invention. The corresponding channel is the input parameter full amount initialization channel, each initialization channel corresponds to a target scenario, and a target scenario can correspond to multiple initialization channels.
[0093] The channels are classified according to the settlement requirements of the fund settlement party, that is, the initialization channels corresponding to the same fund settlement target scenario can be classified into one category, that is, the channels with the same settlement requirements can be classified into one category. By classifying the channels, the parameter initialization calculation rules of all target scenarios are enumerated.
[0094] Specifically, after enumerating the target scenarios corresponding to the funds settlement, the server obtains the funds settlement calculation case and analyzes the input parameters in the calculation case; if the input parameters in the calculation case hit the case collection rules, there is a target scenario corresponding to the calculation case, and the calculation case is classified as the corresponding target scenario.
[0095] Among them, by analyzing the input parameters in the fund settlement calculation case, the initialization channel is obtained according to the input parameters. If there is an initialization channel that fully initializes the input parameters, the input parameters in the calculation case hit the case collection rule, and there is a target scenario corresponding to the calculation case. The target scenario is obtained through the initialization channel, and the calculation case is classified into the corresponding target scenario.
[0096] S320. According to the determined one or more channels, enumerate all corresponding scenes to determine whether the target scene is within the scope of all scenes; if yes, confirm the target scene; if not, issue an alarm.
[0097] Specifically, according to the classification of the initialization channel, all the target scenarios of fund settlement are enumerated, and the target scenarios are saved in the scenario list in the server. After the server obtains the fund settlement request to be executed, the scenario initialization interface in the server obtains the input parameters specified in the fund settlement request, and lists the initialization calculation rules according to the input parameters. Each calculation rule corresponds to an initialization channel. If there is a channel that initializes all the input parameters, the fund settlement request has a corresponding target scenario, and it is confirmed that the target scenario has been collected; if there is no channel that initializes all the input parameters, the server alerts the party requesting the fund settlement.
[0098] Furthermore, by analyzing the input parameters in the fund settlement calculation case, it is determined whether the target scenario already exists in the calculation case library.
[0099] Specifically, through the pre-operation, the parameters of all scenarios are initialized, and the initialization channels of all scenarios are obtained. Each initialization channel corresponds to a scenario. After obtaining the fund settlement request to be executed, the initialization channel is selected by analyzing the input parameters in the fund settlement request, and the target scenario corresponding to the fund settlement request is obtained through the initialization channel. If there is a target scenario corresponding to the fund settlement request case, the collection of the calculation case is abandoned; if there is no target scenario corresponding to the fund settlement request case, the operation of calculating the fund settlement based on the calculation rules of the target scenario and the input parameters in the fund settlement request is continued, and the collection status of the target scenario calculation case is updated to collected.
[0100] Specifically, a new initialization channel is specified according to the input parameters of the fund settlement request, and the new initialization channel is input into the scene initialization interface of the server, and the fund settlement request is listed as a new scene and saved in the scene list of the server.
[0101] The technical solution of this embodiment analyzes the input parameters of the fund settlement request, lists the initialization calculation rules according to the input parameters, each calculation rule corresponds to an initialization channel, and each initialization channel corresponds to a target scenario. The fund settlement scenarios are enumerated by initializing the input parameters. When performing replay verification, the missing scenarios can be clearly perceived according to the input parameters of the calculation case. This solves the problem that there are a large number of data cases but cannot cover all business scenarios and cannot perceive the risks of missing scenarios. It realizes the flexible initialization of all scenarios that need to be replayed, and covers the most scenarios with the least data.
[0102] Embodiment 4
[0103] Figure 5 A structural block diagram of a fund settlement scene replay device provided in Embodiment 4 of the present invention, wherein the device can execute a fund settlement scene replay method provided in any embodiment of the present invention, such as Figure 5 As shown, the device includes: a settlement request acquisition module 510, a scene initialization module 520, a fund settlement module 530, a scene marking module 540, a scene replay module 550, a case selection module 560 and a logic verification module 570.
[0104] Among them, the settlement request acquisition module 510 is used to obtain a funds settlement request; the scenario initialization module 520 is used to call the scenario initialization interface, and determine the target scenario corresponding to the funds settlement request from the multiple scenarios listed in the scenario initialization interface according to the input parameters specified in the funds settlement request; the funds settlement module 530 is used to perform funds settlement calculations based on the input parameters in the funds settlement request according to the calculation rules of the target scenario; the scenario marking module 540 is used to use the input parameters and calculation results of the funds settlement request as calculation cases, and use the target scenario to mark the calculation cases, and store the calculation case library; the scene replay module 550 is used to determine at least one to-be-replayed scenario to be replayed according to the scenario requirements when a replay requirement is generated; the case selection module 560 is used to select a calculation case that meets the requirements of the to-be-replayed scenario from the calculation case library according to the scene mark according to the to-be-replayed scenario; the logic verification module 570 is used to use the replay component to replay the calculation case to verify the calculation logic.
[0105] The technical solution provided in this embodiment flexibly initializes all the scenes that need to be replayed, builds a complete scene list according to the rules of the corresponding channel, and while collecting cases, analyzes the input parameters corresponding to the cases, maps the case input parameters to the target scenes corresponding to the cases, and marks the target scenes. It achieves the purpose of covering the most scenes with the least data, clearly perceives the case coverage of each scene, and shortens the case replay time. It solves the problem that the collection of a large number of cases in the context of massive requests and calculations will bring great pressure to consumers, and the replay of a large number of cases consumes a lot of time, resulting in a greatly lengthened verification process.
[0106] Furthermore, the scene initialization module 520 may be specifically used for:
[0107] Determine the corresponding channel according to the input parameters of the fund settlement request; wherein the channels are classified according to the settlement requirements of the fund settlement party; enumerate all corresponding scenarios according to the determined one or more channels, and determine whether the target scenario is within the scope of all scenarios; if yes, confirm the target scenario, if not, issue an alarm.
[0108] Furthermore, the above-mentioned scene initialization module 520 can also be specifically used for:
[0109] Determine whether the target scenario already exists in the calculation case library. If so, abandon the collection of the target scenario; if not, continue to execute the operation of calculating the funds settlement based on the calculation rules of the target scenario and the input parameters in the funds settlement request, and update the collection status of the target scenario calculation case to collected.
[0110] Furthermore, the fund settlement module 530 can be specifically used for:
[0111] Calling information parameters of the target scenario through a service system, wherein the information parameters include data of the interface bill calculation scenario;
[0112] By adding the configuration of the target scene to the service system, a calculation rule of the target scene is added to the service system; wherein each target scene corresponds to a calculation rule, and a scene tag is set for each target scene where the calculation rule is located;
[0113] If there is a key parameter in the input parameters that hits the scene mark of the target scene, funds settlement is performed on the input parameters in the funds settlement request according to the calculation rules corresponding to the target scene.
[0114] Furthermore, the logic verification module 570 may be specifically used for:
[0115] The replay component is used to analyze at least one computing service required to be called by the computing case; for the parameters in the computing case, the computing service is generalized and called, the computing case is replayed and calculated, and a calculation result is obtained.
[0116] Furthermore, the above logic verification module 570 may also be specifically used for:
[0117] A replay component is used to replay the calculation case to obtain a calculation result; the calculation result is compared with the existing calculation result in the calculation case; if the comparison is consistent, the replay state of the more detailed case is consistent; if the comparison is inconsistent, the replay state of the more detailed case is consistent; and the calculation logic is verified based on whether the calculation result comparison is consistent.
[0118] Wherein, if the comparison is inconsistent, the method further comprises:
[0119] Determine whether the configuration of the computing service is correct; issue an alarm on the correctness of the computing logic based on whether the computing results can be obtained, whether the computing results are consistent, and whether the configuration is correct.
[0120] The fund settlement scene replay device provided in this embodiment can be applied to the fund settlement scene replay method provided in any of the above embodiments, and has corresponding functions and beneficial effects.
[0121] Embodiment 5
[0122] Figure 6 A schematic diagram of the structure of a playback device for a fund settlement scenario provided in Embodiment 5 of the present invention, such as Figure 6 As shown, the device includes a processor 60, a memory 61, an input device 62 and an output device 63; the number of processors 60 in the device can be one or more. Figure 6 A processor 60 is taken as an example; the processor 60, the memory 61, the input device 62 and the output device 63 in the device can be connected by a bus or other means. Figure 6 The example of connecting through bus is taken in the following.
[0123] The memory 61 is a computer-readable storage medium that can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the fund settlement scenario replay method in the embodiment of the present invention. The processor 60 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory 61, that is, realizing the above-mentioned fund settlement scenario replay method.
[0124] The memory 61 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the terminal, etc. In addition, the memory 61 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 61 may further include a memory remotely arranged relative to the processor 60, and these remote memories may be connected to the device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0125] The input device 62 may be used to receive input fund settlement request information and generate fund settlement request service parameter input related to user settings and function control of the device. The output device 63 may include a display device such as a display screen.
[0126] Embodiment 6
[0127] Embodiment 6 of the present invention further provides a storage medium comprising computer executable instructions, wherein the computer executable instructions are used to execute a method for replaying a funds settlement scenario when executed by a computer processor, the method comprising:
[0128] Get fund settlement request;
[0129] Calling a scenario initialization interface, and determining a target scenario corresponding to the funds settlement request from among multiple scenarios listed in the scenario initialization interface according to input parameters specified in the funds settlement request;
[0130] Calculating the funds settlement based on the input parameters in the funds settlement request according to the calculation rules of the target scenario;
[0131] Taking the input parameters and calculation results of the fund settlement request as calculation cases, and using the target scenario to mark the calculation cases, and storing the calculation case library;
[0132] When a replay demand is generated, determining at least one to-be-replayed scene that needs to be replayed according to the scene demand;
[0133] According to the scenario to be replayed, a computing case that meets the requirements of the scenario to be replayed is selected from a computing case library according to the scenario tag;
[0134] Of course, the computer executable instructions of the storage medium provided in the embodiment of the present invention are not limited to the method operations described above, but can also perform related operations in the replay method of the fund settlement scenario provided in any embodiment of the present invention.
[0135] Through the above description of the implementation methods, the technicians in the relevant field can clearly understand that the present invention can be implemented by means of software and necessary general hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.
[0136] It is worth noting that in the embodiment of the above-mentioned search device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0137] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A replay method for a fund settlement scenario, characterized in that: include: Get fund settlement request; Calling a scenario initialization interface, and determining a target scenario corresponding to the funds settlement request from among multiple scenarios listed in the scenario initialization interface according to input parameters specified in the funds settlement request; Calculating the funds settlement based on the input parameters in the funds settlement request according to the calculation rules of the target scenario; The input parameters and calculation results of the fund settlement request are used as calculation cases, and the calculation cases are marked with the target scenario, and a calculation case library is stored; When a replay demand is generated, at least one to-be-replayed scene that needs to be replayed is determined according to the scene demand; According to the scenario to be replayed, a computing case that meets the requirements of the scenario to be replayed is selected from a computing case library according to the scenario tag; Replay the calculation case using a replay component to verify the calculation logic; Wherein, according to the calculation rule of the target scenario, the calculation of the fund settlement is performed based on the input parameters in the fund settlement request, including: Calling information parameters of the target scenario through a service system, wherein the information parameters include data of an interface bill calculation scenario; By adding the configuration of the target scene to the service system, a calculation rule of the target scene is added to the service system; wherein each target scene corresponds to a calculation rule, and a scene tag is set for each target scene where the calculation rule is located; If there is a key parameter in the input parameters that hits the scene mark of the target scene, funds settlement is performed on the input parameters in the funds settlement request according to the calculation rules corresponding to the target scene.
2. The method according to claim 1, characterized in that The replay component is used to replay the calculation case, including: Using the replay component to analyze at least one computing service required to be called by the computing case; For the parameters in the calculation case, the calculation service is generalized and the calculation case is replayed to obtain the calculation result.
3. The method according to claim 1, characterized in that The replay component is used to replay the calculation case to verify the calculation logic including: Replay the calculation case using a replay component to obtain a calculation result; Comparing the calculation result with the existing calculation result in the calculation case; If the comparison is consistent, the replay status of the updated case is consistent; If the comparison is inconsistent, the replay status of the update case is inconsistent; Verify the calculation logic by comparing the calculation results to see if they are consistent.
4. The method according to claim 3, characterized in that If the alignment is inconsistent, the method further comprises: Determine whether the configuration of the computing service is correct; Alerts are issued on the correctness of the calculation logic based on whether the calculation results can be obtained, whether the calculation results are consistent, and whether the configuration is correct.
5. The method according to claim 1, characterized in that After determining the target scenario corresponding to the fund settlement request, the method further includes: Determining the corresponding channel according to the input parameters of the fund settlement request; wherein the channels are classified according to the settlement requirements of the fund settlement party; According to the determined one or more channels, all corresponding scenes are enumerated to determine whether the target scene is within the scope of all scenes; If yes, the target scene is confirmed; if no, an alarm is issued.
6. The method according to claim 1, characterized in that After determining the target scenario corresponding to the fund settlement request, the method further includes: Determine whether the target scene already exists in the calculation case library, and if so, give up collecting the target scene; If not, continue to execute the operation of calculating the fund settlement according to the calculation rules of the target scenario and based on the input parameters in the fund settlement request, and update the collection status of the target scenario calculation case to collected.
7. A playback device for a fund settlement scenario, characterized in that: include: A settlement request acquisition module is used to obtain fund settlement requests; A scenario initialization module, used to call a scenario initialization interface, and determine a target scenario corresponding to the fund settlement request from among multiple scenarios listed in the scenario initialization interface according to input parameters specified in the fund settlement request; A fund settlement module, configured to calculate fund settlement based on the input parameters in the fund settlement request according to the calculation rules of the target scenario; A scenario marking module, used to use the input parameters and calculation results of the fund settlement request as calculation cases, and use the target scenario to mark the calculation cases, and store the calculation case library; A scene replay module, used to determine at least one to-be-replayed scene to be replayed according to the scene requirement when a replay requirement is generated; A case selection module, used to select a computing case that meets the requirements of the scenario to be replayed from a computing case library according to the scenario to be replayed and according to the scenario tag; A logic verification module, used to use a replay component to replay the calculation case to verify the calculation logic; Among them, the fund settlement module is specifically used for: Calling information parameters of the target scenario through a service system, wherein the information parameters include data of an interface bill calculation scenario; By adding the configuration of the target scene to the service system, a calculation rule of the target scene is added to the service system; wherein each target scene corresponds to a calculation rule, and a scene tag is set for each target scene where the calculation rule is located; If there is a key parameter in the input parameters that hits the scene mark of the target scene, funds settlement is performed on the input parameters in the funds settlement request according to the calculation rules corresponding to the target scene.
8. A playback device for a fund settlement scenario, characterized in that: The device comprises: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the replay method of the fund settlement scenario as described in any one of claims 1-6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, a replay method for a fund settlement scenario as described in any one of claims 1-6 is implemented.
