Picture interception method and device, equipment and storage medium

By constructing hash buckets and using perceptual hashing to match similar images, images containing steganographic content can be quickly filtered out, solving the problem of difficulty in intercepting steganographic content in existing technologies and achieving efficient image review and security assurance.

CN120956514APending Publication Date: 2025-11-14GUANGZHOU SHIYINLIAN SOFTWARE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511323507.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-16
Publication Date
2025-11-14

AI Technical Summary

Technical Problem

Existing content recognition and detection technologies are insufficient to effectively intercept images with embedded steganographic content, allowing steganography to circumvent traditional censorship methods in internet content distribution.

Method used

By calculating the perceptual hash of the image to be uploaded, hash buckets are used to match similar reference images, perform steganography analysis and interception, and hash buckets are constructed to store reference images with the same local hash characteristics, quickly filtering out images that may contain steganography.

Benefits of technology

It significantly improves the efficiency and accuracy of image review, enabling it to quickly identify and block images containing steganographic content, effectively maintaining the compliance and security of platform content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120956514A_ABST
    Figure CN120956514A_ABST
Patent Text Reader

Abstract

The invention discloses a picture interception method and device, equipment and a storage medium, and belongs to the field of application software. The method comprises the following steps: calculating perceptual hash of a to-be-uploaded picture, and obtaining hash fragments of the perceptual hash; according to the Hash fragment of the to-be-uploaded picture, matching from the at least two Hash buckets to obtain a target Hash bucket; the hash bucket corresponds to a bucket hash value, the hash bucket is used for storing a reference picture, and a hash segment of the reference picture is the same as the bucket hash value of the hash bucket; the target bucket hash value of the target hash bucket is the same as the hash segment of the to-be-uploaded picture; under the condition that a reference picture similar to the to-be-uploaded picture exists in the target hash bucket, carrying out steganography content analysis on the to-be-uploaded picture; and intercepting the to-be-uploaded picture under the condition that the steganography content exists in the to-be-uploaded picture. According to the method, the picture with the steganographic content can be intercepted quickly and efficiently.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of application software, and in particular to an image interception method, apparatus, device, and storage medium. Background Technology

[0002] In the field of internet content distribution, some platforms use steganography to embed business data into ordinary image files in order to reduce bandwidth costs, and then store and distribute it through legitimate content distribution channels.

[0003] Steganography typically utilizes spatial or frequency domain algorithms, such as least significant bit substitution or discrete cosine transform coefficient modification, to embed target data losslessly into a host image, maintaining its original visual appearance. These stegatized images can easily pass standard file format verification and security auditing mechanisms, allowing them to be uploaded to third-party hosting platforms. Subsequently, the recipient uses specific decoding methods to extract the original data from the seemingly normal image for display or reuse.

[0004] Because steganographic content is statistically highly similar to regular images, and the original hosting platform's review mechanisms typically only target visually visible violations, this method can circumvent traditional review methods. This situation presents new challenges to existing content recognition and detection technologies. Summary of the Invention

[0005] This application provides an image interception method, apparatus, device, and storage medium, which can quickly and efficiently intercept images containing steganographic content. The technical solution is as follows:

[0006] According to one aspect of this application, an image interception method is provided, the method comprising:

[0007] Calculate the perceptual hash of the image to be uploaded, and obtain the hash fragment of the perceptual hash;

[0008] Based on the hash fragment of the image to be uploaded, a target hash bucket is obtained by matching from at least two hash buckets; each hash bucket has a corresponding bucket hash value, and the hash bucket is used to store a reference image, the hash fragment of which is the same as the bucket hash value of the hash bucket; the target bucket hash value of the target hash bucket is the same as the hash fragment of the image to be uploaded.

[0009] If a reference image similar to the image to be uploaded exists in the target hash bucket, perform steganography analysis on the image to be uploaded.

[0010] If the image to be uploaded contains hidden content, the image to be uploaded will be intercepted.

[0011] According to another aspect of this application, an image interception device is provided, the device comprising:

[0012] The acquisition module is used to calculate the perceptual hash of the image to be uploaded and to obtain the hash fragment of the perceptual hash;

[0013] A matching module is used to match a target hash bucket from at least two hash buckets based on the hash fragment of the image to be uploaded; each hash bucket corresponds to a bucket hash value, and the hash bucket is used to store a reference image, the hash fragment of which is the same as the bucket hash value of the hash bucket; the target bucket hash value of the target hash bucket is the same as the hash fragment of the image to be uploaded.

[0014] The analysis module is used to perform steganography analysis on the image to be uploaded when a reference image similar to the image to be uploaded exists in the target hash bucket.

[0015] The interception module is used to intercept the image to be uploaded if the image to be uploaded contains steganographic content.

[0016] According to another aspect of this application, a computer device is provided, the computer device including a processor and a memory, the memory storing at least one instruction, at least one program, code set or instruction set, the at least one instruction, the at least one program, the code set or instruction set being loaded and executed by the processor to implement the image interception method as described above.

[0017] According to another aspect of this application, a computer-readable storage medium is provided, wherein at least one instruction, at least one program, code set, or instruction set is stored therein, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the image interception method described above.

[0018] According to another aspect of this 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 image interception method provided in various alternative implementations of the above aspects.

[0019] The beneficial effects of the technical solution provided in this application include at least the following:

[0020] Using reference images containing steganographic content, hash buckets are constructed, storing reference images with the same local hash characteristics (called bucket hash values). When a user uploads an image, the perceptual hash of the image to be uploaded is calculated, and the hash fragments of the perceptual hash are matched against each hash bucket to determine the hash bucket to which the image belongs (the local hash characteristics of the image to be uploaded are the same as the bucket hash value of that hash bucket), thus quickly filtering out reference images with local similarity to the image to be uploaded. Then, the similarity between the image to be uploaded and the reference images in the hash bucket is precisely matched. If the similarity is high, the image to be uploaded may contain steganographic content. Further steganographic content analysis is performed on the images to be uploaded to identify and block images containing steganographic content. When users upload a large number of images in batches, this method can quickly and automatically scan the batch of uploaded images. Because when users upload images containing steganographic content on a large scale, they often insert steganographic content into the same or similar images for easy extraction. Therefore, the image interception method provided in this application, when screening images to be uploaded for steganography, first matches similar uploaded images. If a large number of similar uploaded images exist, the image to be uploaded may contain steganography, requiring further steganography analysis. This method does not require steganography analysis for every image to be uploaded, and can quickly filter images that may contain steganography. Steganography analysis is only performed on the filtered images, significantly improving the efficiency and accuracy of image review and effectively maintaining the compliance and security of platform content. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 This is a schematic diagram of the structure of a computer system provided in an exemplary embodiment of this application;

[0023] Figure 2 This is a flowchart of an exemplary embodiment of the image interception method provided in this application;

[0024] Figure 3 This is a flowchart of an exemplary embodiment of the image interception method provided in this application;

[0025] Figure 4 This is a schematic diagram of an image interception method provided in an exemplary embodiment of this application;

[0026] Figure 5This is a flowchart of an exemplary embodiment of the image interception method provided in this application;

