Risk control defense method and device for transaction risk, equipment and storage medium
By calculating user risk scores in real time and using the Flink calculation model to determine risk control strategies, the problem of low transaction risk identification efficiency in the existing technology is solved, and the effect of quickly identifying high-risk users and improving the efficiency of identifying wooly parties is achieved.
Patent Information
- Application Number
- CN202411465299.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-18
- Publication Date
- 2025-01-21
AI Technical Summary
The prior art is less efficient in identifying and defending transaction risks, especially when processing Internet data, resulting in low recognition efficiency of wool party.
Calculate the user's risk score in real time, determine the current user's risk level, and save it to the Redis database. Use the preset Flink computing model to determine the corresponding target air control defense strategy from the Redis database.
It realizes the rapid identification of high-risk users, improves the identification efficiency of wool party, ensures the persistence and queryability of data, and facilitates subsequent risk management and auditing.
Smart Images

Figure CN119338254A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data analysis technology, which is applied to the field of financial technology business, and in particular to a risk control defense method, device, equipment and storage medium for transaction risks. Background Art
[0002] Traditional risk control strategies are people-centric and target people with different risk profiles. Although risks can be effectively reduced through strategies formulated by risk control personnel in advance, omissions are inevitable due to the limitations of risk perception among different people.
[0003] Currently, machine learning is mostly used to mine and identify the bargain hunters. However, due to the complexity and divergence of Internet data, the efficiency of identifying the bargain hunters is low. Therefore, how to improve the efficiency of identifying the bargain hunters has become an urgent problem that needs to be solved. Summary of the invention
[0004] The present application provides a risk control defense method, device, equipment and storage medium for transaction risks to improve the efficiency of identifying wool-gathering parties.
[0005] In a first aspect, the present application provides a risk control defense method for transaction risks, the method comprising:
[0006] Determine the current risk level of the current user ID according to the current risk score of the current user ID;
[0007] Saving the current user ID and the current risk level to a Redis database;
[0008] By presetting the Flink calculation model, the current user ID and the current risk level, a target risk control defense strategy corresponding to the current risk level is determined from the Redis database.
[0009] In a second aspect, the present application further provides a risk control and defense device for transaction risks, the device comprising:
[0010] A current risk level determination module, used to determine the current risk level of the current user ID according to the current risk score of the current user ID;
[0011] A current risk level saving module, used to save the current user ID and the current risk level to a Redis database;
[0012] The risk control and defense strategy determination module is used to determine a target risk control and defense strategy corresponding to the current risk level from the Redis database by using a preset Flink calculation model, the current user ID and the current risk level.
[0013] In a third aspect, the present application also provides a computer device, comprising a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program and implement the risk control defense method for transaction risks as described above when executing the computer program.
[0014] In a fourth aspect, the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the processor implements the risk control defense method for transaction risks as described above.
[0015] The present application discloses a risk control defense method, device, equipment and storage medium for transaction risks, wherein the risk control defense method for transaction risks includes determining the current risk level of the current user ID according to the current risk score of the current user ID; saving the current user ID and the current risk level to the Redis database; and determining the target risk control defense strategy corresponding to the current risk level from the Redis database by presetting the Flink computing model, the current user ID and the current risk level. In the above manner, the present application can quickly identify high-risk users by calculating the user's risk score in real time, and save the user ID and risk level to the Redis database, thereby ensuring the persistence and queryability of the data, and facilitating subsequent risk management and auditing. Using the Flink computing model, a large amount of data streams can be efficiently processed, and real-time data analysis and decision-making can be achieved, thereby improving the efficiency of identifying wool parties. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0017] Figure 1 It is a schematic flow chart of a risk control defense method for transaction risks provided by the first embodiment of the present application;
[0018] Figure 2 is a schematic flow chart of a risk control defense method for transaction risks provided by the second embodiment of the present application;
[0019] Figure 3 is a schematic flow chart of a risk control defense method for transaction risks provided by the third embodiment of the present application;
[0020] Figure 4A schematic block diagram of a risk control and defense device for transaction risks provided in an embodiment of the present application;
[0021] Figure 5 A schematic block diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0022] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0023] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.
[0024] It should be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0025] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0026] The embodiments of the present application provide a risk control defense method, device, equipment and storage medium for transaction risks. Among them, the risk control defense method for transaction risks can be applied to the server. By calculating the user's risk score in real time, high-risk users can be quickly identified, and the user ID and risk level can be saved to the Redis database, ensuring the persistence and queryability of the data, which is convenient for subsequent risk management and auditing. Using the Flink computing model, a large amount of data streams can be efficiently processed, and real-time data analysis and decision-making can be achieved, thereby improving the efficiency of identifying wool parties. Among them, the server can be an independent server or a server cluster.
[0027] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0028] See also Figure 1 , Figure 1 This is a schematic flow chart of a risk control and defense method for transaction risks provided by the first embodiment of the present application. This risk control and defense method for transaction risks can be applied to the server, and is used to quickly identify high-risk users by calculating the user's risk score in real time, and save the user ID and risk level to the Redis database, ensuring the persistence and queryability of the data, which is convenient for subsequent risk management and auditing. Using the Flink computing model, a large amount of data streams can be efficiently processed, and real-time data analysis and decision-making can be achieved, thereby improving the efficiency of identifying wool parties.
[0029] like Figure 1 As shown, the risk control and defense method for transaction risks specifically includes steps S10 to S30.
[0030] Step S10: Determine the current risk level of the current user ID according to the current risk score of the current user ID;
[0031] Step S20: Save the current user ID and the current risk level to the Redis database;
[0032] Step S30: Determine a target risk control defense strategy corresponding to the current risk level from the Redis database by presetting a Flink computing model, the current user ID, and the current risk level.
[0033] In one embodiment, all relevant data of the current user ID, including but not limited to transaction behavior, login information, device information, etc., are collected, and the collected data is analyzed using a preset risk scoring model to calculate the risk score of the current user. According to business needs and historical data analysis, scoring thresholds for different risk levels are set, and the user's risk score is compared with the preset threshold to determine the user's current risk level.
[0034] Save the user ID and the corresponding risk level as a key-value pair in the Redis database, and ensure that the Flink computing model has been deployed and configured to receive the user ID and risk level as input. Input the user ID and risk level as a data stream into the Flink model. The Flink model queries and determines the corresponding risk control defense strategy from the Redis database based on the input user ID and risk level.
[0035] This embodiment discloses a risk control defense method, device, equipment and storage medium for transaction risks. The risk control defense method for transaction risks includes determining the current risk level of the current user ID according to the current risk score of the current user ID; saving the current user ID and the current risk level to the Redis database; and determining the target risk control defense strategy corresponding to the current risk level from the Redis database by presetting the Flink computing model, the current user ID and the current risk level. In the above manner, the present application can quickly identify high-risk users by calculating the user's risk score in real time, and save the user ID and risk level to the Redis database, thereby ensuring the persistence and queryability of the data, and facilitating subsequent risk management and auditing. Using the Flink computing model, a large amount of data streams can be efficiently processed, and real-time data analysis and decision-making can be achieved, thereby improving the efficiency of identifying wool parties.
[0036] based on Figure 1 In the embodiment shown, in this embodiment, before step S10, the following steps are included:
[0037] Get the historical database;
[0038] Determining a preset risk score based on historical user portraits in the historical database;
[0039] At least one historical risk level is determined based on each of the preset risk scores.
[0040] In one embodiment, a connection is made to a database storing historical user data, and an SQL query or other data retrieval method is executed to obtain the required historical user data.
[0041] Clean the extracted historical data, remove invalid or incomplete records, extract user profile-related features from the historical data, such as transaction behavior, login frequency, user preferences, etc., and use clustering algorithms to group users based on the extracted features in order to better understand user behavior patterns.
[0042] Determine which user profile features are most important for risk score prediction and use historical data to train the risk score model. Apply the trained model to historical user data and calculate each user's historical risk score, ensuring that the scores are on a uniform scale for easy comparison and subsequent processing.
[0043] This embodiment discloses a risk control defense method, device, equipment and storage medium for transaction risks, wherein the risk control defense method for transaction risks includes obtaining a historical database; determining a preset risk score based on historical user portraits in the historical database; determining at least one historical risk level based on each preset risk score; determining the current risk level of the current user ID based on the current risk score of the current user ID; saving the current user ID and the current risk level to a Redis database; and determining a target risk control defense strategy corresponding to the current risk level from the Redis database by presetting a Flink computing model, the current user ID and the current risk level. In the above manner, the present application can quickly identify high-risk users by calculating the risk score of the user in real time, and save the user ID and risk level to the Redis database, thereby ensuring the persistence and queryability of the data and facilitating subsequent risk management and auditing. Using the Flink computing model, a large amount of data streams can be efficiently processed, and real-time data analysis and decision-making can be achieved, thereby improving the efficiency of identifying wool parties.
[0044] See also Figure 2 , Figure 2 This is a schematic flow chart of a risk control and defense method for transaction risks provided by the second embodiment of the present application. This risk control and defense method for transaction risks can be applied to the server, and is used to quickly identify high-risk users by calculating the user's risk score in real time, and save the user ID and risk level to the Redis database, ensuring the persistence and queryability of the data, which is convenient for subsequent risk management and auditing. Using the Flink computing model, a large amount of data streams can be efficiently processed, and real-time data analysis and decision-making can be achieved, thereby improving the efficiency of identifying wool parties.
[0045] based on Figure 1 The embodiment shown, this embodiment Figure 2 As shown, step S10 includes step S101 to step S102.
[0046] Step S101: determining historical profit information of the current user ID within a preset time period based on the current risk score;
[0047] Step S102: Based on each preset profit interval and the historical profit information, the risk level of the current user ID is classified to determine the current risk level.
[0048] In one embodiment, five risk levels are formulated according to the risk situation:
[0049] Automatically offline, all users with this risk level will be prohibited from purchasing;
[0050] High-risk rule group: This type of user ID is blocked by high-risk rules and has the lowest tolerance for users. Only risk-free users can place orders.
[0051] Medium-risk rule group: This type of user ID is intercepted by the medium-risk rule. Compared with the high-risk rule group, the user tolerance of the team is higher. Both no-risk and low-risk users can place orders, and users of other levels are prohibited from placing orders.
[0052] Low-risk rule group: This type of user ID is blocked by low-risk rule. Compared with the medium-risk rule group, the tolerance for users is higher, and only high-risk users are prohibited from placing orders;
[0053] Just let it go. Users of all risk levels with this type of user ID can purchase it.
[0054] This embodiment discloses a risk control defense method, device, equipment and storage medium for transaction risks, and the risk control defense method for transaction risks includes obtaining a historical database; determining a preset risk score according to the historical user portraits in the historical database; determining at least one historical risk level according to each preset risk score; determining the historical profit information of the current user ID within a preset time period based on the current risk score; classifying the risk level of the current user ID based on each preset profit interval and the historical profit information, and determining the current risk level; saving the current user ID and the current risk level to the Redis database; and determining the target risk control defense strategy corresponding to the current risk level from the Redis database by presetting the Flink calculation model, the current user ID and the current risk level. In the above manner, the present application can quickly identify high-risk users by calculating the risk score of the user in real time, and save the user ID and risk level to the Redis database, ensuring the persistence and queryability of the data, and facilitating subsequent risk management and auditing. Using the Flink calculation model, a large amount of data streams can be efficiently processed, and real-time data analysis and decision-making can be realized, thereby improving the efficiency of identifying wool parties.
[0055] In a more preferred embodiment, step S102 includes:
[0056] When the historical profit information belongs to the first profit range, determining the current risk level as the first risk level;
[0057] When the historical profit information belongs to the second profit range, determining the current risk level as the second risk level;
[0058] When the historical profit information belongs to the third profit range, determining the current risk level as the third risk level;
[0059] When the historical profit information belongs to the fourth profit interval, the current risk level is determined as the fourth risk level.
[0060] Specifically, the risk level calculation - when all products are ordered using a user ID, the profit of the product will be calculated, and the user ID will be calculated to have a negative profit:
[0061] 1. Every time an order is placed, the risk control system will transmit the profit information and order information of all ordered goods to the risk control system;
[0062] 2. The risk control system will calculate the profit of each user ID over a period of time in real time through the real-time calculation platform.
[0063] The following are some examples:
[0064] a) When the profit of a user ID is negative 50,000 within one hour, the risk level of the user ID will be set to low, which will be valid for 10 days, and all low-risk users will be prohibited from placing orders;
[0065] b) When the profit of a user ID is negative 100,000 within one hour, the risk level of the user ID will be medium, which will be valid for 5 days. All medium-risk users will be prohibited from placing orders;
[0066] c) When the profit of a user ID is negative 500,000 within one hour, the risk level of the user ID will be high, which will be valid for 3 days, and all high-risk users will be prohibited from placing orders;
[0067] d) When the profit of a user ID is negative 1 million within 1 hour, the user ID will be automatically offline for 1 day, and no one will be allowed to place orders.
[0068] The present embodiment discloses a risk control and defense method, apparatus, device and storage medium for transaction risks. The risk control and defense method for transaction risks includes obtaining a historical database; determining a preset risk score based on historical user portraits in the historical database; determining at least one historical risk level based on each preset risk score; determining historical profit information of the current user ID within a preset time period based on the current risk score; when the historical profit information belongs to a first profit interval, determining the current risk level as a first risk level; when the historical profit information belongs to a second profit interval, determining the current risk level as a second risk level; when the historical profit information belongs to a third profit interval, determining the current risk level as a third risk level; when the historical profit information belongs to a fourth profit interval, determining the current risk level as a fourth risk level; saving the current user ID and the current risk level to a Redis database; and determining a target risk control and defense strategy corresponding to the current risk level from the Redis database by presetting a Flink computing model, the current user ID and the current risk level. Through the above method, this application can quickly identify high-risk users by calculating the user's risk score in real time, and save the user ID and risk level to the Redis database, ensuring the persistence and queryability of the data, which is convenient for subsequent risk management and auditing. Using the Flink computing model, a large amount of data streams can be efficiently processed, and real-time data analysis and decision-making can be achieved, thereby improving the efficiency of identifying wool parties.
[0069] See also Figure 3 , Figure 3 This is a schematic flow chart of a risk control defense method for transaction risks provided by the third embodiment of the present application. This risk control defense method for transaction risks can be applied to the server, and is used to quickly identify high-risk users by calculating the user's risk score in real time, and save the user ID and risk level to the Redis database, ensuring the persistence and queryability of the data, which is convenient for subsequent risk management and auditing. Using the Flink computing model, a large amount of data streams can be efficiently processed, and real-time data analysis and decision-making can be achieved, thereby improving the efficiency of identifying wool parties.
[0070] based on Figure 1 The embodiment shown, this embodiment Figure 3 As shown, step S30 includes step S301 to step S302.
[0071] Step S301: Determine the historical profit information of the current user through the preset Flink calculation model and the current user ID;
[0072] Step S302: Based on the historical profit information and the current risk level, call the target risk control defense strategy from the Redis database.
[0073] In one embodiment, a preset Flink computing model is loaded, which is used to process user data and receive the current user ID from the front-end system or API to confirm the validity of the user ID.
[0074] Use the Flink model to extract historical profit information related to the current user ID from the database or other data sources. The Flink model calculates the extracted data to determine the user's historical profit. Configure the connection parameters of the Redis database. Use the Redis client to establish a connection with the database, extract the risk level corresponding to the current user ID from the Redis database, and confirm the validity and accuracy of the risk level data.
[0075] According to historical profit information and current risk level, the corresponding risk control defense strategy is matched from the Redis database. According to the called risk control strategy, corresponding risk control measures are taken for users, and the execution effect of the risk control strategy is monitored to ensure the effective implementation of the strategy.
[0076] This embodiment discloses a risk control defense method, device, equipment and storage medium for transaction risks, wherein the risk control defense method for transaction risks includes determining the current risk level of the current user ID according to the current risk score of the current user ID; saving the current user ID and the current risk level to the Redis database; determining the historical profit information of the current user through the preset Flink computing model and the current user ID; and calling the target risk control defense strategy from the Redis database based on the historical profit information and the current risk level. In the above manner, the present application can quickly identify high-risk users by calculating the risk score of the user in real time, and save the user ID and risk level to the Redis database, thereby ensuring the persistence and queryability of the data, and facilitating subsequent risk management and auditing. Using the Flink computing model, a large amount of data streams can be efficiently processed, and real-time data analysis and decision-making can be achieved, thereby improving the efficiency of identifying wool parties.
[0077] based on Figure 3 In the embodiment shown, in this embodiment, step S301 includes:
[0078] Define the calculation logic of profit information through the Flink calculation model;
[0079] A preset application programming interface API is called, and the historical profit information is calculated according to the preset API and the calculation logic.
[0080] In one embodiment, the calculation indicators of profit information are clarified, such as total revenue, cost, tax, etc. According to business needs, a profit calculation formula is written, such as profit = total revenue - cost - tax. Design a data flow diagram to determine the input, processing, and output processes of data. Ensure that the Apache Flink environment has been built and configured.
[0081] Use Flink's API to develop a calculation model, implement the calculation logic of profit information, read the documentation of the preset API, understand the API call method, parameters and return values, test the preset API, and ensure the availability and stability of the API. Integrate the preset API into the Flink calculation model, ensure that the logic of the API call is consistent with the profit calculation logic, and ensure that the correct parameters are passed when calling the API, such as user ID, time range, etc.
[0082] This embodiment discloses a risk control defense method, device, equipment and storage medium for transaction risks. The risk control defense method for transaction risks includes determining the current risk level of the current user ID according to the current risk score of the current user ID; saving the current user ID and the current risk level to the Redis database; defining the calculation logic of the profit information through the Flink calculation model; calling the preset application programming interface API, and calculating the historical profit information according to the preset API and the calculation logic; based on the historical profit information and the current risk level, calling the target risk control defense strategy from the Redis database. Through the above method, the present application can quickly identify high-risk users by calculating the risk score of the user in real time, and save the user ID and risk level to the Redis database, ensuring the persistence and queryability of the data, which is convenient for subsequent risk management and auditing. Using the Flink calculation model, a large amount of data streams can be efficiently processed, and real-time data analysis and decision-making can be achieved, thereby improving the efficiency of identifying wool parties.
[0083] Based on any of the above embodiments, in this embodiment, step S20 includes:
[0084] Generate a key-value pair according to the current user ID and the current risk level, wherein the key is the current user ID and the value is the current risk level;
[0085] The key-value pair is saved to the Redis database through the built-in SET command of the Rsdis database.
[0086] Specifically, receive the current user ID and current risk level from the front-end system, API call or other data source, and verify the validity of the received user ID and risk level data. Define the current user ID as the key, define the current risk level as the value, and combine the key and value to generate a key-value pair. Configure the address, port, password and other connection parameters of the Redis server, use the Redis client library to establish a connection with the Redis server, use the Redis SET command to prepare for the data write operation, execute the SET command through the Redis client, write the key-value pair to the Redis database, check the command execution result, and confirm that the key-value pair has been successfully written.
[0087] See also Figure 4 , Figure 4 The embodiment of the present application provides a schematic block diagram of a risk control and defense device for transaction risk, which is used to execute the aforementioned risk control and defense method for transaction risk. The risk control and defense device for transaction risk can be configured on a server.
[0088] like Figure 4 As shown, the risk control and defense device 400 for transaction risks includes:
[0089] The current risk level determination module 410 is used to determine the current risk level of the current user ID according to the current risk score of the current user ID;
[0090] The current risk level saving module 420 is used to save the current user ID and the current risk level to a Redis database;
[0091] The risk control and defense strategy determination module 430 is used to determine the target risk control and defense strategy corresponding to the current risk level from the Redis database through a preset Flink calculation model, the current user ID and the current risk level.
[0092] Furthermore, the risk control and defense device 400 for transaction risks includes:
[0093] A historical database acquisition module is used to acquire the historical database;
[0094] A preset risk score determination module, used to determine a preset risk score based on historical user portraits in the historical database;
[0095] The historical risk level determination module is used to determine at least one historical risk level according to each of the preset risk scores.
[0096] Furthermore, the current risk level determination module 410 includes:
[0097] A historical profit information determination unit, configured to determine historical profit information of the current user ID within a preset time period based on the current risk score;
[0098] The current risk level determination unit is used to classify the risk level of the current user ID based on each preset profit interval and the historical profit information to determine the current risk level.
[0099] Furthermore, the current risk level determination unit includes:
[0100] A first risk level determination subunit, configured to determine the current risk level as the first risk level when the historical profit information belongs to the first profit interval;
[0101] A second risk level determination subunit, configured to determine the current risk level as the second risk level when the historical profit information belongs to the second profit range;
[0102] A third risk level determination subunit, configured to determine the current risk level as the third risk level when the historical profit information belongs to the third profit interval;
[0103] The fourth risk level determination subunit is used to determine the current risk level as the fourth risk level when the historical profit information belongs to the fourth profit interval.
[0104] Furthermore, the risk control and defense strategy determination module 430 includes:
[0105] A historical profit information determining unit, configured to determine the historical profit information of the current user through the preset Flink calculation model and the current user ID;
[0106] A target risk control and defense strategy determination unit is used to call the target risk control and defense strategy from the Redis database based on the historical profit information and the current risk level.
[0107] Furthermore, the historical profit information determination unit includes:
[0108] A calculation logic definition subunit, used to define the calculation logic of profit information through the Flink calculation model;
[0109] The historical profit information determination subunit is used to call a preset application programming interface API and calculate the historical profit information according to the preset API and the calculation logic.
[0110] Furthermore, the current risk level storage module 420 includes:
[0111] a key-value pair generating unit, configured to generate a key-value pair according to the current user ID and the current risk level, wherein the key is the current user ID and the value is the current risk level;
[0112] The key-value pair saving unit is used to save the key-value pair to the Redis database through the built-in SET command of the Rsdis database.
[0113] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described device and each module can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0114] The above-mentioned device can be implemented in the form of a computer program. Figure 5 Runs on the computer device shown.
[0115] See also Figure 5 , Figure 5 1 is a schematic block diagram of a computer device provided in an embodiment of the present application. The computer device may be a server.
[0116] See also Figure 5 The computer device includes a processor, a memory and a network interface connected through a system bus, wherein the memory may include a non-volatile storage medium and an internal memory.
[0117] The non-volatile storage medium can store an operating system and a computer program. The computer program includes program instructions, and when the program instructions are executed, the processor can execute any risk control defense method for transaction risks.
[0118] The processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.
[0119] The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium. When the computer program is executed by the processor, the processor can execute any risk control defense method for transaction risks.
[0120] The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0121] It should be understood that the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0122] In one embodiment, the processor is used to run a computer program stored in the memory to implement the following steps:
[0123] Determine the current risk level of the current user ID according to the current risk score of the current user ID;
[0124] Saving the current user ID and the current risk level to a Redis database;
[0125] By presetting the Flink calculation model, the current user ID and the current risk level, a target risk control defense strategy corresponding to the current risk level is determined from the Redis database.
[0126] In one embodiment, before determining the current risk level of the current user ID according to the current risk score of the current user ID, it is used to implement:
[0127] Get the historical database;
[0128] Determining a preset risk score based on historical user portraits in the historical database;
[0129] At least one historical risk level is determined based on each of the preset risk scores.
[0130] In one embodiment, the current risk level of the current user ID is determined according to the current risk score of the current user ID, so as to achieve:
[0131] Based on the current risk score, determine historical profit information of the current user ID within a preset time period;
[0132] Based on each preset profit interval and the historical profit information, the risk level of the current user ID is classified to determine the current risk level.
[0133] In one embodiment, based on each preset profit interval and the historical profit information, the risk level of the current user ID is classified to determine the current risk level, so as to achieve:
[0134] When the historical profit information belongs to the first profit range, determining the current risk level as the first risk level;
[0135] When the historical profit information belongs to the second profit range, determining the current risk level as the second risk level;
[0136] When the historical profit information belongs to the third profit range, determining the current risk level as the third risk level;
[0137] When the historical profit information belongs to the fourth profit interval, the current risk level is determined as the fourth risk level.
[0138] In one embodiment, by presetting the Flink computing model, the current user ID and the current risk level, a target risk control defense strategy corresponding to the current risk level is determined from the Redis database to achieve:
[0139] Determine the historical profit information of the current user through the preset Flink calculation model and the current user ID;
[0140] Based on the historical profit information and the current risk level, the target risk control defense strategy is called from the Redis database.
[0141] In one embodiment, the historical profit information of the current user is determined by using the preset Flink calculation model and the current user ID, so as to achieve:
[0142] Define the calculation logic of profit information through the Flink calculation model;
[0143] A preset application programming interface API is called, and the historical profit information is calculated according to the preset API and the calculation logic.
[0144] In one embodiment, the current user ID and the current risk level are saved to a Redis database to implement:
[0145] Generate a key-value pair according to the current user ID and the current risk level, wherein the key is the current user ID and the value is the current risk level;
[0146] The key-value pair is saved to the Redis database through the built-in SET command of the Rsdis database.
[0147] A computer-readable storage medium is also provided in an embodiment of the present application, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and the processor executes the program instructions to implement any one of the risk control and defense methods for transaction risks provided in the embodiments of the present application.
[0148] The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiment, such as a hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc., equipped on the computer device.
[0149] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A risk control and defense method for transaction risks, characterized in that: include: Determine the current risk level of the current user ID according to the current risk score of the current user ID; Saving the current user ID and the current risk level to a Redis database; By presetting the Flink calculation model, the current user ID and the current risk level, a target risk control defense strategy corresponding to the current risk level is determined from the Redis database.
2. The risk control and defense method for transaction risks according to claim 1 is characterized in that: Before determining the current risk level of the current user ID according to the current risk score of the current user ID, the method includes: Get the historical database; Determining a preset risk score based on historical user portraits in the historical database; At least one historical risk level is determined based on each of the preset risk scores.
3. The risk control and defense method for transaction risks according to claim 2 is characterized in that: Determining the current risk level of the current user ID according to the current risk score of the current user ID includes: Based on the current risk score, determine historical profit information of the current user ID within a preset time period; Based on each preset profit interval and the historical profit information, the risk level of the current user ID is classified to determine the current risk level.
4. The risk control and defense method for transaction risks according to claim 3 is characterized in that: The step of classifying the risk level of the current user ID based on each preset profit interval and the historical profit information to determine the current risk level includes: When the historical profit information belongs to the first profit range, determining the current risk level as the first risk level; When the historical profit information belongs to the second profit range, determining the current risk level as the second risk level; When the historical profit information belongs to the third profit range, determining the current risk level as the third risk level; When the historical profit information belongs to the fourth profit interval, the current risk level is determined as the fourth risk level.
5. The risk control and defense method for transaction risks according to claim 1 is characterized in that: The step of determining a target risk control defense strategy corresponding to the current risk level from the Redis database by presetting the Flink computing model, the current user ID, and the current risk level includes: Determine the historical profit information of the current user through the preset Flink calculation model and the current user ID; Based on the historical profit information and the current risk level, the target risk control defense strategy is called from the Redis database.
6. The risk control and defense method for transaction risks according to claim 5 is characterized in that: The determining the historical profit information of the current user by using the preset Flink calculation model and the current user ID includes: Define the calculation logic of profit information through the Flink calculation model; A preset application programming interface API is called, and the historical profit information is calculated according to the preset API and the calculation logic.
7. The risk control and defense method for transaction risks according to any one of claims 1 to 6, characterized in that: The step of saving the current user ID and the current risk level to a Redis database includes: Generate a key-value pair according to the current user ID and the current risk level, wherein the key is the current user ID and the value is the current risk level; The key-value pair is saved to the Redis database through the built-in SET command of the Rsdis database.
8. A risk control and defense device for transaction risks, characterized in that: include: A current risk level determination module, used to determine the current risk level of the current user ID according to the current risk score of the current user ID; A current risk level saving module, used to save the current user ID and the current risk level to a Redis database; The risk control and defense strategy determination module is used to determine a target risk control and defense strategy corresponding to the current risk level from the Redis database by using a preset Flink calculation model, the current user ID and the current risk level.
9. A computer device, characterized in that: The computer device includes a memory and a processor; The memory is used to store computer programs; The processor is used to execute the computer program and implement the risk control and defense method for transaction risks as described in any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the risk control and defense method for transaction risks as described in any one of claims 1 to 7.