Transaction rating method, system and equipment and storage medium

By obtaining transaction data for customers on multiple trading days and using the Gaussian Hidden Markov model for risk rating, the problem that single point-of-time data in the existing technology is difficult to capture long-term trading trends, and a more accurate and intelligent risk rating for trading behavior is achieved.

CN119648361APending Publication Date: 2025-03-18AGRICULTURAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411739841.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

The existing technology mainly relies on transaction data at a single point in time when rating customers' transaction risk, making it difficult to capture long-term trading trends and pattern changes of customers, resulting in low accuracy in risk rating.

Method used

By obtaining the transaction data information of the customer within a preset time period (including multiple consecutive trading days), and using the Gaussian Hidden Markov model as the rating model, the evaluation values ​​under different risk level models are calculated through the forward inference algorithm, and finally the risk level with the largest evaluation value is selected as the rating result.

Benefits of technology

This method can take into account the characteristics of customers' trading behavior more comprehensively, improve the accuracy and intelligence of trading behavior risk ratings, and reduce the risk of misjudgment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119648361A_ABST
    Figure CN119648361A_ABST
Patent Text Reader

Abstract

The invention discloses a transaction rating method, system and device and a storage medium, and the method comprises the steps: obtaining transaction data information in a first preset time period, inputting the transaction data information into a first number of rating models, obtaining an evaluation value corresponding to each model, the first number being a preset risk level number, and the first number being a preset risk level number; each risk level corresponds to a rating model, the rating model takes transaction information elements as observation nodes of a Gaussian hidden Markov model, and a model of a hidden Markov model evaluation value is calculated through a forward reasoning algorithm; and taking the risk level corresponding to the rating model with the maximum evaluation value as a rating result. And processing customer transaction information of multiple consecutive days by using an inference algorithm of the hidden Markov model. According to the time sequence analysis method, the long-term trend and periodic change of the customer transaction behavior can be captured, so that whether the risk exists in the customer transaction behavior or not can be predicted more accurately.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a transaction rating method, system, device and storage medium. Background Art

[0002] With the continuous development of the financial market, it is becoming increasingly important for financial institutions to manage customer transaction risks. In order to effectively prevent and control risks in the transaction process, most financial institutions rely mainly on customers' current transaction information when rating customer transaction risks. This information usually covers multiple dimensions such as transaction amount, transaction frequency, and transaction type in the recent period. By setting a series of rules and thresholds, financial institutions can quickly conduct preliminary risk assessments on customers' transaction activities, thereby promptly identifying potential risky behaviors.

[0003] However, existing assessment methods have obvious limitations. They mainly focus on the transaction data of customers at a specific point in time, while ignoring the long-term historical transaction records of customers. In fact, risky trading behaviors often have strong confidentiality and certain periodic characteristics, which makes it difficult for data at a single point in time to fully and accurately reflect the customer's real trading habits and potential risks. For example, some risky trading behaviors may be very hidden over a period of time. Only analyzing the transaction data information at a specific point in time is difficult to reveal the true intention and rules of the transaction. Therefore, it is difficult for existing risk assessment methods to capture the long-term trading trends and pattern changes of customers, resulting in low accuracy in risk level assessment. Summary of the invention

[0004] Based on the above problems, the present application provides a transaction rating method, system, device and storage medium.

[0005] The embodiments of the present application disclose the following technical solutions:

[0006] A first aspect of an embodiment of the present application provides a transaction rating method, including:

[0007] Acquiring transaction data information within a first preset time period, where the first preset time period includes a plurality of consecutive trading days;

[0008] Input the transaction data information into a first number of rating models respectively to obtain evaluation values ​​corresponding to each model, wherein the first number is a preset number of risk levels, each risk level corresponds to a rating model, and the rating model uses transaction information elements as observation nodes of a Gaussian hidden Markov model and calculates the evaluation value of the hidden Markov model through a forward reasoning algorithm;

[0009] The risk level corresponding to the rating model with the largest evaluation value is taken as the rating result.