[0027] Figure 6 This is a schematic diagram of an image interception method provided in an exemplary embodiment of this application;

[0028] Figure 7 This is a schematic diagram of the structure of an image interception device provided in an exemplary embodiment of this application;

[0029] Figure 8 This is a schematic diagram of the structure of a computer device provided in an exemplary embodiment of this application.

[0030] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. Detailed Implementation

[0031] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0032] Figure 1 A schematic diagram of a computer system provided in an exemplary embodiment of this application is shown. The computer system may include a terminal device 101 and a server 103.

[0033] For example, the image interception method shown in this application embodiment can be applied to a terminal device 101, which runs an application 102 that supports image uploading. The terminal device may include a mobile phone, tablet computer, laptop computer, desktop computer, all-in-one computer, IoT device, smart robot workstation, television, set-top box, smart glasses, smartwatch, digital camera, MP4 playback device, MP5 playback device, learning machine, e-reader, e-book reader, electronic dictionary, in-vehicle equipment, virtual reality (VR) playback device, or augmented reality (AR) playback device, etc.

[0034] For example, the image interception method provided in this application can be executed by a client in a terminal device. This client is a client of an application that supports image uploading. Any application with image uploading functionality can use this image interception method; therefore, this application is not limited to any type of application. For example, the application may include at least one of the following: audio applications, video applications, social applications, shopping applications, live streaming applications, news applications, browsers, local service applications, travel applications, and financial applications.

[0035] Terminal device 101 includes a first memory and a first processor. The first memory stores an image interception program; the image interception program is invoked and executed by the first processor to implement the image interception method provided in this application. The first memory may include, but is not limited to, the following: Random Access Memory (RAM), Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), and Electrically Erasable Programmable Read-Only Memory (EEPROM).

[0036] The first processor can consist of one or more integrated circuit chips. Optionally, the first processor can be a general-purpose processor, such as a central processing unit (CPU) or a network processor (NP). Optionally, the first processor can implement the image interception method provided in this application by running programs or code.

[0037] In one alternative embodiment, the terminal device 101 and the server 103 can be interconnected via a wired or wireless network.

[0038] For example, the image interception method provided in this application can also be executed by a server. Server 103 is used to provide background services for the client of terminal device 101. The client uploads the image to be uploaded to server 103, and the server uses the image interception method provided in this application to perform steganography detection and interception on the image to be uploaded.

[0039] Optionally, server 103 undertakes the main computing work and terminal device 101 undertakes the secondary computing work; or, server 103 undertakes the secondary computing work and terminal device 101 undertakes the main computing work; or, server 103 and terminal device 101 use a distributed computing architecture for collaborative computing.

[0040] Server 103 can be a single server, a server cluster consisting of multiple servers, or a cloud computing service center.

[0041] Optionally, server 103 includes a second memory and a second processor. The second memory stores an image interception program; the image interception program is called by the second processor to implement the image interception method provided in this application. Optionally, the second memory may include, but is not limited to, the following: RAM, ROM, PROM, EPROM, EEPROM. Optionally, the second processor may be a general-purpose processor, such as a CPU or NP.

[0042] Figure 2 This is a flowchart illustrating an exemplary embodiment of an image interception method provided in this application. The method can be implemented by, for example... Figure 1 The method is executed by the terminal device or server shown. The method includes the following steps.

[0043] Step 210: Calculate the perceptual hash of the image to be uploaded and obtain the hash fragment of the perceptual hash.

[0044] For example, this method can be executed by a server. The terminal device can send the image to be uploaded by the user to the server, and the server can execute the image interception method provided in this embodiment to review the image to be uploaded.

[0045] Optionally, this method can also be executed by the terminal device. When a user uploads an image to be uploaded, the terminal device can use the image interception method provided in this embodiment to review the image. If the image to be uploaded passes the review and is not intercepted, the terminal device sends the image to be uploaded to the server; if the image to be uploaded is intercepted, the terminal device does not send the image to be uploaded to the server.

[0046] The image to be uploaded can be of any format and size.

[0047] Perceptual hashing (pHash) is an image fingerprinting technique based on content similarity. It uses algorithms to convert the essential features of an image (such as structure and color distribution) into short binary or hexadecimal hash values. Even if an image is modified through resizing, brightness changes, or slight compression, perceptual hashing maintains similarity, causing images with similar content to generate similar hash values ​​(differences can be measured using Hamming distance). Compared to traditional hashing, perceptual hashing better aligns with human visual perception consistency.

[0048] In one optional embodiment, the image to be uploaded is scaled to a fixed size (e.g., 32*32 pixels or other sizes) to reduce complexity while retaining the general structure of the image. The scaled image is then converted to grayscale, retaining only brightness information. Using discrete cosine transform, the grayscale image is converted to frequency domain data, where at least one data point at the beginning of the frequency domain data indicates the overall frequency domain structure of the image, and at least one data point at the end indicates the detailed features of the image. Subsequently, low-frequency features are extracted from the frequency domain data; for example, 64 low-frequency data points (8*8 pixels) are extracted from the top left corner of the frequency domain data. A perceptual hash is generated based on the low-frequency features; for example, the average of the 64 low-frequency data points is calculated, and each low-frequency data point is compared to the average. If it is not less than the average, it is set to 1; otherwise, it is set to 0. This yields a 64-bit binary string, which is the perceptual hash of the image to be uploaded. For example, converting the 64-bit binary string to hexadecimal yields the perceptual hash: 3c8f9ad3739e4aa5.

[0049] A hash fragment can be any segment extracted from a perceptual hash. Since perceptual hashes contain a large amount of data, using complete perceptual hashes for extensive screening is inefficient. Therefore, the method provided in this embodiment uses hash fragments for rapid screening, finding hash buckets with the same hash fragments. Each hash bucket stores at least one reference image with the same hash fragment. Then, the complete hash fragment is used to perform similarity matching with the reference images in the hash bucket, improving image screening efficiency.

[0050] Optionally, the perceptual hash is divided into at least two segments, and step 220 is executed sequentially for each hash segment to match the hash bucket corresponding to each hash segment.

[0051] Step 220: Based on the hash fragment of the image to be uploaded, match the target hash bucket from at least two hash buckets; each hash bucket has a corresponding bucket hash value, and the hash bucket is used to store reference images. The hash fragment of the reference image is the same as the bucket hash value of the hash bucket; the target bucket hash value of the target hash bucket is the same as the hash fragment of the image to be uploaded.

[0052] For example, a reference image may include all images uploaded to the server. And / or, a reference image may be an image containing steganographic content.

[0053] For example, the hash bucket is generated based on all the images stored in the server, and reference images in the same hash bucket have the same hash fragment.

[0054] Alternatively, reference images within the same hash bucket may have the same hash fragment at the same location in the perceived hash.

[0055] For example, the perceptual hash of the first reference image is 1111 0000 0101; the perceptual hash of the second reference image is 1111 0100 0001; dividing the perceptual hash into three segments yields three hash fragments. Since the first hash fragment of the first reference image and the first hash fragment of the second reference image are both 1111, both the first and second reference images are stored in the hash bucket where the first hash fragment is 1111.

