Model construction system and method based on confrontation verification
By building a model system based on adversarial verification, creating new labels and training classifiers, we can filter out device data similar to the target channel, solve the problem of insufficient samples when new channels are connected, and improve the accuracy and efficiency of security identification.
Patent Information
- Application Number
- CN202510649069.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-20
- Publication Date
- 2025-10-17
AI Technical Summary
When new channels are connected, the existing machine learning models have poor recognition stability due to insufficient sample size, and collecting sample data from other channels will lead to excessive resource consumption and high trial and error costs, affecting the accuracy of safety hazard identification.
By building a system based on adversarial verification models, creating new labels and training classifiers, we can filter out device data with similar characteristics to the target channel, build a secure identification model, reduce computing resource consumption, and improve identification accuracy.
It effectively reduces modeling resource consumption, shortens modeling time, and improves the accuracy of identifying safety hazards and hidden dangers.
Smart Images

Figure CN120804691A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer application, in particular to a model construction system and method based on adversarial verification. BACKGROUND
[0002] With the development of the Internet, various Internet service platforms (also known as channels) have emerged, such as online shopping platforms, online car-hailing platforms, sharing platforms, maps, music, etc. These platforms have brought great convenience to people's lives, but due to their close integration with the Internet, there are some security risks such as fraud, dishonesty, and theft. Currently, machine learning models (referred to as models) are mainly used to identify devices with security risks.
[0003] Usually, platforms will reach out to devices through some channels in order to attract more devices. However, for some newly accessed channels, the number of samples reached is relatively small, which leads to insufficient samples for model training, affecting the stability of identifying devices with security risks.
[0004] This requires collecting samples from other channels to expand the new channel samples. In fact, there are many other external channels, and the sample data volume is also very large. If all the sample data of other external channels is used as new channel data for modeling, it will lead to excessive resource consumption and high trial and error cost for modeling, and the superposition of channel sample data one by one will affect the interaction of the channel itself. Therefore, it is urgent to select samples that are most similar to the feature expression of new channel samples from all channel samples for efficient sample expansion, so as to improve the stability of identifying devices with security risks. SUMMARY Therefore, the present application mainly aims to provide a model construction system and method based on adversarial verification for device security identification, in order to at least partially solve at least one of the above technical problems.
[0005] In order to solve the above technical problems, the present application provides a model construction system based on adversarial verification, which comprises: A creation module for creating a new label for all channel devices according to whether the device is reached through a target channel; A training module for training a classifier according to device data and the new label, so that the trained classifier can distinguish between target channels and non-target channels based on device data; An input module for inputting device data of all channels into the trained classifier to obtain a channel prediction value of the device; A construction module for filtering target device data from device data of all channels according to the channel prediction value, and constructing a security identification model.
[0006] According to a preferred embodiment of the present application, the constructing module is configured to use the channel prediction value as a weight of the device data, and construct the security identification model according to the device data and the weight.
[0007] According to a preferred embodiment of the present application, the constructing module is configured to select device data with a channel prediction value greater than a threshold value, and construct the security identification model according to the selected device data.
[0008] According to a preferred embodiment of the present application, the training module comprises: a dividing module configured to divide the device data and the corresponding new labels into a training set and a test set; a sub-training module configured to train a classifier on the training set; a testing module configured to verify the trained classifier on the test set, and determine that the training is completed when the ACU of the classifier on the test set is greater than a preset value.
[0009] To solve the above technical problems, the second aspect of the present application provides a model construction method based on adversarial verification, which comprises: creating new labels for all channel devices according to whether the devices are reached through a target channel; training a classifier according to the device data and the new labels, so that the trained classifier can distinguish whether a device is reached through a target channel or a non-target channel based on the device data; inputting the device data of all channels into the trained classifier to obtain channel prediction values of the devices; selecting target device data from the device data of all channels according to the channel prediction values, and constructing a security identification model.
[0010] According to a preferred embodiment of the present application, the selecting target device data from the device data of all channels according to the channel prediction values, and constructing a security identification model comprises: using the channel prediction value as a weight of the device data; constructing the security identification model according to the device data and the weight.
[0011] According to a preferred embodiment of the present application, the selecting target device data from the device data of all channels according to the channel prediction values, and constructing a security identification model comprises: selecting device data with a channel prediction value greater than a threshold value; constructing the security identification model according to the selected device data.
[0012] According to a preferred embodiment of the present application, the training a classifier according to the device data and the new labels comprises: dividing the device data and the corresponding new labels into a training set and a test set; training the classifier on the training set; verifying the trained classifier on the test set, and when the ACU of the classifier on the test set is greater than a preset value, the training is completed.
[0013] To solve the above technical problems, the third aspect of the present application provides an electronic device, comprising: a processor; and a memory storing computer executable instructions that, when executed, cause the processor to perform the method according to any one of the above.
[0014] To solve the above technical problems, the fourth aspect of the present application provides a computer program product comprising a computer program, characterized in that the computer program, when executed by a processor, implements the method according to any one of the above.
[0015] To sum up, the present application creates a new label of a target channel or a non-target channel for all channel devices according to whether the device is reached by the target channel; then trains a classifier based on the device data of all channels and the new label, and makes the trained classifier able to distinguish whether the device is reached by the target channel or the non-target channel based on the device data through the adversarial training between the device data of the target channel and the device data of other non-target channels; inputs the device data of all channels into the trained classifier to obtain the channel prediction value of the device; and filters the target device data from the device data of all channels according to the channel prediction value, so as to filter out the device data similar to the target channel for efficient sample expansion, thereby effectively reducing the consumption of computing resources during modeling, shortening the modeling time, and improving the accuracy of safety hazard and safety risk identification. BRIEF DESCRIPTION OF DRAWINGS
[0016] In order to make the technical problems solved by the present application, the technical means adopted and the technical effects obtained more clear, specific embodiments of the present application will be described in detail below with reference to the drawings. However, it should be declared that the drawings described below are only the drawings of exemplary embodiments of the present application, and for those skilled in the art, other drawings of embodiments can be obtained from these drawings without creative labor.
[0017] Figure 1 is a structural framework schematic diagram of a model construction system based on adversarial verification provided by an embodiment of the present application; Figure 2 is a flow schematic diagram of a model construction method based on adversarial verification provided by an embodiment of the present application; Figure 3 is a structural diagram of an exemplary embodiment of an electronic device according to the present application; Figure 4is a schematic diagram of a computer readable medium embodiment of the present application. DETAILED DESCRIPTION
[0018] In the premise of conforming to the technical concept of the present application, the structures, properties, effects or other features described in a certain specific embodiment can be combined into one or more other embodiments in any suitable manner.
[0019] In the introduction to the specific embodiments, the detailed description of the structures, properties, effects or other features is to enable the skilled in the art to fully understand the embodiments. However, it does not exclude that the skilled in the art can implement the present application without the above-mentioned structures, properties, effects or other features in specific cases. The figures in the drawings are only an exemplary demonstration, and do not represent that all the contents, operations and steps in the figures must be included in the scheme of the present application, nor must they be executed in the order shown in the figures.
[0020] Reference Figure 1 , Figure 1 is a structural framework schematic diagram of a model construction system based on adversarial verification provided by an embodiment of the present application for device security identification, as shown in Figure 1 The system comprises: A creation module 21 is configured to create new labels for devices in all channels according to whether the devices are reached through a target channel. A training module 22 is configured to train a classifier according to device data and the new labels, so that the trained classifier can distinguish the target channel and the non-target channel based on the device data; the device data comprises at least one of the following: a region where the device is located, a device purchase or return record, device information, and device behavior information. An input module 23 is configured to input the device data of devices in all channels into the trained classifier to obtain channel prediction values of the devices. A construction module 24 is configured to filter target device data from the device data of devices in all channels according to the channel prediction values, and construct a security identification model.
[0021] In an optional implementation, the construction module 24 is configured to take the channel prediction values as weights of the device data, and construct the security identification model according to the device data and the weights.
[0022] In another optional implementation, the construction module 24 is configured to select device data with a channel prediction value greater than a threshold value, and construct the security identification model according to the selected device data.
[0023] Further, the training module 22 comprises: A division module is configured to divide the device data and the corresponding new labels into a training set and a test set. a sub-training module for training the classifier on the training set; a testing module for verifying the trained classifier on the testing set, and the training is completed when the ACU of the classifier on the testing set is greater than a preset value.
[0024] Based on Figure 2 The model construction system based on the adversarial verification, the embodiment of the present application further provides a monitoring system, the system comprises: An acquisition module is configured to acquire device data in response to a service request of a target channel device; An identification module is configured to input the device data into a pre-constructed security identification model to identify a security identification result of the device according to an output result of the security identification model; the security identification model is constructed by the model construction method based on the adversarial verification described in any one of the above. An execution module is configured to perform security monitoring control (security monitoring) processing according to the security identification result, such as risk control business (pre-monitoring control of platform business security risks).
[0025] Based on Figure 1 The model construction system based on the adversarial verification, the embodiment of the present application further provides a model construction method based on the adversarial verification. The method can be applied to a security monitoring scenario where the number of target channel reach devices is relatively small, such as a risk control scenario, specifically: risk control business in the initial stage of new channel access. For example, Figure 2 The model construction method based on the adversarial verification comprises: S1. Creating a new label according to whether a device reaches all channels through a target channel; In this embodiment, the target channel can be a new reach channel accessed by the platform, and the non-target channel refers to all other reach channels except the target channel. The reach channel can be a short message reach channel, a video push channel, a shopping reach channel, a television reach channel, etc.
[0026] Wherein: reaching through the target channel means that the device accesses the platform through the target channel, and not reaching through the target channel means reaching through other non-target channels, which means that the device accesses the platform through other channels other than the target channel. For example, the device reaching through the target channel can be marked as 1 in label_new, and the device not reaching through the target channel (i.e., reaching through other non-target channels) can be marked as 0 in label_new.
[0027] S2. Training a classifier according to device data and the new label, In this embodiment, the device data can be any device-related data selected by the device and disclosed or desensitized. It can include at least one of the device location, device purchase or return record, device communication record, device information, and device behavior information; The purchase record refers to the record of the device purchasing goods on the platform. The device return record refers to the record of whether the device returns the goods on time after applying for the goods on the platform. The goods can be physical goods, virtual goods, services, etc., which are not limited by the present application. The device communication record can include the contact list stored in the device, the communication record stored in the device, and other communication-related information. The device information can include gender, age, education, fraud record, illegal record, and the like. The device behavior information refers to the operation information of the device on the platform, such as browsing, visiting, collecting, clicking, etc.
[0028] In this embodiment, a binary classifier such as logistic regression, decision tree, support vector machine, XGboost, etc. can be trained. One binary classifier can be trained, or multiple binary classifiers of different types can be trained in series or parallel to obtain a classifier.
[0029] For example, in one training method, all channel-reached device data and corresponding new labels can be re-divided into a training set and a test set; the training set is input into the classifier for training, after the training is completed, the test set is input into the classifier for verification, and when the ACU (Area under curve) of the classifier on the test set is greater than a preset value, it is proved that the classifier can easily distinguish whether the device is reached through the target channel or the non-target channel under the current feature expression, and the training is completed. The preset value can be determined according to the actual training target, for example, the preset value can be 0.7. In this way, based on the adversarial training between the target channel device data and other non-target channel device data, the trained classifier can distinguish whether the device is reached through the target channel or the non-target channel based on the device data.
[0030] S3, inputting the device data of all channels into the trained classifier to obtain a channel prediction value of the device; For example, inputting the above-mentioned device data selected and disclosed by the device in all channels into the trained classifier can output a device channel prediction value between [0, 1], the closer the value is to 1, the greater the probability that the device is reached through the target channel, and the closer the value is to 0, the greater the probability that the device is reached through the non-target channel.
[0031] S4, screening target device data from the device data of all channels according to the channel prediction value, and constructing a security identification model.
[0032] The application is based on the adversarial training between the target channel device data and other non-target channel device data, so that the trained classifier can distinguish whether the device is reached through the target channel or the non-target channel based on the device data; based on the trained classifier, the channel prediction value of all devices is obtained; and the device data similar to the target channel feature expression is screened out from the device data of all channels through the channel prediction value for efficient sample expansion, thereby effectively reducing the consumption of computing resources during modeling, shortening the modeling time, and improving the accuracy of security identification.
[0033] In the embodiment, the device data can be screened and the security identification model can be constructed in various ways. For example, in one example, a threshold value can be set in advance, such as using the mean value of all device data channel prediction values as the threshold value, and selecting device data with a channel prediction value greater than the threshold value; and constructing a security identification model according to the selected device data. For example, the selected device data can be input into a preset model for training to obtain a security identification model. The preset model can use Lightgbm model, XGBoost model, etc. Experimental verification shows that this method can bring a gain of 1% ACU of the constructed model.
[0034] In another example, the larger the channel prediction value output by the classifier, the higher the similarity of the device data to the device data of the target channel, and the smaller the channel prediction value output by the classifier, the lower the similarity of the device data to the device data of the target channel. The channel prediction value can be used as the weight of the device data, and a security identification model can be constructed according to the device data and the weight. In this way, the device data with a large channel prediction value will be amplified in the training weight of the security identification model, and the device data with a small channel prediction value will be reduced in the training weight of the security identification model, which is equivalent to the model scaling the device data according to the weight for training, so that the model automatically selects the target device data with high similarity to the target channel during the construction of the security identification model based on the channel prediction value, and then constructs a security identification model according to the selected device data. For example, the selected device data can be input into a preset model for training to obtain a security identification model. The preset model can use Lightgbm model, XGBoost model, etc. Experimental verification shows that this method can bring a gain of 1.8% ACU of the constructed model.
[0035] Based on Figure 2 The model construction method based on the adversarial verification, and the application further provides a monitoring method, which comprises: S101, in response to a service request of a device of a target channel, obtaining device data; S103, input the device data into a pre-constructed security identification model to identify a security identification result of the device according to an output result of the security identification model; the security identification model is constructed by the model construction method based on the adversarial verification. S103, according to the security identification result, perform corresponding security monitoring control (security monitoring) processing, for example: platform risk control business (pre-monitoring control of platform business security risks) and the like.
[0036] The security identification of the application relates to whether each device in monitoring has a security hazard, a security risk (safe or unsafe), a security level, whether there is a security hazard risk, and whether there is a risk problem in advance.
[0037] Those skilled in the art can understand that each module in the above system embodiment can be distributed in the system as described, or can be changed and distributed in one or more systems different from the above embodiment. The modules of the above embodiment can be combined into one module, or can be further split into multiple sub-modules.
[0038] The electronic device embodiment of the application is described below, which can be regarded as an embodiment of the entity form of the above method and system embodiments of the application. For the details described in the electronic device embodiment of the application, it should be regarded as a supplement to the above method or system embodiment; for the details not disclosed in the electronic device embodiment of the application, it can be realized by referring to the above method or system embodiment.
[0039] Figure 3 is a structural block diagram of an exemplary embodiment of an electronic device according to the application. Figure 3 The display electronic device is only an example, and should not bring any limitation to the function and use range of the embodiment of the application.
[0040] As shown in Figure 3 The electronic device 300 of the exemplary embodiment is in the form of a general data processing device. The components of the electronic device 300 can include but are not limited to: at least one processing unit 310, at least one storage unit 320, a bus 330 connecting different electronic device components (including the storage unit 320 and the processing unit 310), a display unit 340, etc.
[0041] The storage unit 320 stores a computer readable program, which can be a source program or a code of a read-only program. The program can be executed by the processing unit 310, so that the processing unit 310 performs the steps of various embodiments of the application. For example, the processing unit 310 can perform the steps as shown in Figure 1 .
[0042] Bus 330 can be representative of one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration bus, a processor or local bus using any of a variety of bus architectures.
[0043] Electronic device 300 can also communicate with one or more external devices 100, such as a keyboard or a pointing device, displays, a database, a device, a printer, other devices or the like) using one or more buses 330. Communication can also occur via network adapters 360. As described below, network adapters 360 can enable electronic device 300 to communicate with and / or perform operations with respect to one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or the Internet) or one or more devices utilized by such networks. Network adapters 360 can be implemented as card(s) that enable communication through one or more types of networks, such as the Internet, for example. As will be appreciated, various types of network adapters 360 can be used according to particular needs.
[0044] Figure 4 is a schematic diagram of one computer-readable medium embodiment of the present application. As shown in Figure 4 The computer program can be stored on one or more computer-readable media. The computer-readable media can be a readable signal medium or a readable storage medium. When the computer program is executed by one or more data processing devices, the computer-readable medium can implement the above-mentioned method of the present application, that is, creating a new label for devices of all channels according to whether the devices are reached through a target channel; training a classifier according to device data and the new label, so that the trained classifier can distinguish whether a device is reached through a target channel or a non-target channel based on device data; the device data includes at least one of a region where the device is located, device purchase or return records, device information, and device behavior information; inputting device data of all channels into the trained classifier to obtain a channel prediction value of the device; and screening target device data from device data of all channels according to the channel prediction value to construct a security identification model.
[0045] In summary, the present application can be implemented by a method, system, system, electronic device or computer-readable medium of a computer program. Some or all functions of the present application can be implemented in practice using a general-purpose data processing device such as a microprocessor or a digital signal processor (DSP).
[0046] The above-described specific embodiments further illustrate the purpose, technical solutions and beneficial effects of the present application. It should be understood that the present application is not inherently related to any specific computer, virtual system or electronic device, and various general systems can also implement the present application. The above-described specific embodiments are merely examples of the present application and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A model building system based on adversarial verification, characterized in that: The system comprises: Create a module to create new labels for devices across all channels based on whether the device was reached through the target channel; A training module, configured to train a classifier based on the device data and the new label, so that the trained classifier can distinguish target channels from non-target channels based on the device data; The input module is used to input the device data of all channels into the trained classifier to obtain the channel prediction value of the device; A construction module is used to filter target device data from device data of all channels according to the channel prediction value and build a security identification model.
2. The system according to claim 1, wherein: The construction module is used to use the channel prediction value as the weight of the device data; and to construct a security identification model based on the device data and its weight.
3. The system according to claim 1, wherein: The construction module is used to select device data whose channel prediction value is greater than a threshold value, and to construct a security identification model based on the selected device data.
4. The system according to claim 1, wherein: The training module includes: A partitioning module is used to divide device data and corresponding new labels into training sets and test sets; Sub-training module, used to train the classifier on the training set; The testing module is used to verify the trained classifier on the test set, and the training is completed when the ACU of the classifier on the test set is greater than a preset value.
5. A model construction method based on adversarial verification, characterized in that: The method comprises: Create new labels for devices across all channels based on whether they were reached through the target channel; Training a classifier based on the device data and the new label, so that the trained classifier can distinguish whether the device was reached through a target channel or a non-target channel based on the device data; Input the device data of all channels into the trained classifier to obtain the channel prediction value of the device; Target device data is filtered from device data of all channels according to the channel prediction value to build a security identification model.
6. The method according to claim 1, characterized in that The step of filtering target device data from device data of all channels according to the channel prediction value and constructing a security identification model includes: Use the channel prediction value as the weight of the device data; Build a security identification model based on device data and its weights.
7. The method according to claim 1, characterized in that The step of filtering target device data from device data of all channels according to the channel prediction value and constructing a security identification model includes: Select device data whose channel prediction value is greater than the threshold; Build a security identification model based on the selected device data.
8. The method according to claim 1, characterized in that The training of the classifier according to the device data and the new label includes: Divide the device data and the corresponding new labels into training and test sets; Train the classifier on the training set; The trained classifier is verified on the test set, and the training is completed when the ACU of the classifier on the test set is greater than a preset value.
9. An electronic device comprising: processor; as well as A memory storing computer executable instructions which, when executed, cause the processor to perform the method according to any one of claims 5 to 8.
10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 5 to 8 is implemented.