[0010] In a possible implementation, the process of constructing the rating model includes:

[0011] defining a second number of transaction information elements and a third number of hidden states, wherein the third number is the number of consecutive trading days within the first preset time period, and each hidden state corresponds to each trading day;

[0012] The third number of hidden states are constructed to obtain a hidden state Markov chain structure in the form of sequential conversion from left to right, and the second number of transaction information elements are set as observation nodes;

[0013] A rating model is constructed based on the observation nodes and the hidden state Markov chain structure.

[0014] In a possible implementation, the method further includes:

[0015] Inputting the sample data set into the constructed rating model so that the rating model calculates the Gaussian distribution parameters under each hidden state based on the sample data set;

[0016] The parameters of the rating model are adjusted based on the calculated Gaussian distribution parameters until the rating model meets preset conditions, which are used to characterize that the error between the result output by the model and the actual rating result is less than a preset error value, and the convergence speed of the model is not less than a preset speed value.

[0017] In a possible implementation, the transaction information elements include the number of transactions on the day, the maximum transaction amount on the day, the transaction time span on the day, and the earliest transaction time on the day, and setting the second number of transaction information elements as observation nodes includes:

[0018] The number of transactions on the day, the maximum transaction amount on the day, the transaction time span on the day and the earliest transaction time on the day are set as the observation nodes of each model.

[0019] In a possible implementation, the rating model uses a forward reasoning algorithm to calculate the hidden Markov model evaluation value, including:

[0020] Calculate the forward probability of each hidden state on the trading day closest to the current moment;

[0021] Recursively calculate the forward probabilities of other trading days within the first preset time period based on the calculated forward probability;

[0022] The evaluation value of the rating model is calculated based on the forward probability of the trading day farthest from the current moment.

[0023] In a possible implementation, the acquiring transaction data information within a first preset time period includes:

[0024] Acquiring preliminary data information within a first preset time period;

[0025] The preliminary data information is screened based on the transaction information elements of the rating model to obtain transaction data information, wherein the data information type of each transaction day in the transaction data information corresponds to the transaction information elements of the rating model.

[0026] In a possible implementation, inputting the transaction data information into a first number of rating models respectively includes:

[0027] Based on a preset priority order, the transaction data information is input into a first number of rating models in sequence.

[0028] A second aspect of the embodiment of the present application provides a transaction rating system, including:

[0029] An acquisition unit, configured to acquire transaction data information within a first preset time period, wherein the first preset time period includes a plurality of consecutive transaction days;

[0030] An input unit, used to input the transaction data information into a first number of rating models respectively, and obtain evaluation values ​​corresponding to each model, wherein the first number is a preset number of risk levels, each risk level corresponds to a rating model, and the rating model uses transaction information elements as observation nodes of a Gaussian hidden Markov model and calculates the evaluation value of the hidden Markov model through a forward reasoning algorithm;

[0031] The determination unit is used to take the risk level corresponding to the rating model with the largest evaluation value as the rating result.

[0032] A third aspect of an embodiment of the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the transaction rating method as described in the first aspect above is implemented.

[0033] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, characterized in that instructions are stored in the computer-readable storage medium, and when the instructions are executed on a terminal device, the terminal device executes the transaction rating method as described in the first aspect above.

[0034] Compared with the prior art, this application has the following beneficial effects:

[0035] This application not only considers the transaction information of the customer at the current time point, but also obtains the transaction data information of the customer in the first preset time period (the time period includes multiple consecutive trading days). In this way, risky trading behaviors with confidentiality and periodicity can be captured, avoiding the limitations of data at a single time point. Further, this application uses the Gaussian Hidden Markov Model as the core mechanism, takes the transaction information elements as observation nodes, and uses the forward reasoning algorithm to calculate the evaluation values ​​under different risk level models. It can more accurately identify abnormal trading behaviors, even if these abnormal trading behaviors change over time. Finally, by comparing the evaluation values ​​of different risk level models, the risk level corresponding to the maximum value is selected as the final rating result, that is, through the comprehensive analysis of multiple rating models, this application ensures the reliability and stability of the rating results and reduces the risk of misjudgment. In summary, this application effectively solves the limitations of single time points and single types of data in traditional evaluation methods by comprehensively considering historical trading data for multiple consecutive trading days and using statistical models, and improves the comprehensiveness and accuracy of trading behavior risk rating. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0037] Figure 1 A flowchart of a transaction rating method provided in an embodiment of the present application;