[0056] For example, the perceptual hash of the third reference image is 1111 0000 0101; the perceptual hash of the fourth reference image is 0100 1111 0001. Dividing the perceptual hash into three segments yields three hash fragments. Although the third hash fragment of the third reference image and the fourth hash fragment of the fourth reference image are both 1111, they will not be stored in the same hash bucket because of their different positions (the third reference image is in the third hash fragment, and the fourth reference image is in the fourth hash fragment).

[0057] To make it easier to understand, let's take a hash bucket as an example. For instance, if a hash bucket has a first hash segment of 1111, then all reference images stored in this bucket will have a hash segment value of 1111 at the position of the first hash segment. For example, the perceptual hash of the first reference image mentioned above, 1111 00000101, and the perceptual hash of the second reference image, 1111 0100 0001, can both be stored in this hash bucket. Furthermore, the reference image with a perceptual hash of 1111 0000 1010 can also be stored in this hash bucket, and so on.

[0058] For example, two reference images can be stored in at least two hash buckets simultaneously. For instance, if two reference images have the same hash fragment at two locations, they will be stored in two hash buckets. For example, the perceptual hash of the fifth reference image is 1111 0000 0101, and the perceptual hash of the sixth reference image is 1111 0000 0001. Since the first hash fragment of both the fifth and sixth reference images is 1111, both the fifth and sixth reference images are stored in the hash bucket where the first hash fragment is 1111. Similarly, since the second hash fragment of both the fifth and sixth reference images is 0000, both the fifth and sixth reference images are stored in the hash bucket where the second hash fragment is 0000.

[0059] Therefore, the hash fragment of the image to be uploaded is used to match the hash bucket. If the hash fragment successfully matches the hash bucket, it means that the image to be uploaded and the reference image in the hash bucket have the same hash fragment in the same position. Therefore, the probability that the image to be uploaded and the reference image in the hash bucket are similar is high.

[0060] For example, if no hash bucket corresponding to the hash fragment is matched, the screening can end and the image to be uploaded can be uploaded. Optionally, if no hash bucket corresponding to the hash fragment is matched, a hash bucket can be created for the hash fragment, and the image to be uploaded can be stored in the hash bucket for screening subsequent images to be uploaded.

[0061] Step 230: If a reference image similar to the image to be uploaded exists in the target hash bucket, perform steganography analysis on the image to be uploaded.

[0062] Steganography refers to the concealment of secret information (such as text, files, or code) within a seemingly ordinary image using specific techniques (such as modifying the least significant bit of pixel color values, adjusting image EXIF ​​data, or embedding minute differences). This makes the information undetectable to the naked eye, and only specialized tools or algorithms can extract it. Steganography is commonly used for covert communication, digital watermarking, or malicious attacks. It's important to note that to facilitate the extraction of steganography from images, it's common practice to write steganography into identical or similar images and then upload them. Therefore, a large batch of uploaded, similar images is more likely to contain steganography.

[0063] For example, steganographic content can be written into an image in the following ways:

[0064] 1) Least significant bit replacement: Modify the last few bits of the pixel's RGB value (not easily noticeable to the human eye), for example, use the lowest 1-2 bits of each pixel to store binary secret data.

[0065] 2) Frequency domain steganography: Embedding data in the DCT (Discrete Cosine Transform) coefficients of JPEG images or the FFT (Fast Fourier Transform) domain of PNGs.

[0066] 3) Alpha channel / transparency: Hide information using the transparent layer of PNG.

[0067] 4) Metadata (EXIF / IPTC): Hides text or code in the EXIF ​​information of the image (such as shooting time, GPS data).

[0068] 5) Visual noise masking: By adjusting the noise or texture of certain areas of an image, hidden information can be blended into the background.

[0069] Steganography analysis is the process of detecting and extracting hidden information (steganography) within an image. For example, stegography analysis can be performed by: checking for anomalies in image size, pixel statistics, color distribution, etc. (e.g., LSB steganography may cause unnatural RGB value distribution); and / or using specialized software to attempt to decrypt or extract the stegography; and / or, for formats such as JPEG, checking for abnormal modifications to the DCT coefficients; and / or, examining EXIF ​​information for hidden stegography.

[0070] Optionally, steganalysis tools can be used to analyze the steganalysis content of the uploaded image. For example, tools like binwalk and ImageMagick can be used. Steganalysis tools (such as binwalk and ImageMagick) detect or extract hidden information using multi-dimensional techniques. For instance, binwalk can analyze file structure, identify nested files (such as ZIP and JPEG headers) using signature scanning, detect abnormal data regions using entropy values, and support automatic decompression of hidden content; while image tools like ImageMagick can check for anomalies in the statistical distribution of pixel LSBs (least significant bits), parse EXIF ​​metadata, and analyze unnatural traces in color histograms or frequency domain transformations (such as the DCT coefficients of JPEG).

[0071] For example, after matching the target hash bucket, the perceptual hash similarity between the image to be uploaded and the reference image is calculated. If the similarity meets the condition, the image to be uploaded is determined to be similar to the reference image. If there is an image similar to the image to be uploaded in the hash bucket, it means that there is already an uploaded similar image on the server. The image to be uploaded may be a batch-uploaded image carrying steganographic content. In this case, steganographic content analysis is performed on the image to be uploaded to identify whether it carries steganographic content. If it does, the image to be uploaded is blocked; otherwise, it is uploaded.

[0072] For example, if no similar reference image exists in the target hash bucket, the image to be uploaded will proceed normally. Optionally, after the image to be uploaded is completed, it can be stored in the target hash bucket to update the target hash bucket in real time.

[0073] Step 240: If the image to be uploaded contains hidden content, intercept the image to be uploaded.

[0074] For example, if the image to be uploaded contains hidden content, then the image to be uploaded will be deleted.

[0075] Optionally, reference images that are similar to the image to be uploaded can be further deleted.

[0076] Alternatively, if the image to be uploaded contains steganographic content, similar reference images are also analyzed for steganographic content. If the reference images also contain steganographic content, they are marked as containing steganographic content. If subsequent images to be uploaded match images marked as containing steganographic content, then the image to be uploaded is likely to contain steganographic content as well.

[0077] For example, if the reference image is not marked as containing steganographic content, steganographic analysis will be performed on the image to be uploaded if the number of similar reference images in the target hash bucket exceeds a first threshold. If the reference image is marked as containing steganographic content, steganographic analysis will be performed on the image to be uploaded if the number of similar reference images in the target hash bucket exceeds a second threshold. The second threshold is less than the first threshold. For example, if the reference image is not marked as containing steganographic content, steganographic analysis will only be performed when the number of similar reference images exceeds 50; if the reference image is marked as containing steganographic content, steganographic analysis will be performed when the number of similar reference images exceeds 10.

[0078] For example, for image upload services, a similar image judgment process can be added. During the upload process of the image to be uploaded, the perceptual hash (Phash) of the image to be uploaded is calculated. Then, the hash bucket is used to find similar images in seconds among millions of images. Then, the steganography detection tools such as binwalk are used asynchronously for analysis. This can efficiently intercept the upload of batch similar images with steganography and prevent the CDN (Content Delivery Network) service from being stolen.

