CN-116721330-B - Heterogeneous detection method, device, equipment and medium based on generation countermeasure network
Abstract
The present invention relates to the field of artificial intelligence technologies, and in particular, to a heterogeneous detection method, apparatus, device, and medium based on generation of an countermeasure network. The method is applied to the medical field, virtual image data corresponding to the image data to be detected is generated through a generating network, the virtual image data is judged through a judging network, source data is determined, a preset judging function is used for calculating to obtain judging scores between the image data to be detected and the source data, and when the judging scores are larger than a second preset threshold value, the image data to be detected is determined to be abnormal data. In the invention, virtual data is generated by generating a network, the virtual data is judged by judging the network, source data is determined from the virtual data, whether the data to be detected is abnormal data or not is judged according to the distance between the source data and the data to be detected, and under the condition of passive data, the abnormal data is detected, thereby solving the problem of passive data in the abnormal data detection process and protecting the privacy of user data.
Inventors
- QU XIAOYANG
- WANG JIANZONG
- CHEN JINGANG
Assignees
- 平安科技(深圳)有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20230616
Claims (8)
- 1. A heterogeneous detection method based on generation of an antagonism network, the heterogeneous detection method comprising: Generating virtual image data corresponding to image data to be detected by using a generating network aiming at the image data to be detected; Acquiring a discrimination network obtained based on the training of known types and sample data, discriminating the virtual image data through the discrimination network to obtain a discrimination result, and determining the virtual image data corresponding to the discrimination result as source data when the discrimination result is larger than a first preset threshold value; calculating statistical information of the source data through a mapping function in the discrimination network, wherein the statistical information comprises a mean value and a covariance; Constructing a preset judging function according to the statistical information of the source data and a preset judging rule, wherein the formula of the preset judging function is as follows: Wherein, the Representing the mapping function in the discrimination network, For the mean value corresponding to the source data in category c, For the corresponding covariance when the source data is of category c, The class probability value corresponding to the image to be detected; And calculating to obtain a judgment score between the image data to be detected and the source data by using a preset judgment function, and determining the image data to be detected as abnormal data when the judgment score is larger than a second preset threshold value.
- 2. The heterogeneous detection method according to claim 1, wherein the generating virtual image data corresponding to the image data to be detected using a generation network for the image data to be detected includes: Extracting characteristic data of the image data to be detected; And acquiring random noise data, and generating virtual image data corresponding to the image data to be detected by the generating network according to the characteristic data and the random noise data.
- 3. The heterogeneous detection method of claim 1, wherein the acquiring a discrimination network trained based on known classes and sample data comprises: determining cross entropy loss, information entropy loss and regularization loss of the virtual image data through the discrimination network; And constructing a pre-training loss function according to the cross entropy loss, the information entropy loss and the regularization loss, and taking the pre-training loss function as a corresponding loss function in a discrimination network.
- 4. The heterogeneous detection method according to claim 1, wherein the calculating of the statistical information of the source data by the mapping function in the discrimination network includes: And calculating a mean value and a covariance corresponding to the source data by using a mapping function in the discrimination network, and taking the mean value and the covariance as statistical information corresponding to the source data.
- 5. The heterogeneous detection method according to claim 1, wherein the calculating, using a preset decision function, a decision score between the image data to be detected and the source data includes: inputting the image data to be detected into the discrimination network, and outputting a class probability value corresponding to the image to be detected; And calculating a judgment score between the image data to be detected and the source data based on the class probability value and the preset judgment function.
- 6. A heterogeneous detection apparatus based on generation of an countermeasure network, the heterogeneous detection apparatus comprising: The generating module is used for generating virtual image data corresponding to the image data to be detected by using a generating network aiming at the image data to be detected; The acquisition module is used for acquiring a discrimination network obtained based on the training of the known category and the sample data, and the discrimination network is used for discriminating the virtual image data; The judging module is used for judging the virtual image data through the judging network to obtain a judging result, and when the judging result is larger than a first preset threshold value, the virtual image data corresponding to the judging result is determined to be source data; the statistical information determining module is used for calculating the statistical information of the source data through the mapping function in the discrimination network, wherein the statistical information comprises a mean value and a covariance; The construction module is used for constructing a preset judging function according to the statistical information of the source data and a preset judging rule, wherein the formula of the preset judging function is as follows: Wherein, the Representing the mapping function in the discrimination network, For the mean value corresponding to the source data in category c, For the corresponding covariance when the source data is of category c, The class probability value corresponding to the image to be detected; The abnormal data determining module is used for calculating and obtaining the judgment score between the image data to be detected and the source data by using a preset judgment function, and determining the image data to be detected as abnormal data when the judgment score is larger than a second preset threshold value.
- 7. A computer device, characterized in that it comprises a processor, a memory and a computer program stored in the memory and executable on the processor, which processor implements the method of detecting a anomaly according to any one of claims 1 to 5 when the computer program is executed.
- 8. A computer readable storage medium storing a computer program, characterized in that the computer program, when executed by a processor, implements the method of detecting a dissimilarity according to any one of claims 1 to 5.
Description
Heterogeneous detection method, device, equipment and medium based on generation countermeasure network Technical Field The present invention relates to the field of artificial intelligence technologies, and in particular, to a heterogeneous detection method, apparatus, device, and medium based on generation of an countermeasure network. Background In the medical field, because of the diversity of image categories, in order to rapidly detect the category of a medical image, when the medical image is detected, the medical image is generally used as training data to train an image category detection model to obtain a trained image category detection model, and a medical image detection classification task is executed by using the trained image category detection model, but when a target sample medical image is a new category, the category of the medical image to be detected cannot be detected by using the trained image category detection model, so that it is required to firstly determine whether the target sample medical image belongs to a model known category, and it is required to execute a new heterogeneous detection task on the target sample medical image, wherein the new heterogeneous detection task is to determine whether a target sample belongs to the model known category or the model unknown category. If the target sample does not belong to any of the known classes of the model, then the sample is a new heterogeneous sample. The conventional novel heterogeneous detection method generally comprises a detection method based on probability statistics and a detection method based on distance, but the detection method based on probability statistics and the detection method based on distance need to access source data, and the source data often belong to private data and cannot be obtained, so that how to detect abnormal data in a target sample becomes a problem to be solved under the condition of passive data. Disclosure of Invention In view of the foregoing, it is desirable to provide a heterogeneous detection method, apparatus, device, and medium based on generation of an countermeasure network, so as to solve the problem of how to detect abnormal data in a target sample in the case of passive data. A first aspect of an embodiment of the present application provides a heterogeneous detection method based on generation of an countermeasure network, the heterogeneous detection method including: Generating virtual image data corresponding to image data to be detected by using a generating network aiming at the image data to be detected; Acquiring a discrimination network obtained based on the training of known types and sample data, discriminating the virtual image data through the discrimination network to obtain a discrimination result, and determining the virtual image data corresponding to the discrimination result as source data when the discrimination result is larger than a first preset threshold value; And calculating to obtain a judgment score between the image data to be detected and the source data by using a preset judgment function, and determining the image data to be detected as abnormal data when the judgment score is larger than a second preset threshold value. A second aspect of an embodiment of the present application provides a heterogeneous detection apparatus based on generation of an countermeasure network, the heterogeneous detection apparatus including: The generating module is used for generating virtual image data corresponding to the image data to be detected by using a generating network aiming at the image data to be detected; The judging module is used for acquiring a judging network obtained based on the training of the known category and the sample data, judging the virtual image data through the judging network to obtain a judging result, and determining the virtual image data corresponding to the judging result as source data when the judging result is larger than a first preset threshold value; The abnormal data determining module is used for calculating and obtaining the judgment score between the image data to be detected and the source data by using a preset judgment function, and determining the image data to be detected as abnormal data when the judgment score is larger than a second preset threshold value. In a third aspect, an embodiment of the present invention provides a computer device, the computer device including a processor, a memory, and a computer program stored in the memory and executable on the processor, the processor implementing the method for detecting a anomaly as described in the first aspect when the computer program is executed. In a fourth aspect, embodiments of the present invention provide a computer readable storage medium storing a computer program which, when executed by a processor, implements the method for detecting a anomaly as described in the first aspect. Compared with the prior art, the invention has the beneficial effects that: G