[0038] Figure 2 A schematic diagram of a hidden state Markov chain structure provided in an embodiment of the present application;

[0039] Figure 3 A schematic diagram of the relationship between hidden states and observed variables in a hidden Markov model provided in an embodiment of the present application;

[0040] Figure 4 A structural diagram of a transaction rating system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0041] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only 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.

[0042] To facilitate understanding of the technical solutions provided by the embodiments of the present application, the professional terms involved in the embodiments of the present application will be explained below.

[0043] Hidden Markov Model: A classic machine learning statistical model used to describe a Markov process with hidden unknown parameters. It is a type of Markov chain whose state cannot be observed directly, but can be observed through a sequence of observation vectors. Each observation vector is represented by various states through certain probability density distributions. Each observation vector is generated by a state sequence with a corresponding probability density distribution, forming a hidden Markov chain with a certain number of states.

[0044] To facilitate understanding of the technical solutions provided by the embodiments of the present application, the background technology involved in the embodiments of the present application will be described below.

[0045] As mentioned above, currently, most financial institutions rely mainly on the customer's current transaction information when rating customer transaction risk. This information usually includes the transaction amount, frequency, type, etc. in the recent period. By setting a series of rules and thresholds, financial institutions can preliminarily determine whether the customer's transaction is risky.

[0046] Existing evaluation methods mainly rely on the customer's current transaction information, while ignoring the customer's long-term historical transaction data. Because risky trading behaviors may be secretive and cyclical, data at a single point in time cannot fully reflect the customer's real trading behavior.

[0047] In order to solve the above problems, the embodiment of the present application performs customer transaction risk rating by establishing a hidden Markov model. The model not only includes key information such as the number of transactions on the day, the maximum transaction amount on the day, the transaction time span on the day, and the earliest transaction time on the day, but also uses the forward reasoning algorithm of the hidden Markov model to process multiple transaction information. This method can more comprehensively consider the characteristics of customer transaction behavior, thereby improving the accuracy and intelligence of customer transaction risk rating.

[0048] In addition, the customer transaction behavior risk rating model established in this application also uses the hidden Markov model inference algorithm to process customer transaction information for multiple consecutive days. This processing method can more deeply explore the customer's transaction behavior pattern and further improve the accuracy of the target behavior intention prediction.

[0049] It should be noted that the transaction rating method, system, device and medium provided in this application can be applied to the field of computer technology. The above is only an example and does not limit the application field of the transaction rating method, system, device and medium provided in this application. In addition, the embodiment of the present application may not limit the execution subject of the transaction rating. For example, the transaction rating method of the embodiment of the present application can be applied to data processing devices such as terminal devices or servers. Among them, the terminal device can be an electronic device such as a computer, a personal digital assistant (PDA). The server can be a stand-alone server, a cloud server, or a cluster server composed of multiple servers.

[0050] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only 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.

[0051] The following is an example of an example to illustrate a transaction rating method provided by the present application. Figure 1 ,Should Figure 1 A flowchart of a transaction rating method provided in an embodiment of the present application, the method comprising:

[0052] S101. Acquire transaction data information within a first preset time period.

[0053] First, you need to define a first preset time period, such as the last 3 days or 7 days, to obtain all transaction data information within the time period. These transaction data information include but are not limited to the number of transactions on the day, the maximum transaction amount on the day, the transaction time span on the day, and the earliest transaction time on the day. Data collection can be automatically completed through the transaction system within the financial institution to ensure the timeliness and accuracy of the data.

[0054] In a possible implementation, the acquiring transaction data information within a first preset time period includes:

[0055] Acquire preliminary data information within a first preset time period; filter the preliminary data information based on the transaction information elements of the rating model to obtain transaction data information, wherein the data information type of each transaction day in the transaction data information corresponds to the transaction information elements of the rating model.

[0056] Select an appropriate first preset time period, such as the most recent month or the most recent quarter, and flexibly adjust it according to business needs. During this time period, collect all relevant transaction records to form a set of preliminary data information. The preliminary data information should be as detailed as possible, including but not limited to the following: transaction date and time, number of transactions on the day, maximum transaction amount on the day, transaction time span on the day and earliest transaction time on the day, transaction type (such as purchase, refund, etc.), identity information of both parties to the transaction (such as customer ID, merchant ID), transaction geographic location, transaction device information (such as mobile payment, PC, etc.), transaction context information (such as purchased product category, event promotion information, etc.).

[0057] Filter out the transaction information directly related to the rating model from the preliminary data information. The rating model contains a series of specific transaction information elements, such as the number of transactions on the day, the maximum transaction amount on the day, the transaction time span on the day, and the earliest transaction time on the day. According to the transaction information elements of the rating model, filter the preliminary data information collected in the first step. Only keep those data records that contain the required information elements.

[0058] By screening and sorting these data based on the transaction information elements of the rating model, we can obtain the transaction data information that meets the requirements. This process ensures the accuracy and relevance of the transaction data information, and provides a solid foundation for subsequent analysis and rating.

[0059] S102: Input the transaction data information into a first number of rating models respectively to obtain evaluation values ​​corresponding to each model.

[0060] The first number is the number of pre-set risk levels, each risk level corresponds to a rating model, and the rating model uses transaction information elements as observation nodes of a Gaussian hidden Markov model and adopts a forward reasoning algorithm to calculate the evaluation value of the hidden Markov model.

[0061] For each pre-set risk level, a rating model is constructed. Assuming that the risk level is divided into three levels: low risk, medium risk, and high risk, three rating models need to be constructed. Each rating model uses transaction information elements as observation nodes of the Gaussian Hidden Markov Model (GHMM). The training process of the GHMM model involves parameter estimation, that is, determining the state transition probability matrix, the initial state probability vector, and the observation probability distribution. These parameters are usually learned from historical transaction data through maximum likelihood estimation or the Baum-Welch algorithm.

[0062] The state transition probability matrix represents the probability of transitioning from one hidden state to another. The initial state probability vector represents the probability of being in each hidden state at the beginning of the transaction. The observation probability distribution is the probability of observing a specific transaction information element under a given hidden state.

[0063] The collected transaction data information is input into the above three rating models respectively, and the forward reasoning algorithm is used to calculate the evaluation value of each model. The forward reasoning algorithm can effectively calculate the probability of the model generating this sequence under a given observation sequence (i.e., transaction data information), and this probability is the evaluation value. The evaluation value reflects the degree of match between the transaction data and the model. The higher the evaluation value, the more the transaction data conforms to the risk characteristics represented by the model.

[0064] S103. The risk level corresponding to the rating model with the largest evaluation value is taken as the rating result.

[0065] Finally, the evaluation values ​​of the three models are compared, and the risk level corresponding to the rating model with the largest evaluation value is used as the rating result of this transaction. For example, if the evaluation value of the medium-risk model is the highest, then this transaction is rated as medium-risk.

[0066] Exemplarily, from among the three evaluation values ​​λ1, λ2, and λ3 generated by the hidden Markov model of the risk rating of the three customer transaction behaviors, one with the largest evaluation value is selected as the result of the risk rating of the customer transaction behavior.

[0067] If the hidden Markov model with the largest evaluation value is: λ1, the result of the risk level of the customer's transaction behavior is "low risk".

[0068] If the hidden Markov model with the largest evaluation value is: λ2, then the result of the risk level of the customer's transaction behavior is "medium risk".

[0069] If the hidden Markov model with the largest evaluation value is: λ3, then the result of the risk level of the customer's transaction behavior is "high risk".

[0070] The following is an explanation of the process of building the rating model.