[0079] In summary, the method provided in this embodiment uses reference images containing steganographic content to construct hash buckets. These hash buckets store reference images with the same local hash characteristics (referred to as bucket hash values). When a user uploads an image, the perceptual hash of the image to be uploaded is calculated, and the hash fragments of the perceptual hash are matched with each hash bucket to determine the hash bucket to which the image belongs (the local hash characteristics of the image to be uploaded are the same as the bucket hash value of that hash bucket). This quickly filters out reference images with local similarity to the image to be uploaded. Then, the similarity between the image to be uploaded and the reference images in the hash buckets is precisely matched. If the similarity is high, the image to be uploaded may contain steganographic content. Further steganographic content analysis is performed on the images to be uploaded to identify and block images containing steganographic content. When users upload a large number of images in batches, this method can quickly and automatically scan the batch of uploaded images, significantly improving the efficiency and accuracy of the review process and effectively maintaining the compliance and security of the platform's content.

[0080] The method provided in this embodiment uses the perceptual hash (Phash) of the image to be uploaded to determine image similarity, and then uses Local Sensitive Hash (LSH) hash buckets to quickly find similar images to determine whether a large number of similar images have been uploaded. Then, it performs steganography analysis on the similar images. While ensuring service performance, it can effectively block new images with unknown steganography features, and at the same time, it can still save the original images required by the business, ensuring that the images are lossless.

[0081] The method provided in this embodiment addresses the issue that when users upload a large number of images containing steganographic content, they often embed steganographic content in identical or similar images for easier extraction. Therefore, analyzing each image individually during steganographic content screening would consume significant processor resources and be extremely time-consuming. To improve screening efficiency, this embodiment first matches uploaded images similar to the image to be uploaded. If a large number of similar uploaded images exist, the image to be uploaded may contain steganographic content, and further steganographic content analysis is then performed. This method can quickly filter images that may contain steganographic content, performing steganographic content analysis on the filtered images, thus improving screening efficiency and reducing time consumption.

[0082] Figure 3 This is a flowchart illustrating an exemplary embodiment of an image interception method provided in this application. The method can be implemented by, for example... Figure 1 The terminal device or server shown executes this. Based on Figure 2 In the illustrated embodiment, step 210 includes step 211, and step 230 includes step 231.

[0083] Step 211: Calculate the perceptual hash of the image to be uploaded, and split the perceptual hash into at least two hash fragments according to the preset splitting method. The at least two hash fragments correspond to the splitting positions. Obtain at least two hash fragments corresponding to at least two splitting positions.

[0084] For example, the preset splitting method could be to divide the perceptual hash into at least two hash segments according to a preset number of segments. Alternatively, the preset splitting method could be to split the perceptual hash into at least two hash segments according to a preset splitting position. Another preset splitting method could be to split the perceptual hash into at least two hash segments according to a preset splitting ratio.

[0085] Optionally, at least two hash fragments can be sequentially concatenated to reconstruct the complete perceptual hash. Alternatively, at least two hash fragments can be partial segments extracted from the perceptual hash. The at least two hash fragments may or may not contain duplicate fragments.

[0086] In one alternative embodiment, the perceptual hash is divided into four hash segments, which are sequentially: the first hash segment corresponding to the first split position (or "first hash segment"), the second hash segment corresponding to the second split position (or "second hash segment"), the third hash segment corresponding to the third split position (or "third hash segment"), and the fourth split segment corresponding to the fourth split position (or "fourth hash segment").

[0087] Step 220: Based on the hash fragment of the image to be uploaded, match the target hash bucket from at least two hash buckets; each hash bucket has a corresponding bucket hash value, and the hash bucket is used to store reference images. The hash fragment of the reference image is the same as the bucket hash value of the hash bucket; the target bucket hash value of the target hash bucket is the same as the hash fragment of the image to be uploaded.

[0088] For example, there is a one-to-one correspondence between the hash bucket, the bucket hash value, and the split position. In the reference image, the hash fragment at the split position is the same as the bucket hash value of the hash bucket.

[0089] Taking obtaining the first hash fragment as an example:

[0090] Obtain the first hash fragment corresponding to the first split position; based on the first split position and the first hash fragment, match the target hash bucket from at least two hash buckets; the target hash bucket corresponds to the first split position, and the target bucket hash value of the target hash bucket is the same as the first hash fragment.

[0091] For example, the remaining hash fragments can also be matched against the corresponding target hash buckets by referring to the first hash fragment. After matching all hash fragments, at least one target hash bucket can be obtained.

[0092] In one optional embodiment, when the number of hash segments is 4, the target hash bucket includes at least one of the following: a first target hash bucket corresponding to the first split position and having a bucket hash value equal to the first hash segment; a second target hash bucket corresponding to the second split position and having a bucket hash value equal to the second hash segment; a third target hash bucket corresponding to the third split position and having a bucket hash value equal to the third hash segment; and a fourth target hash bucket corresponding to the fourth split position and having a bucket hash value equal to the fourth hash segment.

[0093] Step 231: If the number of reference images similar to the image to be uploaded in the target hash bucket is greater than the number threshold, perform steganography analysis on the image to be uploaded.

[0094] For example, the reference perceptual hash of the reference image is obtained; the Hamming distance between the reference perceptual hash and the perceptual hash of the image to be uploaded is calculated; if the Hamming distance is less than a similarity threshold, the reference image and the image to be uploaded are determined to be similar.

[0095] Hamming distance is a metric that measures the difference between two strings of equal length, representing the number of different characters at the same position. For example, the Hamming distance between "10101" and "11100" is 2 (the 2nd and 5th characters are different). In image comparison, the similarity between two hash strings can be quantified by calculating their Hamming distance: the smaller the distance (e.g., <5), the more similar the images; the larger the distance (e.g., >10), the more significant the difference.

[0096] For example:

[0097] The perceptual hash of image A is: 1011101;

[0098] The perceptual hash of image B is: 1001001;

[0099] If the perceptual hashes of images A and B differ in two characters at the same position, then the Hamming distance is 2.

[0100] In one optional embodiment, when the Hamming distance is 0, the two images can be considered to be almost identical; when the Hamming distance is 1 to 5, the two images can be considered to be highly similar; when the Hamming distance is 6 to 10, the two images can be considered to have some similarity; when the Hamming distance is 11 to 20, the two images can be considered to be significantly different and are two different images; when the Hamming distance is greater than 21, the two images can be considered to be significantly different.

[0101] Optionally, since perceptual hash is a fuzzy feature summary of an image, slight changes to the image (e.g., minor cropping, scaling, brightness changes, or compression) will result in a difference of 1 to 5 bits in the perceptual hash; a difference of 6 to 10 bits in the perceptual hash indicates that there are more local changes in the image, or that the two images are of the same type (e.g., different angles of the same object); a Hamming distance greater than 15 usually indicates that the images are completely different. Therefore, the similarity threshold can be set to 6 or 11. If the Hamming distance is less than 6 or less than 11, the reference image is considered similar to the image to be uploaded.

