Risk control service switching method and device, equipment, storage medium and program product
By receiving the risk control service request from the service caller and determining the initial switch status according to preset rules, gradual switching of risk control services and real-time monitoring of risk control services is solved, and the problem of long-term switching of risk control services in the existing technology is solved, and efficient and safe switching of risk control services is achieved.
Patent Information
- Application Number
- CN202411927845.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-04-18
AI Technical Summary
The existing risk control service switching methods take a long time and cannot monitor abnormal situations in real time during the switching process. Once problems arise, it is impossible to achieve automatic reversal, which makes it difficult to control the risks.
By receiving the risk control service request from the service caller, the initial switch status is determined based on real-time requests and preset switching rules, the risk control service is gradually switched, and abnormal situations during the switching process are monitored in real time.
It has achieved efficiency improvement and security guarantee for risk control service switching, provided real-time monitoring of abnormalities, and improved risk control capabilities.
Smart Images

Figure CN119847697A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information processing technology, and in particular to a risk control service switching method, device, equipment, storage medium and program product. Background Art
[0002] With the rapid changes in the market environment, the adjustment of risk control strategies has become increasingly frequent, which inevitably puts higher requirements on the flexibility and response speed of risk control services. At present, when switching between old and new risk control services, the commonly used risk control service switching method is based on the traffic playback of real-time request data, using the playback data to call the new risk control service, and returning the results returned by the new risk control service to the offline environment for batch verification with the results returned by the old risk control service. However, this method is time-consuming and cannot monitor abnormal situations in the switching process in real time. Once a problem occurs, it cannot be automatically switched back, making it difficult to control the risks in the switching process and easily causing batch request processing exceptions.
[0003] Based on the above content, how to improve the efficiency and security of risk control service switching is an urgent problem to be solved.
[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention
[0005] The main purpose of this application is to provide a risk control service switching method, device, equipment, storage medium and program product, aiming to solve the technical problem of how to improve the efficiency and security of risk control service switching.
[0006] To achieve the above objectives, the present application proposes a risk control service switching method, the method comprising:
[0007] Receive risk control service requests from several service callers;
[0008] Determine the initial switch state of the risk control service request according to the risk control service request and the preset cut-off rule;
[0009] According to the initial switch state, the risk control service is called to obtain the risk control call result;
[0010] The risk control service is switched according to the risk control call result.
[0011] In one embodiment, the step of determining the initial switch state of the risk control service request according to the risk control service request and the preset cut-off rule includes:
[0012] Determine a corresponding volume cut request identifier according to the risk control service request;
[0013] According to the slicing request identifier and the preset slicing rule, the initial switch state of the risk control service request is confirmed.
[0014] In one embodiment, the risk control service includes a first risk control service and a second risk control service, the initial switch state includes a first switch state and a second switch state, and the step of calling the risk control service according to the initial switch state to obtain a risk control call result includes:
[0015] When the initial switch state is the first switch state or the second switch state, synchronously calling the first risk control service and the second risk control service to obtain a first calling result and a second calling result;
[0016] A risk control call result is obtained according to the first call result and the second call result.
[0017] In one embodiment, the initial switch state includes a third switch state, and the step of switching the risk control service according to the risk control call result includes:
[0018] According to the risk control call result, confirm the risk level of risk control service switching;
[0019] When the risk level is low risk and the initial switch state is the first switch state, the initial switch state is set to the second switch state in combination with a preset cutoff rule;
[0020] When the risk level is high risk and the switch state is the second switch state, the initial switch state is set to the first switch state in combination with a preset cutoff rule;
[0021] When the risk level is low risk and the switch state is the second switch state, in combination with the preset cut-off rule, the initial switch state is set to the third switch state, wherein there is a risk control service that is preferentially called in the third switch state, and the risk control service that is preferentially called is the second risk control service.
[0022] In one embodiment, the step of confirming the risk level of risk control service switching according to the risk control call result includes:
[0023] Confirm whether the first call result and the second call result in the risk control call results within a preset period are inconsistent, and the inconsistency ratio;
[0024] When the first call result is inconsistent with the second call result, and the ratio value exceeds a preset threshold, confirming that the risk level of the risk control service switching is high risk;
[0025] When the first call result is consistent with the second call result, confirming that the risk level of the risk control service switching is low risk; and / or
[0026] When the first call result is inconsistent with the second call result, and the ratio value does not exceed the preset threshold, it is confirmed that the risk level of the risk control service switching is low risk.
[0027] In one embodiment, after the step of confirming whether the first call result and the second call result in the risk control call result within the preset period are inconsistent, and the inconsistency ratio, the step further includes:
[0028] When the first call result is inconsistent with the second call result, based on Flink stream processing technology, the difference fields between the first call result and the second call result are determined in real time;
[0029] According to the risk control service request, the difference field is stored.
[0030] In addition, to achieve the above purpose, the present application also proposes a risk control service switching device, the risk control service switching device comprising:
[0031] A receiving module is used to receive risk control service requests from several service callers;
[0032] A switch status confirmation module, used to determine the initial switch status of the risk control service request according to the risk control service request and the preset cut-off rule;
[0033] A risk control calling module, used to call the risk control service according to the initial switch state to obtain the risk control calling result;
[0034] The switching processing module is used to switch the risk control service according to the risk control call result.
[0035] In addition, to achieve the above-mentioned purpose, the present application also proposes a risk control service switching device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the risk control service switching method described above.
[0036] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the risk control service switching method described above are implemented.
[0037] In addition, to achieve the above-mentioned purpose, the present application also proposes a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the risk control service switching method described above are implemented.
[0038] One or more technical solutions proposed in this application have at least the following technical effects:
[0039] The risk control service switching method, device, equipment, storage medium and program product proposed in the embodiments of the present application specifically receive risk control service requests from several service callers; determine the initial switch state of the risk control service request based on the risk control service request and preset cutting rules; call the risk control service based on the initial switch state to obtain the risk control call result; and switch the risk control service based on the risk control call result.
[0040] The present application receives risk control service requests from several service callers so as to obtain the initial switch state of the real-time request according to the real-time request and the preset cutting rules; then, based on the initial switch state, the risk control service is switched, thereby realizing gradual switching in the process of real-time calling of the risk control service. This not only ensures the efficiency of the switching process of different risk control services, but also provides the ability to monitor abnormalities in real time during the switching process, thereby ensuring the security of the risk control service switching process and improving the risk management and control capabilities. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0042] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0043] Figure 1 A flowchart of the first embodiment of the risk control service switching method of this application is provided;
[0044] Figure 2 A flowchart of the second embodiment of the risk control service switching method of this application is provided;
[0045] Figure 3 A flowchart of the third embodiment of the risk control service switching method of this application is provided;
[0046] Figure 4 A schematic diagram of the process of initial switch state change in the risk control service switching process involved in the embodiment of the present application;
[0047] Figure 5 This is a schematic diagram of the module structure of the risk control service switching device according to an embodiment of the present application;
[0048] Figure 6 This is a schematic diagram of the device structure of the hardware operating environment involved in the risk control service switching method in the embodiment of the present application.
[0049] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0050] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0051] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0052] The main solution of the embodiment of the present application is: receiving risk control service requests from several service callers; determining the initial switch state of the risk control service request based on the risk control service request and preset cutting rules; calling the risk control service according to the initial switch state to obtain the risk control call result; switching the risk control service according to the risk control call result.
[0053] Technical terms involved in the embodiments of this application:
[0054] Risk control service: Risk control service refers to the process of managing and reducing potential business risks through a series of risk identification, assessment, monitoring and response measures to ensure the security, stability and sustainability of business operations, while protecting customers and enterprises from unnecessary losses. Risk control services are usually used in the financial field, e-commerce, Internet and other fields.
[0055] Flink: Flink is an open source stream processing framework developed by the Apache Software Foundation. Its core is a distributed data flow engine written in Java and Scala. Flink is mainly used for stateful computing on bounded and unbounded data streams, supporting a variety of application scenarios such as real-time data processing, batch processing, event-driven applications, data lake computing, and machine learning. Flink is designed to run in all common cluster environments and achieve memory-level computing speeds at any scale.
[0056] Kafka: Kafka is an open source stream processing platform developed by the Apache Software Foundation, known for its high throughput and low latency. It adopts a distributed architecture, supports partitioning and multi-copy replication, and ensures data security and reliability. Kafka can be used to build real-time data pipelines to implement functions such as messaging, data stream processing, and data storage.
[0057] As the market environment changes with each passing day, the demand for risk control in the financial, e-commerce, and Internet industries is increasing, and the adjustment of risk control strategies has become extremely frequent. In order to maintain the stability and competitiveness of the business, enterprises must continuously upgrade risk control services to quickly respond to market changes and new risk forms. However, the upgrade of risk control services is not only a technical update, but also involves the switching and transition of new and old risk control services.
[0058] Since the existing risk control service switching method is usually based on the traffic replay of real-time request data, by capturing the real-time request data in the production environment, replaying it in the offline environment, and calling the new risk control service for processing. Subsequently, the return results of the new risk control service are batch compared with the return results of the old risk control service to verify the accuracy and stability of the new service. However, this method has many limitations. First, the process of traffic replay and result comparison takes a lot of time and cannot meet the requirements of rapid response. Secondly, the simulation of the offline environment may not be able to fully restore the complexity of the production environment, resulting in deviations in the comparison results. In addition, once a problem occurs during the switching process, such as inconsistency between the new and old risk control conclusions or substandard performance of the new service, the existing solutions often cannot achieve automatic switching back and require manual intervention, which in turn causes the risk of risk control service switching to be uncontrollable.
[0059] From the above analysis, it can be seen that how to improve the efficiency and security of risk control service switching is an urgent problem to be solved.
[0060] The present application provides a solution, which receives risk control service requests from several service callers so as to obtain the initial switch state of the real-time request according to the real-time request and the preset cutting rules; then, based on the initial switch state, the risk control service is switched, thereby realizing gradual switching in the process of real-time calling of the risk control service, which not only ensures the efficiency of the switching process of different risk control services, but also provides the ability to monitor abnormalities in real time during the switching process, thereby ensuring the security of the risk control service switching process and improving the risk management and control capabilities.
[0061] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or a risk control service switching device capable of realizing the above functions, etc. The following takes the risk control service switching device as an example to illustrate this embodiment and the following embodiments.
[0062] Based on this, the present application embodiment provides a risk control service switching method, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the risk control service switching method of the present application.
[0063] In this embodiment, the risk control service switching method includes steps S110 to S140:
[0064] Step S110, receiving risk control service requests from several service callers;
[0065] Specifically, the risk control service switching device needs to receive risk control service requests from multiple service callers (such as clients, business systems, etc.) so as to subsequently perform risk control service switching processing based on multiple real-time risk control service requests, ensuring that the risk control service can be switched quickly and smoothly, while maintaining the ability to perform online risk control processing during the risk control service switching process, effectively improving the security of the risk control service switching process.
[0066] Step S120, determining an initial switch state of the risk control service request according to the risk control service request and a preset cut-off rule;
[0067] It should be noted that the preset volume cutoff rules refer to the request allocation rules formulated by relevant personnel based on business logic, system load, user level, user behavior data and other factors; the initial switch state is used to identify the processing logic of the risk control service request, such as "allocated to the first risk control service for processing", "allocated to the second risk control service for processing", etc. Among them, the first risk control service and the second risk control service can be services composed of different risk control assessment algorithms or risk control strategies.
[0068] Specifically, based on the risk control service request, the risk assessment information in the request content is identified through preset keywords or natural language processing technology, including but not limited to user information, transaction details, request time, user behavior data, etc., and then based on the preset cutting rules, it is determined how the risk control processing of the risk control service request will be executed, thereby determining the initial switch state of the risk control service request.
[0069] For example, the risk control service switching device receives two risk control service requests at the same time. According to the preset cutting rules, the request with a high user level needs to be processed by the first risk control service and the second risk control service together, while the request with a low user level only needs to be processed by the first risk control service.
[0070] In a feasible implementation manner, the step S120 may include steps A01 to A02:
[0071] Step A01, determining a corresponding volume cut request identifier according to the risk control service request;
[0072] Step A02: confirming the initial switch state of the risk control service request according to the cut-off request identifier and the preset cut-off rule.
[0073] In this implementation manner, the preset cut-off rule is set as a request allocation rule formulated according to the cut-off request identifier.
[0074] Specifically, the risk control service switching device first extracts the user certificate number, user level and other information from the user information in the risk control service request content, thereby determining the corresponding volume cut request identifier. The volume cut request identifier is used to identify the associated user of the risk control service request. It should be understood that the volume cut request identifier can be unique or not.
[0075] Then, the risk control service switching device can determine the request allocation rule corresponding to the cut-off request identifier based on the obtained cut-off request identifier and the preset cut-off rule, thereby obtaining the initial switch state of the current risk control service request. It should be understood that each cut-off request identifier has a corresponding initial switch state.
[0076] For example, when the preset cut-off rule is a risk control service switching rule set according to the user's birth region or date of birth in the user ID number, for example, the preset cut-off rule is that the risk control service request associated with the user whose birth month is January needs to be processed together with the first risk control service and the second risk control service. Among them, the first risk control service can be the risk control service associated with the old risk control strategy, referred to as the old risk control service, and the second risk control service can be the risk control service associated with the new risk control strategy, referred to as the new risk control service.
[0077] When the risk control service switching device receives a risk control service request, it extracts the birth month information in the user information based on the user information associated with the risk control service request, generates a cut-off request identifier "01", and according to the above-mentioned preset cut-off rules, it can be determined that the corresponding initial switch state is "old-new".
[0078] In this implementation, the corresponding volume cut request identifier is confirmed by utilizing the user information associated with the risk control service request, thereby obtaining the initial switch state corresponding to the risk control service request. Subsequently, according to the initial switch state, gradual switching can be achieved during the real-time call of the risk control service, thereby ensuring the efficiency of the switching process of different risk control services.
[0079] Step S130, calling the risk control service according to the initial switch state to obtain the risk control calling result;
[0080] Specifically, the risk control service switching device selects different risk control services for call processing according to the initial switch state of the risk control service request, thereby obtaining the risk control call result. Among them, the different risk control services include the first risk control service, the second risk control service, the third risk control service, etc. The first risk control service, the second risk control service, and the third risk control service can be services composed of different risk control assessment algorithms or risk control strategies.
[0081] The risk control call result includes the risk control conclusion obtained by calling the risk control service to process the risk control service request. The risk control conclusion usually includes the requested risk assessment level, risk type, decision-making recommendations and other information.
[0082] In a feasible implementation manner, the risk control service includes a first risk control service and a second risk control service, the initial switch state includes a first switch state and a second switch state, and the step S130 may include steps B01 to B02:
[0083] Step B01, when the initial switch state is the first switch state or the second switch state, synchronously calling the first risk control service and the second risk control service to obtain a first calling result and a second calling result;
[0084] Step B02, obtaining a risk control call result according to the first call result and the second call result.
[0085] Specifically, when the risk control service includes a first risk control service and a second risk control service, the switching process of the risk control service refers to switching between the first risk control service and the second risk control service.
[0086] When the initial switch state corresponding to the received risk control service request is the first switch state, the first risk control service and the second risk control service are called synchronously to obtain the risk control conclusion obtained by calling the first risk control service to process the risk control service request, i.e., the first call result, and the risk control conclusion obtained by calling the second risk control service to process the risk control service request, i.e., the second call result.
[0087] The first call result and the second call result together constitute the risk control call result.
[0088] It should be noted that when the initial switch state is the first switch state, although the risk control call result includes the first call result and the second call result, for a certain risk control service request, the risk control service switching device only returns the first call result to the service caller. When the initial switch state is the second switch state, although the risk control call result includes the first call result and the second call result, for a certain risk control service request, the risk control service switching device only returns the second call result to the service caller. In the above manner, the risk control service request is processed online during the risk control service switching process.
[0089] Step S140: switching the risk control service according to the risk control call result.
[0090] In this embodiment, the risk control service switching device can collect the risk control call results generated by the risk control service request within a preset number or a preset time, compare the differences in the call results of different risk control services, and then confirm the risk control call result with a higher accuracy, so as to obtain the corresponding risk control service with a higher accuracy, and forward the subsequent risk control service request to the risk control service with a higher accuracy for processing, so as to achieve the switching of the risk control service. Or, the difference in the call results of different risk control services is compared, and then the consistency of the risk control call results is confirmed. When the consistency is high, the risk control service is updated to the risk control service associated with the latest risk control strategy, so as to achieve the switching of the risk control service and meet the latest risk control strategy of the market.
[0091] Among them, the preset quantity and preset time are set by relevant personnel based on the actual needs of risk control service switching.
[0092] This embodiment provides a risk control service switching method, which receives risk control service requests from several service callers; determines the initial switch state of the risk control service request based on the risk control service request and a preset cut-off rule; calls the risk control service based on the initial switch state to obtain a risk control call result; and switches the risk control service based on the risk control call result.
[0093] The present application receives risk control service requests from several service callers so as to obtain the initial switch state of the real-time request according to the real-time request and the preset cutting rules; then, based on the initial switch state, the risk control service is switched, thereby realizing gradual switching in the process of real-time calling of the risk control service. This not only ensures the efficiency of the switching process of different risk control services, but also provides the ability to monitor abnormalities in real time during the switching process, thereby ensuring the security of the risk control service switching process and improving the risk management and control capabilities.
[0094] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the first embodiment can be referred to the above description, and no further description will be given later. On this basis, the initial switch state includes the third switch state, please refer to Figure 2 The step S140 further includes steps S210 to S240:
[0095] Step S210, confirming the risk level of risk control service switching according to the risk control call result;
[0096] It should be understood that when an enterprise conducts risk control management, it needs to use risk control services to conduct business risk assessments on risk control service requests in order to perform risk control.
[0097] In order to realize the switching of risk control services during the real-time processing of risk control service requests, in this embodiment, the first risk control service is preferably the risk control service currently used by the enterprise, which has a higher default accuracy rate, and the second risk control service is the risk control service to be switched.
[0098] Specifically, according to the risk control call results, the first call result generated by calling the first risk control service for multiple risk control service requests within a preset time is compared with the second call result generated by calling the second risk control service to confirm whether there is a difference. According to the difference information between the risk control conclusions for the same risk control service request in the first call result and the second call result, the risk level of switching from the first risk control service to the second risk control service is confirmed by difference rate analysis or consistency test method, so as to realize real-time monitoring of abnormalities in the switching process according to the risk level of the risk control service switching, ensure the safety of the risk control service switching process, and improve the risk management and control capabilities.
[0099] For example, by calculating the difference rate of the two call results in key indicators (such as risk score, pass rate, rejection rate, etc.). Specifically, the difference rate can be calculated by the following formula:
[0100] (Indicator value of service A - indicator value of service B) / indicator value of service A)
[0101] Among them, service A refers to the first risk control service, and service B refers to the second risk control service.
[0102] Then, by setting a difference rate threshold, the risk level of risk control service switching is determined based on whether the difference rate exceeds the threshold.
[0103] In addition, the consistency of the two call results can also be evaluated by using statistical methods (such as chi-square test, Kappa coefficient, etc.). The higher the consistency of the two call results, the lower the risk level of risk control service switching; otherwise, the higher the risk.
[0104] Step S220, when the risk level is low risk and the initial switch state is the first switch state, in combination with a preset cutoff rule, the initial switch state is set to the second switch state;
[0105] Step S230, when the risk level is high risk and the switch state is the second switch state, in combination with a preset cutoff rule, the initial switch state is set to the first switch state;
[0106] Specifically, in order to improve the efficiency of risk control service switching, when the risk level of risk control service switching is low risk, and the initial switch state corresponding to the cut-off request identifier is the first switch state, it means that there is no difference or the difference rate is small in the risk control conclusions made by the first risk control service and the second risk control service for the risk control service request. It is possible to consider using the risk control conclusion of the second risk control service for the user-related risk control service request represented by the cut-off request identifier, that is, modifying the initial switch state corresponding to the cut-off request identifier to the second switch state, and returning the second call result for the risk control service request to the caller, thereby realizing front-end switching on the risk control service.
[0107] Furthermore, in order to ensure the security of risk control service switching and enable the risk control service switching device to have the ability to monitor abnormalities in real time during the switching process, it is necessary to monitor the performance of the second risk control service to improve the security of risk service switching.
[0108] Specifically, when the risk level of the risk control service switching is high risk, and the initial switch state corresponding to the cut-off request identifier is the second switch state, it means that there are large differences in the risk control conclusions made by the first risk control service and the second risk control service for the risk control service request. At this time, it may be necessary to use the risk control conclusion of the first risk control service for the user-related risk control service request represented by the cut-off request identifier, that is, to change the initial switch state corresponding to the cut-off request identifier from the second switch state back to the first switch state, and return the first call result for the risk control service request to the caller, thereby realizing abnormal monitoring of the second risk control service, so that the risk control service switching device has the ability to automatically switch back the risk control service.
[0109] Step S240, when the risk level is low risk and the switch state is the second switch state, in combination with the preset cut-off rule, the initial switch state is set to the third switch state, wherein there is a risk control service that is preferentially called in the third switch state, and the risk control service that is preferentially called is the second risk control service.
[0110] Furthermore, when the risk level of the risk control service switching is low risk, and the initial switch state corresponding to the cut-off request identifier is the second switch state, it means that there is no difference or the difference rate is small between the risk control conclusions made by the first risk control service and the second risk control service for the risk control service request. At this time, the risk control conclusion of the second risk control service can still be used for the risk control service request related to the user represented by the cut-off request identifier, and the second call result for the risk control service request is returned to the caller, thereby realizing abnormal monitoring of the second risk control service, effectively ensuring the efficiency of risk service switching, and further improving risk management capabilities.
[0111] It can be understood that in this embodiment, when the risk level of the risk control service switching is continuously monitored as low risk, the risk control service switching device modifies the initial switch state corresponding to the cut-off request identifier to the third switch state, and gives priority to or only calls the second risk control service for the user-related risk control service request represented by the cut-off request identifier, and returns the second call result for the risk control service request to the caller, thereby realizing the formal switching of the backend to the second risk control service.
[0112] It should be understood that because the number of users requesting risk control services is too large, users can be initially classified through the cut-off request identifier. In this embodiment, the above method can be applied to switch the risk control service for a certain type of users with the same cut-off request identifier. In order to enable the enterprise to continue to call the risk control service for risk control for risk control service requests related to other users, the risk control service switching device can set the initial switch state corresponding to the cut-off request identifier associated with other users to the fourth switch state. The risk control service request in the fourth switch state preferentially calls or only calls the first risk control service, and returns the first call result for the risk control service request to the caller.
[0113] This embodiment provides a risk control service switching method, which confirms the risk level of risk control service switching according to the risk control call result, and then switches the risk control service between the front end and the back end according to the risk level. Based on the setting of the initial switch state, abnormal monitoring of risk control service switching is implemented to facilitate the subsequent construction of an abnormal switching back mechanism to prevent large numbers of abnormal decisions, ensure the security of the risk control service switching process, and improve risk management capabilities.
[0114] Based on the first embodiment and / or the second embodiment of the present application, in the third embodiment of the present application, the same or similar contents as those in the first embodiment and / or the second embodiment can refer to the above description, and will not be described in detail later. Figure 3 , the step S210 includes steps S310 to S340:
[0115] Step S310, confirming whether the first call result and the second call result in the risk control call results within a preset period are inconsistent, and the inconsistency ratio;
[0116] Specifically, confirm whether there are inconsistent risk control conclusions between the first call result and the second call result in the risk control call results within the preset period, and calculate the ratio of inconsistent risk control conclusions between the first call result and the second call result, and the calculation formula is as follows:
[0117] Number of inconsistent risk control conclusions / Number of all risk control conclusions
[0118] Among them, the preset cycle is set by relevant personnel based on the actual needs of risk control service switching.
[0119] Step S320: when the first call result is inconsistent with the second call result and the ratio value exceeds a preset threshold, confirming that the risk level of the risk control service switching is high risk;
[0120] It is understandable that when the first call result is inconsistent with the second call result, and the inconsistency ratio exceeds the preset threshold, it can be considered that there is a large difference between the risk control conclusions made by the first risk control service and the second risk control service for the risk control service request, and the risk level of the risk control service switching is confirmed to be high risk. Among them, the preset threshold is set by the relevant personnel according to the actual needs of the risk control service switching.
[0121] Step S330: when the first call result is consistent with the second call result, confirm that the risk level of the risk control service switching is low risk; and / or
[0122] Step S340: When the first call result is inconsistent with the second call result and the ratio value does not exceed the preset threshold, confirm that the risk level of the risk control service switching is low risk.
[0123] It can be understood that when the first call result is consistent with the second call result, it can be considered that the risk control conclusions made by the first risk control service and the second risk control service for the risk control service request are highly consistent, confirming that the risk level of the risk control service switching is low risk.
[0124] Alternatively, when the first call result is inconsistent with the second call result, and the inconsistency ratio does not exceed the preset threshold, it can also be considered that the inconsistency between the risk control conclusions made by the first risk control service and the second risk control service for the risk control service request is low, and the risk level of the risk control service switching is confirmed to be low risk.
[0125] Furthermore, since the risk control service may also have false alarms, it is possible to manually review and confirm whether the inconsistency between the risk control conclusions in the first call result and the second call result is true. After step S310, steps C01 to C02 are also included:
[0126] Step C01: when the first call result is inconsistent with the second call result, based on Flink stream processing technology, determining the difference fields between the first call result and the second call result in real time;
[0127] Step C02: storing the difference field according to the risk control service request.
[0128] Specifically, when the first call result is inconsistent with the second call result, the risk control service switching device asynchronously pushes the first call result and the second call result to Kafka for storage, and then uses Flink streaming technology to obtain the first call result and the second call result from Kafka, and compares the risk control conclusions of the first call result and the second call result for the same risk control service request one by one, and obtains the difference fields of the two risk control conclusions in real time. Then, for the unique identifier of each risk control service request, the difference fields obtained in real time are stored for subsequent manual review.
[0129] In this embodiment, Figure 4 The figure shows a flow chart of the initial switch state change during a risk control service switching process.
[0130] exist Figure 4 In the example, when the initial switch state corresponding to the volume cut request identifier is the fourth switch state, only the first risk control service is called for the risk control service request related to the user represented by the volume cut request identifier, and the first call result for the risk control service request is returned to the caller. The first risk control service refers to the old risk control service, and the second risk control service refers to the new risk control service.
[0131] When the new risk control service is deployed at the back end, the initial switch state corresponding to the volume cut request identifier can be switched to the first switch state, and then a long-term comparison of the risk control conclusions of the new and old risk control services is performed. When the risk control conclusions are consistent after a long-term comparison, the initial switch state corresponding to the volume cut request identifier is switched to the second switch state. Then, when the initial switch state corresponding to the volume cut request identifier is the second switch state, a long-term comparison of the risk control conclusions of the new and old risk control services is performed again. When the risk control conclusions are consistent after a long-term comparison, the initial switch state corresponding to the volume cut request identifier is switched to the third switch state. When there is an inconsistency in the comparison of the risk control conclusions, and the inconsistency ratio exceeds the preset threshold, it can be considered that the risk control service switching is abnormal at this time, and the risk control service switching device needs to switch back the risk control service, that is, switch the initial switch state corresponding to the volume cut request identifier to the first switch state.
[0132] This embodiment provides a risk control service switching method, which realizes abnormal monitoring of risk control service switching by confirming whether the first call result and the second call result in the risk control call results within a preset period are inconsistent, and the inconsistency ratio, and then judging the risk level of risk control service switching, so as to subsequently build an abnormal switching back mechanism to prevent large quantities of abnormal decisions, ensure the security of the risk control service switching process, and improve risk management capabilities.
[0133] This application also provides a risk control service switching device, please refer to Figure 5 , the risk control service switching device comprises:
[0134] The receiving module 10 is used to receive risk control service requests from several service callers;
[0135] The switch state confirmation module 20 is used to determine the initial switch state of the risk control service request according to the risk control service request and the preset cut-off rule;
[0136] The risk control calling module 30 is used to call the risk control service according to the initial switch state to obtain the risk control calling result;
[0137] The switching processing module 40 is used to switch the risk control service according to the risk control call result.
[0138] The risk control service switching device provided by the present application adopts the risk control service switching method in the above embodiment, which can solve the technical problem of how to improve the efficiency and safety of risk control service switching. Compared with the prior art, the beneficial effects of the risk control service switching device provided by the present application are the same as the beneficial effects of the risk control service switching method provided by the above embodiment, and the other technical features in the risk control service switching device are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0139] The present application provides a risk control service switching device, which includes: at least one processor; and a memory that is communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the risk control service switching method in the above-mentioned implementation example.
[0140] Reference below Figure 6 , which shows a schematic diagram of the structure of a risk control service switching device suitable for implementing the embodiment of the present application. The risk control service switching device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The risk control service switching device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0141] like Figure 6As shown, the risk control service switching device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the risk control service switching device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the risk control service switching device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a risk control service switching device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or provided instead.
[0142] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0143] The risk control service switching device provided by the present application adopts the risk control service switching method in the above embodiment, which can solve the technical problem of how to improve the efficiency and safety of risk control service switching. Compared with the prior art, the beneficial effects of the risk control service switching device provided by the present application are the same as the beneficial effects of the risk control service switching method provided by the above embodiment, and the other technical features in the risk control service switching device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0144] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0145] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0146] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the risk control service switching method in the above-mentioned embodiment.
[0147] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0148] The computer-readable storage medium may be included in the risk control service switching device; or may exist independently without being assembled into the risk control service switching device.
[0149] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the risk control service switching device, the risk control service switching device: receives risk control service requests from several service callers; determines the initial switch state of the risk control service request based on the risk control service request and the preset cutting rule; calls the risk control service according to the initial switch state to obtain the risk control call result; and switches the risk control service according to the risk control call result.
[0150] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0151] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0152] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0153] The readable storage medium provided in this application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned risk control service switching method, and can solve the technical problem of how to improve the efficiency and security of risk control service switching. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the risk control service switching method provided in the above-mentioned embodiment, and will not be repeated here.
[0154] An embodiment of the present application provides a computer program product, including a computer program, which implements the steps of the risk control service switching method as described above when the computer program is executed by a processor.
[0155] The computer program product provided in this application can solve the technical problem of how to improve the efficiency and security of risk control service switching. Compared with the prior art, the beneficial effects of the computer program product provided in the embodiment of this application are the same as the beneficial effects of the risk control service switching method provided in the above embodiment, which will not be repeated here.
[0156] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent processing scope of the present application.
Claims
1. A risk control service switching method, characterized in that: The method comprises: Receive risk control service requests from several service callers; Determine the initial switch state of the risk control service request according to the risk control service request and the preset cut-off rule; According to the initial switch state, the risk control service is called to obtain the risk control call result; The risk control service is switched according to the risk control call result.
2. The method according to claim 1, characterized in that The step of determining the initial switch state of the risk control service request according to the risk control service request and the preset cut-off rule includes: Determine a corresponding volume cut request identifier according to the risk control service request; According to the slicing request identifier and the preset slicing rule, the initial switch state of the risk control service request is confirmed.
3. The method according to claim 2, characterized in that The risk control service includes a first risk control service and a second risk control service, the initial switch state includes a first switch state and a second switch state, and the step of calling the risk control service according to the initial switch state to obtain a risk control call result includes: When the initial switch state is the first switch state or the second switch state, synchronously calling the first risk control service and the second risk control service to obtain a first calling result and a second calling result; A risk control call result is obtained according to the first call result and the second call result.
4. The method according to claim 3, characterized in that The initial switch state includes a third switch state, and the step of switching the risk control service according to the risk control call result includes: According to the risk control call result, confirm the risk level of risk control service switching; When the risk level is low risk and the initial switch state is the first switch state, the initial switch state is set to the second switch state in combination with a preset cutoff rule; When the risk level is high risk and the switch state is the second switch state, the initial switch state is set to the first switch state in combination with a preset cutoff rule; When the risk level is low risk and the switch state is the second switch state, in combination with the preset cut-off rule, the initial switch state is set to the third switch state, wherein there is a risk control service that is preferentially called in the third switch state, and the risk control service that is preferentially called is the second risk control service.
5. The method according to claim 4, characterized in that The step of confirming the risk level of risk control service switching according to the risk control call result includes: Confirm whether the first call result and the second call result in the risk control call results within a preset period are inconsistent, and the inconsistency ratio; When the first call result is inconsistent with the second call result, and the ratio value exceeds a preset threshold, confirming that the risk level of the risk control service switching is high risk; When the first call result is consistent with the second call result, confirming that the risk level of the risk control service switching is low risk; and / or When the first call result is inconsistent with the second call result, and the ratio value does not exceed the preset threshold, it is confirmed that the risk level of the risk control service switching is low risk.
6. The method according to claim 5, characterized in that After the step of confirming whether the first call result and the second call result in the risk control call result within the preset period are inconsistent, and the inconsistency ratio, the step further includes: When the first call result is inconsistent with the second call result, based on Flink stream processing technology, the difference fields between the first call result and the second call result are determined in real time; According to the risk control service request, the difference field is stored.
7. A risk control service switching device, characterized in that: The risk control service switching device comprises: A receiving module is used to receive risk control service requests from several service callers; A switch status confirmation module, used to determine the initial switch status of the risk control service request according to the risk control service request and the preset cut-off rule; A risk control calling module, used to call the risk control service according to the initial switch state to obtain the risk control calling result; The switching processing module is used to switch the risk control service according to the risk control call result.
8. A risk control service switching device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the risk control service switching method according to any one of claims 1 to 6.
9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the risk control service switching method according to any one of claims 1 to 6 are implemented.
10. A computer program product, characterized in that The computer program product includes a computer program, and when the computer program is executed by a processor, the steps of the risk control service switching method according to any one of claims 1 to 6 are implemented.