[0071] In one possible implementation, the rating model construction process includes:

[0072] Step A1: define a second number of transaction information elements and a third number of hidden states, where the third number is the number of consecutive trading days within a first preset time period, and each hidden state corresponds to each trading day.

[0073] In order to rate different risk levels (low risk, medium risk, high risk), it is necessary to train an HMM model for each risk level. Each model will have the same observed variables and hidden state structure, but the parameters (such as hidden state transition probability, observation probability) will be different.

[0074] Exemplarily, based on the customer's daily transaction information, the observed variables are defined as a 4-dimensional vector, including: the number of transactions on the day, the maximum transaction amount on the day, the transaction time span on the day, and the earliest transaction time on the day.

[0075] Among them, the number of transactions per day refers to the total number of transactions that a customer has made on that day, including all incoming and outgoing transactions. This indicator can help identify the frequency of a customer's transactions, and frequent trading activities may be a sign of trading behavior. The maximum transaction amount per day refers to the maximum single transaction amount made by a customer on that day. A high single transaction may indicate the presence of large-scale fund transfers, which is one of the common behavioral characteristics in trading activities. The transaction time span per day refers to the length of time between the customer's earliest transaction time and the latest transaction time of the day. A longer transaction time span may mean that the customer is active in different time periods during the day, which helps to identify abnormal trading patterns. The earliest transaction time of the day refers to the time of the customer's first transaction of the day. This information can be used to observe the time distribution of customer trading activities. For example, too early or too late transaction times may not be consistent with normal business activities, indicating possible trading behavior.

[0076] For example, the number of hidden states can be defined as 3, which are denoted as S1, S2, and S3, representing the customer ratings two days ago, the previous day, and the current day, respectively.

[0077] In the embodiment of the present application, a "left-right" form is used to construct a hidden state Markov chain. The "left-right" form of hidden state Markov chain means that the hidden state in the model can only be converted from left to right in sequence, and cannot be reversed or skipped. Figure 2 , Figure 2 A schematic diagram of a hidden state Markov chain structure provided for an embodiment of the present application, wherein S1 and S2 can be converted to each other, S2 can be converted to S3, and the three hidden states S1, S2, and S3 can be self-converted.

[0078] Step A2: construct the third number of hidden states to obtain a hidden state Markov chain structure based on the form of sequential conversion from left to right, and set the second number of transaction information elements as observation nodes.

[0079] Step A3: constructing a rating model based on the observation nodes and the hidden state Markov chain structure.

[0080] The four transaction information elements of the customer: the number of transactions on the day, the maximum transaction amount on the day, the transaction time span on the day and the earliest transaction time on the day, are used as observation nodes of the Gaussian Hidden Markov Model.

[0081] These four observation nodes can fully capture the transaction characteristics of customers, including transaction frequency, amount, time and continuity, which are crucial for assessing the risk of transaction behavior. By using these specific transaction information as observation nodes, GHMM can more accurately model the customer's transaction behavior, thereby improving the accuracy of transaction behavior risk assessment. These observation nodes can be dynamically adjusted as the customer's transaction behavior changes, so that the model can adapt to the behavior patterns of different customers. Figure 3 , Figure 3 A schematic diagram of the relationship between hidden states and observed variables in a hidden Markov model provided in an embodiment of the present application.

[0082] In a possible implementation, the process of determining the model further includes:

[0083] The sample data set is input into the constructed rating model so that the rating model calculates the Gaussian distribution parameters in each hidden state based on the sample data set; the parameters of the rating model are adjusted based on the calculated Gaussian distribution parameters until the rating model meets preset conditions, and the preset conditions are used to characterize that the error between the result output by the model and the actual rating result is less than a preset error value, and the convergence speed of the model is not less than a preset speed value.

[0084] After the model is built, the sample data set of transaction information is read and input into the model structure of customer transaction behavior risk rating to learn the model parameters. The observation probability Gaussian distribution μ under the three hidden states is calculated respectively. i The expectation and covariance ∑ i The maximum likelihood estimate (i=1, 2, 3) is used to calculate the Gaussian distribution parameters (expectation and covariance) under each hidden state. This is a key step in model training. Through this step, the model can learn the typical trading behavior patterns of customers at different risk levels from historical trading data.

