Risk identification method and device, storage medium and electronic equipment
Through the risk control model that does not include the event characterization layer, the problem of high hardware resource occupancy of the risk control model is solved, the accuracy of risk identification and the parameter volume of the risk control model are improved, and the more Accurate risk control.
Patent Information
- Application Number
- CN202411312840.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-19
- Publication Date
- 2025-01-10
AI Technical Summary
The existing risk control model uses the event characterization layer to extract features with high hardware resource occupancy, which makes it impossible to expand the parameters of other network layers, making the parameter amount of the risk control model unable to reach the parameter amount of the large model, which in turn leads to the accuracy of the output results. Low.
A risk control model that does not include the event representation layer is used to encode and matrix transform the sequence data to obtain a vector suitable for the input dimension of the risk control model, and input it into the risk control model for risk identification.
Risk identification is carried out through a large risk control model that does not include the event characterization layer and has large model parameters, which improves the accuracy of risk identification, which is conducive to more accurate risk control.
Smart Images

Figure CN119295078A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method, device, storage medium and electronic device for risk identification. Background Art
[0002] With the development of information technology and artificial intelligence, there are more and more service providers who provide support for users to perform business, such as payment service providers. At the same time, the security of privacy data has also received widespread attention.
[0003] At present, users may violate regulations when using the functions provided by the service provider to perform business. Therefore, the service provider can use a risk control model pre-trained based on transaction data to identify risks in the business performed by the user to determine whether the business performed by the user is risky. Among them, transaction data is behavioral sequence data composed of user transaction events. Generally, the risk control model includes at least an event representation layer, a fully connected layer, a coding layer, and a classification layer. The vector corresponding to the transaction data is first input into the event representation layer to determine the characteristics of the transaction data, and then the characteristics are input into the fully connected layer to obtain input features. The dimension of the input feature is the input dimension of the coding layer. After that, the input feature is input into the coding layer to obtain the coding feature, and the coding feature is input into the classification layer to obtain the recognition result.
[0004] However, when using the event representation layer to extract features, the high hardware resource usage makes it impossible to expand the parameters of other network layers of the risk control model, so that the number of parameters of the risk control model cannot reach the number of parameters of the large model, which in turn leads to low accuracy of the results output by the risk control model. Therefore, when hardware resources are limited, how to identify risks based on behavior sequence data to more accurately determine whether the business executed by the user is risky is a very important issue.
[0005] Based on this, this specification provides a method for risk identification. Summary of the invention
[0006] This specification provides a risk identification method, device, storage medium and electronic device to partially solve the above-mentioned problems existing in the prior art.
[0007] This manual adopts the following technical solutions:
[0008] This manual provides a method for risk identification, including:
[0009] Obtain several transaction events of the user to be risk-controlled, and determine the sequence data composed of each transaction event;
[0010] Encoding the sequence data to obtain a sequence vector;
[0011] According to a preset dimension, matrix transformation is performed on the sequence vector to obtain a first vector; the preset dimension is an input dimension of a pre-trained risk control model; the risk control model does not include an event representation layer, and a model parameter of the risk control model is not less than a target threshold;
[0012] The first vector is input into the risk control model to determine the risk identification result corresponding to the user to be risk controlled.
[0013] Optionally, the dimension of the first vector is the preset dimension;
[0014] According to a preset dimension, matrix transformation is performed on the sequence vector to obtain a first vector, which specifically includes:
[0015] Determine the dimension of the sequence vector and use it as the first dimension;
[0016] When the first dimension is a multiple of the preset dimension, a matrix transformation is performed on the sequence vector according to the preset dimension to obtain a first vector.
[0017] Optionally, it also includes:
[0018] When the first dimension is not a multiple of the preset dimension, determining multiples of the preset dimension and using them as multiples to be selected;
[0019] From the multiples to be selected, determine a multiple to be selected that is greater than the first dimension and use it as the first multiple;
[0020] determining a difference between the first multiple and the first dimension;
[0021] From the first multiples, determine the first multiple corresponding to the minimum difference and use it as the target multiple;
[0022] Filling the sequence vector to obtain a second vector whose dimension is a multiple of the target;
[0023] Perform a matrix transformation on the second vector according to a preset dimension to obtain a first vector.
[0024] Optionally, the risk control model includes a pooling layer; the risk control model does not include a fully connected layer;
[0025] Inputting the first vector into the risk control model to determine the risk identification result corresponding to the user to be risk controlled specifically includes:
[0026] Inputting the first vector into the pooling layer of the risk control model to obtain a third vector;
[0027] The third vector is input into the risk control model to determine the risk identification result corresponding to the user to be risk controlled.
[0028] Optionally, the risk control model includes a coding layer, and the input dimension of the coding layer is the preset dimension;
[0029] Inputting the first vector into the risk control big model to determine the risk identification result corresponding to the user to be risk controlled specifically includes:
[0030] Inputting the first vector into the coding layer of the risk control model to determine sequence features;
[0031] According to the sequence characteristics, a risk identification result corresponding to the user to be risk controlled is determined.
[0032] Optionally, the risk control model further includes a classification layer;
[0033] Determining the risk identification result corresponding to the user to be risk controlled according to the sequence characteristics specifically includes:
[0034] The sequence features are input into the classification layer of the risk control model to determine the risk identification result corresponding to the user to be risk controlled.
[0035] Optionally, pre-train a large risk control model, including:
[0036] Determine sequence data and use it as a training sample, encode the training sample, and determine an initial vector corresponding to the training sample; wherein the sequence data includes several transaction events in the user's history;
[0037] According to a preset dimension, the initial vector is subjected to matrix transformation to obtain a training vector; the preset dimension is the input dimension of the large risk control model to be trained;
[0038] Input the training vector into the risk control model to be trained, and determine the recognition result corresponding to the training sample; the risk control model to be trained does not include an event representation layer, and the model parameter of the risk control model to be trained is not less than a target threshold;
[0039] Determine the label of the training sample, and train the risk control large model to be trained based on the difference between the recognition result and the label.
[0040] This specification provides a risk identification device, including:
[0041] An acquisition module is used to acquire several transaction events of the user to be risk-controlled, and to determine the sequence data composed of each transaction event;
[0042] An encoding module, used for encoding the sequence data to obtain a sequence vector;
[0043] An alignment module, configured to perform matrix transformation on the sequence vector according to a preset dimension to obtain a first vector; the preset dimension is an input dimension of a pre-trained risk control model; the risk control model does not include an event representation layer, and a model parameter of the risk control model is not less than a target threshold;
[0044] The identification module is used to input the first vector into the risk control model to determine the risk identification result corresponding to the user to be risk controlled.
[0045] Optionally, the dimension of the first vector is the preset dimension;
[0046] The alignment module is specifically used to determine the dimension of the sequence vector and use it as the first dimension; when the first dimension is a multiple of the preset dimension, perform matrix transformation on the sequence vector according to the preset dimension to obtain the first vector.
[0047] Optionally, the alignment module is also used to, when the first dimension is not a multiple of the preset dimension, determine each multiple of the preset dimension and use them as each candidate multiple; determine a candidate multiple that is greater than the first dimension from the candidate multiples and use it as the first multiple; determine the difference between the first multiple and the first dimension; determine the first multiple corresponding to the minimum difference from the first multiples and use it as the target multiple; fill the sequence vector to obtain a second vector whose dimension is the target multiple; and perform a matrix transformation on the second vector according to the preset dimension to obtain a first vector.
[0048] Optionally, the risk control model includes a pooling layer; the risk control model does not include a fully connected layer;
[0049] The identification module is specifically used to input the first vector into the pooling layer of the risk control model to obtain a third vector; input the third vector into the risk control model to determine the risk identification result corresponding to the user to be risk controlled.
[0050] Optionally, the risk control model includes a coding layer, and the input dimension of the coding layer is the preset dimension;
[0051] The identification module is specifically used to input the first vector into the coding layer of the risk control model to determine the sequence characteristics; and determine the risk identification result corresponding to the user to be risk controlled according to the sequence characteristics.
[0052] Optionally, the risk control model further includes a classification layer;
[0053] The identification module is specifically used to input the sequence features into the classification layer of the risk control model to determine the risk identification result corresponding to the user to be risk controlled.
[0054] Optionally, the device further comprises:
[0055] A training module is used to determine sequence data and use it as a training sample, encode the training sample, and determine the initial vector corresponding to the training sample; wherein the sequence data includes several transaction events in the user's history; the initial vector is matrix transformed according to a preset dimension to obtain a training vector; the preset dimension is the input dimension of the risk control model to be trained; the training vector is input into the risk control model to be trained to determine the recognition result corresponding to the training sample; the risk control model to be trained does not include an event representation layer, and the model parameters of the risk control model to be trained are not less than a target threshold; determine the label of the training sample, and train the risk control model to be trained based on the difference between the recognition result and the label.
[0056] This specification provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned risk identification method is implemented.
[0057] This specification provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned risk identification method when executing the program.
[0058] At least one of the above technical solutions adopted in this specification can achieve the following beneficial effects:
[0059] In the risk identification method provided in this specification, when performing risk identification, the server may first obtain several transaction events of the user to be risk controlled, and determine the sequence data composed of each transaction event. Encode the sequence data to obtain a sequence vector. According to the preset dimension, perform a matrix transformation on the sequence vector to obtain a first vector. Input the first vector into the risk control model to determine the risk identification result corresponding to the user to be risk controlled. The risk control model does not include an event representation layer, and the model parameters of the risk control model are not less than the target threshold.
[0060] It can be seen from the above method that in this method, when performing risk identification, several transaction events of the user to be risk controlled are first obtained, and the sequence data composed of each transaction event is determined. The sequence data is encoded to obtain a sequence vector. According to the preset dimension, the sequence vector is matrix transformed to obtain a first vector. The first vector is input into the risk control large model to determine the risk identification result corresponding to the user to be risk controlled. The risk identification of the user to be risk controlled is performed by the risk control large model that does not include the event representation layer and has large model parameters, so that the risk identification result obtained is more accurate, which is conducive to more precise risk control of the user to be risk controlled. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] The drawings described herein are used to provide a further understanding of this specification and constitute a part of this specification. The illustrative embodiments and descriptions of this specification are used to explain this specification and do not constitute an improper limitation on this specification. In the drawings:
[0062] Figure 1 A flowchart of a risk identification method in this manual;
[0063] Figure 2 A schematic diagram of risk identification provided in this manual;
[0064] Figure 3 A schematic diagram for determining risk identification results provided in this specification;
[0065] Figure 4 A schematic diagram of a risk identification process based on a risk control big model provided in this specification;
[0066] Figure 5 A schematic diagram of the training process of a large risk control model provided in this specification;
[0067] Figure 6 A schematic diagram of a hierarchical label provided in this specification;
[0068] Figure 7 A schematic diagram of a risk identification device provided in this manual;
[0069] Figure 8 The corresponding Figure 1 Schematic diagram of electronic equipment. DETAILED DESCRIPTION
[0070] In order to make the purpose, technical solutions and advantages of this specification more clear, the technical solutions of this specification will be clearly and completely described below in combination with the specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this specification.
[0071] The embodiments of this specification provide a method, device, storage medium and electronic device for risk identification. The technical solutions provided by the embodiments of this specification are described in detail below in conjunction with the accompanying drawings.
[0072] Figure 1 The following is a flow chart of a risk identification method in this specification, which specifically includes the following steps:
[0073] S100: Acquire several transaction events of the user to be risk-controlled, and determine sequence data composed of each transaction event.
[0074] Generally, when risk identification is performed on the business performed by users, such as Figure 2 As shown, Figure 2 This is a schematic diagram of risk identification provided in this manual. Figure 2 The risk control model shown includes an event representation layer, a fully connected layer, a coding layer, and a classification layer. Generally, the user's sequence data is obtained first, and the sequence data consists of several transaction events. Then the sequence data is encoded to obtain a vector, and the vector is input into the event representation layer of the risk control model to determine the characteristics of the sequence data. Then the characteristics are input into the fully connected layer of the risk control model to obtain input characteristics with the dimension of the input dimension of the coding layer of the risk control model. After that, the input characteristics are input into the coding layer of the risk control model to obtain coding characteristics, and then the user's recognition result is determined based on the coding characteristics. Specifically, the risk control model may also include a classification layer, and the coding characteristics may be input into the classification layer of the risk control model to determine the user's recognition result. Among them, the above-mentioned risk control model is an ordinary machine learning model, and the model parameters of the risk control model do not reach the model parameters of the large model.
[0075] However, the existing text, image, sound and other data can be regarded as sequence data composed of different nodes, namely words, image blocks, and sound fragments. Correspondingly, the nodes of the sequence data are the transaction events of the users. The transaction event is structured data composed of several attributes. Assuming that the transaction event is structured data composed of N attributes, and the dimension of each attribute is D, then the dimension corresponding to a single transaction event is N×D. However, in text, image, voice and other data, a single node only needs D dimensions to express. Due to the uniqueness of sequence data, when the event representation layer is used to extract features, the memory occupancy rate (i.e., the hardware resource occupancy rate) of the intermediate activation value of the event representation layer is higher than the memory occupancy rate of the intermediate activation value of the network layer of the model of the same scale such as text, image, and sound. The memory occupancy rate of the former is approximately N times that of the latter. In practical applications, N is usually between 50 and 200. Therefore, when the event representation layer is used to extract features, the hardware resource occupancy rate is high, which makes it impossible to expand the parameters of other network layers of the risk control model, so that the number of parameters of the risk control model cannot reach the number of parameters of the large model, which leads to low accuracy of the results output by the risk control model.
[0076] Based on this, in this specification, the device used for risk identification can obtain several transaction events of the user to be risk controlled, and determine the sequence data composed of each transaction event. Among them, the device used for risk identification can be a server, a client or software, or an electronic device such as a desktop computer, a laptop computer, etc. For the convenience of description, the risk identification method provided in this specification is described below with the server as the execution subject.
[0077] The above-mentioned risk control users are users who need to be identified for risks, and the transaction events are transaction events generated when the risk control users perform transaction operations. The transaction events are structured data composed of several attributes and attribute values. The attributes can be event name, product name and transaction time. Of course, they can also include transaction amount, which is not specifically limited in this specification. The transaction event can be expressed as "attribute 1: x, attribute 2: x, attribute 3: x, ... attribute N: x", where N represents the number of attributes and x represents the attribute value. Specifically, taking the attributes including event name, product name, transaction time and transaction amount as an example, the transaction event can be "event name: payment, product name: lunch, transaction time: 12:00, transaction amount: 23".
[0078] The above sequence data includes several transaction events, and the sequence data can be expressed as "{transaction event 1}, {transaction event 2}, {transaction event 3}, ... {transaction event S}", where S represents the number of transaction events. Since each transaction event is structured data composed of several attributes and attribute values, the sequence data can also be expressed as "{attribute 1: x, attribute 2: x, attribute 3: x, ... attribute N: x}, {attribute 1: x, attribute 2: x, attribute 3: x, ... attribute N: x}, {attribute 1: x, attribute 2: x, attribute 3: x, ... attribute N: x}, ... {attribute 1: x, attribute 2: x, attribute 3: x, ... attribute N: x}". For example, assuming that the sequence data includes 3 transaction events, and each transaction event is structured data consisting of attributes such as event name, product name, transaction time and transaction amount, and attribute values, then the sequence data can be "{event name: payment, product name: lunch, transaction time: 12:00, transaction amount: 23}, {event name: payment, product name: dinner, transaction time: 18:00, transaction amount: 32}, {event name: x, product name: drink, transaction time: 15:00, transaction amount: 18}".
[0079] S102: Encode the sequence data to obtain a sequence vector.
[0080] In this specification, the server may encode the sequence data to obtain a sequence vector. Specifically, the server may use a pre-set algorithm or a pre-trained network layer to encode the sequence data to obtain a sequence vector. Of course, the server may also use any existing technology to encode the sequence data to obtain a sequence vector, which is not specifically limited in this specification.
[0081] S104: Perform matrix transformation on the sequence vector according to a preset dimension to obtain a first vector; the preset dimension is the input dimension of the pre-trained risk control model; the risk control model does not include an event representation layer, and the model parameters of the risk control model are not less than a target threshold.
[0082] In this specification, the server may perform a matrix transformation on the sequence vector according to a preset dimension to obtain a first vector. The preset dimension is the input dimension of the pre-trained risk control model. The risk control model is a model pre-trained by the server, and the risk control model is used to identify risks for users. The risk control model does not include an event representation layer, that is, the risk control model does not include the event representation layer of the existing ordinary risk control model. Moreover, the model parameters of the risk control model are not less than the target threshold, while the model parameters of the existing ordinary risk control model are relatively small, and the model parameters of the risk control model are larger than the model parameters of the existing ordinary risk control model. The target threshold is a preset threshold, and the target threshold can be 1B. The dimension of the above-mentioned first vector is a preset dimension.
[0083] In this specification, since a large amount of hardware resources are required when extracting features using the event representation layer in the existing ordinary risk control model, the existing ordinary risk control model is limited by hardware resources, and the model parameters of the existing ordinary risk control model are relatively small, the model parameters of the large risk control model are greater than the model parameters of the existing ordinary risk control model.
[0084] In the present specification, when performing a matrix transformation on a sequence vector according to a preset dimension to obtain a first vector, the server may first determine the dimension of the sequence vector and use it as the first dimension. When the first dimension is a multiple of the preset dimension, the sequence vector is matrix transformed according to the preset dimension to obtain the first vector. Among them, when the first dimension is a multiple of the preset dimension, it means that the first dimension can divide the preset dimension, so the dimension of each row of the first vector is the preset dimension, that is, the first vector has a preset dimension column, and the number of rows corresponding to the first vector is the result of dividing the first dimension by the preset dimension. Specifically, the server may first determine the dimension of the sequence vector and use it as the first dimension. When the first dimension is a multiple of the preset dimension, determine the result of dividing the first dimension by the preset dimension, use the result as the number of rows, use the preset dimension as the number of columns, perform a matrix transformation on the sequence vector, and obtain the first vector, which is a matrix vector with result rows and preset dimension columns.
[0085] However, when the first dimension is not a multiple of the preset dimension, the server may determine each multiple of the preset dimension and use them as each multiple to be selected. From each multiple to be selected, determine a multiple to be selected that is greater than the first dimension and use it as the first multiple. Then, determine the difference between the first multiple and the first dimension. From the first multiple, determine the first multiple corresponding to the minimum difference and use it as the target multiple. Then fill the sequence vector to obtain a second vector with a dimension of the target multiple. Then, perform a matrix transformation on the second vector according to the preset dimension to obtain the first vector. Among them, the above-mentioned multiple to be selected is a multiple of the preset dimension, that is, the multiple to be selected is the product of a preset natural number and a preset dimension, and the preset natural number is a natural number in any range. Generally, the preset natural number can be set to all natural numbers in [1, 100]. Of course, it can also be set to a natural number in other ranges, and this specification does not make specific restrictions. The target multiple is the multiple with the smallest difference between the first multiple and the first dimension. The above-mentioned difference is the result obtained by subtracting the first dimension from the first multiple.
[0086] When the sequence vector is filled to obtain a second vector with a dimension multiple of the target, the server may use a null value to fill the first vector to obtain a second vector with a dimension multiple of the target. At this time, the dimension of the second vector obtained after filling is a multiple of the preset dimension, so the server may perform a matrix transformation on the second vector according to the preset dimension to obtain the first vector. The specific process is the same as the process of performing a matrix transformation on the sequence vector according to the preset dimension to obtain the first vector, and will not be repeated here.
[0087] In this specification, when performing matrix transformation on the sequence vector according to the preset dimension to obtain the first vector, the server may adopt a preset transformation algorithm to perform matrix transformation on the sequence vector according to the preset dimension to obtain the first vector. The transformation algorithm is preset by the server, and the transformation algorithm includes a padding algorithm and a matrix transformation algorithm. The padding algorithm may be a Padding algorithm, and the matrix transformation algorithm may be a Reshape algorithm. Of course, the server may also input the sequence vector into a pre-trained transformation layer to obtain the first vector, and the transformation layer is used to perform matrix transformation on the sequence vector according to the preset dimension.
[0088] S106: Input the first vector into the risk control model to determine the risk identification result corresponding to the user to be risk controlled.
[0089] In this specification, the server may input the first vector into the risk control big model to determine the risk identification result corresponding to the user to be risk controlled. Among them, the risk control big model is a big model pre-trained by the server, and the model parameter of the risk control big model may be 1B. The risk control big model does not include an event representation layer, and the risk control big model may at least include a coding layer, and the input dimension of the coding layer is a preset dimension. The above risk identification result may be one of risk and no risk, or one of various types of risks and no risk, which is not specifically limited in this specification.
[0090] Specifically, the server may input the first vector into the coding layer of the risk control model to determine the sequence features. According to the sequence features, the risk identification result corresponding to the user to be risk controlled is determined. Among them, the above-mentioned coding layer may be a Transformer. Since the risk control model does not include an event representation layer with a high hardware resource occupancy rate, the coding layer of the risk control model can be expanded. Since the hardware resources required to extract features using the event representation layer in the existing ordinary risk control model are large, the coding layer of the existing ordinary risk control model is limited by hardware resources, and the model parameters of the coding layer of the existing ordinary risk control model are small, so the model parameters of the coding layer in the risk control model are not less than the model parameters of the coding layer of the existing ordinary risk control model, so that the coding layer in the risk control model can better extract the features of the sequence data. In addition, since the dimension of the first vector input to the coding layer is a preset dimension, although the model parameters of the coding layer are consistent with the model parameters of the event representation layer in the existing, the hardware resources required when extracting the features of the sequence data using the coding layer are also less than the hardware resources required when extracting the features of the sequence data using the event representation layer in the existing.
[0091] When determining the risk identification results corresponding to the risk control users based on the sequence characteristics, Figure 3 As shown, Figure 3 A schematic diagram of determining risk identification results provided in this specification, the server can determine the candidate features whose distance from the sequence features is within a specified range in the pre-built retrieval library, and use them as target features. Determine the risk situation of the user corresponding to the target feature, and use it as the risk identification result of the user to be risk controlled. Among them, the retrieval library is pre-built by the server, and the retrieval library includes features obtained after feature extraction of the sequence data of each user, that is, the retrieval library includes several candidate features, and the users corresponding to the candidate features included in the retrieval library can be risky users or risk-free users. In addition, whether a user is risky can be determined by the risk control personnel based on the user's sequence data, that is, whether the user marked by the risk control personnel is risky.
[0092] Specifically, when there is a risk in the sequence data, the risk control personnel can mark the sequence data as risky, so the risk situation corresponding to the sequence data is risky, and the user corresponding to the sequence data is at risk. When there is no risk in the sequence data, the risk control personnel mark the sequence data as risk-free, the risk situation corresponding to the sequence data is risk-free, and the user corresponding to the sequence data is not at risk. Of course, whether the user is at risk can also be determined by any existing risk control identification system based on the user's sequence data, and this manual does not specifically limit it. Of course, the specific type of risk of risky users can also be marked by risk control personnel, and can also be determined by any existing risk control identification system, and this manual does not specifically limit it.
[0093] The above-mentioned specified range is a pre-set value. When the distance between a feature in the retrieval library and the sequence feature is within the specified range, it means that the feature is similar to the sequence feature. The risk situation of the user corresponding to the feature can be used as the risk situation corresponding to the user to be risk controlled, that is, the risk identification result. That is, when the feature is similar to the sequence feature, the user corresponding to the feature is at risk, and the user to be risk controlled corresponding to the sequence feature may also be at risk. Therefore, the risk situation of the user corresponding to the feature can be used as the risk identification result corresponding to the user to be risk controlled.
[0094] In this specification, the above-mentioned risk control model may also include a classification layer, which may be a network layer trained together with other network layers in the risk control model, or a pre-trained classification layer, which is not specifically limited in this specification. Based on this, when determining the risk identification result corresponding to the user to be risk controlled according to the sequence features, the server may input the sequence features into the classification layer of the risk control model to determine the risk identification result corresponding to the user to be risk controlled. Among them, the model parameters of the above-mentioned classification layer are not less than the model parameters of the classification layer of the existing ordinary risk control model. Since the event representation layer with high hardware resource occupancy rate is not included in the risk control model, the classification layer of the risk control model can be expanded. Since the hardware resources required to extract features using the event representation layer in the existing ordinary risk control model are large, the classification layer of the existing ordinary risk control model is limited by hardware resources, and the model parameters of the classification layer of the existing ordinary risk control model are small, so the model parameters of the classification layer in the risk control model are not less than the model parameters of the classification layer of the existing ordinary risk control model, so that the classification layer in the risk control model can more accurately determine the risk identification result of the user to be risk controlled.
[0095] In this specification, the above-mentioned risk control model includes a coding layer and a classification layer, such as Figure 4 As shown, Figure 4This is a schematic diagram of a risk identification process based on a risk control model provided in this specification. The server can input the first vector into the encoding layer of the risk control model to obtain a sequence feature. Then the sequence feature is input into the classification layer of the risk control model to determine the risk identification result corresponding to the risk control user.
[0096] It can be seen from the above method that when performing risk identification, the server can first obtain several transaction events of the user to be risk controlled, and determine the sequence data composed of each transaction event. Encode the sequence data to obtain a sequence vector. According to the preset dimension, perform a matrix transformation on the sequence vector to obtain a first vector. Input the first vector into the risk control large model to determine the risk identification result corresponding to the user to be risk controlled. By using the risk control large model that does not include the event representation layer and has large model parameters to identify the risk of the user to be risk controlled, the risk identification result obtained is more accurate, which is conducive to more precise risk control of the user to be risk controlled.
[0097] In this specification, the risk control model may also include a pooling layer. When the first vector is input into the risk control model in the above step S106 and the risk identification result corresponding to the user to be risk controlled is determined, the server may input the first vector into the pooling layer of the risk control model to obtain a third vector. The third vector is input into the risk control model to determine the risk identification result corresponding to the user to be risk controlled. Among them, the existing common risk control model may include a pooling layer. Since the risk control model does not include an event representation layer with a high hardware resource occupancy rate, the pooling layer of the risk control model can be expanded. Since the hardware resources required to extract features using the event representation layer in the existing common risk control model are large, the pooling layer of the existing common risk control model is limited by hardware resources, and the model parameters of the pooling layer of the existing common risk control model are small, the model parameters of the pooling layer in the risk control model are not less than the model parameters of the pooling layer of the existing common risk control model.
[0098] In this specification, since the dimension of the feature of the sequence data output by the event representation layer of the existing common risk control model is inconsistent with the input dimension of the encoding layer, the existing common risk control model includes a fully connected layer, which is used to align the dimension of the feature of the sequence data output by the event representation layer with the input dimension of the encoding layer. However, Figure 1 The risk identification method shown is to perform matrix transformation on the sequence vector to align the preset dimension, that is, the input dimension of the encoding layer of the risk control model. Therefore, the above-mentioned risk control model does not include a fully connected layer. At the same time, by avoiding adding a fully connected layer outside the structure of the encoding layer, it is ensured that the network structure of the entire risk control model has a complete residual connection to alleviate the problem of gradient disappearance during the training of the risk control model.
[0099] In this specification, the above-mentioned risk control model can be a pre-trained model. When the risk control model is pre-trained, Figure 5 As shown, Figure 5 The schematic diagram of the training process of a risk control model provided in this specification is that the server can determine the sequence data and use it as a training sample, and encode the training sample to determine the initial vector corresponding to the training sample. Then, according to the preset dimension, the initial vector is matrix transformed to obtain the training vector. The training vector is input into the risk control model to be trained to determine the recognition result corresponding to the training sample. After that, the server can determine the label of the training sample, and train the risk control model to be trained according to the difference between the recognition result and the label. Among them, the above-mentioned sequence data includes several transaction events in the user's history, and the transaction event is a structured data composed of several attributes and attribute values. The above-mentioned process of determining the initial vector is similar to the process described in the above-mentioned step S102, and will not be repeated here. The above-mentioned preset dimension is the input dimension of the risk control model to be trained, and the above-mentioned process of obtaining the training vector is similar to the process described in the above-mentioned step S104, and will not be repeated here. The above-mentioned risk control model to be trained does not include an event representation layer, and the model parameters of the risk control model to be trained are not less than the target threshold. The above identification result may be one of risk and no risk, or one of various types of risks and no risk, which is not specifically limited in this specification.
[0100] In this specification, the above-mentioned large risk control model to be trained includes at least a coding layer. When the training vector is input into the large risk control model to be trained and the recognition result corresponding to the training sample is determined, the server can input the training vector into the coding layer of the large risk control model to be trained, determine the input feature, and then determine the recognition result corresponding to the training sample based on the input feature.
[0101] When determining the recognition result corresponding to the training sample based on the input feature, the server can determine the candidate feature whose distance from the input feature is within a specified range in the pre-built search library and use it as the target feature. The risk situation of the user corresponding to the target feature is determined and used as the recognition result corresponding to the training sample.
[0102] In addition, the server may also input the input features into the classification layer of the large risk control model to be trained to determine the recognition results corresponding to the training samples. The classification layer may be a pre-trained classification layer or an untrained classification layer. The classification layer may be trained together with the large risk control model to be trained, which is not specifically limited in this specification. For ease of explanation, this specification takes the classification layer as an untrained network layer and trains it together with the large risk control model to be trained as an example.
[0103] In this specification, when the risk control large model to be trained is trained based on the difference between the recognition results and the labels, the server can determine the difference based on the recognition results and the labels, and based on the difference, use a preset loss function to determine the loss, and based on the loss, use loss scaling technology, i.e., Loss Scale technology, to train the risk control large model to be trained.
[0104] In this specification, the labels of the above training samples can be risk situations marked by risk control personnel, that is, they can be one of risky and no risk, or one of various types of risks and no risk. This specification does not make specific limitations.
[0105] In addition, with the development of payment services, risks are also changing rapidly. There may be a hierarchical relationship between risks. The risks can be divided into black, white and gray. Gray risks can also be divided into hidden cases and non-hidden cases. Black risks can also be divided into confirmed existence and doubtful risks. Confirmed existence can also be divided into different specific types of risks. The different specific types of risks can be information leakage, device loss, etc., and doubtful risks can also be divided into different types of doubtful risks. The different types of doubtful risks can be suspected operations by relatives and friends, suspected operations by oneself, mobile phone Trojans, etc. Based on this, the label corresponding to the above training samples can be a hierarchical label. The hierarchical label includes sub-labels corresponding to several levels, each sub-label corresponds to a level, and the number of sub-labels is equal to the number of levels. There are as many sub-labels as there are levels. Each sub-label can be a label value composed of several 0s and 1s. The number of risk types included in the level is the number of label values corresponding to the sub-label of the level. 0 indicates a miss, and 1 indicates a hit. Therefore, the above recognition result can be a recognition result of a hierarchical structure. The specific structure is similar to the structure of the above label, and it will not be repeated here.
[0106] For example, suppose there are three levels, the first level is black, white and gray, the second level includes hidden cases, non-hidden cases, confirmed existence and doubtful. The third level includes information leakage, device loss, suspected operation by relatives and friends, suspected operation by oneself, mobile phone Trojans, etc. Figure 6 As shown, Figure 6 Schematic diagram of a hierarchical label provided in this specification. Assuming that the training sample is determined to have a black risk and a black risk of information leakage, the label corresponding to the training sample can be "100100010000", where the first three digits represent the first level of black, white, and gray (i.e. Figure 6 The first level is from left to right as shown in the figure), and hits black, that is, the first position is 1 and the other positions are 0. The first three digits "100" are the sub-labels corresponding to the first level. The four digits after the first three digits, that is, "1000", are the sub-labels corresponding to the second level. The four-digit value indicates the existence, doubt, hidden case, and non-hidden case (i.e. Figure 6The training sample hit is confirmed to exist, so the first position of the four-digit value is 1, and the other positions are 0. The last five digits, "10000", are the sub-labels corresponding to the third level. The five-digit values represent information leakage, device loss, suspected operation by relatives and friends, suspected operation by oneself, mobile phone Trojan (i.e. Figure 6 The training sample hits information leakage, so the first position of the five-digit value is set to 1, and the other positions are set to 0.
[0107] In this specification, the above recognition result includes several sub-results, and the above classification layer may include several sub-classification layers, each of which is used to determine the sub-results corresponding to each level. Based on this, when determining the recognition result corresponding to the training sample according to the input features, the server may also input the input features into each classification layer of the risk control model to be trained, determine the sub-results output by each classification layer, and determine the recognition result composed of the sub-results. Among them, each classification layer is used to determine the sub-results corresponding to each level, and each level is pre-set.
[0108] In this specification, the above-mentioned large risk control model to be trained may also include a pooling layer. When the training vector is input into the large risk control model to be trained and the recognition result corresponding to the training sample is determined, the server may input the training vector into the pooling layer of the large risk control model to be trained to obtain a pooling vector. The pooling vector is then input into the large risk control model to be trained to determine the recognition result corresponding to the training sample.
[0109] In this specification, the above-mentioned large risk control model to be trained does not include a fully connected layer. In addition, the above-mentioned large risk control model to be trained or the coding layer in the large risk control model is a Transformer, and the coding layer is a network layer constructed based on pre-normalization, i.e., PreNorm.
[0110] In this specification, when pre-training the risk control model, the pre-training + fine-tuning paradigm can be used to train the risk control model to be trained. Specifically, the server can obtain the first sample and determine the label of the first sample. Based on the first sample and the label, the process of training the risk control model to be trained (i.e. Figure 5 The process shown in the figure) is to pre-train the initial risk control model. Then, a second sample is obtained and the label of the second sample is determined. Based on the second sample and the label, the initial risk control model is fine-tuned to obtain the risk control model. This process is similar to the process of training the risk control model to be trained (i.e. Figure 5The process shown in the figure is the same as that in the above-mentioned process), except that the above-mentioned risk control big model to be trained is the initial risk control big model, that is, the above-mentioned risk control big model to be trained is a pre-trained big model. Among them, the above-mentioned first sample and the second sample can both be sequence data composed of a number of transaction events of the user, but the first sample can be randomly acquired by the server, and the second sample can be acquired by the server based on the downstream task. The type of label corresponding to the first sample and the type of label corresponding to the second sample may be different, that is, the type of label corresponding to the first sample is different from the type of label corresponding to the second sample. The initial risk control big model trained based on the first sample and the label can be used to identify different types of risks, while the risk control big model trained based on the second sample and the label is used to perform downstream tasks, that is, to identify the type of risk corresponding to the downstream task.
[0111] In this specification, each transaction event corresponds to a vector, the sequence vector includes several subsequence vectors, each subsequence vector corresponds to each transaction event in the sequence data, and similarly, the initial vector also includes several sub-initial vectors, each sub-initial vector corresponds to each transaction event in the training sample. Therefore, the first vector also includes several sub-first vectors, and the training vector also includes several sub-training vectors. The sequence feature also includes several sub-sequence features, and the input feature also includes several sub-input features.
[0112] Therefore, taking the above encoding of sequence data to obtain a sequence vector as an example, the server can encode each transaction event included in the sequence data to obtain a subsequence vector corresponding to each transaction event, and then determine the sequence vector composed of each subsequence vector. Taking the example of performing a matrix transformation on the sequence vector according to a preset dimension to obtain a first vector, the server can perform a matrix transformation on each subsequence vector included in the sequence vector according to the preset dimension to obtain a sub-first vector. Then determine the first vector composed of each sub-first vector.
[0113] In addition, taking the example of inputting the first vector into the coding layer of the risk control model to determine the sequence feature, the server may input each sub-first vector included in the first vector into the coding layer of the risk control model to determine the sub-sequence feature, and then determine the sequence feature composed of the sub-sequence features.
[0114] In this specification, after obtaining the risk identification result, the server can perform risk control on the risk-controlled user according to the risk identification result of the risk-controlled user. Specifically, the server can determine the strategy for risk control of the risk-controlled user according to the risk identification result of the risk-controlled user, and perform risk control on the risk-controlled user according to the determined strategy. Among them, the strategy is determined according to the risk identification result of the risk-controlled user. When the risk of the risk-controlled user is high, it is necessary to adopt a more stringent strategy to perform risk control on the risk-controlled user. For example, if it is identified that user 1 is at high risk, the strategy may be to restrict user 1 from using payment tools for payment. However, when the risk of the risk-controlled user is low or there is no risk, it is necessary to adopt a more relaxed strategy to perform risk control on the risk-controlled user. For example, if it is identified that the risk of user 1 is relatively low, the strategy may be to restrict the number of times user 1 uses payment tools for payment each month.
[0115] When determining the strategy for risk control of the user to be risk controlled based on the risk identification result of the user to be risk controlled, the server can send the risk identification result of the user to be risk controlled to the risk control personnel, and the risk control personnel formulates the strategy based on the received risk identification result and returns it. Of course, the server can also determine the strategy corresponding to the risk identification result from the pre-built strategy library based on the risk identification result of the user to be risk controlled.
[0116] The above is a method for risk identification provided by one or more embodiments of this specification. Based on the same idea, this specification also provides a corresponding risk identification device, such as Figure 7 shown.
[0117] Figure 7 A schematic diagram of a risk identification device provided in this manual specifically includes:
[0118] The acquisition module 200 is used to acquire a number of transaction events of the user to be risk-controlled, and determine the sequence data composed of each transaction event;
[0119] An encoding module 202, used to encode the sequence data to obtain a sequence vector;
[0120] The alignment module 204 is used to perform matrix transformation on the sequence vector according to a preset dimension to obtain a first vector; the preset dimension is the input dimension of the pre-trained risk control model; the risk control model does not include an event representation layer, and the model parameter of the risk control model is not less than a target threshold;
[0121] The identification module 206 is used to input the first vector into the risk control model to determine the risk identification result corresponding to the user to be risk controlled.
[0122] Optionally, the dimension of the first vector is the preset dimension;
[0123] The alignment module 204 is specifically used to determine the dimension of the sequence vector and use it as the first dimension; when the first dimension is a multiple of the preset dimension, perform matrix transformation on the sequence vector according to the preset dimension to obtain the first vector.
[0124] Optionally, the alignment module 204 is also used to, when the first dimension is not a multiple of the preset dimension, determine each multiple of the preset dimension and use them as each candidate multiple; determine a candidate multiple that is greater than the first dimension from the candidate multiples and use it as the first multiple; determine the difference between the first multiple and the first dimension; determine the first multiple corresponding to the minimum difference from the first multiples and use it as the target multiple; fill the sequence vector to obtain a second vector whose dimension is the target multiple; and perform a matrix transformation on the second vector according to the preset dimension to obtain a first vector.
[0125] Optionally, the risk control model includes a pooling layer; the risk control model does not include a fully connected layer;
[0126] The identification module 206 is specifically used to input the first vector into the pooling layer of the risk control model to obtain a third vector; input the third vector into the risk control model to determine the risk identification result corresponding to the user to be risk controlled.
[0127] Optionally, the risk control model includes a coding layer, and the input dimension of the coding layer is the preset dimension;
[0128] The identification module 206 is specifically used to input the first vector into the coding layer of the risk control model to determine the sequence characteristics; and determine the risk identification result corresponding to the user to be risk controlled according to the sequence characteristics.
[0129] Optionally, the risk control model further includes a classification layer;
[0130] The identification module 206 is specifically used to input the sequence features into the classification layer of the risk control model to determine the risk identification result corresponding to the user to be risk controlled.
[0131] Optionally, the device further comprises:
[0132] The training module 208 is used to determine sequence data and use it as a training sample, encode the training sample, and determine the initial vector corresponding to the training sample; wherein the sequence data includes several transaction events in the user's history; the initial vector is matrix transformed according to a preset dimension to obtain a training vector; the preset dimension is the input dimension of the risk control model to be trained; the training vector is input into the risk control model to be trained to determine the recognition result corresponding to the training sample; the risk control model to be trained does not include an event representation layer, and the model parameters of the risk control model to be trained are not less than a target threshold; determine the label of the training sample, and train the risk control model to be trained based on the difference between the recognition result and the label.
[0133] This specification also provides a computer-readable storage medium, which stores a computer program, which can be used to execute the above Figure 1 The risk identification method shown.
[0134] This manual also provides Figure 8 The schematic structure diagram of the electronic device shown in FIG. Figure 8 As mentioned above, at the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and may also include other hardware required for the business. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to achieve the above Figure 1 Of course, in addition to the software implementation, this specification does not exclude other implementations, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0135] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.
[0136] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.
[0137] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0138] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0139] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0140] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0141] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0142] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0143] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0144] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0145] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0146] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity 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, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0147] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0148] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media including storage devices.
[0149] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0150] The above description is only an embodiment of the present specification and is not intended to limit the present specification. For those skilled in the art, the present specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification shall be included in the scope of the claims of the present specification.
Claims
1. A method for risk identification, comprising: Obtain several transaction events of the user to be risk-controlled, and determine the sequence data composed of each transaction event; Encoding the sequence data to obtain a sequence vector; According to a preset dimension, matrix transformation is performed on the sequence vector to obtain a first vector; the preset dimension is an input dimension of a pre-trained risk control model; the risk control model does not include an event representation layer, and a model parameter of the risk control model is not less than a target threshold; The first vector is input into the risk control model to determine the risk identification result corresponding to the user to be risk controlled.
2. The method according to claim 1, wherein the dimension of the first vector is the preset dimension; According to a preset dimension, matrix transformation is performed on the sequence vector to obtain a first vector, which specifically includes: Determine the dimension of the sequence vector and use it as the first dimension; When the first dimension is a multiple of the preset dimension, a matrix transformation is performed on the sequence vector according to the preset dimension to obtain a first vector.
3. The method of claim 2, further comprising: When the first dimension is not a multiple of the preset dimension, determining multiples of the preset dimension and using them as multiples to be selected; From the multiples to be selected, determine a multiple to be selected that is greater than the first dimension and use it as the first multiple; determining a difference between the first multiple and the first dimension; From the first multiples, determine the first multiple corresponding to the minimum difference and use it as the target multiple; Filling the sequence vector to obtain a second vector whose dimension is a multiple of the target; Perform a matrix transformation on the second vector according to a preset dimension to obtain a first vector.
4. The method according to claim 1, wherein the risk control model includes a pooling layer; the risk control model does not include a fully connected layer; Inputting the first vector into the risk control model to determine the risk identification result corresponding to the user to be risk controlled specifically includes: Inputting the first vector into the pooling layer of the risk control model to obtain a third vector; The third vector is input into the risk control model to determine the risk identification result corresponding to the user to be risk controlled.
5. The method according to claim 1, wherein the risk control model comprises a coding layer, and the input dimension of the coding layer is the preset dimension; Inputting the first vector into the risk control model to determine the risk identification result corresponding to the user to be risk controlled specifically includes: Inputting the first vector into the coding layer of the risk control model to determine sequence features; According to the sequence characteristics, a risk identification result corresponding to the user to be risk controlled is determined.
6. The method according to claim 5, wherein the risk control model further comprises a classification layer; Determining the risk identification result corresponding to the user to be risk controlled according to the sequence characteristics specifically includes: The sequence features are input into the classification layer of the risk control model to determine the risk identification result corresponding to the user to be risk controlled.
7. The method according to claim 1, pre-training a large risk control model, specifically comprising: Determine sequence data and use it as a training sample, encode the training sample, and determine an initial vector corresponding to the training sample; wherein the sequence data includes several transaction events in the user's history; According to a preset dimension, the initial vector is subjected to matrix transformation to obtain a training vector; the preset dimension is the input dimension of the large risk control model to be trained; Input the training vector into the risk control model to be trained, and determine the recognition result corresponding to the training sample; the risk control model to be trained does not include an event representation layer, and the model parameter of the risk control model to be trained is not less than a target threshold; Determine the label of the training sample, and train the risk control model to be trained based on the difference between the recognition result and the label.
8. A risk identification device, comprising: An acquisition module is used to acquire several transaction events of the user to be risk-controlled, and to determine the sequence data composed of each transaction event; An encoding module, used for encoding the sequence data to obtain a sequence vector; An alignment module, configured to perform matrix transformation on the sequence vector according to a preset dimension to obtain a first vector; the preset dimension is an input dimension of a pre-trained risk control model; the risk control model does not include an event representation layer, and a model parameter of the risk control model is not less than a target threshold; The identification module is used to input the first vector into the risk control model to determine the risk identification result corresponding to the user to be risk controlled.
9. The device according to claim 8, wherein the dimension of the first vector is the preset dimension; The alignment module is specifically used to determine the dimension of the sequence vector and use it as the first dimension; when the first dimension is a multiple of the preset dimension, perform matrix transformation on the sequence vector according to the preset dimension to obtain the first vector.
10. The device according to claim 9, wherein the alignment module is further configured to, when the first dimension is not a multiple of the preset dimension, determine multiples of the preset dimension and use them as multiples to be selected; and determine a multiple to be selected that is greater than the first dimension from the multiples to be selected and use it as the first multiple; determining a difference between the first multiple and the first dimension; From the first multiples, determine the first multiple corresponding to the minimum difference and use it as the target multiple; The sequence vector is padded to obtain a second vector whose dimension is a multiple of the target; and the second vector is matrix transformed according to a preset dimension to obtain a first vector.
11. The device of claim 8, wherein the risk control model comprises a pooling layer; the risk control model does not comprise a fully connected layer; The identification module is specifically used to input the first vector into the pooling layer of the risk control model to obtain a third vector; input the third vector into the risk control model to determine the risk identification result corresponding to the user to be risk controlled.
12. The device according to claim 8, wherein the risk control model comprises a coding layer, and the input dimension of the coding layer is the preset dimension; The identification module is specifically used to input the first vector into the coding layer of the risk control model to determine the sequence characteristics; and determine the risk identification result corresponding to the user to be risk controlled according to the sequence characteristics.
13. The device according to claim 12, wherein the risk control model further comprises a classification layer; The identification module is specifically used to input the sequence features into the classification layer of the risk control model to determine the risk identification result corresponding to the user to be risk controlled.
14. The apparatus of claim 8, further comprising: A training module is used to determine sequence data and use it as a training sample, encode the training sample, and determine the initial vector corresponding to the training sample; wherein the sequence data includes several transaction events in the user's history; the initial vector is matrix transformed according to a preset dimension to obtain a training vector; the preset dimension is the input dimension of the risk control model to be trained; the training vector is input into the risk control model to be trained to determine the recognition result corresponding to the training sample; the risk control model to be trained does not include an event representation layer, and the model parameters of the risk control model to be trained are not less than a target threshold; determine the label of the training sample, and train the risk control model to be trained based on the difference between the recognition result and the label.
15. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the method according to any one of claims 1 to 7.
16. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 7 when executing the program.
Citation Information
Cited By
Model training method, transaction data processing method, and program product
CN121705732A