[0102] If a large number of reference images are found that are similar to the image to be uploaded, the image to be uploaded may contain steganographic content, requiring steganographic analysis. For example, if the number of reference images similar to the image to be uploaded exceeds a certain threshold, steganographic analysis is performed on both the image to be uploaded and the similar reference images. This reduces resource consumption while ensuring the interception of a large number of uploaded images containing steganographic content.

[0103] For example, a steganalysis tool can be used asynchronously to perform steganalysis on the images to be uploaded. That is, the steganalysis and the aforementioned hash bucket-based image filtering are executed asynchronously. After filtering out images that meet the criteria for uploading, steganalysis on those images can be triggered, while simultaneously continuing to filter and match subsequent images to be uploaded, thus improving the efficiency of image screening.

[0104] For example, the first thread or the first process can be used to execute the steps of matching reference images similar to the image to be uploaded in steps 210, 220 and 230, and the second thread or the second process can be used to execute the step of "steganographic content analysis of the image to be uploaded" in step 230. The first thread and the second thread are two threads running simultaneously, and / or the first process and the second process are two processes running simultaneously.

[0105] Step 240: If the image to be uploaded contains hidden content, intercept the image to be uploaded.

[0106] For example, such as Figure 4 As shown, when a user uploads image 401 through image upload service interface 402, the server calculates the perceptual hash of image 401: 1010 1100 1111 0001. This perceptual hash is split into four hash segments: the first segment is 1010, the second is 1100, the third is 1111, and the fourth is 0001. Then, based on the first hash segment 1010, the server matches the hash bucket containing the first hash segment 1010. All reference images stored in the hash bucket containing the first hash segment 1010 have the first hash segment 1010 as their first hash segment. The first hash segment is the perceptual hash of the reference images stored in hash bucket 1010. This can include: 1010 1100 1111 0001, 1010 10011111 0001, 1010 1100 0101 0001, and 1010 1100 1011 1001. It's clear that the first hash segment for all reference images is 1010. Next, the Hamming distance between image 401 and all reference images in this hash bucket is calculated. If the Hamming distance is less than 5, the reference image is identified as a similar image. Similarly, the hash buckets for the other three hash segments of image 401 are searched, and similar reference images are matched within these hash buckets. Finally, the total number of similar reference images in all matching hash buckets is counted. If the total number exceeds a threshold, steganography analysis is performed on image 401. For example, a steganography analysis tool can be used to determine whether image 401 contains steganography, or the metadata information of image 401 can be read and checked for any abnormalities, or other screening methods can be used to screen image 401 for steganography.

[0107] In summary, the method provided in this embodiment uses reference images containing steganographic content to construct hash buckets. These hash buckets store reference images with the same local hash characteristics (referred to as bucket hash values). When a user uploads an image, the perceptual hash of the image to be uploaded is calculated, and the hash fragments of the perceptual hash are matched with each hash bucket to determine the hash bucket to which the image belongs (the local hash characteristics of the image to be uploaded are the same as the bucket hash value of that hash bucket). This quickly filters out reference images with local similarity to the image to be uploaded. Then, the similarity between the image to be uploaded and the reference images in the hash buckets is precisely matched. If the similarity is high, the image to be uploaded may contain steganographic content. Further steganographic content analysis is performed on the images to be uploaded to identify and block images containing steganographic content. When users upload a large number of images in batches, this method can quickly and automatically scan the batch of uploaded images, significantly improving the efficiency and accuracy of the review process and effectively maintaining the compliance and security of the platform's content.

[0108] The method provided in this embodiment matches reference images similar to the image to be uploaded by calculating perceptual hash and Hamming distance. Since the calculation of perceptual hash and Hamming distance is very quick and consumes little CPU resources, it can quickly and efficiently match similar images, improving the review efficiency of images to be uploaded.

[0109] This embodiment provides a method for intercepting the upload of batches of similar images containing steganographic content based on image-aware hashing (Phash) and Local Sensitive Hash (LSH, i.e., hash buckets). This method can be used in image upload server services. It utilizes image-aware hashing to identify a large number of similar image uploads in the system, and then uses steganographic content analysis tools such as binwalk and imagemagick to analyze whether these similar images possess steganographic features. This allows for effective early warning and interception of large-scale steganographic image uploads even when steganographic features are unknown, preventing enterprises' image CDN services from being stolen by illegal websites and avoiding high CDN bandwidth costs and policy risks for enterprises.

[0110] The method provided in this embodiment applies the hash value used for similar image determination and similar image search to the interception of steganographic image uploads. This allows the system to detect a large number of similar image uploads even without known steganographic features, and then performs automatic / manual steganography screening. This solves the problem of effectively intercepting steganographic image uploads without knowing the steganographic features, while also completing the determination of a large number of similar images with low performance overhead before performing steganography screening, thus avoiding impact on the online system. This method is low-cost, achieves fast steganography screening, reduces intrusion into the original system, and can be applied to high-concurrency image upload services.

[0111] An example is given of an embodiment for constructing hash buckets.

[0112] Figure 5 This is a flowchart illustrating an exemplary embodiment of an image interception method provided in this application. The method can be implemented by, for example... Figure 1 The method is executed by the terminal device or server shown. The method includes the following steps.

[0113] Step 310: Calculate the reference-aware hash of the reference image.

[0114] For example, a reference-aware hash is 64 bits, and the reference-aware hash is split into k reference hash fragments (e.g., if k=4, then each reference hash fragment is 16 bits).

[0115] Step 320: Split the reference-aware hash into at least two reference hash segments according to the preset splitting method; the at least two reference hash segments include the i-th reference hash segment corresponding to the i-th splitting position; i is a positive integer.

[0116] For example, a reference-aware hash is 64 bits, and the reference-aware hash is split into k reference hash fragments (e.g., if k=4, then each reference hash fragment is 16 bits).

[0117] Step 330: If there exists an i-th hash bucket that corresponds to the i-th split position and whose bucket hash value is the same as the i-th reference hash fragment, store the identifier of the reference image and the reference perceptual hash into the i-th hash bucket.

[0118] For example, the ID (identifier) ​​and reference-aware hash of the reference image are stored in the i-th hash bucket, and the ID (identifier) ​​and reference-aware hash of the reference image are inserted into a collection of Redis (Remote Dictionary Server), which is used to store the hash buckets.

[0119] Step 340: If there is no hash bucket corresponding to the i-th split position and whose bucket hash value is the same as the i-th reference hash fragment, create the i-th hash bucket. The i-th hash bucket corresponds to the i-th split position and the bucket hash value of the i-th hash bucket is equal to the i-th reference hash fragment.

[0120] For example, Figure 4 The method provided in the illustrated embodiment can be used in Figure 2 or Figure 3 The method provided in the illustrated embodiment is executed prior to this.

