Data processing method, device, computer equipment and storage medium
By obtaining the sample data set and feature types in the model training scenario and generating training indicator information, the problem of inaccurate feature types selected by user experience is solved, and the accuracy of model training and the effect of abnormal user distinction is improved.
Patent Information
- Application Number
- CN202110396801.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-13
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2041-04-13
AI Technical Summary
In the prior art, when users choose a model to train feature types based on experience, it may lead to inaccurate feature types, affecting the accuracy of model training.
By obtaining the sample data set and feature types in the model training scenario, generating training indicator information, assisting in selecting feature types that are suitable for the model training scenario, and using machine learning and blockchain technology to store and verify training indicator information.
It improves the accuracy of feature type selection, improves the effect of model training, and enhances the accuracy of the model when distinguishing abnormal users from normal users.
Smart Images

Figure CN113705072B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a data processing method, apparatus, computer device, and storage medium. Background Art
[0002] With the continuous development of computer networks, artificial intelligence (AI) related technologies have penetrated into all aspects of life. For example, models are trained through artificial intelligence related machine learning technologies, so that the trained models can distinguish and predict data.
[0003] In the prior art, when training a model, the user usually selects one or more data feature types suitable for model training based on experience in advance, and then completes the model training through the features of the sample data under the selected data feature type.
[0004] Since users usually select data feature types for model training based on experience, they can arbitrarily select data feature types associated with the trained model. Therefore, it is very likely that the data feature types selected by users for model training are not accurate. Summary of the Invention
[0005] The present application provides a data processing method, apparatus, computer device, and storage medium that can improve the accuracy of feature types determined to be compatible with model training scenarios.
[0006] On one hand, the present application provides a data processing method, the method comprising:
[0007] Get a sample data set for the model training scenario; the sample data set contains M sample data, where M is a positive integer;
[0008] Obtain N feature types to be analyzed, and obtain the feature values of each sample data under each feature type respectively; N is a positive integer;
[0009] Based on the characteristic value of each sample data under each feature type, the training indicator information of the sample data set under each feature type is generated. The training indicator information is used to assist in determining the feature type that is suitable for the model training scenario from N feature types.
[0010] In one aspect, the present application provides a data processing device, comprising:
[0011] The sample acquisition module is used to obtain a sample data set in the model training scenario; the sample data set contains M sample data, where M is a positive integer;
[0012] The feature acquisition module is used to obtain N feature types to be analyzed and obtain the feature values of each sample data under each feature type respectively; N is a positive integer;
[0013] The indicator generation module is used to generate training indicator information of the sample data set under each feature type based on the characteristic value of each sample data under each feature type. The training indicator information is used to assist in determining the feature type that is suitable for the model training scenario from N feature types.
[0014] Optionally, the N feature types include an i-th feature type, where i is a positive integer less than or equal to N; the i-th feature type has t target feature values, where t is a positive integer;
[0015] The indicator generation module generates training indicator information for each feature type of the sample dataset based on the feature value of each sample data under each feature type, including:
[0016] According to the eigenvalue of each sample data under the i-th feature type, determine the eigenvalue frequency corresponding to each target eigenvalue in the t types of target eigenvalues;
[0017] According to the eigenvalue frequency corresponding to each target eigenvalue, the training index information of the sample data set under the i-th feature type is generated.
[0018] Optionally, the M sample data include negative sample data and positive sample data; the N feature types include the j-th feature type, where j is a positive integer less than or equal to N;
[0019] The indicator generation module generates training indicator information for each feature type of the sample dataset based on the feature value of each sample data under each feature type, including:
[0020] According to the characteristic value of each sample data under the j-th feature type, the M sample data are divided to obtain K1 sample data bins corresponding to the j-th feature type; K1 is a positive integer less than or equal to M;
[0021] Obtain the negative sample frequencies of the negative sample data included in the K1 sample data bins respectively;
[0022] According to the negative sample frequencies corresponding to the K1 sample data bins, determine the frequency change trend between the negative sample frequencies corresponding to the K1 sample data bins;
[0023] The frequency change trend is determined as the training indicator information of the sample data set under the jth feature type.
[0024] Optionally, the M sample data include negative sample data and positive sample data; the N feature types include the s-th feature type, where s is a positive integer less than or equal to N;
[0025] The indicator generation module generates training indicator information for each feature type of the sample dataset based on the feature value of each sample data under each feature type, including:
[0026] According to the characteristic value of each sample data under the s-th feature type, the M sample data are divided into K2 sample data bins corresponding to the s-th feature type; K2 is a positive integer less than or equal to M;
[0027] Obtain the number of negative samples of the negative sample data included in the K2 sample data bins respectively;
[0028] Obtain the number of positive samples of the positive sample data included in the K2 sample data bins respectively;
[0029] According to the number of negative samples and the number of positive samples corresponding to the K2 sample data bins, the training indicator information of the sample data set under the sth feature type is determined.
[0030] Optionally, the indicator generation module determines the training indicator information of the sample data set under the sth feature type according to the number of negative samples and the number of positive samples corresponding to the K2 sample data bins, including:
[0031] According to the number of negative sample data and positive samples corresponding to the K2 sample data bins, the sample discrimination weights corresponding to the K2 sample data bins are determined;
[0032] According to the number of negative samples, number of positive samples and sample discrimination weight corresponding to the K2 sample data bins, the sample discrimination index value corresponding to the sth feature type is determined;
[0033] The sample discrimination index value corresponding to the s-th feature type is determined as the training index information of the sample data set under the s-th feature type.
[0034] Optionally, the above device further includes:
[0035] A sorting module is used to sort N feature types according to the descending order of the sample distinction index values of the sample data set under each feature type, to obtain the sorted N feature types;
[0036] The feature selection module is used to determine the first L feature types among the sorted N feature types as feature types that are suitable for the model training scenario; L is a positive integer less than or equal to N.
[0037] Optionally, the M sample data are M sample users;
[0038] The above device also includes:
[0039] Model acquisition module, used to obtain the model to be trained in the model training scenario;
[0040] The target sample acquisition module is used to acquire target sample users and obtain the feature values of target sample users under L feature types; the target sample users carry user labels; the user labels are abnormal user labels or normal user labels;
[0041] A model training module is used to train the to-be-trained model based on the feature values of the target sample user under L feature types and the user labels carried by the target sample user to obtain a target model;
[0042] The target model is used to differentiate and predict the attributes of the predicted user, which are normal attributes or abnormal attributes.
[0043] Optionally, the above device further includes:
[0044] The predicted user acquisition module is used to obtain the predicted user and obtain the feature values of the predicted user under L feature types;
[0045] A feature prediction module is used to input the feature values of the predicted user under L feature types into the target model and predict the attributes of the target user in the target model;
[0046] The early warning module is used to determine the predicted user as an abnormal user if the attribute of the predicted user is an abnormal attribute, and perform an early warning operation on the abnormal user.
[0047] Optionally, the M sample data include negative sample data and positive sample data; the N feature types include the z-th feature type, where z is a positive integer less than or equal to N;
[0048] The indicator generation module generates training indicator information for each feature type of the sample dataset based on the feature value of each sample data under each feature type, including:
[0049] According to the characteristic value of each sample data under the z-th feature type, the M sample data are divided into K3 sample data bins corresponding to the z-th feature type; K3 is a positive integer less than or equal to M;
[0050] Obtain the negative sample frequencies of the negative sample data included in the K3 sample data bins respectively;
[0051] Obtain the positive sample frequencies of the positive sample data included in the K3 sample data bins respectively;
[0052] According to the negative sample frequency and positive sample frequency corresponding to the k3 sample data bins, obtain the model discrimination corresponding to the zth feature type;
[0053] The model discrimination is determined as the training indicator information of the sample data set under the zth feature type.
[0054] Optionally, the sample acquisition module obtains sample datasets for model training scenarios in the following ways:
[0055] Obtain a sample data set in a sample data system;
[0056] The feature acquisition module obtains the feature values of each sample data under each feature type in the following ways:
[0057] Based on the access interface between the sample data system and the metadata system, the feature value of each sample data under each feature type is obtained in the metadata system.
[0058] Optionally, the sample acquisition module obtains sample datasets for model training scenarios in the following ways:
[0059] Get the sample acquisition request sent by the client; the sample acquisition request carries the sample search field;
[0060] Get the sample data set based on the sample search field;
[0061] The above device is also used for:
[0062] The training indicator information of the sample data set under each feature type is sent to the client, so that the client displays the training indicator information of the sample data set under each feature type on the client interface.
[0063] In one aspect, the present application provides a computer device including a memory and a processor, wherein the memory stores a computer program. When the computer program is executed by the processor, the processor executes the method in one aspect of the present application.
[0064] In one aspect, the present application provides a computer-readable storage medium storing a computer program. The computer program includes program instructions. When the program instructions are executed by a processor, the processor executes the method in the above aspect.
[0065] According to one aspect of the present application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the method provided in various optional embodiments such as the above-mentioned aspect.
[0066] The present application can first obtain a sample data set under a model training scenario; the sample data set contains M sample data, where M is a positive integer; and N feature types to be analyzed can be obtained, and the feature values of each sample data under each feature type can be obtained respectively; N is a positive integer; and then, based on the feature values of each sample data under each feature type, training index information of the sample data set under each feature type can be generated, and the training index information is used to assist in determining the feature type that is compatible with the model training scenario from the N feature types. It can be seen that the method proposed in the present application can generate training index information of the sample data set under each feature type based on the feature values of each sample data under each feature type, and the feature type that is compatible with the model training scenario can be more accurately selected from the N feature types through the training index information, and then the feature type that is compatible with the model training scenario can be used to achieve more accurate training of the model under the model training scenario, so that the trained model has better model performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] In order to more clearly illustrate the technical solutions in the present application or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. 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 any creative work.
[0068] Figure 1 This is a schematic diagram of a network architecture provided by an embodiment of the present application;
[0069] Figure 2 This is a schematic diagram of a feature measurement scenario provided by this application;
[0070] Figure 3 It is a flowchart of a data processing method provided by this application;
[0071] Figure 4 This is a schematic diagram of an interface for managing sample data on a client provided by this application;
[0072] Figure 5a-5b This is a schematic diagram of a data acquisition scenario provided by this application;
[0073] Figure 6 This is a schematic diagram of a model training scenario provided by this application;
[0074] Figure 7a-7b This is a schematic diagram of an interface for displaying measurement results provided by this application;
[0075] Figure 8 It is a flowchart of a data processing method provided by this application;
[0076] Figure 9 It is a structural diagram of a data processing device provided by this application;
[0077] Figure 10 This is a structural diagram of a computer device provided by this application. DETAILED DESCRIPTION
[0078] The following will be combined with the accompanying drawings to clearly and completely describe the technical solutions in this application. Obviously, the embodiments described are only some of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making any creative efforts are within the scope of protection of this application.
[0079] This application relates to artificial intelligence-related technologies. Artificial Intelligence (AI) refers to theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use knowledge to achieve optimal results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new type of intelligent machine that can respond in a manner similar to human intelligence. Artificial intelligence is the study of the design principles and implementation methods of various intelligent machines, enabling them to have the functions of perception, reasoning, and decision-making.
[0080] Artificial intelligence (AI) technology is a comprehensive discipline encompassing a wide range of fields, encompassing both hardware and software technologies. Foundational AI technologies generally include sensors, specialized AI chips, cloud computing, distributed storage, big data processing, operating / interaction systems, and mechatronics. AI software technologies primarily encompass computer vision, speech processing, natural language processing, and machine learning / deep learning.
[0081] This application mainly involves machine learning in artificial intelligence. Among them, machine learning (ML) is a multi-disciplinary interdisciplinary subject that involves probability theory, statistics, approximation theory, convex analysis, algorithmic complexity theory and other disciplines. It specializes in how computers simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their own performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications are spread across all areas of artificial intelligence. Machine learning and deep learning usually include technologies such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and learning by formula.
[0082] The machine learning involved in this application mainly refers to how to accurately select the feature types for training the model in the model training scenario. For details, please refer to the following Figure 3 Description in the corresponding embodiment.
[0083] This application also involves blockchain-related technologies. Blockchain is a new application model for computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Blockchain is essentially a decentralized database, a string of data blocks generated using cryptographic methods. Each data block contains information about a batch of network transactions, which is used to verify the validity of the information (anti-counterfeiting) and generate the next block. A blockchain can include a blockchain underlying platform, a platform product service layer, and an application service layer. A blockchain includes a series of blocks that are connected to each other in chronological order of generation. Once a new block is added to the blockchain, it cannot be removed. The block records the recorded data submitted by the nodes in the blockchain system. In this application, the training indicator information corresponding to each generated feature type can be added to the blockchain for storage to ensure that the training indicator information corresponding to each feature type is tamper-proof, thereby ensuring that when the training indicator information corresponding to each feature type is needed later, the true training indicator information for each feature type can be obtained.
[0084] See Figure 1 , Figure 1 This is a schematic diagram of a network architecture provided by an embodiment of the present application. Figure 1 As shown, the network architecture may include a server 200 and a terminal device cluster, and the terminal device cluster may include one or more terminal devices, and the number of terminal devices is not limited here. Figure 1 As shown, the multiple terminal devices may specifically include terminal device 100a, terminal device 101a, terminal device 102a, ..., terminal device 103a; Figure 1 As shown, the terminal device 100a, the terminal device 101a, the terminal device 102a, ..., the terminal device 103a can all be connected to the server 200 through a network, so that each terminal device can exchange data with the server 200 through the network connection.
[0085] like Figure 1The server 200 shown can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal device can be a smart terminal such as a smartphone, tablet computer, laptop computer, desktop computer, smart TV, etc.
[0086] Terminal devices 101a, 102a, ..., and 103a in the terminal device cluster may be terminal devices of ordinary users registered in a transaction client, and the transaction client may be any client capable of conducting data transactions. User information registered in the transaction clients of terminal devices 101a, 102a, ..., and 103a, as well as transaction records related to data transactions conducted by the users in the transaction clients, may be synchronized to server 200, which may be a backend server for the transaction clients.
[0087] Furthermore, terminal device 100a may be a terminal device of a measurement operator, who may be a relevant staff member of the client backend. Terminal device 100a may include a measurement client, which may be a client for measuring the relevant feature types of users in the aforementioned transaction client. By measuring the relevant feature types of users in the transaction client, a feature type that is more suitable for model training can be selected from a number of user feature types. The trained model can more accurately distinguish between abnormal users and normal users. Abnormal users may refer to users who have abnormal transaction behavior in the transaction client, while normal users may refer to users who do not have abnormal transaction behavior in the transaction client. The backend server of the measurement client may also be the aforementioned server 200. It can be understood that server 200 may store relevant transaction data and user information for all users in the transaction client. Therefore, the measurement operator can request server 200, through the measurement client, to measure the relevant feature types of users in the transaction client.
[0088] Please also see Figure 2 , Figure 2 This is a schematic diagram of a feature measurement scenario provided by this application. Figure 2As shown, the calculation personnel can upload sample users (such as the user ID of the uploaded sample user, which can represent the corresponding user information) in the calculation client of the terminal device 100a, or request to obtain the corresponding sample users through the relevant sample search field in the calculation client. For example, if the sample search field is "users who have transaction activities within a certain transaction time period", the sample users requested to be obtained can include users who have transaction activities within the transaction time period. If the calculation personnel requests to obtain sample users in the calculation client, then the request to obtain sample users can be made to the server 200. Therefore, it can be understood that the terminal device 100a can respond to the relevant user operation of the calculation personnel and submit M sample users (such as the M sample users in box 100b) to the server 200 in the calculation client. The M sample users can be uploaded by the calculation personnel in the calculation client, or obtained through the relevant sample search field request in the calculation client, or partially uploaded on the calculation client and partially obtained through the sample search field request in the calculation client. The M sample users constitute the sample data set.
[0089] Furthermore, the system also supports the measurement personnel to submit N feature types (including feature type 1 to feature type N) for the above-mentioned M sample users in the measurement client of the terminal device 100a, and submit a request (which can be called a measurement request) in the measurement client to measure the N feature types through the feature values of the M sample users on the N feature types. The measurement client can send the measurement request to the server 200, and the server 200 can measure the N feature types through the feature values of the M sample users on the N feature types according to the measurement request. Please refer to the following description.
[0090] The server 200 can obtain the feature value of each sample user (among M sample users) under each feature type (among N feature types). The feature value does not necessarily refer to an index value, but can represent any feature of the sample user, such as gender feature (male or female feature) and user account feature (user account character string). Furthermore, the features under any feature type can be represented by unique characters or numerical values, and the feature value can also be a character or numerical value used to uniquely represent the corresponding feature. A sample user can have one feature value under one feature type. Figure 2 As shown, the server 200 can obtain the feature values of M sample users under feature type 1 (as shown in box 101b), the server 200 can obtain the feature values of M sample users under feature type 2 (as shown in box 102b), ..., the server 200 can obtain the feature values of M sample users under feature type N (as shown in box 103b).
[0091] Furthermore, the server 200 can calculate the training index information corresponding to each feature type through the feature values of M sample users under each feature type, such as Figure 2 As shown, it can include training indicator information 1 corresponding to feature type 1 to training indicator information N corresponding to feature type N. Furthermore, the server 200 can recommend and rank the N feature types based on the training indicator information corresponding to each feature type, that is, the feature type most suitable for model training is arranged in front. The server 200 can send the recommended ranking containing the N feature types to the measurement client, or / and, the server 200 can also send the training indicator information corresponding to each feature type to the measurement client. The measurement client can display the obtained recommended ranking and / or training indicator information on the client interface through the terminal device 100a. The measurement personnel can view the recommended ranking and / or training indicator information by themselves, and then select the feature type for model training from the N feature types. As shown in box 105b, the feature type 106b selected for model training can be a feature type that is more easily distinguished between abnormal users and normal users. The measurement personnel can use the feature type 106b for model training, and then train an abnormal user differentiation model. Subsequently, the abnormal user differentiation model can be used to identify the probability that the user to be identified is an abnormal user.
[0092] Among them, M sample users can be the following Figure 3 For the M sample data in the embodiment, the abnormal user differentiation model can be as follows: Figure 3 For the target model trained in the corresponding embodiment, the specific process of how to generate the training index information corresponding to various feature types through the feature values of sample users under various feature types, and the specific process of how to train the abnormal user differentiation model can be found in the following Figure 3 Corresponding to the relevant description in the embodiment.
[0093] Through the method provided in this application, the effect of each feature type on model training can be measured by the feature values of sample users under various feature types, and training indicator information corresponding to various feature types can be obtained. Then, the feature type used for model training can be accurately selected from N feature types through the training indicator information corresponding to various feature types, thereby improving the accuracy of the trained abnormal user discrimination model in distinguishing abnormal users.
[0094] See Figure 3 , Figure 3It is a flowchart of a data processing method provided by the present application. The execution subject in the embodiment of the present application can be a computer device or a computer device cluster composed of multiple computer devices. The computer device can be a server or a terminal device. Therefore, the execution subject in the embodiment of the present application can be a server, a terminal device, or a combination of a server and a terminal device. Here, the execution subject in the present application is a server as an example for explanation. Figure 3 As shown, the method may include:
[0095] Step S101: Obtain a sample data set in a model training scenario; the sample data set includes M sample data, where M is a positive integer;
[0096] In this application, a client can be provided to the user (as described above Figure 2 The corresponding embodiment includes a measurement client), which can be carried in the user's terminal device. The client can be a web client or an application software, which supports the user to upload or obtain sample data in the model training scenario in the client, and initiate a measurement request for one or more feature types of the sample data to obtain a measurement result (such as the training indicator information corresponding to the various feature types described below). The test result can assist the user in selecting the feature type that is compatible with the model training scenario, and then the features of the sample data under the feature type that is compatible with the model training scenario (such as the feature values described below) can be used to train the model in the model training scenario.
[0097] Therefore, the server can obtain a sample data set in the model training scenario. The sample data set can include M sample data, where M is a positive integer. The specific value of M is determined according to the actual application scenario. The sample data set can be a sample data set uploaded by the user on the client and then sent to the server by the client; or, the user is supported to enter the sample retrieval field on the client and submit a sample acquisition request to the server through the client. The sample acquisition request carries the sample retrieval field, which is a field used to obtain the corresponding sample data. Therefore, the server can obtain the sample data associated with the sample retrieval field in the data system, and the above-mentioned sample data set can be composed of the sample data associated with the sample retrieval field obtained.
[0098] Optionally, the sample data can be sample users, that is, the sample data set can be a sample user set, and the M sample data can refer to M sample users. Therefore, if the sample search field is "users marked by an authority," the sample data obtained in association with the sample search field can be users marked by an authority. If the sample search field is "users who have conducted transactions within a certain time period," the sample data obtained in association with the sample search field can be users who have conducted transactions within that time period. The specific content of the sample search field can be determined based on the actual application scenario and is not limited thereto.
[0099] The data system may be a system within the server, or a system not within the server but accessible to the server. The client may be a client of an organization or enterprise, and users with access rights to the client may include all or some employees of the organization or enterprise. The data system may include a sample data system that supports operations such as uploading sample data to the sample data system, obtaining sample data already in the sample data system, and managing sample data in the sample data system through the client by users with access rights to the client.
[0100] Furthermore, the above-mentioned data system may also include a metadata system, which can be understood as including all business data. Therefore, if a user obtains sample data from the data system through the client (such as retrieving sample data through the above-mentioned sample search field), the obtained sample data may be obtained from the metadata system, and the sample data obtained from the metadata system may also be uploaded to the sample data system.
[0101] If the sample data is a sample user, the components of the sample data uploaded to the sample data system may include: the sample source (such as the metadata system or user upload), the sample identifier (such as the sample user's user ID), and the sample label (such as a good or bad label for the sample user). In other words, the sample data in the sample data system can be uploaded according to a specified standard format, making it easier for subsequent users to retrieve, view, and manage the sample data in the sample data system on the client side.
[0102] Optionally, the good or bad label of the above-mentioned sample user can be a label that the sample user is a normal user (which can be called a normal user label) or a label that the sample user is an abnormal user (which can be called an abnormal user label). For example, a sample user carrying a normal user label indicates that his or her transaction behavior is normal, and a sample user carrying an abnormal user label indicates that his or her transaction behavior is abnormal.
[0103] The model training scenario can be determined based on the type of model that needs to be trained. For example, if the model to be trained is a face recognition model, the model training scenario can refer to the face recognition scenario; for another example, if the model to be trained is an abnormal user differentiation model, the model training scenario can refer to the abnormal user differentiation scenario.
[0104] Therefore, through the above process, it can be seen that the sample data set obtained by the server can be uploaded by the user on the client, or obtained by the user from the metadata system through the sample search field, or directly selected from the existing sample data in the sample data system.
[0105] See Figure 4 , Figure 4 This is a schematic diagram of an interface for managing sample data on the client side provided by this application. Figure 4 As shown in the box 101c, in the client interface 100c of the client, operations such as uploading samples, registering samples, viewing the records of uploaded samples, and retrieving existing sample tables from the sample library (such as the sample data system) can be performed. The intelligent analysis platform can be the above-mentioned measurement client. Figure 4 As shown, the client interface 100c also displays the sample table 102c and the sample table 103c already in the sample data system. A sample table may include one or more sample data. A sample table may have a sample name (such as "sample abc" and "sample bcd" here), an ID field (such as the identifier of the sample table), a label meaning (that is, the meaning of the sample label carried by each sample data), a sample description (such as relevant descriptive information of the sample table), a creation time, and an effective time period.
[0106] Step S102: Obtain N feature types to be analyzed, and obtain the feature values of each sample data under each feature type respectively; N is a positive integer;
[0107] In this application, the server can also obtain N types of feature types to be analyzed. The N types of feature types can be feature types that the user enters in the client and then submits to the server by the client, or the client can include a feature type list. The N types of feature types can be feature types that the user selects from the feature type list on the client and then submits to the server by the client. The N types of feature types can be feature types associated with model training scenarios. By entering the N types of feature types in the client, the user needs to determine which of the N feature types are more effective for training the model in the model training scenario. For example, if the sample data is a sample user and the model training scenario is a scenario for distinguishing abnormal users, it is necessary to determine which of the N feature types are more effective features for distinguishing abnormal users.
[0108] For example, if the sample data is a sample user, the N feature types may include the feature type of user age, the feature type of user gender, the feature type of user transaction time, the feature type of the bank card used for user transactions, and the feature type of user account number, etc.
[0109] The server can also obtain the characteristic value of each sample data in the M sample data under the above-mentioned N feature types. The characteristic value is not necessarily a numerical value, and the characteristic value represents the characteristics of the sample data. A sample data under one feature type can have one characteristic value. For example, N feature types can include a feature type of user age, and the characteristic value of the sample data can be the age of the sample user (such as 18, 28 or 38 years old). For another example, N feature types can include a feature type of user gender, and the characteristic value of the sample data can be the gender of the sample user (such as male or female). For another example, N feature types can include a feature type of user transaction time, and the characteristic value of the sample data can be the transaction time of the sample user (such as xx hours, xx minutes, and xx seconds).
[0110] As can be seen above, the metadata system can contain all business data. Therefore, the server can obtain the characteristic values of the sample data from the metadata system. An access interface can exist between the sample data system and the metadata system. This access interface overcomes the access restrictions between the sample data system and the metadata system, allowing the sample data system and the metadata system to access each other. Therefore, after the server obtains a sample dataset from the sample data system, it can access the metadata system through the access interface between the sample data system and the metadata system to obtain the characteristic values of the sample data from the metadata system.
[0111] See Figure 5a-5b , Figure 5a-5b This is a schematic diagram of a data acquisition scenario provided by this application. Figure 5a As shown, the sample data can be sample users, and the metadata system can include an access layer, a basic layer, a feature layer, and a marketplace layer. Among them, the access layer can include the user's lowest-level business data (such as transaction data), including risk control cache, transaction logs, and BI (big data analysis) data; the basic layer can include transaction details, daily tables, weekly tables, and monthly tables; the feature layer can include user account, mobile phone number, and device (such as the device used to log in to the user account) and other feature information; the marketplace layer can include users such as the trading market (such as users on the trading market), policy interception (such as users who have been intercepted by transactions), and 110 portraits (such as users with portraits in authoritative departments). Therefore, it can be understood that the sample data set can be obtained from the marketplace layer, and the feature type of the sample data can be obtained from the feature layer. If the required feature type of the sample data cannot be obtained in the feature layer, more detailed feature types of the sample data can be further obtained from the basic layer or the access layer.
[0112] Optionally, the feature types of sample users can generally be divided into 9 categories of feature types. The 9 categories of features can include the feature type of user account, the feature type of bank card (such as the bank card used by the user for transaction), the feature type of ID card (such as the ID card used to register the user account), the feature type of device (such as the device used by the user to log in to the user account), the feature type of mobile phone number (such as the mobile phone number associated with the user account), the feature type of QR code (such as the QR code scanned when the user conducts a transaction), the feature type of IP (communication address), the feature type of merchant (such as the merchant where the user conducts the transaction), and the feature type of user text (such as the relevant text content when the user conducts the transaction). Under these 9 categories of feature types, there can also be more detailed feature types, which can include feature types of several dimensions (such as tens of thousands of dimensions). Therefore, the above-mentioned N feature types can be part or all of the feature types of these several dimensions. As shown in box 101f, the training indicator information corresponding to each feature type in the N feature types obtained in the following step S103 can be obtained by analyzing the schedule feature analysis within the team, the temporary feature analysis outside the team, the feature analysis when building a special (such as for a specific project) analysis database, or / and the feature analysis of external cooperation data. In other words, according to the actual application scenario, as long as a feature type analysis scenario is required, the method provided in this application can be used for analysis. The analysis result is the training indicator information corresponding to the feature type. The training indicator information can not only be used to select the feature type of the training model, but also can be used to analyze the characteristics of the corresponding feature type.
[0113] Further, if Figure 5b As shown, the data system of the present application may include three systems, which may be a feature measurement system, a sample data system, and a metadata system respectively. There may be access interfaces between the three systems, and the three systems may access each other through the access interfaces between each other. The present application breaks through the access restrictions between the three systems, so that when measuring feature types, sample data can be obtained from the sample data system, and feature values of sample data can be obtained from the metadata system. Then, feature types can be measured based on the sample data and feature values of sample data obtained by the feature measurement system. The triggering of feature type measurement and the display of measurement results can be achieved through the feature measurement client of the feature measurement system, which can be the client mentioned above or the above-mentioned client. Figure 2 The measurement client in .
[0114] Step S103: Generate training indicator information for each feature type of the sample data set based on the feature value of each sample data under each feature type. The training indicator information is used to assist in determining the feature type that is suitable for the model training scenario from the N feature types.
[0115] In this application, the server can generate training index information of the sample data set under each feature type based on the feature value of each sample data under each feature type. The training index information can be understood as the statistical feature information between the feature values of N sample data under each feature type. The server can send the training index information to the client, and the client can display the training index information corresponding to each feature type on the client interface. The training index information can be used as a basis for the user to select the feature type for model training from N feature types (that is, to select the feature type that is compatible with the model training scenario), so that the user can more accurately select the feature type for model training, and then the feature type selected by the training index information can train the model more accurately.
[0116] The training indicator information corresponding to each feature type can be generated in the following ways:
[0117] The first way to generate training indicator information: according to the eigenvalue of each sample data under the i-th feature type, determine the eigenvalue frequency corresponding to each target eigenvalue in the t target eigenvalues; according to the eigenvalue frequency corresponding to each target eigenvalue, generate the training indicator information of the sample data set under the i-th feature type. The above-mentioned N feature types may include the i-th feature type, i is a positive integer less than or equal to N, the i-th feature type may have t target eigenvalues, t is a positive integer, and the i-th feature type may be any feature type among the N feature types. For example, the i-th feature type may be a gender type, then the i-th feature type may have 2 (i.e., t is equal to 2) target eigenvalues, and the 2 target eigenvalues may be a target eigenvalue "male" and a target eigenvalue "female". For another example, the i-th feature type can be the type of trading time period within a day. If one hour of a day is divided into a trading time period, then a day includes 24 trading time periods. Then the i-th feature type can have 24 (i.e., t equals 24) target feature values, and the 24 target feature values are the 24 trading time periods within a day.
[0118] Therefore, the server can obtain the eigenvalue frequency corresponding to each target eigenvalue in the t target eigenvalues based on the eigenvalue of each sample data under the i-th feature type. The eigenvalue frequency can refer to the number of times each target eigenvalue appears. For example, if the i-th feature type is gender, M is equal to 6, that is, the sample data set includes 6 sample data, each of which is a sample user. Among the 6 sample users, the number of sample users with male gender is 2, and the number of sample users with female gender is 4. Then, the eigenvalue frequency of the target eigenvalue "male" is equal to 2, and the eigenvalue frequency of the target eigenvalue "female" is equal to 4.
[0119] Furthermore, feature types are divided into continuous and discrete types. For example, the gender feature type mentioned above is discrete. For discrete feature types, the corresponding target feature values are categorized, such as the target feature value type of "male" and the target feature value type of "female". Therefore, for discrete feature types, the frequency of each target feature value (i.e., feature value frequency) can be calculated. Then, based on the feature value frequency, the frequency and cumulative frequency of each target feature value can be calculated.
[0120] For example, if there are three target eigenvalues, namely target eigenvalue 1, target eigenvalue 2 and target eigenvalue 3, the eigenvalue frequency of target eigenvalue 1 is 5, the eigenvalue frequency of target eigenvalue 1 is 10, and the eigenvalue frequency of target eigenvalue 1 is 15, then the frequency of target eigenvalue 1 can be equal to 1 / 6 (i.e. 5 / (5+10+15)), the frequency of target eigenvalue 2 can be equal to 1 / 3 (i.e. 10 / (5+10+15)), and the frequency of target eigenvalue 3 can be equal to 1 / 2 (i.e. 15 / (5+10+15)). The cumulative frequency of target eigenvalue 1, target eigenvalue 2 and target eigenvalue 3 is equal to 1 / 6+1 / 3+1 / 2, which is equal to 1.
[0121] Furthermore, it should be noted that if a sample data item does not have a feature value for a certain feature type (e.g., a sample user has not registered their gender), missing value filling can be performed on the sample data, such as marking the missing feature value for the sample data item as "null." This process can be understood as a data cleansing process for the sample data. Therefore, if the feature value for the sample data item is not subsequently obtained for that feature type, data acquisition will not fail. It should be noted that if one or more sample data items do not have a feature value for a certain feature type, and missing value filling is performed on the feature value for that one or more sample data items, then that feature type can have an additional target feature value, which is "null." Therefore, it can be understood that since the frequency of a target feature value being "null" can also be calculated, even if sample data items do not have a feature value for a certain feature type, the calculated cumulative frequency of the target feature value for that feature type will generally be equal to 1. If it is not equal to 1, it indicates that the relevant statistical data (such as frequency and count data) for the target feature value for that feature type is incorrect, and the problem needs to be screened and recalculated. By filling missing values in sample data, even if only part of the sample data has eigenvalues under a certain feature type (i.e., the coverage of the eigenvalues is relatively low), this part of the sample data can be utilized, thereby improving the selection range and utilization rate of the sample data.
[0122] Therefore, the frequency, frequency and cumulative frequency of each target feature value calculated above can be used as the training index information corresponding to the i-th feature type (that is, the training index information of the sample data set under the i-th feature type).
[0123] It can be understood that the corresponding frequency, frequency and cumulative frequency can also be calculated for continuous feature types. However, for continuous feature types, the frequency, frequency and cumulative frequency are not calculated according to the classification of the target feature value, but according to the binning. Binning is also segmentation. For example, for age, 0 to 50 years old can be considered a bin, and 50 to 100 years old can also be considered a bin. Then, the frequency of sample data contained in each bin, the frequency of good samples contained in each bin (such as sample data with normal user labels), the frequency of bad samples contained in each bin (such as sample data with abnormal user labels), and the proportion of bad samples in each bin (ie frequency) and other statistical information can be calculated as training indicator information corresponding to the continuous feature type.
[0124] Optionally, in this application, if a sample data in the above sample data set has no characteristic values under N feature types, the sample data can be filtered out from the sample data set, and when generating the training indicator parameters corresponding to each feature type, the filtered sample data set can be used to generate them.
[0125] The above sample data set can be used as the observation group. As for the above statistical information such as frequency, frequency, and cumulative frequency (which belongs to training indicator information), the server can also obtain the statistical information of the control group in the same way as obtaining the statistical information of the observation group (i.e., obtaining the training indicator information of the control group). The control group can include all users in the trading market. Therefore, the server can provide the statistical information of the observation group and the statistical information of the control group to the client together. The client can display the statistical information of the observation group and the statistical information of the control group together in a comparative manner, so that the measurement personnel can analyze the statistical information of the observation group more deeply and intuitively through the statistical information of the control group. This is also conducive to the measurement user to select the feature type for modeling from N feature types.
[0126] The second method of generating training indicator information: For continuous feature types, such as age feature types, the M sample data can be binned (i.e., segmented) according to the continuous feature type, wherein the binning method for binning the M sample data can be the default binning method set by the system or the user-defined binning method. Furthermore, both the system default binning method and the user-defined binning method can be operations such as equidistant binning or equifrequency binning for the M sample data, while the user-defined binning method can also be the user inputting one or more binning interval points through the client, and then the M sample data can be binned according to the one or more binning interval points.
[0127] The N feature types mentioned above may include the jth feature type, where j is a positive integer less than or equal to N. The jth feature type may be any continuous feature type among the N feature types. If the jth feature type is a continuous age type, then the characteristic value of each sample data in the M sample data under the jth feature type may be age, and each sample data may correspond to one age. Then, the M sample data may be binned by dividing the M sample data into bins every 30 consecutive years. For example, based on the age corresponding to each sample data, sample data corresponding to ages 1 to 30 may be binned, sample data corresponding to ages 31 to 60 may be binned, sample data corresponding to ages 61 to 90 may be binned, etc. Therefore, it can be understood that the above-mentioned equidistant binning may refer to binning according to the same age interval (e.g., every 30 years), and the above-mentioned equal-frequency binning may refer to binning according to the principle that the frequency (i.e., number) of sample data contained in each bin is the same.
[0128] The bins divided into M sample data by the jth feature type can be called sample data bins. The number of sample data bins can be K1, where K1 is a positive integer less than or equal to M. The specific value of K1 is determined according to the actual application scenario. Among them, the M sample data can include negative sample data and positive sample data. The negative sample data can be sample data with negative sample labels added (such as the above-mentioned abnormal user labels), and the positive sample data can be sample data with positive sample labels added (such as the above-mentioned normal user labels). The sample labels added to the sample data (such as negative sample labels and positive sample labels) can all be labels added to the sample data by the user. Therefore, the server can obtain the negative sample frequency (such as the number of negative sample data) and the negative sample frequency (such as the proportion of negative sample data in the corresponding bin) of the negative sample data contained in each sample data bin in the K1 sample data bins. One sample data bin can correspond to one negative sample frequency. For example, if a sample data bin includes 10 sample data, and there are 6 negative sample data in the 10 sample data, then the negative sample frequency corresponding to the sample data bin is equal to 6 / 10. Therefore, the negative sample frequency corresponding to each sample data bin in the K1 sample data bins can be used to obtain the frequency change trend between the negative sample frequencies corresponding to the K1 sample data bins. The frequency change trend can be reflected by a frequency change curve, which can pass through (i.e., include) the negative sample frequencies corresponding to the K1 sample data bins, i.e., the frequency change curve can be drawn by the negative sample frequencies corresponding to the K1 sample data bins. Optionally, if the negative sample frequencies corresponding to multiple (the number is determined according to the actual application scenario) consecutive sample data bins in the K1 sample data bins are monotonically increasing / decreasing in sequence, then the frequency change trend can also include an increasing / decreasing trend between the negative sample frequencies corresponding to the multiple consecutive sample data bins. Therefore, the frequency change trend between the negative sample frequencies corresponding to the above K1 sample data bins can be used as training indicator information under the j-th feature type.
[0129] The third way to generate training indicator information: the above-mentioned N feature types may include the s-th feature type, s is a positive integer less than or equal to N, and the s-th feature type may be any one of the continuous feature types in the N feature types. Similarly, the above-mentioned M sample data may include a number of negative sample data and a number of positive sample data. Similarly, the server may divide (i.e., bin) the M sample data according to the characteristic value of each sample data under the s-th feature type, and obtain K2 sample data bins corresponding to the s-th feature type, where K2 is a positive integer less than or equal to M. The binning method is determined according to the actual application scenario, such as the system default binning method or the user-defined binning method.
[0130] Furthermore, the server can obtain the number of negative sample data (which can be called the number of negative samples) and the number of positive sample data (which can be called the number of positive samples) contained in each of the K2 sample data bins. One sample data bin can correspond to one negative sample number and one positive sample number. The server can also calculate the total number of negative sample data and the total number of positive sample data contained in the M sample data. The server can calculate the sample discrimination weight (i.e., Weight of Evidence, WOE value, also called evidence weight) corresponding to each sample data bin based on the number of negative sample data and positive samples corresponding to each sample data bin and the total number of negative sample data and positive sample data contained in the sample data set. Please refer to the following formula (1):
[0131]
[0132] Among them, the fth sample data bin can refer to any sample data bin among the K2 sample data bins, and f is a positive integer less than or equal to k2. Therefore, WOE f It can refer to the sample discrimination weight of the f-th sample data bin, bad f Indicates the number of negative sample data contained in the f-th sample data bin, good f Indicates the number of positive sample data contained in the f-th sample data bin, bad Y Indicates the total number of negative sample data contained in the sample data set, good Y Indicates the total number of positive sample data contained in the sample data set. The WOE value can be used to evaluate the probability of negative sample data existing in each sample data bin. The larger the WOE value, the greater the probability that the sample data in the corresponding sample data bin is negative sample data. Conversely, the smaller the WOE value, the smaller the probability that the sample data in the corresponding sample data bin is negative sample data.
[0133] After calculating the sample discrimination weights corresponding to each sample data bin, the sample discrimination index value (i.e., Information Value, IV value, also known as information value) corresponding to the s-th feature type can be calculated using the sample discrimination weights corresponding to each sample data bin. Please refer to the following formula (2):
[0134]
[0135] The characters in formula (2) and formula (1) have the same meanings.
[0136] Furthermore, when the feature type is discrete, the sample discrimination weight corresponding to the discrete feature type can also be calculated. The principle is the same as the principle of calculating the sample discrimination index value corresponding to the sth feature type mentioned above. For discrete feature types, the sample data to which a target feature value corresponding to the feature type belongs can be understood as sample data in a sample data bin. For example, for the feature type of gender, the sample data with the corresponding feature value of "male" can be understood as sample data belonging to one sample data bin, and the sample data with the corresponding feature value of "female" can be understood as sample data belonging to another sample data bin. In other words, the above-mentioned WOE value and IV value can be calculated for both discrete and continuous feature types. The IV value can be used to evaluate the degree of distinction between negative sample data and positive sample data. The larger the IV value, the better the effect of the corresponding feature type in distinguishing between negative sample data and positive sample data. Conversely, the smaller the IV value, the worse the effect of the corresponding feature type in distinguishing between negative sample data and positive sample data.
[0137] The server may use the sample discrimination weight corresponding to each sample data bin under the sth feature type calculated above and the sample discrimination index value corresponding to the sth feature type as the training index information corresponding to the sth feature type.
[0138] Furthermore, the server can calculate the sample discrimination index value corresponding to each of the N feature types using the same principle as that used to calculate the sample discrimination index value corresponding to the sth feature type. The server can also sort the N feature types in descending order of the sample discrimination index values corresponding to each feature type to obtain the sorted N feature types. Feature types that are ranked higher can be understood as being more suitable for the model training scenario, and feature types that are more suitable for the model training scenario are more suitable for training the model in that model training scenario.
[0139] Therefore, the server can use the top L feature types from the sorted N feature types as the feature types suitable for the model training scenario, where L is a positive integer less than or equal to N. The specific value of L depends on the actual application scenario. Furthermore, if the M sample data represents M sample users, the server can also obtain the to-be-trained model for the model training scenario. For example, if the model training scenario involves distinguishing abnormal users, the to-be-trained model is the initial model that needs to be trained for distinguishing abnormal users. The server can also obtain target sample users. The number of target sample users depends on the actual application scenario. These target sample users can carry user labels, which can be abnormal user labels or normal user labels. Different target sample users can carry the same user label or different user labels. A target sample user carrying an abnormal user label has an actual abnormal attribute, indicating that the target sample user is an abnormal user, such as indicating that the target sample user's transaction behavior is abnormal. Conversely, a target sample user carrying a normal user label has an actual normal attribute, indicating that the target sample user is a normal user, such as indicating that the target sample user's transaction behavior is normal. The target sample user may be a sample user different from the M sample users.
[0140] Furthermore, the server can also obtain the characteristic values of the target sample user under the above L types of feature types, and can input the characteristic values of the target sample user under the above L types of feature types into the model to be trained to train the model to be trained. The process of training the model to be trained can be: the model to be trained can predict the attributes of the target sample user based on the characteristic values of the input target sample user under the L types of feature types. The attribute can be an abnormal attribute or a normal attribute. The server can obtain the prediction loss function of the model to be trained based on the difference between the attribute of the target sample user predicted by the model to be trained and the actual attribute of the target sample user indicated by the user label carried by the target sample user. Then, the model parameters of the model to be trained can be corrected by the prediction loss function to achieve the purpose of training the model to be trained. The trained model to be trained (such as the model to be trained with the model parameters corrected to convergence) can be called the target model. The target model can be used to distinguish and predict the attributes of the predicted user. The predicted user can be any user who needs to conduct transaction behavior evaluation.
[0141] For example, the server can obtain a predicted user from a data system, or the predicted user can also be a user submitted by a user on the client. The server can obtain the feature values of the predicted user under the aforementioned L feature types, and can input the feature values of the predicted user under the L feature types into the aforementioned target model. Then, the target model can be used to predict the attributes of the predicted user. Furthermore, if the predicted attributes of the predicted user are abnormal, the predicted user can be treated as an abnormal user, and an early warning operation can be performed on the abnormal user. For example, an abnormal prompt information for the abnormal user can be returned to the client to warn relevant personnel.
[0142] See Figure 6 , Figure 6 This is a schematic diagram of a model training scenario provided by this application. Figure 6 As shown, the target sample data can refer to the target sample user described above. The feature values of the target sample data under L feature types can be input into the to-be-trained model 100g. The to-be-trained model 100g can be trained using the feature values of the target sample data under L feature types, thereby training the target model 101g. Subsequently, the server can obtain the predicted user and input the feature values of the predicted user under L feature types into the target model. The target model can then predict the attribute 102g of the predicted user. Furthermore, if the attribute 102g is an abnormal attribute, the predicted user can be treated as an abnormal user and a warning operation can be performed on the abnormal user.
[0143] The fourth way to generate training indicator information: The above-mentioned N feature types may include the z-th feature type, where z is a positive integer less than or equal to N, and the z-th feature type may be any one of the continuous feature types in the N feature types. Similarly, the above-mentioned M sample data may include a number of negative sample data and a number of positive sample data. Similarly, the server may divide (i.e., bin) the M sample data according to the characteristic value of each sample data under the z-th feature type, and obtain K3 sample data bins corresponding to the z-th feature type, where K3 is a positive integer less than or equal to M. The binning method is determined according to the actual application scenario, such as the system default binning method or the user-defined binning method.
[0144] Furthermore, the server can also obtain the frequency of negative sample data included in each of the K3 sample data bins (which can be referred to as the negative sample frequency). The negative sample frequency can be the ratio of the number of negative sample data in the corresponding sample data bin to the total number of sample data included in the sample data bin. The server can also obtain the frequency of positive sample data included in each sample data bin (which can be referred to as the positive sample frequency). The positive sample frequency can be the ratio of the number of positive sample data in the corresponding sample data bin to the total number of sample data included in the sample data bin. Since the zth feature type is continuous, the K3 sample data bins have a certain order. Therefore, the corresponding model discrimination (i.e., Kolmogorov-Smirnov, abbreviated as KS evaluation index) can be calculated based on the negative sample frequency and positive sample frequency corresponding to each sample data bin. The method for obtaining the model discrimination can be referred to the following formula (3):
[0145] ks=max{|cum(bad g -rate)-cum(good g -rate)|,1≤g≤K3} (3)
[0146] Among them, the g-th sample data bin can be any sample data bin among the K3 sample data bins, cum(bad g -rate) represents the negative sample frequency corresponding to the g-th sample data bin and the sum of the negative sample frequencies of the sample data bins sorted before the g-th sample data bin, cum(good g -rate) represents the sum of the positive sample frequencies corresponding to the g-th sample data bin and the positive sample frequencies of the sample data bins ranked before the g-th sample data bin. The KS evaluation index is used to assess the model's discriminative prediction ability. The KS evaluation index can range from 0 to 1. A larger KS evaluation index indicates a better discriminative prediction ability of the model. This means that when feature types with larger KS evaluation indexes are used to train the model, the trained model can have stronger discriminative prediction capabilities for positive and negative sample data. Conversely, a smaller KS evaluation index indicates a worse discriminative prediction ability of the model. This means that when feature types with smaller KS evaluation indexes are used to train the model, the trained model can have worse discriminative prediction capabilities for positive and negative sample data. The model discrimination calculated above can be used as the training indicator information corresponding to the z-th feature type. The server can also calculate the model discrimination for other continuous feature types in the same way as calculating the model discrimination for the z-th feature type.
[0147] It is understandable that the four methods of generating training indicator information described above describe four types of training indicator information. According to the actual application scenario, one, any two, any three or any four of the four types of training indicator information can be selected as the training indicator information corresponding to the feature type. The server can recommend the sorting of the above-mentioned N feature types through the training indicator information (for example, recommending the sorting of the N feature types after sorting by the IV value mentioned above). The server can also generate text description information corresponding to each feature type based on the training indicator information corresponding to each feature type. The text description information can be a text description of the training indicator information corresponding to the feature type, such as using text to describe the feature value frequency of each target feature value of the above-mentioned t-th feature type, using text to describe the frequency change trend between the negative sample frequencies corresponding to each sample data bin of the above-mentioned j-th feature type, using text to describe the sample discrimination index value corresponding to each sample data bin of the above-mentioned s-th feature type, and using text to describe the model discrimination degree of the above-mentioned z-th feature type, etc. The server can also generate intuitive schematic diagrams such as table diagrams, histograms or curve diagrams corresponding to each feature type based on the training indicator information corresponding to each feature type, for example, generate a table diagram corresponding to the eigenvalue frequency of each target eigenvalue of the above-mentioned t-th feature type, generate a curve diagram corresponding to the frequency change trend between the negative sample frequencies corresponding to each sample data bin of the above-mentioned j-th feature type, generate a curve diagram corresponding to the sample discrimination index value corresponding to each sample data bin of the above-mentioned s-th feature type, and generate a curve diagram corresponding to the model discrimination degree of each feature type, etc.
[0148] Furthermore, the server can send the above-mentioned recommended ranking, text description information, table diagram, histogram or curve chart and other indicator information for the N feature types (the indicator information indicates the training indicator information of each feature type) to the client, so that the client can display the obtained indicator information on the client interface. Through the indicator information, the user can clearly see the degree of adaptability of each feature type in the N feature types to the model training scenario. The indicator information can be used as a basis for the user to select a feature type that is compatible with the model training scenario from the N feature types, so that the feature type selected by the user can more accurately train the model in the model training scenario.
[0149] See Figure 7a-7b , Figure 7a-7b This is a schematic diagram of an interface for displaying measurement results provided by this application. Figure 7a As shown, the training indicator information (including frequency (i.e., quantity), frequency) of the observation group (i.e., the above-mentioned sample data set) and the training indicator information of the control group are intuitively compared and displayed on the client interface 100d of the client. Figure 7aAs shown, in area 101d of the client interface 100d, the frequencies of the observation group and the control group in different sample data bins (such as the sample data bins of 0 to 50 and the sample data bins of 51 to 100) are compared and displayed; in area 102d of the client interface 100d, the total number of the observation group and the control group and the number in each bin are compared and displayed in a table; in area 103d of the client interface 100d, the frequencies and rates of the observation group and the control group are compared and displayed in a table.
[0150] For example Figure 7b As shown, a histogram 101e in the client interface 104e of the client shows the frequency (i.e., quantity) of negative sample data and positive sample data contained in each sample data bin (including bin 1, bin 2, bin 3, and bin 4). A curve 102e is also displayed in the histogram 101e. The curve 102e contains the proportion of negative sample data in each sample data bin. The curve 102e shows the changing trend of the proportion of negative sample data in each sample data bin (i.e., the above-mentioned frequency changing trend). The curve 103e in the client interface 104e also shows the changing pattern of the WOE value of each bin.
[0151] In addition, the client interface 104e also includes a button 100e (i.e., the button "Download Data"), through which the data displayed in the client interface (such as the histogram 101e and the curve chart 103e, etc.) and the training indicator information corresponding to each feature type can be downloaded. The downloaded data can be in word format (editable text format) or pdf format (portable document format), etc.
[0152] The present application can first obtain a sample data set under a model training scenario; the sample data set contains M sample data, where M is a positive integer; and N feature types to be analyzed can be obtained, and the feature values of each sample data under each feature type can be obtained respectively; N is a positive integer; and then, based on the feature values of each sample data under each feature type, training index information of the sample data set under each feature type can be generated, and the training index information is used to assist in determining the feature type that is compatible with the model training scenario from the N feature types. It can be seen that the method proposed in the present application can generate training index information of the sample data set under each feature type based on the feature values of each sample data under each feature type, and the feature type that is compatible with the model training scenario can be more accurately selected from the N feature types through the training index information, and then the feature type that is compatible with the model training scenario can be used to achieve more accurate training of the model under the model training scenario, so that the trained model has better model performance.
[0153] See Figure 8 , Figure 8 This is a flowchart of a data processing method provided by this application. Figure 8 , the method may include:
[0154] First, the following steps s1 to s3 may be front-end page operations.
[0155] Step s1: obtain samples;
[0156] The user is supported to obtain a sample in the client, and the sample may be the above-mentioned sample data set, and the sample data set may include M sample data.
[0157] Step s2: Get features;
[0158] The client supports users to enter features, which can be the N feature types mentioned above, and supports users to submit custom binning methods corresponding to continuous feature types in the client. If the user does not submit a custom binning method, the system default binning method can be obtained.
[0159] Step s3: Submit the task to the background for execution:
[0160] Supports users to submit measurement tasks for feature types to the backend in the client.
[0161] Furthermore, the following steps s4 to s8 may be steps for performing feature descriptive statistics in the background.
[0162] Step s4: raw data processing;
[0163] The server can determine whether it is necessary to obtain the training indicator information of each feature type through the feature values of the control group under each feature type, wherein whether a control group is needed can be selected by the user in the client. If the user selects that a control group is needed in the client, then the server can determine that it is necessary to obtain the training indicator information of each feature type through the feature values of the control group under each feature type. Conversely, if the user does not select that a control group is needed in the client, then the server can determine that it is not necessary to obtain the training indicator information of each feature type through the feature values of the control group under each feature type. The process of obtaining the training indicator information of each feature type through the feature values of the control group under each feature type is the same as the process of obtaining the training indicator information of each feature type through the feature values of the above-mentioned observation group (i.e., the sample data set) under each feature type.
[0164] The server can associate features: that is, after obtaining the sample data set and N feature types, the server can associate (i.e., obtain) the feature values of each sample data under the N feature types from the data system. The server can also filter out the IDs of sample data (such as the user ID of the sample user) that do not have feature values under the feature type. The server can also obtain a sample data list consisting of sample data that do not have feature values under various feature types. One feature type can correspond to one sample data list. If M sample data have feature values under a certain feature type, there may be no sample data list for that feature type.
[0165] Step s5: variable type distinction;
[0166] Variables are feature types. The server can distinguish between discrete and continuous feature types among the N aforementioned feature types. For discrete feature types, the server can classify the feature values. For example, for gender, the feature values can be classified into "male" and "female." For continuous feature types, the server can bin (i.e., segment) the feature values.
[0167] Step s6: indicator processing;
[0168] The server can fill in missing values for sample data that do not have feature values under the feature type, such as filling the feature values corresponding to the sample data with "null". Furthermore, the server can calculate statistical information between the feature values of M sample data, and the statistical information may include statistical information such as frequency, number of frequencies, cumulative frequency, and the frequency change trend of the above-mentioned negative sample frequency in each bin. Among them, the statistical information of the sample data under the discrete feature type and the statistical information of the sample data under the continuous feature type can be calculated separately. One feature type can correspond to one statistical information, and the statistical information can be the training indicator information corresponding to the feature type.
[0169] Step s7: output data;
[0170] The server can output the statistical information of the calculated sample data under the discrete feature type, and output the statistical information of the calculated sample data under the continuous feature type, and export the sample data list corresponding to each feature type, which sample data list includes sample data whose feature values do not exist under the corresponding feature type.
[0171] Step s8: Upload the merged results to the distributed storage system (HDFS);
[0172] The server can merge the statistical information corresponding to the above-mentioned discrete feature types, the statistical information corresponding to the above-mentioned continuous feature types, and the sample data lists corresponding to each feature type, and store the merged data in a distributed storage system. When the data is needed later, it can be obtained from the distributed storage system.
[0173] By obtaining the statistical information corresponding to the discrete feature type and the statistical information corresponding to the continuous feature type as described above, the result 103h can be obtained. The result 103h may include five parts of content, including descriptive statistics (which may be text description information of the statistical information), feature distribution diagrams (such as histograms or curve diagrams showing statistical information), frequency distribution lists (i.e., tables showing frequencies), frequency change trends (such as the frequency trend curve of negative sample data in each bin), and the proportion of good and bad samples (such as the frequency of good and bad samples in each bin).
[0174] Furthermore, the following steps s9 to s12 may be steps for performing feature validity analysis in the background.
[0175] Step s9: raw data processing;
[0176] Get the feature values of M sample data under each feature type.
[0177] Step s10: feature validity measurement;
[0178] Similarly, discrete and continuous feature types can be calculated separately. The server can also fill missing values for sample data that do not have feature values under the feature type. For discrete feature types, the server can respectively calculate the proportion of negative sample data and the proportion of positive sample data in the sample data belonging to the feature values of different categories of the feature type. For example, if the discrete feature type is a gender feature type, the server can calculate the proportion of negative sample data in the sample data with the feature value of "male", and the server can also calculate the proportion of negative sample data in the sample data set with the feature value of "male". The server can also calculate the proportion of negative sample data in the sample data with the feature value of "female", and the server can also calculate the proportion of negative sample data in the sample data set with the feature value of "female"; the server can also calculate the proportion of positive sample data in the sample data with the feature value of "male", and the server can also calculate the proportion of positive sample data in the sample data with the feature value of "male" to the sample data set. The server can also calculate the proportion of positive sample data in the sample data with the feature value of "female", and the server can also calculate the proportion of positive sample data in the sample data with the feature value of "female" to the sample data set.
[0179] For continuous feature types, the server can calculate the proportion of negative sample data in each sample data bin to the sample data in the corresponding bin, the proportion of negative sample data in each sample data bin to the sample data in the sample data set, the proportion of positive sample data in each sample data bin to the sample data in the corresponding bin, and the proportion of positive sample data in each sample data bin to the sample data in the sample data set.
[0180] Furthermore, through the various proportions calculated above, the WOE value, IV value, KS evaluation index and other indicator values corresponding to each feature type can be calculated (these indicator values can all be used as training indicator information corresponding to the feature type). The WOE value, IV value and KS evaluation index can all be used to evaluate the effectiveness of the corresponding feature type, that is, to evaluate whether the corresponding feature type is suitable for the model training scenario.
[0181] Step s11: save the result;
[0182] The server may upload the various ratios and index values calculated in steps s9 to s12 to the distributed storage system. If the ratios and index values are needed later, they may be obtained from the distributed storage system.
[0183] By obtaining various proportions and index values as described above, a result 104h can be obtained. The result 104h may include five parts, including feature monotonicity judgment (such as whether the frequency of negative sample data remains monotonically increasing or monotonically decreasing between each bin. The monotonicity judgment can be used to find a more effective application point, such as the application point from which the frequency of negative sample data monotonically increases), feature IV value, feature KS evaluation index, and feature WOE value.
[0184] Among them, the above-mentioned steps of performing feature descriptive statistics (i.e., steps s4 to s8) and the above-mentioned steps of performing feature validity analysis (i.e., steps s9 to s12) can be executed in parallel, and the steps of the two parts are not prioritized and do not affect each other. Optionally, according to user needs, if the user only needs feature descriptive statistics, only steps s4 to s8 can be executed, and steps s9 to s12 are not executed; if the user only needs feature validity, only steps s9 to s12 can be executed, and steps s4 to s8 are not executed; if the user needs both feature descriptive statistics and feature validity, all steps s4 to s12 can be executed. The server can send the above-mentioned result 103h and / or result 104h to the client, and the client displays the result 103h and / or result 104h to the user on the client interface. The result 103h and / or result 104h is obtained through the training indicator information corresponding to each feature type. The result 103h and / or result 104h can guide the user to select the feature type for model training, that is, the feature type that is more effective for model training.
[0185] Furthermore, the following is a code description of the relevant steps involved in this application:
[0186] The above-mentioned process steps for feature descriptive statistics construct several different functions based on variable type (discrete variable) and binning results (such as equal interval binning, equal frequency binning, or custom binning). The code is explained below using the processing flow of discrete variables (i.e., discrete feature types) as an example:
[0187] Among them, the functions for calculating the frequency, frequency, and cumulative frequency of discrete variables are as follows:
[0188] def discri_var_distribute(df_feature,var_name,result_path).
[0189] Missing value filling: fillna('missing') can be used to fill missing values in the original data;
[0190] Counting frequency: You can use value_counts(sort=False) to define print(df_discri), and you can use print(df_discri) to count the frequency;
[0191] Calculate frequency: You can use 'sub_total_num_percentage' = 'sub_total_num' / 'sub_total_num' to calculate the frequency;
[0192] Calculate frequency: You can use df_discri['sub_total_num_percentage_add']
[0193] =df_discri['sub_total_num_percentage'].cumsum()
[0194] print(df_discri) to calculate the frequency;
[0195] The result data (such as frequency and frequency) obtained from the above calculation can be written to a local CSV (comma-separated value file format) file in an appended manner, as shown in the following code:
[0196] df_discri.to_csv(result_path,mode='a',header=False,sep='\t',index=False).
[0197] For the relevant steps of the above feature validity process, such as calculating the woe value of discrete variables, in order to avoid type errors caused by some numerical discrete variables, the discrete variables can be forced to be converted into the str data type (a data type) for processing, such as the following code:
[0198] for var in cfg.discrete_var_list:
[0199] cfg.dataset_train[var]=cfg.dataset_train[var].astype(str). This code can be used to convert discrete variables into str data type.
[0200] The present application can first obtain a sample data set under a model training scenario; the sample data set contains M sample data, where M is a positive integer; and N feature types to be analyzed can be obtained, and the feature values of each sample data under each feature type can be obtained respectively; N is a positive integer; and then, based on the feature values of each sample data under each feature type, training index information of the sample data set under each feature type can be generated, and the training index information is used to assist in determining the feature type that is compatible with the model training scenario from the N feature types. It can be seen that the method proposed in the present application can generate training index information of the sample data set under each feature type based on the feature values of each sample data under each feature type, and the feature type that is compatible with the model training scenario can be more accurately selected from the N feature types through the training index information, and then the feature type that is compatible with the model training scenario can be used to achieve more accurate training of the model under the model training scenario, so that the trained model has better model performance.
[0201] See Figure 9 , Figure 9 This is a structural diagram of a data processing device provided by the present application. The data processing device can be a computer program (including program code) running on a computer device. For example, the data processing device is an application software. The data processing device can be used to execute the corresponding steps of the method provided in the embodiment of the present application. Figure 9 As shown, the data processing device 1 may include: a sample acquisition module 101, a feature acquisition module 102 and an indicator generation module 103;
[0202] The sample acquisition module 101 is used to obtain a sample data set in a model training scenario; the sample data set includes M sample data, where M is a positive integer;
[0203] The feature acquisition module 102 is used to obtain N feature types to be analyzed and obtain the feature value of each sample data under each feature type respectively; N is a positive integer;
[0204] The indicator generation module 103 is used to generate training indicator information of the sample data set under each feature type based on the characteristic value of each sample data under each feature type. The training indicator information is used to assist in determining the feature type that is compatible with the model training scenario from N feature types.
[0205] Optionally, the N feature types include an i-th feature type, where i is a positive integer less than or equal to N; the i-th feature type has t target feature values, where t is a positive integer;
[0206] The indicator generation module 103 generates training indicator information of the sample data set under each feature type according to the feature value of each sample data under each feature type, including:
[0207] According to the eigenvalue of each sample data under the i-th feature type, determine the eigenvalue frequency corresponding to each target eigenvalue in the t types of target eigenvalues;
[0208] According to the eigenvalue frequency corresponding to each target eigenvalue, the training index information of the sample data set under the i-th feature type is generated.
[0209] Optionally, the M sample data include negative sample data and positive sample data; the N feature types include the j-th feature type, where j is a positive integer less than or equal to N;
[0210] The indicator generation module 103 generates training indicator information of the sample data set under each feature type according to the feature value of each sample data under each feature type, including:
[0211] According to the characteristic value of each sample data under the j-th feature type, the M sample data are divided to obtain K1 sample data bins corresponding to the j-th feature type; K1 is a positive integer less than or equal to M;
[0212] Obtain the negative sample frequencies of the negative sample data included in the K1 sample data bins respectively;
[0213] According to the negative sample frequencies corresponding to the K1 sample data bins, determine the frequency change trend between the negative sample frequencies corresponding to the K1 sample data bins;
[0214] The frequency change trend is determined as the training indicator information of the sample data set under the jth feature type.
[0215] Optionally, the M sample data include negative sample data and positive sample data; the N feature types include the s-th feature type, where s is a positive integer less than or equal to N;
[0216] The indicator generation module 103 generates training indicator information of the sample data set under each feature type according to the feature value of each sample data under each feature type, including:
[0217] According to the characteristic value of each sample data under the s-th feature type, the M sample data are divided into K2 sample data bins corresponding to the s-th feature type; K2 is a positive integer less than or equal to M;
[0218] Obtain the number of negative samples of the negative sample data included in the K2 sample data bins respectively;
[0219] Obtain the number of positive samples of the positive sample data included in the K2 sample data bins respectively;
[0220] According to the number of negative samples and the number of positive samples corresponding to the K2 sample data bins, the training indicator information of the sample data set under the sth feature type is determined.
[0221] Optionally, the indicator generation module 103 determines the training indicator information of the sample data set under the sth feature type according to the number of negative samples and the number of positive samples corresponding to the K2 sample data bins, including:
[0222] According to the number of negative sample data and positive samples corresponding to the K2 sample data bins, the sample discrimination weights corresponding to the K2 sample data bins are determined;
[0223] According to the number of negative samples, number of positive samples and sample discrimination weight corresponding to the K2 sample data bins, the sample discrimination index value corresponding to the sth feature type is determined;
[0224] The sample discrimination index value corresponding to the s-th feature type is determined as the training index information of the sample data set under the s-th feature type.
[0225] Optionally, the device 1 further includes:
[0226] A sorting module 104 is configured to sort the N feature types according to the descending order of the sample discrimination index values of the sample data set under each feature type, to obtain the sorted N feature types;
[0227] The feature selection module 105 is used to determine the first L feature types among the sorted N feature types as feature types that are adapted to the model training scenario; L is a positive integer less than or equal to N.
[0228] Optionally, the M sample data are M sample users;
[0229] The above-mentioned device 1 further includes: a model acquisition module 106, a target sample acquisition module 107 and a model training module 108;
[0230] The model acquisition module 106 is used to obtain the model to be trained in the model training scenario;
[0231] The target sample acquisition module 107 is used to acquire target sample users and obtain feature values of the target sample users under L feature types; the target sample users carry user labels; the user labels are abnormal user labels or normal user labels;
[0232] The model training module 108 is used to train the to-be-trained model based on the feature values of the target sample user under L feature types and the user labels carried by the target sample user to obtain a target model;
[0233] The target model is used to differentiate and predict the attributes of the predicted user, which are normal attributes or abnormal attributes.
[0234] Optionally, the apparatus 1 further includes: a predicted user acquisition module 109, a feature prediction module 110, and an early warning module 111;
[0235] The predicted user acquisition module 109 is used to acquire the predicted user and obtain the feature values of the predicted user under L feature types;
[0236] The feature prediction module 110 is used to input the feature values of the predicted user under L feature types into the target model and predict the attributes of the target user in the target model;
[0237] The early warning module 111 is configured to determine the predicted user as an abnormal user if the attribute of the predicted user is an abnormal attribute, and perform an early warning operation on the abnormal user.
[0238] Optionally, the M sample data include negative sample data and positive sample data; the N feature types include the z-th feature type, where z is a positive integer less than or equal to N;
[0239] The indicator generation module 103 generates training indicator information of the sample data set under each feature type according to the feature value of each sample data under each feature type, including:
[0240] According to the characteristic value of each sample data under the z-th feature type, the M sample data are divided into K3 sample data bins corresponding to the z-th feature type; K3 is a positive integer less than or equal to M;
[0241] Obtain the negative sample frequencies of the negative sample data included in the K3 sample data bins respectively;
[0242] Obtain the positive sample frequencies of the positive sample data included in the K3 sample data bins respectively;
[0243] According to the negative sample frequency and positive sample frequency corresponding to the k3 sample data bins, obtain the model discrimination corresponding to the zth feature type;
[0244] The model discrimination is determined as the training indicator information of the sample data set under the zth feature type.
[0245] Optionally, the sample acquisition module 101 acquires a sample data set in a model training scenario by:
[0246] Obtain a sample data set in a sample data system;
[0247] The feature acquisition module 102 acquires the feature value of each sample data under each feature type in the following manner:
[0248] Based on the access interface between the sample data system and the metadata system, the feature value of each sample data under each feature type is obtained in the metadata system.
[0249] Optionally, the sample acquisition module 101 acquires a sample data set in a model training scenario by:
[0250] Get the sample acquisition request sent by the client; the sample acquisition request carries the sample search field;
[0251] Get the sample data set based on the sample search field;
[0252] The above device 1 is also used for:
[0253] The training indicator information of the sample data set under each feature type is sent to the client, so that the client displays the training indicator information of the sample data set under each feature type on the client interface.
[0254] According to one embodiment of the present application, Figure 3 The steps involved in the data processing method shown can be represented by Figure 9 The data processing device 1 shown in FIG. 1 is executed by each module. For example, Figure 3 The step S101 shown in FIG. Figure 9 The sample acquisition module 101 in the embodiment is used to execute, Figure 3 The step S102 shown in FIG. Figure 9 The feature acquisition module 102 is executed; Figure 3 The step S103 shown in FIG. Figure 9 The indicator generation module 103 in is executed.
[0255] The present application can first obtain a sample data set under a model training scenario; the sample data set contains M sample data, where M is a positive integer; and N feature types to be analyzed can be obtained, and the feature values of each sample data under each feature type can be obtained respectively; N is a positive integer; and then, based on the feature values of each sample data under each feature type, training index information of the sample data set under each feature type can be generated, and the training index information is used to assist in determining the feature type that is compatible with the model training scenario from the N feature types. It can be seen that the method proposed in the present application can generate training index information of the sample data set under each feature type based on the feature values of each sample data under each feature type, and the feature type that is compatible with the model training scenario can be more accurately selected from the N feature types through the training index information, and then the feature type that is compatible with the model training scenario can be used to achieve more accurate training of the model under the model training scenario, so that the trained model has better model performance.
[0256] According to one embodiment of the present application, Figure 9 The various modules in the data processing device 1 shown can be individually or all combined into one or several units to constitute, or one (or some) of the units can be further divided into multiple smaller sub-units in function, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application. The above modules are divided based on logical functions. In actual applications, the functions of a module can also be implemented by multiple units, or the functions of multiple modules can be implemented by one unit. In other embodiments of the present application, the data processing device 1 may also include other units. In actual applications, these functions can also be implemented with the assistance of other units, and can be implemented by the collaboration of multiple units.
[0257] According to one embodiment of the present application, the program can be executed by running on a general computer device such as a computer including a central processing unit (CPU), a random access memory (RAM), a read-only memory (ROM) and other processing elements and storage elements. Figure 3 A computer program (including program code) for each step involved in the corresponding method shown in Figure 9 The data processing device 1 shown in the embodiment of the present application is used to implement the data processing method of the embodiment of the present application. The above computer program can be recorded on a computer readable recording medium, for example, and loaded into the above computing device through the computer readable recording medium and run therein.
[0258] See Figure 10 , Figure 10 This is a schematic diagram of the structure of a computer device provided by this application. Figure 10 As shown, the computer device 1000 may include: a processor 1001, a network interface 1004 and a memory 1005. In addition, the computer device 1000 may also include: a user interface 1003, and at least one communication bus 1002. The communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), a keyboard (Keyboard), and the user interface 1003 may optionally include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a non-volatile memory (non-volatile memory), such as at least one disk memory. The memory 1005 may optionally also be at least one storage device located away from the aforementioned processor 1001. As Figure 10 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a device control application program.
[0259] exist Figure 10 In the computer device 1000 shown, the network interface 1004 can provide network communication functions; the user interface 1003 is mainly used to provide an interface for user input; and the processor 1001 can be used to call the device control application stored in the memory 1005 to achieve:
[0260] Get a sample data set for the model training scenario; the sample data set contains M sample data, where M is a positive integer;
[0261] Obtain N feature types to be analyzed, and obtain the feature values of each sample data under each feature type respectively; N is a positive integer;
[0262] Based on the characteristic value of each sample data under each feature type, the training indicator information of the sample data set under each feature type is generated. The training indicator information is used to assist in determining the feature type that is suitable for the model training scenario from N feature types.
[0263] It should be understood that the computer device 1000 described in the embodiment of the present application can execute the above Figure 3 The description of the above data processing method in the corresponding embodiment can also be performed Figure 9 The description of the data processing device 1 in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of adopting the same method will not be repeated here either.
[0264] In addition, it should be pointed out that the present application also provides a computer-readable storage medium, and the computer-readable storage medium stores a computer program executed by the data processing device 1 mentioned above, and the computer program includes program instructions. When the processor executes the program instructions, it can execute the above-mentioned Figure 3 The description of the data processing method in the corresponding embodiment will therefore not be repeated here. In addition, the description of the beneficial effects of using the same method will not be repeated here. For technical details not disclosed in the computer storage medium embodiment involved in this application, please refer to the description of the method embodiment of this application.
[0265] As an example, the above program instructions may be deployed on a computer device for execution, or deployed on multiple computer devices located at one location for execution, or executed on multiple computer devices distributed at multiple locations and interconnected by a communication network. Multiple computer devices distributed at multiple locations and interconnected by a communication network may constitute a blockchain network.
[0266] The computer-readable storage medium may be the data processing device provided in any of the aforementioned embodiments or the internal storage unit of the computer device, such as the hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the computer device. Furthermore, the computer-readable storage medium may also include both the internal storage unit of the computer device and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by the computer device. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.
[0267] The present application provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the above-mentioned Figure 3 The description of the above-mentioned data processing method in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of adopting the same method will not be repeated here. For technical details not disclosed in the computer-readable storage medium embodiment involved in this application, please refer to the description of the method embodiment of this application.
[0268] The terms "first", "second", etc. in the description, claims, and drawings of the embodiments of the present application are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "comprising" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, apparatus, product, or device comprising a series of steps or units is not limited to the listed steps or modules, but may optionally include steps or modules not listed, or may optionally include other step units inherent to these processes, methods, apparatuses, products, or devices.
[0269] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0270] The methods and related devices provided by the embodiments of the present application are described with reference to the method flow charts and / or structural diagrams provided by the embodiments of the present application. Specifically, each process and / or block in the method flow charts and / or structural diagrams, as well as the combination of processes and / or blocks in the flow charts and / or block diagrams, 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 generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the process. Figure 1 Schematic diagram of one or more processes and / or structures Figure 1 These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including the instruction device, which implements the function specified in the process. Figure 1 Schematic diagram of one or more processes and / or structures Figure 1 These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation 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 process. Figure 1 The flow or flows and / or structures illustrate the steps of the functions specified in one block or multiple blocks.
[0271] The above disclosure is only a preferred embodiment of the present application, and certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.
Claims
1. A data processing method, characterized in that: The method comprises: Obtain a sample user set in a scenario of abnormal user differentiation, wherein the sample user set includes M sample users, where M is a positive integer; Obtain N feature types associated with the transactions of the sample user and the scenarios distinguishing the abnormal users, and obtain the feature value of each sample user under each feature type, where N is a positive integer; Performing statistical processing on the feature values of each sample user under each feature type to generate training indicator information for the sample user set under each feature type, wherein the training indicator information under one feature type is used to indicate the adaptability of the feature type to the scenario for distinguishing abnormal users; Using the training indicator information under the N feature types, a feature type that is adapted to the scenario for distinguishing the abnormal user is selected from the N feature types; The screened feature types are used to train an abnormal user discrimination model that distinguishes and predicts users with abnormal transaction behaviors and users without abnormal transaction behaviors.
2. The method according to claim 1, characterized in that The N feature types include the i-th feature type, where i is a positive integer less than or equal to N; the i-th feature type has t target feature values, where t is a positive integer; The performing statistical processing on the feature value of each sample user under each feature type to generate training indicator information of the sample user set under each feature type includes: Determining, according to the feature value of each sample user under the i-th feature type, the feature value frequency corresponding to each target feature value in the t types of target feature values; According to the eigenvalue frequency corresponding to each target eigenvalue, training index information of the sample user set under the i-th feature type is generated.
3. The method according to claim 1, characterized in that The M sample users include negative sample users and positive sample users; the N feature types include the j-th feature type, where j is a positive integer less than or equal to N; The performing statistical processing on the feature value of each sample user under each feature type to generate training indicator information of the sample user set under each feature type includes: Divide the M sample users according to the feature value of each sample user under the j-th feature type to obtain K1 sample user bins corresponding to the j-th feature type; K1 is a positive integer less than or equal to M; Obtain the negative sample frequencies of the negative sample users included in the K1 sample user bins respectively; Determine, based on the negative sample frequencies corresponding to the K1 sample user bins, a frequency change trend between the negative sample frequencies corresponding to the K1 sample user bins; The frequency change trend is determined as training indicator information of the sample user set under the j-th feature type.
4. The method according to claim 1, wherein The M sample users include negative sample users and positive sample users; the N feature types include the sth feature type, where s is a positive integer less than or equal to N; The performing statistical processing on the feature value of each sample user under each feature type to generate training indicator information of the sample user set under each feature type includes: Divide the M sample users according to the feature value of each sample user under the s-th feature type to obtain K2 sample user bins corresponding to the s-th feature type; K2 is a positive integer less than or equal to M; Obtain the number of negative samples of the negative sample users included in the K2 sample user bins respectively; Obtain the number of positive samples of the positive sample users included in the K2 sample user bins respectively; The training index information of the sample user set under the sth feature type is determined according to the number of negative samples and the number of positive samples corresponding to the K2 sample user bins.
5. The method according to claim 4, characterized in that Determining the training indicator information of the sample user set under the sth feature type according to the number of negative samples and the number of positive samples corresponding to the K2 sample user bins, includes: Determine the sample discrimination weights corresponding to the K2 sample user bins according to the number of negative samples and the number of positive samples corresponding to the K2 sample user bins; Determine the sample discrimination index value corresponding to the s-th feature type according to the number of negative samples, the number of positive samples, and the sample discrimination weights corresponding to the K2 sample user bins; The sample distinction index value corresponding to the s-th feature type is determined as the training index information of the sample user set under the s-th feature type.
6. The method according to claim 5, characterized in that The method further comprises: Sorting the N feature types according to the descending order of the sample distinction index values of the sample user set under each feature type to obtain the sorted N feature types; The first L feature types among the sorted N feature types are determined as feature types that are adapted to the scenario for distinguishing the abnormal users; L is a positive integer less than or equal to N.
7. The method according to claim 6, characterized in that The method further comprises: Obtaining a model to be trained in the scenario of distinguishing abnormal users; Obtain a target sample user and obtain feature values of the target sample user under the L feature types; the target sample user carries a user label; the user label is an abnormal user label or a normal user label; Training the to-be-trained model according to the feature values of the target sample user under the L feature types and the user label carried by the target sample user to obtain a target model; The target model is used to differentiate and predict the attributes of the predicted user, which are normal attributes or abnormal attributes.
8. The method according to claim 7, characterized in that The method further comprises: Obtaining the predicted user, and obtaining feature values of the predicted user under the L feature types; Inputting the feature values of the predicted user under the L feature types into the target model, and predicting the attributes of the predicted user in the target model; If the attribute of the predicted user is the abnormal attribute, the predicted user is determined to be an abnormal user, and an early warning operation is performed on the abnormal user.
9. The method according to claim 1, characterized in that The M sample users include negative sample users and positive sample users; the N feature types include the z-th feature type, where z is a positive integer less than or equal to N; The performing statistical processing on the feature value of each sample user under each feature type to generate training indicator information of the sample user set under each feature type includes: Divide the M sample users according to the feature value of each sample user under the zth feature type to obtain K3 sample user bins corresponding to the zth feature type; K3 is a positive integer less than or equal to M; Obtain the negative sample frequencies of the negative sample users included in the K3 sample user bins respectively; Obtaining the positive sample frequencies of the positive sample users included in the K3 sample user bins respectively; Obtain the model discrimination corresponding to the zth feature type according to the negative sample frequencies and positive sample frequencies corresponding to the K3 sample user bins; The model discrimination is determined as the training index information of the sample user set under the zth feature type.
10. The method according to claim 1, characterized in that The sample user set for the scenario of obtaining abnormal user distinction includes: Acquire the sample user set in a sample data system; The step of obtaining the feature value of each sample user under each feature type includes: Based on the access interface between the sample data system and the metadata system, the feature value of each sample user under each feature type is respectively obtained in the metadata system.
11. The method according to claim 1, wherein The sample user set for the scenario of obtaining abnormal user distinction includes: Obtaining a sample acquisition request sent by a client; the sample acquisition request carries a sample search field; Acquire the sample user set according to the sample search field; The method further comprises: The training indicator information of the sample user set under each feature type is sent to the client, so that the client displays the training indicator information of the sample user set under each feature type on the client interface.
12. A data processing device, characterized in that: The device comprises: A sample acquisition module is used to acquire a sample user set in a scenario of distinguishing abnormal users, wherein the sample user set includes M sample users, where M is a positive integer; A feature acquisition module is used to acquire N feature types associated with the transactions of sample users and the scenarios distinguished by the abnormal users, and to obtain the feature value of each sample user under each feature type, where N is a positive integer; an indicator generation module, configured to perform statistical processing on the feature values of each sample user under each feature type to generate training indicator information for the sample user set under each feature type, wherein the training indicator information under one feature type is used to indicate the suitability of the feature type for the scenario of distinguishing abnormal users; Using the training indicator information under the N feature types, a feature type that is adapted to the scenario for distinguishing the abnormal user is selected from the N feature types; The screened feature types are used to train an abnormal user discrimination model that distinguishes and predicts users with abnormal transaction behaviors and users without abnormal transaction behaviors.
13. The device according to claim 12, characterized in that The M sample users include negative sample users and positive sample users; the N feature types include the j-th feature type, where j is a positive integer less than or equal to N; The indicator generation module is further used to: Divide the M sample users according to the feature value of each sample user under the j-th feature type to obtain K1 sample user bins corresponding to the j-th feature type; K1 is a positive integer less than or equal to M; Obtain the negative sample frequencies of the negative sample users included in the K1 sample user bins respectively; Determine, based on the negative sample frequencies corresponding to the K1 sample user bins, a frequency change trend between the negative sample frequencies corresponding to the K1 sample user bins; The frequency change trend is determined as training indicator information of the sample user set under the j-th feature type.
14. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the method according to any one of claims 1 to 11.
15. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor and executing the method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Bank potential credit client mining method based on knowledge graph and machine learning algorithm
CN110458592A
Classification model training method and device based on service security and storage medium
CN111259985A