[0085] In this process, first load a sample dataset, which can be a table or database containing transaction records. Extract necessary features, such as transaction amount, transaction time, etc. For example, a set of sample datasets containing known rating results can be screened from historical transaction records. The dataset should cover various transaction types, including normal transactions and abnormal transactions, to ensure that the model can learn a wide range of data features.

[0086] For each hidden state, calculate the maximum likelihood estimate of the expectation and covariance of the Gaussian distribution of the observation probability in that state. The calculation method can be:

[0087]

[0088]

[0089] X i is the sample data, n is the number of samples in each hidden state, cov i (N, N) is the variance of the number of transactions in the ith hidden state, cov i (M, M) is the maximum transaction amount in the ith hidden state, cov i (T, T) is the transaction time span in the ith hidden state, cov i (K, K) is the earliest transaction time in the i-th hidden state.

[0090] In a hidden Markov model (HMM), the parameters of the observed probability distribution need to be initialized. By calculating the expectation and covariance of the Gaussian distribution of the sample data in different hidden states, a reasonable initial value can be provided for these parameters. This helps to improve the efficiency and accuracy of subsequent model training.

[0091] The Gaussian distribution parameters (expectation and covariance) in each hidden state reflect the statistical characteristics of the observed data in that state. Through these parameters, we can better understand and capture the characteristics of transaction behavior in different hidden states. For example, a hidden state may correspond to "normal transaction" and another hidden state may correspond to "suspicious transaction".

[0092] During model training, the parameters of the Gaussian distribution are continuously updated to maximize the likelihood function. The choice of initial parameters has a great impact on the convergence speed and final performance of the model. Reasonable selection of initial parameters can help the model converge to the optimal solution faster.

[0093] During the model training process, the performance indicators of the model are continuously monitored, including the error between the model output and the actual rating results and the convergence speed of the model. The specific adjustment steps are as follows:

[0094] Use the cross-validation method to evaluate the prediction error of the model. Calculate the difference between the rating results output by the model and the actual rating results. Commonly used error metrics include mean square error (MSE), root mean square error (RMSE), etc.

[0095] Record the changes in model parameters after each iteration and calculate the convergence speed of the model. The convergence speed can be measured by the magnitude of parameter changes between two adjacent iterations.

[0096] If the prediction error of the model is greater than the preset error value, or the convergence speed of the model is lower than the preset speed value, the model parameters need to be adjusted. Possible adjustment strategies include increasing the number of hidden states, modifying the initial parameter settings, adjusting the number of iterations, etc.

[0097] When the prediction error and convergence speed of the model meet the preset conditions, an independent validation dataset is used to further verify the performance of the model. The validation dataset should contain sample data that was not used in the training phase to ensure the generalization ability of the model.

[0098] In a possible implementation, the rating model uses a forward reasoning algorithm to calculate the hidden Markov model evaluation value, including:

[0099] Step B1: Calculate the forward probability of each hidden state on the trading day closest to the current time.

[0100] For example, three consecutive days of transaction information data can be input into the model as an observation sequence. The purpose of this is to allow the model to consider the customer's transaction behavior over a period of time, rather than just a single day's behavior.

[0101] The transaction information of three consecutive days is recorded as (O1, O2, O3, O4), and the observation data of each day t is O t They all include the number of transactions on the day, the maximum transaction amount on the day, the transaction time span on the day and the earliest transaction time on the day. According to the input data of the hidden Markov model observation node, the forward inference algorithm is used to calculate the hidden Markov model evaluation value: P(O|λ);

[0102] First, the forward probabilities of the three hidden states at time t=1 are calculated using the following calculation method:

[0103]

[0104] in, is the initial probability of the three hidden states,

[0105] is the probability of observing o1 in the 4 hidden states.