[0121] For example, such as Figure 6As shown, the image uploader 403 can upload a reference image to the server through the image upload service interface 402. The server can calculate the perceptual hash of the reference image, for example, the perceptual hash could be: 1010 1100 11110001. Then, the perceptual hash of the reference image is segmented into four hash fragments: the first hash fragment is 1010, the second hash fragment is 1100, the third hash fragment is 1111, and the fourth hash fragment is 0001. Hash buckets are created for each of the four hash fragments, and the reference images are stored in these hash buckets. The four hash buckets are stored in a key-value in-memory database (e.g., Redis). The data type for storing the reference image in the hash bucket is set, and the data content is the perceptual hash of the reference image. Taking the hash bucket with the first hash fragment 1010 as an example, all reference images stored in this hash bucket have the first hash fragment of 1010. In other words, reference images stored in the hash bucket have the same hash fragments at the same location, indicating that these images have a certain degree of similarity. Therefore, when searching for similar images to be uploaded, the hash bucket can be matched first, and then the Hamming distance can be calculated on the perceptual hash of the reference images in the hash bucket. In this way, similar reference images can be found, and the perceptual hashes that need to be compared can be greatly reduced, thus improving the search speed.

[0122] For example, using Redis, by leveraging hash fragments of perceptual hashing, reference images with the same hash fragments at the same location are grouped into the same hash bucket, which quickly reduces the number of images that need to be compared for the image to be uploaded, and enables fast searching of similar images.

[0123] In summary, the method provided in this embodiment uses reference images containing steganographic content to construct hash buckets. These hash buckets store reference images with the same local hash characteristics (referred to as bucket hash values). When a user uploads an image, the perceptual hash of the image to be uploaded is calculated, and the hash fragments of the perceptual hash are matched with each hash bucket to determine the hash bucket to which the image belongs (the local hash characteristics of the image to be uploaded are the same as the bucket hash value of that hash bucket). This quickly filters out reference images with local similarity to the image to be uploaded. Then, the similarity between the image to be uploaded and the reference images in the hash buckets is precisely matched. If the similarity is high, the image to be uploaded may contain steganographic content. Further steganographic content analysis is performed on the images to be uploaded to identify and block images containing steganographic content. When users upload a large number of images in batches, this method can quickly and automatically scan the batch of uploaded images, significantly improving the efficiency and accuracy of the review process and effectively maintaining the compliance and security of the platform's content.

[0124] It should be noted that this application may display prompt interfaces, pop-ups, or output voice prompts before and during the collection of user data. These prompt interfaces, pop-ups, or voice prompts are used to inform the user that their data is being collected. This ensures that the application only begins the steps for collecting user data after receiving confirmation from the user regarding the prompt interface or pop-up; otherwise (i.e., without user confirmation), the steps for collecting user data end, meaning no user data is collected. In other words, all user data collected in this application is collected with the user's consent and authorization, and the collection, use, and processing of related user data must comply with the relevant laws, regulations, and standards of the relevant countries and regions.

[0125] It should be noted that the order of the method steps provided in the embodiments of this application can be adjusted appropriately, and the steps can also be added or removed as appropriate. Figure 2 , Figure 3 , Figure 5 The steps in the illustrated embodiments can also be combined arbitrarily to obtain new embodiments. Any variations that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the protection scope of this application, and therefore will not be described in detail here.

[0126] Figure 7 This is a schematic diagram of the structure of an image interception device provided in an exemplary embodiment of this application. The device includes:

[0127] The acquisition module 501 is used to calculate the perceptual hash of the image to be uploaded and to acquire the hash fragment of the perceptual hash;

[0128] The matching module 502 is used to match a target hash bucket from at least two hash buckets based on the hash fragment of the image to be uploaded; each hash bucket corresponds to a bucket hash value, the hash bucket is used to store a reference image, the hash fragment of the reference image is the same as the bucket hash value of the hash bucket; the target bucket hash value of the target hash bucket is the same as the hash fragment of the image to be uploaded.

[0129] Analysis module 503 is used to perform steganography analysis on the image to be uploaded when a reference image similar to the image to be uploaded exists in the target hash bucket.

[0130] The interception module 504 is used to intercept the image to be uploaded if the image to be uploaded contains steganographic content.

[0131] In an optional embodiment, the acquisition module 501 is used to split the perceptual hash into at least two hash segments according to a preset splitting method, wherein the at least two hash segments correspond to the splitting positions; and to acquire at least two hash segments corresponding to at least two splitting positions.

[0132] In one optional embodiment, the hash bucket, the bucket hash value, and the splitting position have a one-to-one correspondence, and the hash fragment of the reference image at the splitting position is the same as the bucket hash value of the hash bucket.

[0133] The acquisition module 501 is used to acquire the first hash fragment corresponding to the first split position;

[0134] The matching module 502 is used to match the target hash bucket from the at least two hash buckets based on the first split position and the first hash fragment; the target hash bucket corresponds to the first split position, and the target bucket hash value of the target hash bucket is the same as the first hash fragment.

[0135] In one alternative embodiment, the target hash bucket includes at least one hash bucket obtained by matching at least two hash fragments corresponding to the at least two split positions.

[0136] In an optional embodiment, the analysis module 503 is used to perform steganography analysis on the image to be uploaded when the number of reference images similar to the image to be uploaded in the target hash bucket is greater than a number threshold.

[0137] In an optional embodiment, the acquisition module 501 is used to acquire the reference perceptual hash of the reference image;

[0138] The analysis module 503 is used to calculate the Hamming distance between the reference perceptual hash and the perceptual hash of the image to be uploaded;

[0139] The analysis module 503 is used to determine that the reference image is similar to the image to be uploaded when the Hamming distance is less than a similarity threshold.

[0140] In one optional embodiment, the analysis module 503 is used to asynchronously use a steganography analysis tool to perform steganography analysis on the image to be uploaded.

[0141] In an optional embodiment, the acquisition module 501 is used to calculate the reference-aware hash of the reference image;

[0142] The acquisition module 501 is used to split the reference-aware hash into at least two reference hash segments according to a preset splitting method; the at least two reference hash segments include the i-th reference hash segment corresponding to the i-th splitting position; i is a positive integer;

[0143] The matching module 502 is used to store the identifier of the reference image and the reference perceptual hash into the i-th hash bucket when there is an i-th hash bucket that corresponds to the i-th splitting position and whose bucket hash value is the same as the i-th reference hash fragment;

[0144] The matching module 502 is used to create the i-th hash bucket when there is no hash bucket corresponding to the i-th split position and whose bucket hash value is the same as the i-th reference hash fragment. The i-th hash bucket corresponds to the i-th split position and the bucket hash value of the i-th hash bucket is equal to the i-th reference hash fragment.

[0145] In an optional embodiment, the acquisition module 501 is used to divide the perceptual hash into four hash segments, the four hash segments being sequentially: a first hash segment corresponding to a first splitting position, a second hash segment corresponding to a second splitting position, a third hash segment corresponding to a third splitting position, and a fourth splitting segment corresponding to a fourth splitting position.

[0146] The target hash bucket includes at least one of the following:

[0147] The first target hash bucket corresponds to the first split position and has a bucket hash value equal to the first hash fragment.

[0148] The second target hash bucket corresponds to the second split position and has a bucket hash value equal to the second hash fragment;

