Block chain harmful picture forgery detection method and device based on multi-feature extraction
Through the multi-feature extraction method, the high-dimensional feature vectors of harmful images of blockchain are obtained, the edge and target location characteristics are determined, and classification detection is carried out, which solves the problem of insufficient recognition of harmful NFT images on the blockchain, and realizes efficient fake image detection.
Patent Information
- Application Number
- CN202411732697.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-05-02
AI Technical Summary
The prior art is difficult to effectively identify and detect the forgery of harmful NFT images on the blockchain, especially when adding noise during the forgery process, the recognition capability is insufficient, resulting in difficulty in spreading and tracing the forged images.
Through the multi-feature extraction method, the high-dimensional feature vectors of harmful blockchain images are obtained, their edge features and target location features are determined, and classification detection is performed based on these features to achieve accurate identification of fake images.
It effectively improves the classification effect of real pictures and forged pictures, improves the detection accuracy and efficiency of forged pictures, and can quickly detect and analyze forged sources and discover propagation hotspots.
Smart Images

Figure CN119919781A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a method and device for detecting forgery of harmful blockchain images using multi-feature extraction. Background Art
[0002] With the rapid development of blockchain technology, NFT (Non-Fungible Token) as an emerging form of digital assets is increasingly used in the fields of art, collectibles, etc. However, the advancement of this technology has also brought some challenges, especially in the spread of harmful information. Harmful NFT images on the blockchain are produced by forging real images, and a small amount of text information is added or part of the content is modified during the copying process, and batch casting and trading are carried out, resulting in the massive spread of harmful information and making it difficult to trace. In addition, the application of AI technologies such as deep learning also provides technical convenience for image forgery, lowers the threshold for the forgery of harmful images, and brings challenges to the standardized supervision of image information content.
[0003] At present, some existing technical solutions mainly focus on methods and systems for identifying harmful images based on user IDs, as well as multimodal harmful link identification based on text and images. Although these technologies can identify harmful images to a certain extent, they still have some defects. For example, they rely on open queries in databases, which makes it difficult to implement them across databases or business scenarios. Alternatively, although harmful links are identified through multimodal feature extraction and deep learning technology, they still lack the ability to identify forged images, especially when different noises are added to confuse the forgery process. Summary of the invention
[0004] The present application provides a method and device for detecting forgery of harmful blockchain images with multi-feature extraction, so as to effectively improve the classification effect of real images and forged images, thereby improving the detection accuracy and efficiency of forged images.
[0005] In a first aspect, the present application provides a method for detecting forgery of harmful blockchain images by extracting multiple features, the method comprising:
[0006] Get harmful images of blockchain;
[0007] Using the blockchain harmful picture, generating a high-dimensional feature vector of the blockchain harmful picture;
[0008] Using the high-dimensional feature vector of the harmful blockchain image, determining the edge features and target part features of the harmful blockchain image;
[0009] The harmful blockchain images are classified and detected according to the edge features and target part features of the harmful blockchain images to obtain the detection results of the harmful blockchain images.
[0010] In a second aspect, the present application provides a blockchain harmful image forgery detection device with multi-feature extraction, the device comprising:
[0011] The first unit is used to obtain harmful images of blockchain;
[0012] The second unit is used to generate a high-dimensional feature vector of the blockchain harmful picture using the blockchain harmful picture;
[0013] The third unit is used to determine the edge features and target part features of the blockchain harmful picture by using the high-dimensional feature vector of the blockchain harmful picture;
[0014] The fourth unit is used to classify and detect the harmful blockchain pictures according to the edge features and target part features of the harmful blockchain pictures to obtain the detection results of the harmful blockchain pictures.
[0015] In a third aspect, the present application provides a readable medium comprising execution instructions. When a processor of an electronic device executes the execution instructions, the electronic device executes any method described in the first aspect.
[0016] In a fourth aspect, the present application provides an electronic device, comprising a processor and a memory storing execution instructions, wherein when the processor executes the execution instructions stored in the memory, the processor executes any method described in the first aspect.
[0017] It can be seen from the above technical scheme that the present application provides a method for detecting forgery of harmful blockchain images by multi-feature extraction. In the method, harmful blockchain images can be obtained first; then, the harmful blockchain images can be used to generate high-dimensional feature vectors of the harmful blockchain images; then, the high-dimensional feature vectors of the harmful blockchain images can be used to determine the edge features and target part features of the harmful blockchain images; finally, the harmful blockchain images can be classified and detected according to the edge features and target part features of the harmful blockchain images to obtain the detection results of the harmful blockchain images. In this embodiment, by using the high-dimensional feature vectors of harmful blockchain images, the edge features and target part features of the harmful blockchain images are extracted, so that the edge features and target part features of the harmful blockchain images can be used to classify and detect the harmful blockchain images to obtain the detection results of the harmful blockchain images, thereby effectively improving the classification effect of real images and forged images, and further improving the detection accuracy and efficiency of forged images.
[0018] The further effects of the above-mentioned non-conventional preferred manner will be described below in conjunction with specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the embodiments of the present application or the existing technical solutions, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0020] Figure 1 A flowchart of a multi-feature extraction method for detecting forged harmful images on blockchain provided by this application;
[0021] Figure 2 A schematic diagram of the structure of a multi-feature extraction blockchain harmful image forgery detection device provided in this application;
[0022] Figure 3 A schematic diagram of the structure of an electronic device provided in this application. DETAILED DESCRIPTION
[0023] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0024] The inventor found that the rapid development of NFT has expanded the ability of blockchain to store and transmit information content from short text to multimedia, including pictures, animated pictures, videos, etc. A large number of harmful NFT pictures on the blockchain are all produced by forging real pictures such as avatar forgery. At the same time, a small part of text information is added during the copying process, or a part of the content is modified for batch casting and trading, which all cause a large amount of harmful information to be spread and make it difficult to trace. In addition, the application of AI technologies such as deep learning also provides technical convenience for image forgery, lowers the threshold for forgery of harmful pictures, and brings challenges to the regulation of image information content. In the Internet information age where AI and blockchain technology are popular, normal information pictures are easy to be forged. For example, the results of forgery relying on AI technology are getting lower and lower. A large number of false pictures will be widely spread on the blockchain network. The unalterable attributes of blockchain and the anonymous and difficult to trace characteristics of addresses make blockchain a hotbed for the spread of false and harmful information. A large amount of harmful information on the blockchain is generated and spread in the form of forged false pictures, which brings information security risks. Therefore, it is necessary to consider the forgery detection of harmful chain pictures. Taking avatar forgery as an example, there are several common forgery methods: 1) overall synthesis generation; 2) editing the avatar according to specific conditions; 3) only changing the face, and the avatar outline remains unchanged. Therefore, this application aims to solve the following technical problems: (1) This application focuses on how to quickly detect and analyze the source or homology of the forgery of harmful images (harmful NFT images) on the blockchain when they are forged and propagated, classify the forged images, and quickly locate and discover the propagation hotspots; (2) In the recognition and analysis process, it is necessary to solve the problem of adding different noises to confuse during forgery, and the recognition model needs to be able to be unaffected by noise; (3) The present invention adopts a method based on multi-feature learning extraction to detect harmful NFT image forgery.
[0025] Therefore, the present application provides a method for detecting forgery of harmful blockchain images by multi-feature extraction, in which a harmful blockchain image can be first obtained; then, the harmful blockchain image can be used to generate a high-dimensional feature vector of the harmful blockchain image; then, the high-dimensional feature vector of the harmful blockchain image can be used to determine the edge features and target part features of the harmful blockchain image; finally, the harmful blockchain image can be classified and detected according to the edge features and target part features of the harmful blockchain image to obtain the detection result of the harmful blockchain image. In this embodiment, by using the high-dimensional feature vector of the harmful blockchain image, the edge features and target part features of the harmful blockchain image are extracted, so that the edge features and target part features of the harmful blockchain image can be used to classify and detect the harmful blockchain image, and the detection result of the harmful blockchain image can be obtained, thereby effectively improving the classification effect of real images and forged images, and then improving the detection accuracy and efficiency of forged images.
[0026] Various non-limiting implementations of the present application are described in detail below in conjunction with the accompanying drawings.
[0027] See also Figure 1 , shows a multi-feature extraction blockchain harmful image forgery detection method in an embodiment of the present application. In this embodiment, the method may include the following steps:
[0028] S101: Get harmful images of blockchain.
[0029] In this embodiment, the blockchain harmful images may be images on the blockchain, for example, a large number of NFT images on the blockchain, including pictures, animated images, videos, etc., such as those produced by forging real pictures by forging avatars, etc. It should be noted that the characteristics of the images on the blockchain are pixelation, cartoon style, and comic style. Blockchain harmful images can be understood as images on the blockchain that contain bad and harmful information.
[0030] S102: Using the blockchain harmful picture, generate a high-dimensional feature vector of the blockchain harmful picture.
[0031] After obtaining the harmful blockchain pictures, the harmful blockchain pictures can be used to generate high-dimensional feature vectors of the harmful blockchain pictures.
[0032] Specifically, the harmful blockchain image can be divided into several image blocks first. For example, the avatar image can be preprocessed, including size alignment, patch segmentation and other operations. And, determine the image embedding vectors corresponding to each of the several image blocks. In one implementation, for each image block, the image block can be linearly projected to obtain the image embedding vector of the image block. Then, the image embedding vectors corresponding to each of the several image blocks can be used to generate the original image vector corresponding to the harmful blockchain image. In one implementation, the image embedding vectors corresponding to each of the several image blocks can be horizontally connected to obtain the original image vector corresponding to the harmful blockchain image. For example, assuming that the harmful blockchain image is an NFT image, each NFT image has a size of one, and a large number of NFT images are high-resolution pixel space images, which can be used directly for calculation, but the amount of calculation is very large. Therefore, the NFT image is preprocessed first. The image preprocessing is to perform a block operation for each image, dividing it into image blocks one by one. For a harmful blockchain image x, assuming that its pixel resolution is (H×W), and the pixel resolution of each image block patche after segmentation is P, then a harmful blockchain image will be divided into a number of Each patch is linearly projected to obtain its patch embedding vector (i.e., the image embedding vector of the image patch), and the image embedding vectors of all image patches are horizontally connected (e.g., flattened operation) to obtain the original image vector of the harmful blockchain image.
[0033] Next, the original image vector corresponding to the harmful blockchain image can be used to determine the high-dimensional feature vector of the harmful blockchain image. It can be understood that the high-dimensional feature vector can reflect feature vectors of more dimensions in the harmful blockchain image, that is, it can reflect more image information in the harmful blockchain image. As an example, the original image vector corresponding to the harmful blockchain image can be first input into the encoder encoder in the variational autoencoder (dVAE) to obtain the discrete word unit tokens corresponding to the original image vector; then, the discrete word unit tokens corresponding to the original image vector are input into the decoder decoder in the variational autoencoder to obtain the high-dimensional feature vector of the harmful blockchain image. It can be understood that the original image vector is regarded as an input sentence, and a method similar to natural language processing is adopted to learn the tokenizer of the harmful blockchain images; specifically, a variational autoencoder is used for learning. During the learning process, there are two modules, encoder and decoder, among which the encoder is the tokenizer process, which learns the original image vector corresponding to the harmful blockchain image as discrete tokens, each token represents a word, and each element of its vector is the serial number in the vocabulary; the decoder learns to reconstruct the high-dimensional feature vector of the harmful blockchain image based on the tokenizer.
[0034] The variational autoencoder is trained based on the multi-head attention mechanism. It can be understood that the original input image vector tokenizer (i.e. the original image vector corresponding to the harmful blockchain image) is trained with multiple heads to obtain several different weight matrix combinations, and these weights represent the importance of a certain spatial position information. The spatial attention matrix is attached to the original feature map to increase useful features and weaken useless features, thereby achieving the effect of feature screening and enhancement.
[0035] S103: Using the high-dimensional feature vector of the blockchain harmful image, determine the edge features and target part features of the blockchain harmful image.
[0036] In this embodiment, after obtaining the high-dimensional feature vector of the harmful blockchain image, the high-dimensional feature vector of the harmful blockchain image can be used to determine the edge features and target part features of the harmful blockchain image.
[0037] Specifically, the high-dimensional feature vector of the harmful blockchain image can be first input into the Canny edge detector of the deep network to obtain N candidate contour images of the harmful blockchain image; wherein N is a positive integer, for example, N can be 4. Then, the N candidate contour images of the harmful blockchain image can be respectively input into several convolutional layers (for example, 5 convolutional layers) of the deep network to obtain the feature image blocks corresponding to each of the N candidate contour images, wherein the sizes of each feature image block are different. Next, the feature image blocks corresponding to each of the N candidate contour images can be input into the first branch network of the deep network to obtain the edge features of the harmful blockchain image. Finally, the feature image blocks corresponding to each of the N candidate contour images can be input into the second branch network of the deep network to obtain the target part features of the harmful blockchain image.
[0038] It should be noted that there are several key identification points for image forgery. One is the outline of the image, which is used to determine whether it is just a face-changing operation without affecting the change of the outline. The second is to achieve the purpose of forgery by changing several key parts, such as changing the size of the eyes and the features of the lips to distinguish them from the original real pictures. The key to this application is to learn the features of these changes. The first is edge feature learning, such as using the deep network DeepEdge to learn edge contours. DeepEdge uses target-related features as high-level clues for contour detection. A multi-level deep network is designed, consisting of five convolutional layers and a bifurcated fully-connected subnetwork. From the input layer to the fifth convolutional layer is a pre-trained network, which is directly used for four different scales of image input. These four parallel and identical data streams are connected to a bifurcated subnetwork consisting of two independently trained branches (i.e., the first branch and the second branch). One branch (i.e., the second branch) learns to predict the likelihood of contours (with classification as the goal), while the other branch (i.e., the first branch) is trained to learn the existence of contours at a given point (based on regression measures), where the Canny edge detector is used to extract candidate contour points, and then four patches of different scales are extracted around each candidate point, while passing through the five convolutional layers of the pre-trained KNet. The patch centered on the candidate point is input and passed through the five convolutional layers of KNet; in order to extract high-level features, a small subvolume of the feature map around the center point is extracted at each convolutional layer, and maximum, average, and center pooling are performed on the subvolume. The pooled values are fed into the bifurcated subnetwork. During testing, the scalar outputs calculated from the branches of the bifurcated subnetwork are averaged to generate the final contour prediction. Secondly, the features of the target parts (such as key parts of the facial features such as lips and eyes) are learned, mainly because the forged images that are different from the real images differ in the following aspects:
[0039] 1) Characteristics of the distance between the eyes and the distance between the outer corners of the eyes and the head;
[0040] 2) Lip size, proportion and other characteristics;
[0041] 3) Gender differences in facial features, such as larger and deeper eye sockets in men and thinner lips in women;
[0042] If the above feature differences can be learned and expressed, it will be helpful to improve the accuracy of image forgery detection.
[0043] S104: Classify and detect the harmful blockchain images according to the edge features and target part features of the harmful blockchain images to obtain detection results of the harmful blockchain images.
[0044] In this embodiment, the edge features and target part features of the harmful blockchain image can be input into the classifier to obtain the detection result of the harmful blockchain image, wherein the detection result can be the detection and classification result of the harmful blockchain image, for example, the detection result includes whether the harmful blockchain image is a real photo, or a forged NFT image. For all the features learned above, including edge contour features, key part features, etc., the decoder is used to classify the embeddings of all nodes, and the corresponding probability values are output. A probability threshold is set, and for those greater than the value, it is output as a classification result of forgery. The predicted error can be calculated as the positive and negative sample error value of the two classifications.
[0045] It can be seen from the above technical scheme that the present application provides a method for detecting forgery of harmful blockchain images by multi-feature extraction. In the method, harmful blockchain images can be obtained first; then, the harmful blockchain images can be used to generate high-dimensional feature vectors of the harmful blockchain images; then, the high-dimensional feature vectors of the harmful blockchain images can be used to determine the edge features and target part features of the harmful blockchain images; finally, the harmful blockchain images can be classified and detected according to the edge features and target part features of the harmful blockchain images to obtain the detection results of the harmful blockchain images. In this embodiment, by using the high-dimensional feature vectors of harmful blockchain images, the edge features and target part features of the harmful blockchain images are extracted, so that the edge features and target part features of the harmful blockchain images can be used to classify and detect the harmful blockchain images to obtain the detection results of the harmful blockchain images, thereby effectively improving the classification effect of real images and forged images, and further improving the detection accuracy and efficiency of forged images.
[0046] It can be understood that the present application can have the following advantages:
[0047] Rapid detection and analysis: The present invention can quickly detect and analyze the forged sources or homologous sources of harmful images on the blockchain, classify the forged images, and quickly locate and discover the hot spots of dissemination.
[0048] Anti-interference ability: In the process of recognition and analysis, the present invention can solve the problem of adding different noises to confuse during forgery, and the recognition model is not interfered by the forgery method.
[0049] Multi-feature extraction: Through multi-feature extraction technologies such as edge contour feature learning and key part feature learning, the present invention effectively improves the classification effect of real pictures and forged pictures.
[0050] Wide application: The present invention can be applied to the business process of analyzing the spread of harmful information on the blockchain, and has broad application prospects and practical application value.
[0051] Technological advancement: This invention adopts a method based on multi-feature learning and extraction, combined with deep learning technology and multi-head attention mechanism, to improve the accuracy and efficiency of forgery detection. Through multi-feature extraction technologies such as edge contour feature learning and key part feature learning, the classification detection effect of real pictures and forged head portrait pictures is improved.
[0052] like Figure 2 As shown, it is a specific embodiment of a multi-feature extraction blockchain harmful image forgery detection device described in this application. The device described in this embodiment is a physical device for executing the method described in the above embodiment. Its technical solution is essentially consistent with the above embodiment, and the corresponding description in the above embodiment is also applicable to this embodiment. The device described in this embodiment includes:
[0053] The first unit 201 is used to obtain harmful images of blockchain;
[0054] The second unit 202 is used to generate a high-dimensional feature vector of the blockchain harmful picture using the blockchain harmful picture;
[0055] The third unit 203 is used to determine the edge features and target part features of the blockchain harmful picture by using the high-dimensional feature vector of the blockchain harmful picture;
[0056] The fourth unit 204 is used to classify and detect the harmful blockchain pictures according to the edge features and target part features of the harmful blockchain pictures to obtain the detection results of the harmful blockchain pictures.
[0057] Optionally, the second unit 202 is specifically used for:
[0058] Dividing the blockchain harmful image into a plurality of image blocks, and determining image embedding vectors corresponding to each of the plurality of image blocks;
[0059] Generate an original image vector corresponding to the harmful blockchain image by using the image embedding vectors corresponding to each of the plurality of image blocks;
[0060] The original image vector corresponding to the blockchain harmful image is used to determine the high-dimensional feature vector of the blockchain harmful image.
[0061] Optionally, the second unit 202 is specifically used for:
[0062] For each image block, a linear projection is performed on the image block to obtain an image embedding vector of the image block.
[0063] Optionally, the second unit 202 is specifically used for:
[0064] The image embedding vectors corresponding to each of the plurality of image blocks are horizontally connected to obtain an original image vector corresponding to the harmful blockchain image.
[0065] Optionally, the second unit 202 is specifically used for:
[0066] Inputting the original image vector corresponding to the harmful blockchain image into the encoder in the variational autoencoder to obtain the discrete word element corresponding to the original image vector;
[0067] The discrete word units corresponding to the original image vector are input into the decoder in the variational autoencoder to obtain a high-dimensional feature vector of the blockchain harmful image.
[0068] Optionally, the variational autoencoder is trained based on a multi-head attention mechanism.
[0069] Optionally, the third unit 203 is used for:
[0070] Input the high-dimensional feature vector of the harmful blockchain image into the Canny edge detector of the deep network to obtain N candidate contour images of the harmful blockchain image; wherein N is a positive integer;
[0071] Inputting the N candidate contour images of the blockchain harmful image into several convolutional layers of the deep network respectively, and obtaining feature image blocks corresponding to each of the N candidate contour images, wherein the sizes of the feature image blocks are different;
[0072] Inputting the feature image blocks corresponding to each of the N candidate contour images into the first branch network of the deep network to obtain the edge features of the harmful blockchain image;
[0073] The feature image blocks corresponding to each of the N candidate contour images are respectively input into the second branch network of the deep network to obtain the target part features of the blockchain harmful image.
[0074] Optionally, the fourth unit 204 is specifically used for:
[0075] The edge features and target part features of the blockchain harmful image are input into a classifier to obtain a detection result of the blockchain harmful image.
[0076] Optionally, the harmful blockchain image is an image on the blockchain.
[0077] Figure 3 It is a structural diagram of an electronic device provided in an embodiment of the present application. At the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and a memory. Among them, the memory may include a memory, such as a high-speed random access memory (Random-Access Memory, RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage, etc. Of course, the electronic device may also include hardware required for other services.
[0078] The processor, network interface and memory can be interconnected through an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0079] The memory is used to store execution instructions. Specifically, the execution instructions are computer programs that can be executed. The memory may include internal memory and non-volatile memory, and provides execution instructions and data to the processor.
[0080] In one possible implementation, the processor reads the corresponding execution instructions from the non-volatile memory into the memory and then runs them, and can also obtain the corresponding execution instructions from other devices to form an image detection device at the logical level. The processor executes the execution instructions stored in the memory to implement the image detection method provided in any embodiment of the present application through the executed execution instructions.
[0081] The above application Figure 1The method performed by the image detection device provided in the illustrated embodiment can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The disclosed methods, steps and logic block diagrams in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.
[0082] The steps of the method disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0083] An embodiment of the present application also proposes a readable storage medium, which stores execution instructions. When the stored execution instructions are executed by a processor of an electronic device, the electronic device can execute the image detection method provided in any embodiment of the present application, and is specifically used to execute the above-mentioned image detection method.
[0084] The electronic device described in the above embodiments may be a computer.
[0085] Those skilled in the art should understand that the embodiments of the present application can be provided as methods or computer program products. Therefore, the present application can adopt a complete hardware embodiment, a complete software embodiment, or a combination of software and hardware.
[0086] Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0087] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0088] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A multi-feature extraction method for detecting forged harmful blockchain images, characterized in that: The method comprises: Get harmful images of blockchain; Using the blockchain harmful picture, generating a high-dimensional feature vector of the blockchain harmful picture; Using the high-dimensional feature vector of the harmful blockchain image, determining the edge features and target part features of the harmful blockchain image; The harmful blockchain images are classified and detected according to the edge features and target part features of the harmful blockchain images to obtain the detection results of the harmful blockchain images.
2. The method according to claim 1, characterized in that: The step of using the blockchain harmful picture to generate a high-dimensional feature vector of the blockchain harmful picture includes: Dividing the blockchain harmful image into a plurality of image blocks, and determining image embedding vectors corresponding to each of the plurality of image blocks; Generate an original image vector corresponding to the harmful blockchain image by using the image embedding vectors corresponding to each of the plurality of image blocks; The original image vector corresponding to the blockchain harmful image is used to determine the high-dimensional feature vector of the blockchain harmful image.
3. The method according to claim 2, characterized in that The determining of the image embedding vectors corresponding to each of the plurality of image blocks comprises: For each image block, a linear projection is performed on the image block to obtain an image embedding vector of the image block.
4. The method according to claim 2, characterized in that: The method of using the image embedding vectors corresponding to the plurality of image blocks to generate the original image vector corresponding to the harmful blockchain image includes: The image embedding vectors corresponding to each of the plurality of image blocks are horizontally connected to obtain an original image vector corresponding to the harmful blockchain image.
5. The method according to claim 2, characterized in that: The determining of the high-dimensional feature vector of the blockchain harmful picture by using the original picture vector corresponding to the blockchain harmful picture includes: Inputting the original image vector corresponding to the harmful blockchain image into the encoder in the variational autoencoder to obtain the discrete word element corresponding to the original image vector; The discrete word units corresponding to the original image vector are input into the decoder in the variational autoencoder to obtain a high-dimensional feature vector of the blockchain harmful image.
6. The method according to claim 5, characterized in that The variational autoencoder is trained based on a multi-head attention mechanism.
7. The method according to claim 1, characterized in that The method of using the high-dimensional feature vector of the harmful blockchain image to determine the edge features and target part features of the harmful blockchain image includes: Input the high-dimensional feature vector of the harmful blockchain image into the Canny edge detector of the deep network to obtain N candidate contour images of the harmful blockchain image; wherein N is a positive integer; Inputting the N candidate contour images of the blockchain harmful image into several convolutional layers of the deep network respectively, and obtaining feature image blocks corresponding to each of the N candidate contour images, wherein the sizes of the feature image blocks are different; Inputting the feature image blocks corresponding to each of the N candidate contour images into the first branch network of the deep network to obtain the edge features of the harmful blockchain image; The feature image blocks corresponding to each of the N candidate contour images are respectively input into the second branch network of the deep network to obtain the target part features of the blockchain harmful image.
8. The method according to claim 1, characterized in that The classifying and detecting the harmful blockchain images according to the edge features and target part features of the harmful blockchain images to obtain the detection results of the harmful blockchain images includes: The edge features and target part features of the blockchain harmful image are input into a classifier to obtain a detection result of the blockchain harmful image.
9. The method according to any one of claims 1 to 8, characterized in that: The harmful blockchain images are images on the blockchain.
10. A multi-feature extraction blockchain harmful image forgery detection device, characterized in that: The device comprises: The first unit is used to obtain harmful images of blockchain; The second unit is used to generate a high-dimensional feature vector of the blockchain harmful picture using the blockchain harmful picture; The third unit is used to determine the edge features and target part features of the blockchain harmful picture by using the high-dimensional feature vector of the blockchain harmful picture; The fourth unit is used to classify and detect the harmful blockchain pictures according to the edge features and target part features of the harmful blockchain pictures to obtain the detection results of the harmful blockchain pictures.