[0106] Step B2: recursively calculate the forward probabilities of other trading days within the first preset time period based on the calculated forward probability.

[0107] Recursively calculate the forward probability at time t=2,3, the calculation method includes:

[0108]

[0109] in, are the probabilities of converting from the i-th hidden state to hidden states S1, S2, and S3, respectively.

[0110] Step B3: Calculate the evaluation value of the rating model based on the forward probability of the trading day farthest from the current time.

[0111] Finally, according to the forward probability at time t=3, the evaluation value of the hidden Markov model λ is calculated, and the calculation method includes:

[0112] P(O1, O2, O3|λ)=α3(S1)+α3(S2)+α3(S3)

[0113] In a possible implementation, the transaction data information may be input into a first number of rating models in sequence based on a preset priority order.

[0114] According to the preset business logic and risk control strategy, each rating model is assigned a priority. The priority can be comprehensively assessed based on factors such as the model's historical accuracy, processing speed, and resource consumption. For example, a model with high historical accuracy has a higher priority; a model with fast processing speed and low resource consumption can also be given a higher priority.

[0115] All rating models can be sorted according to the determined priority rules to form an ordered model list. This list determines the order in which the transaction data information is input into each model. According to the above sorted model list, the prepared transaction data information is sequentially input into the first number of rating models.

[0116] After each rating model processes the transaction data information, it will output the corresponding rating results. These rating results are collected for subsequent risk assessment and decision making.

[0117] In one possible implementation, the overall risk level of the transaction can be determined based on the rating results of each model, combined with their priorities and weights. For example, the rating results of multiple models can be integrated through weighted average, voting mechanism or other integrated learning methods.

[0118] In summary, this application selects four transaction information elements, namely, the number of transactions on the day, the maximum transaction amount on the day, the transaction time span on the day, and the earliest transaction time on the day, as the observation nodes of the Gaussian Hidden Markov Model. These elements can reflect the characteristics of customers' transaction behavior from different angles, provide rich input information for the model, and help improve the prediction performance of the model.

[0119] It not only focuses on customer behavior on a single trading day, but also uses the inference algorithm of the hidden Markov model to process customer transaction information for multiple consecutive days. This time series analysis method can capture the long-term trends and cyclical changes in customer transaction behavior, thereby more accurately predicting customers' future behavioral intentions. It can identify abnormal patterns in customer transaction behavior, such as sudden increases in transaction frequency and large fluctuations in transaction amounts. These abnormal patterns are often closely related to risky transaction behaviors. Therefore, the accuracy of the target behavior intention prediction can be improved.

[0120] Through the forward reasoning algorithm of the hidden Markov model, the present invention can efficiently process these transaction information and accurately assess the risk of the customer's transaction behavior based on this information. The forward reasoning algorithm can reveal the potential pattern behind the customer's transaction behavior by calculating the probability distribution of each hidden state under a given observation sequence, thereby improving the accuracy and intelligence of risk rating.

[0121] The above are some specific implementations of the transaction rating method provided in the embodiment of the present application. Based on this, the present application also provides a corresponding transaction rating system. The system provided in the embodiment of the present application will be introduced from the perspective of functional modularization. Figure 4 A structural diagram of a transaction rating system provided in an embodiment of the present application.

[0122] The system comprises:

[0123] The acquisition unit 110 is used to acquire transaction data information within a first preset time period, where the first preset time period includes a plurality of consecutive transaction days;

[0124] An input unit 111 is used to input the transaction data information into a first number of rating models respectively to obtain evaluation values ​​corresponding to each model, wherein the first number is a preset number of risk levels, each risk level corresponds to a rating model, and the rating model uses transaction information elements as observation nodes of a Gaussian hidden Markov model and calculates the evaluation value of the hidden Markov model through a forward reasoning algorithm;

[0125] The determination unit 112 is used to take the risk level corresponding to the rating model with the largest evaluation value as the rating result.

[0126] The embodiment of the present application also provides corresponding devices and computer storage media for implementing the transaction rating scheme provided in the embodiment of the present application.