[0149] Corresponding to the third split position, and the bucket hash value is equal to the third target hash bucket of the third hash fragment;

[0150] Corresponding to the fourth split position, and the bucket hash value is equal to the fourth target hash bucket of the fourth hash fragment.

[0151] It should be noted that the image interception device provided in the above embodiments is only an example of the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the image interception device and the image interception method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process can be found in the method embodiments, which will not be repeated here.

[0152] Embodiments of this application also provide a computer device, comprising: a processor and a memory, wherein the memory stores at least one instruction, at least one program, code set, or instruction set, and the at least one instruction, at least one program, code set, or instruction set is loaded and executed by the processor to implement the image interception method provided in the above-described method embodiments. This computer device can be implemented as a terminal device.

[0153] For example, Figure 8 This is a schematic diagram of the structure of a computer device provided in an exemplary embodiment of this application.

[0154] Typically, computer device 1700 includes a processor 1701 and a memory 1702.

[0155] Processor 1701 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. Processor 1701 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Processor 1701 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 1701 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the screen. In some embodiments, processor 1701 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.

[0156] The memory 1702 may include one or more computer-readable storage media, which may be non-transitory. The memory 1702 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 1702 is used to store at least one instruction, which is executed by the processor 1701 to implement the image interception method provided in the method embodiments of this application.

[0157] In some embodiments, the computer device 1700 may also optionally include a peripheral device interface 1703 and at least one peripheral device. The processor 1701, memory 1702, and peripheral device interface 1703 can be connected via a bus or signal line. Each peripheral device can be connected to the peripheral device interface 1703 via a bus, signal line, or circuit board. Specifically, the peripheral device includes at least one of the following: a radio frequency circuit 1704, a display screen 1705, a camera assembly 1706, an audio circuit 1707, and a power supply 1708.

[0158] Peripheral device interface 1703 can be used to connect at least one I / O (Input / Output) related peripheral device to processor 1701 and memory 1702. In some embodiments, processor 1701, memory 1702 and peripheral device interface 1703 are integrated on the same chip or circuit board; in some other embodiments, any one or two of processor 1701, memory 1702 and peripheral device interface 1703 can be implemented on separate chips or circuit boards, and this application embodiment is not limited in this respect.

[0159] The radio frequency (RF) circuit 1704 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The RF circuit 1704 communicates with communication networks and other communication devices via electromagnetic signals. The RF circuit 1704 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals back into electrical signals. Optionally, the RF circuit 1704 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, etc. The RF circuit 1704 can communicate with other computer devices via at least one wireless communication protocol. This wireless communication protocol includes, but is not limited to: the World Wide Web, metropolitan area networks, intranets, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and / or WiFi (Wireless Fidelity) networks. In some embodiments, the RF circuit 1704 may also include circuitry related to NFC (Near Field Communication), which is not limited in this application.

[0160] Display screen 1705 is used to display a UI (User Interface). This UI may include graphics, text, icons, videos, and any combination thereof. When display screen 1705 is a touch display screen, it also has the ability to collect touch signals on or above its surface. These touch signals can be input as control signals to processor 1701 for processing. In this case, display screen 1705 can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, there may be one display screen 1705, positioned on the front panel of computer device 1700; in other embodiments, there may be at least two display screens 1705, respectively positioned on different surfaces of computer device 1700 or in a folded design; in still other embodiments, display screen 1705 may be a flexible display screen, positioned on a curved or folded surface of computer device 1700. Furthermore, display screen 1705 may also be configured as a non-rectangular, irregular shape, i.e., a non-rectangular screen. The display screen 1705 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).

[0161] The camera assembly 1706 is used to acquire images or videos. Optionally, the camera assembly 1706 includes a front-facing camera and a rear-facing camera. Typically, the front-facing camera is located on the front panel of the computer device 1700, and the rear-facing camera is located on the back of the computer device. In some embodiments, there are at least two rear-facing cameras, which are any one of a main camera, a depth-sensing camera, a wide-angle camera, and a telephoto camera, to achieve background blurring by fusion of the main camera and the depth-sensing camera, panoramic shooting by fusion of the main camera and the wide-angle camera, VR (Virtual Reality) shooting, or other fusion shooting functions. In some embodiments, the camera assembly 1706 may also include a flash. The flash can be a single-color temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cool light flash, which can be used for light compensation at different color temperatures.

[0162] The audio circuit 1707 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, converting them into electrical signals that are input to the processor 1701 for processing, or to the radio frequency circuit 1704 for voice communication. For stereo sound acquisition or noise reduction purposes, multiple microphones may be used, positioned at different locations within the computer device 1700. The microphone may also be an array microphone or an omnidirectional microphone. The speaker is used to convert electrical signals from the processor 1701 or the radio frequency circuit 1704 into sound waves. The speaker may be a conventional diaphragm speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can convert electrical signals not only into audible sound waves but also into inaudible sound waves for purposes such as distance measurement. In some embodiments, the audio circuit 1707 may also include a headphone jack.

[0163] Power supply 1708 is used to supply power to the various components in computer device 1700. Power supply 1708 can be AC ​​power, DC power, a disposable battery, or a rechargeable battery. When power supply 1708 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery that is charged via a wired line, and a wireless rechargeable battery is a battery that is charged via a wireless coil. The rechargeable battery can also be used to support fast charging technology.

[0164] In some embodiments, the computer device 1700 further includes one or more sensors 1709. The one or more sensors 1709 include, but are not limited to, an accelerometer 1710, a gyroscope 1711, a pressure sensor 1712, an optical sensor 1713, and a proximity sensor 1714.

[0165] Accelerometer 1710 can detect the magnitude of acceleration along the three coordinate axes of a coordinate system established by computer device 1700. For example, accelerometer 1710 can be used to detect the components of gravitational acceleration along the three coordinate axes. Processor 1701 can control touchscreen display 1705 to display the user interface in landscape or portrait view based on the gravitational acceleration signal acquired by accelerometer 1710. Accelerometer 1710 can also be used for games or for acquiring user motion data.

[0166] The gyroscope sensor 1711 can detect the orientation and rotation angle of the computer device 1700. The gyroscope sensor 1711 can work in conjunction with the accelerometer sensor 1710 to acquire 3D motion data from the user on the computer device 1700. Based on the data acquired by the gyroscope sensor 1711, the processor 1701 can perform the following functions: motion sensing (e.g., changing the UI based on the user's tilt), image stabilization during shooting, game control, and inertial navigation.

[0167] Pressure sensor 1712 can be disposed on the side bezel of computer device 1700 and / or on the lower layer of touch display screen 1705. When pressure sensor 1712 is disposed on the side bezel of computer device 1700, it can detect the user's grip signal on computer device 1700, and processor 1701 can perform left / right hand recognition or quick operation based on the grip signal collected by pressure sensor 1712. When pressure sensor 1712 is disposed on the lower layer of touch display screen 1705, processor 1701 can control operable controls on the UI interface based on the user's pressure operation on touch display screen 1705. Operable controls include at least one of button controls, scroll bar controls, icon controls, and menu controls.

[0168] Optical sensor 1713 is used to collect ambient light intensity. In one embodiment, processor 1701 can control the display brightness of touch display screen 1705 based on the ambient light intensity collected by optical sensor 1713. Specifically, when the ambient light intensity is high, the display brightness of touch display screen 1705 is increased; when the ambient light intensity is low, the display brightness of touch display screen 1705 is decreased. In another embodiment, processor 1701 can also dynamically adjust the shooting parameters of camera assembly 1706 based on the ambient light intensity collected by optical sensor 1713.

[0169] The proximity sensor 1714, also known as a distance sensor, is typically located on the front panel of the computer device 1700. The proximity sensor 1714 is used to detect the distance between the user and the front of the computer device 1700. In one embodiment, when the proximity sensor 1714 detects that the distance between the user and the front of the computer device 1700 is gradually decreasing, the processor 1701 controls the touch display screen 1705 to switch from a screen-on state to a screen-off state; when the proximity sensor 1714 detects that the distance between the user and the front of the computer device 1700 is gradually increasing, the processor 1701 controls the touch display screen 1705 to switch from a screen-off state to a screen-on state.

[0170] Those skilled in the art will understand that Figure 8 The structure shown does not constitute a limitation on the computer device 1700, and may include more or fewer components than shown, or combine certain components, or use different component arrangements.

[0171] This application also provides a computer-readable storage medium storing at least one instruction, at least one program, code set, or instruction set. When the at least one instruction, at least one program, code set, or instruction set is loaded and executed by the processor of a computer device, the image interception method provided in the above-described method embodiments is implemented.

[0172] This application also provides a computer program product or computer program that 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 executes the computer instructions, causing the computer device to perform the image interception method provided in the above-described method embodiments.

[0173] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0174] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent switching, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. An image interception method, characterized in that, The method includes: Calculate the perceptual hash of the image to be uploaded, and obtain the hash fragment of the perceptual hash; Based on the hash fragment of the image to be uploaded, a target hash bucket is obtained by matching from at least two hash buckets; each hash bucket has a corresponding bucket hash value, and the hash bucket is used to store a reference image, the hash fragment of which is the same as the bucket hash value of the hash bucket; the target bucket hash value of the target hash bucket is the same as the hash fragment of the image to be uploaded. If a reference image similar to the image to be uploaded exists in the target hash bucket, perform steganography analysis on the image to be uploaded. If the image to be uploaded contains hidden content, the image to be uploaded will be intercepted.

2. The method according to claim 1, characterized in that, The step of obtaining the hash fragment of the perceptual hash includes: The perceptual hash is divided into at least two hash segments according to a preset splitting method, and the at least two hash segments correspond to the splitting positions; Obtain at least two hash fragments corresponding to at least two split positions.

3. The method according to claim 2, characterized in that, The hash bucket, the bucket hash value, and the splitting position have a one-to-one correspondence, and the hash fragment of the reference image at the splitting position is the same as the bucket hash value of the hash bucket. The step of obtaining at least two hash segments corresponding to at least two split positions includes: Obtain the first hash fragment corresponding to the first split position; The step of matching the target hash bucket from at least two hash buckets based on the hash fragment of the image to be uploaded includes: The target hash bucket is obtained by matching the first split position and the first hash fragment from the at least two hash buckets; the target hash bucket corresponds to the first split position, and the target bucket hash value of the target hash bucket is the same as the first hash fragment.

4. The method according to claim 2, characterized in that, The target hash bucket includes at least one hash bucket obtained by matching at least two hash fragments corresponding to the at least two split positions.

5. The method according to any one of claims 1 to 4, characterized in that, When a reference image similar to the image to be uploaded exists in the target hash bucket, steganography analysis is performed on the image to be uploaded, including: If the number of reference images similar to the image to be uploaded in the target hash bucket is greater than a certain threshold, then the image to be uploaded is subjected to steganography analysis.

6. The method according to any one of claims 1 to 4, characterized in that, The method further includes: Obtain the reference-aware hash of the reference image; Calculate the Hamming distance between the reference perceptual hash and the perceptual hash of the image to be uploaded; If the Hamming distance is less than the similarity threshold, the reference image is determined to be similar to the image to be uploaded.

7. The method according to any one of claims 1 to 4, characterized in that, The steganography analysis of the image to be uploaded includes: A steganalysis tool is used asynchronously to perform steganalysis on the image to be uploaded.

8. The method according to any one of claims 1 to 4, characterized in that, The method further includes: Calculate the reference-aware hash of the reference image; The reference-aware hash is split into at least two reference hash segments according to a preset splitting method; the at least two reference hash segments include the i-th reference hash segment corresponding to the i-th splitting position; i is a positive integer; If there exists an i-th hash bucket that corresponds to the i-th splitting position and whose bucket hash value is the same as the i-th reference hash segment, the identifier of the reference image and the reference perceptual hash are stored in the i-th hash bucket; If there is no hash bucket corresponding to the i-th split position and whose bucket hash value is the same as the i-th reference hash fragment, the i-th hash bucket is created, the i-th hash bucket corresponds to the i-th split position, and the bucket hash value of the i-th hash bucket is equal to the i-th reference hash fragment.

9. The method according to claim 2, characterized in that, The step of splitting the perceptual hash into at least two hash fragments according to a preset splitting method includes: The perceptual hash is divided into four hash segments, which are in the following order: the first hash segment corresponding to the first split position, the second hash segment corresponding to the second split position, the third hash segment corresponding to the third split position, and the fourth split segment corresponding to the fourth split position. The target hash bucket includes at least one of the following: The first target hash bucket corresponds to the first split position and has a bucket hash value equal to the first hash fragment. The second target hash bucket corresponds to the second split position and has a bucket hash value equal to the second hash fragment; Corresponding to the third split position, and the bucket hash value is equal to the third target hash bucket of the third hash fragment; Corresponding to the fourth split position, and the bucket hash value is equal to the fourth target hash bucket of the fourth hash fragment.

10. An image interception device, characterized in that, The device includes: The acquisition module is used to calculate the perceptual hash of the image to be uploaded and to obtain the hash fragment of the perceptual hash; A matching module is used to match a target hash bucket from at least two hash buckets based on the hash fragment of the image to be uploaded; each hash bucket corresponds to a bucket hash value, and the hash bucket is used to store a reference image, the hash fragment of which is the same as the bucket hash value of the hash bucket; the target bucket hash value of the target hash bucket is the same as the hash fragment of the image to be uploaded. The analysis module is used to perform steganography analysis on the image to be uploaded when a reference image similar to the image to be uploaded exists in the target hash bucket. The interception module is used to intercept the image to be uploaded if the image to be uploaded contains steganographic content.

11. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing at least one program, which is loaded and executed by the processor to implement the image interception method as described in any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that, The readable storage medium stores at least one program, which is loaded and executed by a processor to implement the image interception method as described in any one of claims 1 to 9.

13. A computer program product, characterized in that, The computer program product 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 executes the computer instructions, causing the computer device to perform the image interception method as described in any one of claims 1 to 9.