[0127] The device includes a memory and a processor, the memory is used to store instructions or codes, and the processor is used to execute the instructions or codes so that the device executes the transaction rating method described in any embodiment of the present application.

[0128] The computer storage medium stores codes, and when the codes are executed, a device executing the codes implements the test method described in any embodiment of the present application.

[0129] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other. For the system or device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.

[0130] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0131] It should be understood that the terms "center", "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating the orientation or position relationship, are based on the orientation or position relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.

[0132] It should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.

[0133] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0134] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0135] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A transaction rating method, characterized in that: include: Acquiring transaction data information within a first preset time period, where the first preset time period includes a plurality of consecutive trading days; Input the transaction data information into a first number of rating models respectively to obtain evaluation values ​​corresponding to each model, wherein the first number is a preset number of risk levels, each risk level corresponds to a rating model, and the rating model uses transaction information elements as observation nodes of a Gaussian hidden Markov model and calculates the evaluation value of the hidden Markov model through a forward reasoning algorithm; The risk level corresponding to the rating model with the largest evaluation value is taken as the rating result.

2. The method according to claim 1, characterized in that The construction process of the rating model includes: defining a second number of transaction information elements and a third number of hidden states, wherein the third number is the number of consecutive trading days within the first preset time period, and each hidden state corresponds to each trading day; The third number of hidden states are constructed to obtain a hidden state Markov chain structure in the form of sequential conversion from left to right, and the second number of transaction information elements are set as observation nodes; A rating model is constructed based on the observation nodes and the hidden state Markov chain structure.

3. The method according to claim 2, characterized in that The method further comprises: Inputting the sample data set into the constructed rating model so that the rating model calculates the Gaussian distribution parameters under each hidden state based on the sample data set; The parameters of the rating model are adjusted based on the calculated Gaussian distribution parameters until the rating model meets preset conditions, which are used to characterize that the error between the result output by the model and the actual rating result is less than a preset error value, and the convergence speed of the model is not less than a preset speed value.

4. The method according to claim 2, characterized in that: The transaction information elements include the number of transactions on the day, the maximum transaction amount on the day, the transaction time span on the day, and the earliest transaction time on the day. The setting of the second number of transaction information elements as observation nodes includes: The number of transactions on the day, the maximum transaction amount on the day, the transaction time span on the day and the earliest transaction time on the day are set as the observation nodes of each model.

5. The method according to claim 1, characterized in that The rating model uses a forward reasoning algorithm to calculate the hidden Markov model evaluation value in the following ways: Calculate the forward probability of each hidden state on the trading day closest to the current moment; Recursively calculate the forward probabilities of other trading days within the first preset time period based on the calculated forward probability; The evaluation value of the rating model is calculated based on the forward probability of the trading day farthest from the current moment.

6. The method according to claim 1, characterized in that The obtaining of transaction data information within a first preset time period includes: Acquiring preliminary data information within a first preset time period; The preliminary data information is screened based on the transaction information elements of the rating model to obtain transaction data information, wherein the data information type of each transaction day in the transaction data information corresponds to the transaction information elements of the rating model.

7. The method according to claim 1, characterized in that The step of inputting the transaction data information into a first number of rating models respectively includes: Based on a preset priority order, the transaction data information is input into a first number of rating models in sequence.

8. A transaction rating system, characterized in that: include: An acquisition unit, configured to acquire transaction data information within a first preset time period, wherein the first preset time period includes a plurality of consecutive transaction days; An input unit, used to input the transaction data information into a first number of rating models respectively, and obtain evaluation values ​​corresponding to each model, wherein the first number is a preset number of risk levels, each risk level corresponds to a rating model, and the rating model uses transaction information elements as observation nodes of a Gaussian hidden Markov model and calculates the evaluation value of the hidden Markov model through a forward reasoning algorithm; The determination unit is used to take the risk level corresponding to the rating model with the largest evaluation value as the rating result.

9. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the transaction rating method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed on a terminal device, the terminal device executes the transaction rating method according to any one of claims 1 to 7.