Image processing method and device

By using a digest algorithm and confusing strings to generate anti-counterfeiting marks in images, the problem of image data being tampered with during transmission is solved, and effective anti-counterfeiting verification of images and the security of identity authentication are achieved.

CN114692222BActive Publication Date: 2024-09-24MASHANG CONSUMER FINANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210320743.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-29
Publication Date
2024-09-24
Estimated Expiration
2042-03-29

AI Technical Summary

Technical Problem

Existing technology cannot effectively prevent image data from being tampered with during transmission, resulting in a decrease in the accuracy of business processing results. Especially in key applications such as identity authentication, tampered image data may be mistaken for legitimate.

Method used

By obtaining the first content collection of the target image, using the target summary algorithm and obfuscated strings to generate summary information, and storing it in the image file structure, it ensures that any tampering will lead to changes in the file structure, thereby achieving image anti-counterfeiting verification.

Benefits of technology

It can effectively identify whether the image has been tampered with, prevent attackers from counterfeiting by replacing or modifying the image, improve the accuracy and security of image anti-counterfeiting, and respond to various attack methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114692222B
    Figure CN114692222B
Patent Text Reader

Abstract

The embodiment of the present application provides an image processing method and device. In the process of anti-counterfeiting processing of a target image, firstly, the first file structure data of the target image is obtained, and then the first summary information is generated based on the first content set and the target obfuscation string in the first file structure data by using the target summary algorithm; then, based on the first summary information, the specified byte content in the information segment corresponding to the third mark code of the first static image file is updated to obtain the target image after anti-counterfeiting processing. Since the first summary information is obtained directly with the help of the first content set of the target image as the anti-counterfeiting mark, as long as any information of the image is tampered with, the image file structure data will change, thereby achieving the effect of image anti-counterfeiting; and the target obfuscation string is introduced during the image anti-counterfeiting processing, which can prevent the attack method of image tampering through image replacement, thereby achieving the purpose of coping with various attack methods.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image anti-counterfeiting technology, and in particular to an image processing method and device. Background Art

[0002] At present, with the rapid development of Internet technology, the Internet has been widely used in people's daily study, work and life. People's daily affairs can be processed and presented through the Internet. At the same time, in order to obtain illegal benefits, attackers often tamper with the image data required for the target business processing process through various attack methods. For example, in the process of transmitting image data from the acquisition module to the business processing module, it is intercepted and tampered by the attacker.

[0003] Therefore, if the tampered image data is directly used for business processing, it will inevitably affect the accuracy of the business processing results. For example, if the tampered face image data is directly used to authenticate the user, the identity authentication may pass even though the face recognition user is not the real person. Based on this, in order to protect the legitimate interests of users, there is a need for image anti-counterfeiting so that the verification party can effectively verify whether the image data to be used has been tampered with. Summary of the invention

[0004] The purpose of the embodiment of the present application is to provide an image processing method and device. Since the first summary information is obtained directly with the help of the first content set of the target image as an anti-counterfeiting mark, as long as any information of the image is tampered with, the image file structure data will change, thereby achieving the effect of image anti-counterfeiting; and introducing a target obfuscation string during image anti-counterfeiting processing, it is possible to prevent attacks that tamper with the image by replacing the image, thereby achieving the purpose of responding to various attack methods.

[0005] In order to implement the above technical solution, the embodiment of the present application is implemented as follows:

[0006] In a first aspect, an embodiment of the present application provides a method for processing an image, the method comprising:

[0007] Acquire first file structure data of a target image; wherein the target image is a first static image file, and the first file structure data includes: a first segment content set extracted from the first static image file at a first time node, the first segment content set being a segment content set of information segments included between a first marker code and a second marker code of the first static image file;

[0008] Generate first summary information based on the first content set and the target obfuscated character string using a target summary algorithm;

[0009] Based on the first summary information, the designated byte content in the information segment corresponding to the third mark code of the first static image file is updated to obtain the target image after anti-counterfeiting processing.

[0010] In a second aspect, an embodiment of the present application provides a method for processing an image, the method comprising:

[0011] Acquire an image to be verified for security purposes; wherein the image to be verified for security purposes comprises: a target image after the anti-counterfeiting processing as described in the first aspect, or a forged image used to attack the target image as described in the first aspect, and the image to be verified for security purposes is a second static picture file;

[0012] Acquire second file structure data of the image to be verified; wherein the second file structure data includes: a second segment content set extracted from the second static image file at a second time node, the second segment content set is a segment content set of information segments included between the first mark code and the second mark code of the second static image file, and the second time node is later than the first time node;

[0013] Using the target digest algorithm, based on the second content set and the target obfuscated character string, generating second digest information; and,

[0014] Acquire third summary information from the information segment corresponding to the third mark code of the second static picture file; wherein the third summary information includes: the first summary information, or forged summary information used to impersonate the first summary information;

[0015] An anti-counterfeiting verification result for the target image is generated based on the third summary information and the second summary information.

[0016] In a third aspect, an embodiment of the present application provides an image processing device, the device comprising:

[0017] A first acquisition module is configured to acquire first file structure data of a target image; wherein the target image is a first static image file, and the first file structure data includes: a first segment content set extracted from the first static image file at a first time node, the first segment content set being a segment content set of information segments included between a first marker code and a second marker code of the first static image file;

[0018] A first summary generation module is configured to generate first summary information based on the first content set and a target obfuscated character string using a target summary algorithm;

[0019] The anti-counterfeiting image generation module is configured to update the specified byte content in the information segment corresponding to the third mark code of the first static image file based on the first summary information to obtain the target image after anti-counterfeiting processing.

[0020] In a fourth aspect, an embodiment of the present application provides an image processing device, the device comprising:

[0021] The anti-counterfeiting image acquisition module is configured to acquire an image to be verified for anti-counterfeiting; wherein the image to be verified for anti-counterfeiting includes: a target image after anti-counterfeiting processing as described in the first aspect, or a forged image used to attack the target image as described in the first aspect, and the image to be verified for anti-counterfeiting is a second static picture file;

[0022] A second acquisition module is configured to acquire second file structure data of the image to be verified for anti-counterfeiting; wherein the second file structure data includes: a second segment content set extracted from the second static image file at a second time node, the second segment content set is a segment content set of information segments included between the first mark code and the second mark code of the second static image file, and the second time node is later than the first time node;

[0023] A second summary generation module is configured to generate second summary information based on the second content set and the target obfuscated character string using the target summary algorithm; and

[0024] A third summary acquisition module is configured to acquire third summary information from the information segment corresponding to the third mark code of the second static image file; wherein the third summary information includes: the first summary information, or forged summary information used to impersonate the first summary information;

[0025] The image anti-counterfeiting verification module is configured to generate an anti-counterfeiting verification result for the target image based on the third summary information and the second summary information.

[0026] In a fifth aspect, an embodiment of the present application provides an image processing device, the device comprising:

[0027] A processor; and a memory arranged to store computer executable instructions, the executable instructions being configured to be executed by the processor, the executable instructions comprising instructions for executing the steps in the method as described in the first aspect or the second aspect.

[0028] In a sixth aspect, an embodiment of the present application provides a storage medium, wherein the storage medium is used to store computer-executable instructions, and the executable instructions enable a computer to execute the steps in the method described in the first aspect or the second aspect.

[0029] It can be seen that in the embodiment of the present application, the process of anti-counterfeiting processing for the target image first obtains the first file structure data of the target image, and then uses the target summary algorithm to generate the first summary information based on the first content set and the target obfuscated character string in the first file structure data; then, based on the first summary information, the specified byte content in the information segment corresponding to the third mark code of the first static picture file is updated to obtain the target image after anti-counterfeiting processing; it is precisely because the first summary information is obtained directly with the help of the first content set of the target image as an anti-counterfeiting mark, and the anti-counterfeiting mark is stored in the specified information segment of the image file structure data of the target image, so that before using the target image for business processing, the target image can be first verified for anti-counterfeiting, that is, combined with the generation process of the first summary information, the same processing process is used to generate the second summary information for the target image to be used, so that as long as any information of the image is tampered with, This causes the image file structure data to change, thereby causing the second summary information to change as well. By comparing the first summary information with the second summary information, it is possible to identify whether the target image has been tampered with, thereby achieving the effect of image anti-counterfeiting; and when performing anti-counterfeiting processing on the target image, a target obfuscation string is introduced. Correspondingly, the second summary information generated during anti-counterfeiting verification is also related to the target obfuscation string. In this way, if an attacker tampers with the target image by image replacement, since the target obfuscation string cannot be known, the third summary information stored by the attacker in the image file structure data of the replaced forged image (that is, the forged summary information used by the attacker to impersonate the first summary information) is irrelevant to the target obfuscation string, resulting in the second summary information being inconsistent with the third summary information used to impersonate the first summary information, thereby achieving rapid identification of whether the target image has been tampered with, and further achieving the purpose of responding to various attack methods. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, 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.

[0031] Figure 1 A first flow chart of the image processing method provided in the embodiment of the present application;

[0032] Figure 2 A second flow chart of the image processing method provided in the embodiment of the present application;

[0033] Figure 3 A third flow chart of the image processing method provided in the embodiment of the present application;

[0034] Figure 4 A fourth flow chart of the image processing method provided in the embodiment of the present application;

[0035] Figure 5a A schematic diagram of a specific implementation principle of image anti-counterfeiting processing in the image processing method provided in an embodiment of the present application;

[0036] Figure 5b A schematic diagram of a specific implementation principle for image anti-counterfeiting verification in the image processing method provided in an embodiment of the present application;

[0037] Figure 6 A fifth flow chart of the image processing method provided in the embodiment of the present application;

[0038] Figure 7 A schematic diagram of the first module composition of the image processing device provided in an embodiment of the present application;

[0039] Figure 8 A schematic diagram of the first module composition of the image processing device provided in an embodiment of the present application;

[0040] Fig. 9 A schematic diagram of the structure of an image processing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0041] In order to enable those skilled in the art to better understand the technical solutions in one or more of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only one or more partial embodiments of the present application, rather than all embodiments. Based on one or more embodiments of the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0042] It should be noted that, in the absence of conflict, one or more embodiments and features in the embodiments of the present application may be combined with each other. The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0043] The embodiment of the present application provides an image processing method and device. The main inventive concept of the present application is: considering that if anti-counterfeiting processing methods such as adding watermarks or anti-counterfeiting marks are used, it is easy for attackers to imitate, so as to achieve the purpose of making the fake look real. Based on this, the technical solution directly uses the first content set of the target image to obtain the first summary information as the anti-counterfeiting mark. Before using the target image for business processing, the target image is firstly verified for anti-counterfeiting, that is, combined with the generation process of the first summary information, the same processing process is used to generate the second summary information for the target image to be used. In this way, as long as any information of the image is tampered with, the image file structure data will change, thereby causing the second summary information to change. By comparing the first summary information with the second summary information, it can be identified whether the target image has been tampered with, thereby achieving a better image anti-counterfeiting effect; considering that if the image anti-counterfeiting information obtained based on the first file structure data The information is not unique (i.e., the anti-counterfeiting mark used for information comparison in the image anti-counterfeiting verification process to verify whether the image has been tampered with). In other words, if the image anti-counterfeiting information obtained based on different file structure data has a certain probability of repetition, it is very likely that the image has been tampered with but the information comparison result is consistent, resulting in the anti-counterfeiting verification passing, thereby reducing the accuracy and credibility of the image anti-counterfeiting verification result. Based on this, the technical solution uses a target digest algorithm to obtain the first digest information based on the first file structure data. Since the digest information obtained by the target digest algorithm is unique and irreversible, it can ensure the uniqueness and irreversibility of the first digest information, thereby ensuring that the digest information obtained based on different file structure data must be different; and since the digest algorithm belongs to an algorithm family, which includes a series of different digest algorithms, the target digest algorithm currently used can be dynamically changed, further improving the image anti-counterfeiting effect;It is also considered that the attacker may not only use the attack method of directly modifying the target image, but may also use the attack method of image replacement. If the attacker directly replaces the target image with a forged image, and the third summary information added to the forged image (that is, the forged summary information used by the attacker to impersonate the first summary information) is obtained based on the image file structure data of the forged image, so that the second file structure data obtained during the anti-counterfeiting verification is consistent with the first file structure data used when generating the third summary information, if the attacker also obtains a pre-agreed preset summary algorithm, so that the second summary information generated during the anti-counterfeiting verification is consistent with the third summary information stored in the forged image by the attacker The information is kept consistent, which will inevitably lead to the situation where the anti-counterfeiting verification result passes. Based on this, the technical solution also introduces a target obfuscation string when performing anti-counterfeiting processing on the target image. Correspondingly, the second summary information generated during anti-counterfeiting verification is also related to the target obfuscation string. In this way, if the attacker tampers with the target image by image replacement, since the target obfuscation string cannot be known, the third summary information in the information segment corresponding to the third mark code of the replaced forged image has nothing to do with the target obfuscation string, resulting in inconsistency between the second summary information and the third summary information, thereby realizing rapid identification of whether the target image has been tampered with, and then achieving the purpose of coping with various attack methods. ;

[0044] Figure 1 A first flow chart of the image processing method provided in the application embodiment is as follows: Figure 1 As shown, the method comprises at least the following steps:

[0045] S102, obtaining first file structure data of a target image; wherein the target image is a first static image file, and the first file structure data includes: a first content set extracted from the first static image file at a first time node, the first content set being a content set of information segments included between a first marker code and a second marker code of the first static image file;

[0046] Among them, the format of the target image can be jpeg format, and correspondingly, the file structure of the target image contains the marker codes including: SOI, APP0, APPn, DQT, SOF0, DHT, SOS, EOI, wherein the first static picture file includes multiple information segments, each information segment has a corresponding marker code, for example, SOI (image file start segment), APP0 (image identification information segment), APPn (that is, application reserved marker code n, the corresponding information segment is the image information segment defining the interactive format, that is, the information segment used to store image metadata), DQT (define quantization table segment), SOF0 (frame image start segment), DHT (define Huffman table segment), DRI (define differential coding cumulative reset interval segment), SOS (image scan start segment), EOI (image file end segment).

[0047] The segment content of the information segment included between the frame image start marker code SOF0 and the image file end marker code EOI of the first static picture file includes image compression data, and the information segment corresponding to the application reserved marker code APPn includes an Exif information object; the first marker code may be any one of SOI, APP0, APPn, DQT, SOF0, DHT, and SOS, and the second marker code may be any one of DHT, SOS, and EOI, but in order to ensure that after any information of the image is tampered with, the first file structure data will be changed, and it is necessary to ensure that the first segment content set includes image compression data;

[0048] Among them, the above-mentioned first time node may be a time node corresponding to the image anti-counterfeiting processing, and correspondingly, the time node corresponding to the image anti-counterfeiting verification is called a second time node, and the second time node is later than the first time node.

[0049] S104, using a target summary algorithm, based on the first content set and the target obfuscated character string, generating first summary information;

[0050] Among them, the target digest algorithm is used to generate the first digest information during image anti-counterfeiting processing, and correspondingly, the target digest algorithm is also used to generate the second digest information during image anti-counterfeiting verification; the above-mentioned target digest algorithm can be a preset digest algorithm, such as the MD5 digest algorithm, that is, the target digest algorithm used in the image anti-counterfeiting processing is fixed, and correspondingly, the target digest algorithm used in the image anti-counterfeiting verification is also fixed; in the specific implementation, the above-mentioned target digest algorithm can also be a digest algorithm selected from multiple digest algorithms, that is, the target digest algorithm used in the image anti-counterfeiting processing is dynamically changing, and correspondingly, the target digest algorithm used in the image anti-counterfeiting verification is also dynamically changing, which can further improve the image anti-counterfeiting effect.

[0051] Among them, a target obfuscation string is also introduced during image anti-counterfeiting processing, and correspondingly, a second summary information is also generated based on the target obfuscation string during image anti-counterfeiting verification; the above-mentioned target obfuscation string can be a preset obfuscation string, such as a pre-generated random string, that is, the target obfuscation string used in image anti-counterfeiting processing is fixed, and correspondingly, the target obfuscation string used in image anti-counterfeiting verification is also fixed; in specific implementation, the above-mentioned target obfuscation string can also be a candidate obfuscation string selected from multiple candidate obfuscation strings, that is, the target obfuscation string used in image anti-counterfeiting processing is dynamically changing, and correspondingly, the target obfuscation string used in image anti-counterfeiting verification is also dynamically changing, which can further improve the image anti-counterfeiting effect.

[0052] Specifically, after obtaining the first content set of the target image, first determine the target digest algorithm and the target obfuscated string, then combine the first content set and the target obfuscated string according to a preset character combination method to obtain a combined string, and then use the target digest algorithm to obtain the first digest information of the combined string. For example, if the target digest algorithm is an MD5 digest algorithm, then solve the first MD5 value of the combined string; wherein the preset character combination method can be a combination method in which the last character of multiple content characters in the first content set is connected and combined with the first character of the target obfuscated string, that is, the first content set is in front and the target obfuscated string is in the back, or a combination method in which the last character of the target obfuscated string is connected and combined with the first character of multiple content characters in the first content set, that is, the target obfuscated string is in front and the first content set is in the back, or the target obfuscated string can be inserted between any two characters of the multiple content characters in the first content set. The specific implementation method can be set according to actual needs. Correspondingly, the same character combination method can be used in image anti-counterfeiting verification, which is not limited here.

[0053] S106: Based on the first summary information, update the designated byte content in the information segment corresponding to the third mark code of the first static image file to obtain a target image after anti-counterfeiting processing.

[0054] Specifically, after the first summary information is generated for the target image during the image anti-counterfeiting processing process, considering that the summary information added in the image anti-counterfeiting processing stage needs to be obtained in the subsequent image anti-counterfeiting verification process, and the same summary generation method is used to generate second summary information for the currently acquired target image, so as to identify whether the currently acquired target image has been tampered with by comparing the summary information extracted from the image to be verified for anti-counterfeiting with the second summary information. Only when it is confirmed that the currently acquired target image has not been tampered with, subsequent business processing is performed based on the currently acquired target image, for example, identity authentication of the target user based on the currently acquired target image. Therefore, only when it is determined that the currently acquired target image has not been tampered with, it is shown that the currently acquired target image is safe, and the identity authentication result obtained based on the target image is credible.

[0055] In the embodiment of the present application, since the first summary information is directly obtained by using the first content set of the target image as an anti-counterfeiting mark, and the anti-counterfeiting mark is stored in the specified information segment of the image file structure data of the target image, before using the target image for business processing, the target image can be firstly verified for anti-counterfeiting, that is, in combination with the generation process of the first summary information, the second summary information is generated for the target image to be used by the same processing process. In this way, as long as any information of the image is tampered with, the image file structure data will be changed, thereby causing the second summary information to change. Then, by comparing the first summary information with the second summary information, it can be identified whether the target image has been tampered with, thereby achieving image anti-counterfeiting. The target obfuscation string is introduced when anti-counterfeiting processing is performed on the target image. Correspondingly, the second summary information generated during anti-counterfeiting verification is also related to the target obfuscation string. In this way, if the attacker tampers with the target image by image replacement, since the target obfuscation string cannot be known, the third summary information stored in the image file structure data of the replaced forged image by the attacker (that is, the forged summary information used by the attacker to impersonate the first summary information) is unrelated to the target obfuscation string, resulting in the second summary information being inconsistent with the third summary information used to impersonate the first summary information, thereby realizing rapid identification of whether the target image has been tampered with, and further achieving the purpose of responding to various attack methods.

[0056] Furthermore, in order to ensure that the first content set contains as much valid content as possible that can reflect whether the image has been tampered with, and at the same time accurately locate the starting byte position and the ending byte position of the first content set, the frame image start marker code and the image file end marker code in the file structure data of the first static image file can be used. Based on this, the first marker code is the frame image start marker code, and the second marker code is the image file end marker code;

[0057] Correspondingly, such as Figure 2 As shown, the above S102, obtaining the first file structure data of the target image, specifically includes:

[0058] S1022, determining a first index position corresponding to a frame image start mark code of a first static picture file; and

[0059] S1024, determining the total byte length of the first static image file, wherein the total byte length is the total number of bytes included between the image file start marker code and the image file end marker code of the first static image file, that is, the total length of all bytes included in the first static image file;

[0060] S1026, acquiring a first content set of the target image at a first time node according to the first index position and the total byte length; and then determining the first content set as first file structure data of the target image.

[0061] Specifically, for the process of obtaining the first content set, that is, extracting the byte content contained between SOF0 and EOI from the first static picture file, byte content extraction scheme 1 can be used to extract the first file structure data from the first static picture file based on the first index position and the total byte length; or byte content extraction scheme 2 can be used to extract the first content set from the first static picture file based on the first index position and the second index position, that is, extracting the byte content under all bytes contained in the frame image start marker code to the image file end marker code from the first static picture file, thereby obtaining the first file structure data.

[0062] In specific implementation, whether it is the above-mentioned scheme 1 or the above-mentioned scheme 2, it is necessary to determine the starting position of the starting byte of the first file structure data to be extracted in the first static picture file (that is, the first index position), and determine the target byte length contained in the extracted first file structure data (that is, the byte length contained between the frame image start marker code SOF0 and the image file end marker code EOI in the first static picture file);

[0063] Specifically, for the above-mentioned scheme 1, the above-mentioned target byte length can be obtained based on the total byte length and the first index position corresponding to SOF0. If the first index position is used to represent the byte length contained between the frame image start marker code SOF0 and the image file start marker code SOI in the first static picture file, then the above-mentioned target byte length can be the difference between the total byte length and the identifier corresponding to the first index position corresponding to SOF0; wherein, since the first static picture file is taken as a whole, its total byte length from the image file start marker code SOI to the image file end marker code EOI is known and easy to obtain, therefore, as long as the image file start marker code SOI is traversed in the first static picture file to the frame image start marker code SOF0, the first index position can be determined, and then the target byte length can be determined based on the total byte length and the first index position. In this process, it is only necessary to traverse from the SOI of the first static picture file to the position of SOF0 to determine the first index position, and there is no need to traverse from SOF0 of the first static picture file to EOI one by one, which can improve the efficiency of obtaining the first file structure data.

[0064] Specifically, for the above-mentioned scheme 2, the above-mentioned target byte length can be obtained based on the second index position corresponding to EOI and the first index position corresponding to SOF0. If the first index position is used to represent the byte length contained between the image file start marker code SOI and the frame image start marker code SOF0 in the first static picture file, and the second index position is used to represent the byte length contained between the image file start marker code SOI and the image file end marker code EOI in the first static picture file, then the above-mentioned target byte length can be the difference between the identifier corresponding to the second index position and the identifier corresponding to the first index position; wherein, since the first index position can be determined by traversing from the image file start marker code SOI to the frame image start marker code SOF0 in the first static picture file, and the second index position can be determined by traversing from the frame image start marker code SOF0 to the image file end marker code EOI in the first static picture file, in this process, it is not only necessary to traverse from the SOI of the first static picture file to the position of SOF0 to determine the first index position, but also it is necessary to traverse from SOF0 of the first static picture file to EOI one by one to determine the second index position.

[0065] Furthermore, considering that some information segments in the image file structure data are not editable and cannot be changed, in order to ensure that the storage location of the first summary information does not affect the display effect of the target image, and to ensure that the information segment storing the first summary information does not belong to the information segment included between the first mark code and the second mark code, since the information segment corresponding to the image mark code APPn includes an Exif information object, and the Exif information object reserves an editable module, based on this, the third mark code is the application reserved mark code n (i.e., the image mark code APPn);

[0066] Correspondingly, the above S106, based on the above first summary information, updates the specified byte content in the information segment corresponding to the third mark code of the first static image file to obtain the target image after anti-counterfeiting processing, specifically includes:

[0067] Step 1: Based on the first summary information, assign a value to the Exif information object in the information segment corresponding to the application reserved mark code n of the first static image file;

[0068] Step 2: Generate a target image after anti-counterfeiting processing based on the assigned first static image file.

[0069] Specifically, after generating the first summary information, the first summary information is assigned to the Exif information object in the information segment corresponding to the image mark code APPn, and ImageDescription is used as the key value, so as to obtain the target image after anti-counterfeiting processing; correspondingly, in the process of image anti-counterfeiting verification, the Exif information object in the information segment corresponding to the image mark code APPn of the target image is obtained, and according to the ImageDescription key value, the value corresponding to the Exif information object (i.e., the first summary information) is obtained.

[0070] Furthermore, in combination with specific application scenarios of business processing based on target images, for application scenarios that require the collection of video data, it can be an application scenario of identity authentication based on part of the video frame images in the video data, or it can be an application scenario of other business processing based on part of the video frame images in the video data. For example, a specific business scenario of identity authentication by collecting video data for a target photographed object, such as Figure 3 As shown, before obtaining the first file structure data of the target image in S102, the method further includes:

[0071] S108, after detecting the user's identity authentication triggering operation, collecting video data of the target shooting object; wherein the target shooting object includes: any one of: a target face, a target ID, and a target bank card;

[0072] S110, determining a target image including a target photographed object among a plurality of video frames in the video data.

[0073] Specifically, in the process of a user requesting identity authentication, the user may choose different identity authentication methods. Correspondingly, the target shooting object when collecting video data is also different. For example, if the user chooses the identity authentication method of face recognition, the target shooting object is the face of the target user. For another example, if the user chooses the identity authentication method of document authentication, the target shooting object is the target user's valid document, such as an ID card, etc. For another example, the user can also choose to use a bank card for identity authentication. In addition, in the specific implementation, the target shooting object required by the business may also be different according to different business needs.

[0074] Then, after the video data for identity authentication is collected for the target object by using the shooting device of the client, other local business processing modules may need to perform identity authentication based on the video data, and the background server may also need to perform identity authentication based on the video data. In this way, before the business processing is performed based on the target image, that is, during the transmission process of the target image, there may be a risk of tampering. Therefore, it is necessary to first perform image anti-counterfeiting processing on the video data. Specifically, at least one video frame can be selected from the video data as the target image for image anti-counterfeiting processing, so that other local business processing modules or the background server (that is, the image anti-counterfeiting verification party, that is, the business processing party) can first perform anti-counterfeiting verification on the target image based on the acquired image to be verified before performing identity authentication based on the video data, that is, verify whether the image to be verified is a forged image used to attack the target image. The forged image is an image after the attacker tampered with the target image (such as an image after some image elements in the target image are modified, or an image after the target image is replaced). Only when it is determined that the target image has not been tampered with (that is, the image to be verified is the target image after anti-counterfeiting processing), the subsequent identity authentication processing flow is triggered.

[0075] In a specific implementation, the process of selecting at least one video frame in the video data as the target image may be to randomly select at least one video frame in the video data as the target image, and correspondingly, the target image after anti-counterfeiting processing needs to be sent separately to the image anti-counterfeiting verification party so that the image anti-counterfeiting verification party can directly perform anti-counterfeiting verification on the target image after anti-counterfeiting processing; or at least one video frame may be selected as the target image in the video data based on preset selection reference factors (for example, business-related data). Based on this, in order to further increase the difficulty of image tampering for attackers, the target image after anti-counterfeiting processing may not be sent separately to the image anti-counterfeiting verification party, but may be sent to the image anti-counterfeiting verification party in the form of video data containing the target image after anti-counterfeiting processing. The image anti-counterfeiting verification party also extracts the target image after anti-counterfeiting processing from the video data based on preset selection reference factors (for example, business-related data), and can perform anti-counterfeiting verification on the target image after anti-counterfeiting processing.

[0076] Further, for the process of generating the first summary information, the selected target summary algorithm may be fixed or dynamically changed. Similarly, the target obfuscated string may be fixed or dynamically changed. For the case where both the target summary algorithm and the target obfuscated string are preset and fixed, before generating the first summary information based on the first content set and the target obfuscated string using the target summary algorithm in S104, the following is further included:

[0077] Determine the preset MD5 algorithm as the target digest algorithm; and,

[0078] The preset obfuscated character string is determined as the target obfuscated character string.

[0079] Specifically, for the generation process of the first summary information, the MD5 algorithm is used to generate the first summary information based on the above-mentioned first content set and the preset obfuscated character string, that is, the first content set and the preset obfuscated character string are combined according to a preset character combination method to obtain a first combined character string, and then the MD5 algorithm is used to obtain a first MD5 value of the first combined character string.

[0080] Among them, since the process of image anti-counterfeiting verification should be consistent with the process of image anti-counterfeiting processing, correspondingly, for the process of image anti-counterfeiting verification, after obtaining the second file structure data of the image to be verified, the MD5 algorithm is used to generate second summary information based on the second content set and the preset obfuscated character string in the second file structure data, that is, the second content set and the preset obfuscated character string are combined according to a preset character combination method to obtain a second combined character string, and then the MD5 algorithm is used to obtain a second MD5 value of the second combined character string.

[0081] Further, the process of determining the target image may be to randomly select at least one video frame in the video data as the target image, or to select at least one video frame in the video data as the target image based on a preset selection reference factor. Taking the random selection of the target image as an example, the above S110, determining the target image including the target photographed object from the multiple video frames in the above video data, specifically includes:

[0082] Extracting at least one target video frame including a target photographed object from a plurality of video frames in the video data;

[0083] The target video frame is determined as a target image containing a target photographed object; wherein the image to be verified for security purposes corresponding to the target image does not belong to the video data, that is, the target image after security processing needs to be sent separately to the image security verification party, that is, the identity verification request sent by the image security processing party to the image security verification party carries the target image after security processing, so that the image security verification party can directly perform security verification on the acquired image to be verified for security purposes, wherein the image to be verified for security purposes may include the target image after image security processing, or a forged image used to attack the target image; in specific implementation, according to the actual situation According to business needs, the collected video data and the target image after anti-counterfeiting processing can be sent to the image anti-counterfeiting verification party at the same time, that is, the identity authentication request sent by the image anti-counterfeiting processing party to the image anti-counterfeiting verification party carries the image to be verified and the above-mentioned video data. However, considering that the target image after anti-counterfeiting processing may be tampered with before business processing is performed based on the target image, the received image to be verified can include the target image after image anti-counterfeiting processing, or a forged image used to attack the target image, and anti-counterfeiting verification can be performed on the image to be verified, and then it is determined whether the target image after anti-counterfeiting processing has been tampered with.

[0084] Further, for the process of generating the first summary information, the selected target summary algorithm may be fixed or dynamically changed. Similarly, the used target obfuscated character string may be fixed or dynamically changed. For the case where at least one of the target summary algorithm and the target obfuscated character string is dynamically changed, in the above S108, after detecting the user's identity authentication trigger operation, after collecting the video data of the target shooting object, and before generating the first summary information based on the above first content set and the target obfuscated character string using the target summary algorithm, the following is further included:

[0085] Determine the business-related data generated in response to the above-mentioned identity authentication triggering operation; wherein the business-related data includes: at least one of: identity authentication method, account security level, and shooting object type;

[0086] Based on the business-related data and the first corresponding relationship, a target digest algorithm and / or a target obfuscated character string is determined.

[0087] Among them, the above-mentioned identity authentication method can be a plurality of candidate authentication method options for users to select, for example, an identity authentication method of face recognition, and another example, an identity authentication method of certificate authentication. The above-mentioned account security level can be a security level determined based on the user's historical behavior data. The above-mentioned shooting object type can include: any one of: target face, target certificate, and target bank card; the above-mentioned first correspondence can include a correspondence between business-related data and a target summary algorithm, and / or a correspondence between business-related data and a target obfuscation string. For example, taking the business-related data as the shooting object type as an example, if the shooting object type is the target face, the target obfuscation string is determined to be obfuscation string 1, if the shooting object type is the target certificate, the target obfuscation string is determined to be obfuscation string 2, and if the shooting object type is the target bank card, the target obfuscation string is determined to be obfuscation string 3; further, in the specific implementation, the target face type, the target certificate type, and the bank to which the target bank card belongs can also be subdivided. For example, the target obfuscation string selected for a male or female target user is different, and so on.

[0088] Specifically, after determining the target digest algorithm and / or target obfuscated string corresponding to the business-related data, for the generation process of the first digest information, the target digest algorithm is used to generate the first digest information based on the above-mentioned first content set and the target obfuscated string, that is, the first content set and the preset obfuscated string are combined according to a preset character combination method to obtain a first combined string, and then the target digest algorithm is used to obtain the first digest information of the first combined string.

[0089] Among them, since the process of image anti-counterfeiting verification should be consistent with the process of image anti-counterfeiting processing, correspondingly, for the process of image anti-counterfeiting verification, after obtaining the second file structure data of the image to be verified, first determine the business-related data corresponding to this identity authentication request; wherein the business-related data includes: at least one of the identity authentication method, the account security level, and the type of the photographed object, and the type of the business-related data referenced by the image anti-counterfeiting verification is the same as the type of the business-related data referenced by the image anti-counterfeiting processing. For example, if the business-related data referenced by the image anti-counterfeiting processing is the photographed object type, then the business-related data referenced by the image anti-counterfeiting verification is the photographed object type; then based on the above-mentioned business-related data and the first corresponding relationship, determine the target digest algorithm and / or the target obfuscation string, that is, the target digest algorithm and / or the target obfuscation string are determined based on the business-related data; then, using the target digest algorithm, based on the second content set and the target obfuscation string in the second file structure data, generate the second digest information, that is, according to the preset character combination method, combine the second content set and the preset obfuscation string to obtain the second combined string, and then use the target digest algorithm to obtain the second digest information of the second combined string.

[0090] In the embodiments provided in the present application, in the process of determining the target digest algorithm and / or the target obfuscation string, reference is made to business-related data related to the business processing process. Since the business-related data belongs to internal business processing data, only the image anti-counterfeiting processing party and the image anti-counterfeiting verification party can obtain it, and the attacker cannot obtain the business-related data. Therefore, even if the first corresponding relationship is obtained, the target digest algorithm and / or the target obfuscation string cannot be determined. This can greatly improve the effect of image anti-counterfeiting.

[0091] Further, the process of determining the target image may be to randomly select at least one video frame in the video data as the target image, or to select at least one video frame in the video data as the target image based on a preset selection reference factor. Taking the selection of the target image based on the preset selection reference factor as an example, the above S110, determining the target image including the target photographed object from the multiple video frames in the above video data, specifically includes:

[0092] Extracting at least one target video frame including a target photographed object from a plurality of video frames in the video data based on the business-related data and the second corresponding relationship;

[0093] The above-mentioned target video frame is determined as the target image; wherein, the image to be verified for security purposes corresponding to the target image belongs to the above-mentioned video data, and the position of the target image in the video data is the same as the position before the anti-counterfeiting processing, that is, in order to further increase the difficulty of image tampering by the attacker, the target image after the anti-counterfeiting processing may not be sent separately to the image anti-counterfeiting verification party, but may be sent to the image anti-counterfeiting verification party in the form of video data containing the target image after the anti-counterfeiting processing, that is, the video data carried in the identity authentication request sent by the image anti-counterfeiting processing party to the image anti-counterfeiting verification party includes the target image after the anti-counterfeiting processing; then, the image anti-counterfeiting verification party also extracts the image to be verified for security purposes from the video data based on the preset selection reference factors (for example, business-related data, that is, the business-related data used when determining the target summary algorithm and / or the target obfuscation string), but considering that the target image after the anti-counterfeiting processing may be tampered with before the business processing is performed based on the target image, the extracted image to be verified for security purposes may include the target image after the image anti-counterfeiting processing, or a forged image used to attack the target image), and then the image to be verified for security purposes may be verified for security purposes, and then it is determined whether the target image after the anti-counterfeiting processing has been tampered with.

[0094] Among them, the above-mentioned second corresponding relationship may include a corresponding relationship between business-related data and the position of the video frame. For example, taking the business-related data as the type of the photographed object as an example, if the type of the photographed object is a target face, the position of the target video frame is determined to be at least one video frame with a higher sorting, for example, the second video frame in the video data; if the type of the photographed object is a target certificate, the position of the target video frame is determined to be at least one video frame with a higher sorting, for example, a video frame in the middle position in the video data; if the type of the photographed object is a target bank card, the position of the target video frame is determined to be at least one video frame with a lower sorting, for example, the last video frame in the video data. 2 video frames; for example, in the case of selecting multiple target images, if the type of the photographed object is a target face, the position of the target video frame is determined to be the video frame with an even number; if the type of the photographed object is a target document, the position of the target video frame is determined to be the video frame with an odd number, and so on. The second corresponding relationship used in the process of determining the target image can be set according to actual needs and is not limited here. In the specific implementation, as long as the second corresponding relationship used in the image anti-counterfeiting processing is consistent with the second corresponding relationship used in the image anti-counterfeiting verification, the image anti-counterfeiting verification party can accurately extract the image to be verified from the video data.

[0095] Specifically, since the image to be verified for security purposes is located in the video data, the image security verification party also needs to extract the image to be verified for security purposes from the video data based on a preset selection reference factor (for example, business-related data) and a second corresponding relationship, and then perform security verification on the image to be verified for security purposes. That is, after obtaining the video data, the image to be verified for security purposes is extracted from multiple video frames in the video data based on the above-mentioned business-related data and the second corresponding relationship; and then the third summary information is obtained from the information segment corresponding to the third mark code of the image to be verified for security purposes.

[0096] Furthermore, considering that other local business processing modules may be required to perform business processing based on the target image, or the background server may be required to perform business processing based on the target image, the process of image anti-counterfeiting verification may be performed by other business processing modules in the client, or by the background server connected to the client for communication. For the case where other business processing modules in the client perform anti-counterfeiting verification on the anti-counterfeiting verification image, based on this, Figure 4 As shown, in the above S106, based on the above first summary information, the specified byte content in the information segment corresponding to the third mark code of the first static image file is updated to obtain the target image after anti-counterfeiting processing, and further includes:

[0097] S112, obtaining an image to be verified for security purposes; the image to be verified for security purposes includes: a target image after security processing, or a forged image used to attack the target image, and the image to be verified for security purposes is a second static image file;

[0098] Specifically, if the image to be verified for anti-counterfeiting is the target image after anti-counterfeiting processing, it means that the target image has not been tampered with; if the image to be verified for anti-counterfeiting is a forged image used to attack the target image, it means that the target image has been tampered with. Specifically, the attacker may modify some image elements in the target image after anti-counterfeiting processing, or replace the target image after anti-counterfeiting processing with a forged image.

[0099] S114, obtaining second file structure data of the image to be verified for anti-counterfeiting; wherein the second file structure data includes: a second segment content set extracted from the second static image file at a second time node, the second segment content set being a segment content set of information segments included between the first mark code and the second mark code of the second static image file, and the second time node is later than the first time node;

[0100] S116, using the target digest algorithm, based on the second content set and the target obfuscated character string, generating second digest information; and,

[0101] S118, acquiring third summary information from the information segment corresponding to the third mark code of the second static image file; wherein the third summary information may include: the first summary information, or forged summary information used to impersonate the first summary information;

[0102] Specifically, if the third marker code is the application reserved marker code n (i.e., APPn), and the first summary information is stored in the Exif information object in the information segment corresponding to the marker code APPn, then the third summary information is obtained from the Exif information object, that is, the Exif information object in the information segment corresponding to the marker code APPn of the first static image file is obtained, and according to the ImageDescription key value, the value corresponding to the Exif information object (i.e., the third summary information) is obtained.

[0103] S120: Generate an anti-counterfeiting verification result for the target image based on the third summary information and the second summary information.

[0104] Among them, the process of obtaining the second file structure data corresponds to the process of obtaining the first file structure data mentioned above. Therefore, the process of obtaining the second file structure data can refer to the specific description of the above step S102, which will not be repeated here; and the process of generating the second summary information corresponds to the process of generating the first summary information in the above image anti-counterfeiting processing process. Therefore, the process of generating the second summary information can refer to the specific description of the above step S104, which will not be repeated here.

[0105] In addition, if in the process of image anti-counterfeiting processing, the target image is selected based on a preset reference factor, and at least one video frame is selected in the video data. Then, in the process of image anti-counterfeiting verification, it is necessary to first extract the image to be verified in the video data based on the preset reference factor (for example, business-related data) and the second corresponding relationship, and then perform anti-counterfeiting verification on the image to be verified. That is, after obtaining the video data, the image to be verified is extracted from multiple video frames in the video data based on the above-mentioned business-related data and the second corresponding relationship; then execute the above-mentioned step S114; and, if at least one of the target summary algorithm and the target obfuscation string is determined based on business-related data related to the business processing process, then in the process of image anti-counterfeiting verification, it is necessary to first determine at least one of the target summary algorithm and the target obfuscation string based on the business-related data; then execute the above-mentioned step S116.

[0106] Specifically, for the process of performing anti-counterfeiting verification on the target image based on the third summary information and the second summary information, the above S120 generates an anti-counterfeiting verification result for the target image based on the third summary information and the second summary information, specifically including:

[0107] If the similarity between the third summary information and the second summary information is greater than or equal to a preset threshold, then determining that the anti-counterfeiting verification result of the target image is passed;

[0108] If the similarity between the third summary information and the second summary information is less than a preset threshold, it is determined that the anti-counterfeiting verification result of the target image is failed.

[0109] Specifically, after obtaining the second summary information corresponding to the anti-counterfeiting verification stage and the third summary information corresponding to the anti-counterfeiting processing stage, the third summary information is compared with the first summary information for similarity. In specific implementation, the preset threshold value may be 100% or less than 100%. Taking the preset threshold value of 100% as an example, only when the third summary information and the second summary information are exactly the same, it is determined that the target image has not been tampered with; wherein, if the third summary information is the same as the second summary information, it can be determined that the target image has not been tampered with, that is, it indicates that the second file structure data has not changed, and the target summary algorithms corresponding to the anti-counterfeiting processing and the anti-counterfeiting verification are the same, and the target obfuscated character strings corresponding to the anti-counterfeiting processing and the anti-counterfeiting verification are the same, therefore, the third summary information is the first summary information, that is, the first summary information is the same as the second summary information; if the third summary information is different from the second summary information, it is determined that the target image has not been tampered with. The image is tampered with, wherein one possible tampering situation is that the image to be verified for security is a forged image in which some elements of the target image are modified, that is, an image modification attack method. Even if the third summary information is the above-mentioned first summary information, the file structure data has changed. Therefore, the third summary information is different from the second summary information. Another possible tampering situation is that the image to be verified for security is a forged image after image replacement, that is, an image replacement attack method. The third summary information is forged summary information used to impersonate the first summary information. Even if the third file structure data corresponding to the third summary information is the same as the second file structure data corresponding to the second summary information, the target digest algorithm corresponding to the third summary information is different from the target digest algorithm corresponding to the second summary information, and / or the target obfuscation string corresponding to the third summary information is different from the target obfuscation string corresponding to the second summary information, resulting in the third summary information being different from the second summary information.

[0110] That is to say, if the similarity between the third summary information and the second summary information is greater than or equal to the preset threshold, it means that the file structure data (i.e., the information segment content set), the target summary algorithm, and the target obfuscated character string used to generate the third summary information and the second summary information are the same, so that the two summary information finally compared can be ensured to be the same. Therefore, it is determined that the anti-counterfeiting verification result of the target image is passed, that is, the third summary information is the first summary information, and the image to be verified for anti-counterfeiting is the target image after anti-counterfeiting processing (i.e., the target image that has not been attacked);

[0111] If the similarity between the third summary information and the second summary information is less than a preset threshold, it means that at least one of the file structure data (i.e., the information segment content set), the target summary algorithm, and the target obfuscation string used to generate the third summary information and the second summary information has changed, and the image will be identified as tampered with. Therefore, the anti-counterfeiting verification result of the target image is determined to be failed, that is, the third summary information is the first summary information, or forged summary information used to impersonate the first summary information, and the image to be verified for security is a forged image used to attack the target image (a forged image in which some image elements are modified, or a forged image after image replacement); specifically, for the attack method in which some elements of the image are modified, the second file structure data in the image to be verified for security will be different from the first file structure data. Therefore, the second summary information obtained based on the second file structure data It will also be different from the first summary information obtained based on the first file structure data, and then the image will be identified as being attacked; and for the image replacement attack method, the attacker will replace the first summary information with forged summary information (that is, the attacker simulates the generation method of the first summary information, and generates the third summary information based on the file structure data of the forged image). At this time, the third summary information in the image to be verified is forged summary information that impersonates the first summary information corresponding to the first time node. Even if the second file structure data is the same as the first file structure data, as long as the attacker cannot accurately know any of the target digest algorithm and the target obfuscation string used to generate the first summary information, the attacker's simulation of the generation method of the first summary information is not completely correct. Therefore, the above-mentioned third summary information will not be the same as the second summary information. Therefore, it will still be identified that the image has been attacked.

[0112] Further, at S120, after generating the anti-counterfeiting verification result for the target image based on the third summary information and the second summary information, the method further includes:

[0113] If the anti-counterfeiting verification result is passed, then the corresponding business processing operation is performed based on the target image;

[0114] If the anti-counterfeiting verification result is failed, an abnormal prompt message indicating that the target image has been tampered with is generated.

[0115] Specifically, if the similarity between the first summary information and the second summary information is greater than or equal to a preset threshold, it means that the target image has not been tampered with, that is, the target image is safe. For example, the preset threshold is 100%. If the similarity between the first summary information and the second summary information is equal to the preset threshold, it means that the first summary information and the second summary information are the same. At this time, business processing can be performed based on the target image. Correspondingly, if the similarity between the first summary information and the second summary information is less than the preset threshold, it means that the target image may be tampered with, that is, the target image is unsafe. At this time, if identity authentication processing is performed based on the target image, the identity authentication result obtained is unreliable.

[0116] In a specific embodiment, Figure 5a As shown in the figure, the process of image anti-counterfeiting processing takes the specific business scenario of collecting video data of the target shooting object for identity authentication as an example, which specifically includes:

[0117] A1, after detecting the user's identity authentication trigger operation, collect video data of the target shooting object; wherein the target shooting object includes: any one of: a target face, a target ID, and a target bank card; specifically, Figure 5b In the example of the identity authentication method of face recognition, the target photographed object is the target face, and taking the selection of a target image as an example, in the specific implementation, multiple video frames can be selected as the target image;

[0118] A2, determining at least one target image containing a target photographed object among the plurality of video frames in the video data;

[0119] A3, obtaining the first file structure data of the target image; wherein the first file structure data may include: a first content set extracted from the first static image file at a first time node, the first content set being a content set of information segments included between the frame image start marker code SOF0 and the image file end marker code EOI of the first static image file;

[0120] A4, using a target summary algorithm, based on the first content set and the target obfuscated character string, generates first summary information;

[0121] A5, based on the first summary information, update the designated byte content in the information segment corresponding to the mark code APPn in the file structure data of the target image to obtain the target image after anti-counterfeiting processing.

[0122] Correspondingly, such as Figure 5b As shown in the figure, the process of image anti-counterfeiting verification specifically includes:

[0123] B1, obtain the image to be verified for security or video data containing the image to be verified for security, and obtain the third summary information from the information segment corresponding to the mark code APPn in the file structure data of the image to be verified for security; wherein, in the case where the target image has not been attacked, the image to be verified for security is the original target image after anti-counterfeiting processing, and the obtained third summary information is the first summary information corresponding to the first time node; the image to be verified for security may also be a forged image after some elements are modified by the attacker, and the obtained third summary information may still be the first summary information corresponding to the first time node; the image to be verified for security may also be a forged image after being replaced by the attacker, and the obtained third summary information may be forged summary information used to impersonate the first summary information corresponding to the first time node;

[0124] B2, obtaining the second file structure data of the image to be verified for anti-counterfeiting; wherein the second file structure data may include: a second content set extracted from the second static image file at a second time node, the second content set being a content set of the information segment included between the frame image start mark code SOF0 and the image file end mark code EOI of the second static image file, and the second time node is later than the first time node;

[0125] B3, using the target digest algorithm, based on the second content set and the target obfuscated character string, generating second digest information;

[0126] B4, generating an anti-counterfeiting verification result of the target image based on the third summary information and the second summary information;.

[0127] The image processing method in the embodiment of the present application, for the process of anti-counterfeiting processing of the target image, first obtains the first file structure data of the target image, and then uses the target summary algorithm to generate the first summary information based on the first content set and the target obfuscated character string in the first file structure data; then, based on the first summary information, updates the specified byte content in the information segment corresponding to the third mark code of the first static picture file to obtain the target image after anti-counterfeiting processing; since the first summary information is directly obtained with the help of the first content set of the target image as the anti-counterfeiting mark, and the anti-counterfeiting mark is stored in the specified information segment of the image file structure data of the target image, before using the target image for business processing, the target image can be first verified for anti-counterfeiting, that is, combined with the generation process of the first summary information, the same processing process is used to generate the second summary information for the target image to be used, so that as long as any information of the image is tampered with, the anti-counterfeiting mark will be generated. The image file structure data is changed, thereby causing the second summary information to change. By comparing the first summary information with the second summary information, it is possible to identify whether the target image has been tampered with, thereby achieving the effect of image anti-counterfeiting; and when the anti-counterfeiting processing is performed on the target image, the target obfuscation string is introduced. Correspondingly, the second summary information generated during the anti-counterfeiting verification is also related to the target obfuscation string. In this way, if the attacker tampers with the target image by image replacement, since the target obfuscation string cannot be known, the third summary information stored by the attacker in the image file structure data of the replaced forged image (that is, the forged summary information used by the attacker to impersonate the first summary information) is irrelevant to the target obfuscation string, resulting in the second summary information being inconsistent with the third summary information used to impersonate the first summary information, thereby achieving rapid identification of whether the target image has been tampered with, and then achieving the purpose of responding to various attack methods.

[0128] Corresponding to the above Figures 1 to 5b Based on the same technical concept, the present application also provides an image processing method. Figure 6 A schematic diagram of a process flow of an image processing method provided in an embodiment of the present application. Figure 6 The method in can be executed by the backend server to perform anti-counterfeiting verification on the image to be verified uploaded by the client, such as Figure 6 As shown, the method comprises at least the following steps:

[0129] S602, obtaining an image to be verified for security; wherein the image to be verified for security includes: Figure 5a The target image after anti-counterfeiting treatment shown in the figure, or used to attack the above Figure 5a The forged image of the target image in the image to be verified for anti-counterfeiting is a second static picture file;

[0130] S604, obtaining second file structure data of the image to be verified for anti-counterfeiting; wherein the second file structure data includes: a second segment content set extracted from the second static image file at a second time node, the second segment content set being a segment content set of information segments included between the first mark code and the second mark code of the second static image file, and the second time node is later than the first time node;

[0131] S606, using a target digest algorithm, based on the second content set and the target obfuscated string, generating second digest information, wherein the target digest algorithm is the target digest algorithm used when generating the target image after the anti-counterfeiting processing, and the target obfuscated string is the target obfuscated string used when generating the target image after the anti-counterfeiting processing; and

[0132] S608, obtaining third summary information from the information segment corresponding to the third mark code of the second static picture file; the third summary information includes: the first summary information, or forged summary information used to impersonate the first summary information;

[0133] S610: Generate an anti-counterfeiting verification result for a target image based on the third summary information and the second summary information.

[0134] Specifically, for the process of performing anti-counterfeiting verification on the target image based on the third summary information and the second summary information, the above S610 generates an anti-counterfeiting verification result for the target image based on the third summary information and the second summary information, specifically including:

[0135] If the similarity between the third summary information and the second summary information is greater than or equal to a preset threshold, then determining that the anti-counterfeiting verification result of the target image is passed;

[0136] If the similarity between the third summary information and the second summary information is less than a preset threshold, it is determined that the anti-counterfeiting verification result of the target image is failed.

[0137] Further, in the above S610, after generating the anti-counterfeiting verification result for the target image based on the above third summary information and the second summary information, the method further includes:

[0138] If the anti-counterfeiting verification result is passed, the corresponding business processing operation is performed based on the target image;

[0139] If the anti-counterfeiting verification result is failed, an abnormal prompt message indicating that the target image has been tampered with is generated.

[0140] The image processing method in the embodiment of the present application directly obtains the first summary information as an anti-counterfeiting mark by means of the first content set of the target image, and stores the anti-counterfeiting mark in the specified information segment of the image file structure data of the target image. Therefore, before using the target image for business processing, the target image can be firstly verified for anti-counterfeiting, that is, in combination with the generation process of the first summary information, the second summary information is generated for the target image to be used by the same processing process. In this way, as long as any information of the image is tampered with, the image file structure data will be changed, thereby causing the second summary information to change. Then, by comparing the first summary information with the second summary information, it can be identified whether the target image has been tampered with, thereby achieving The image anti-counterfeiting effect is achieved; and the target obfuscation string is introduced when the anti-counterfeiting processing is performed on the target image. Correspondingly, the second summary information generated during the anti-counterfeiting verification is also related to the target obfuscation string. In this way, if the attacker tamperes with the target image by image replacement, since the target obfuscation string cannot be known, the third summary information stored by the attacker in the image file structure data of the replaced forged image (that is, the forged summary information used by the attacker to impersonate the first summary information) is unrelated to the target obfuscation string, resulting in the second summary information being inconsistent with the third summary information used to impersonate the first summary information, thereby achieving rapid identification of whether the target image has been tampered with, and further achieving the purpose of responding to various attack methods.

[0141] It should be noted that this embodiment in the present application and the previous embodiment in the present application are based on the same inventive concept, so the specific implementation of this embodiment can refer to the implementation of the aforementioned image processing method, and the repeated parts will not be repeated.

[0142] Corresponding to the above Figures 1 to 5b Based on the same technical concept as the image processing method described above, the present application also provides an image processing device. Figure 7 A schematic diagram of the first module composition of the image processing device provided in the embodiment of the present application, the device is used to perform Figures 1 to 5b The image processing method described, such as Figure 7 As shown, the device comprises:

[0143] The first acquisition module 702 is configured to acquire first file structure data of a target image; wherein the target image is a first static image file, and the first file structure data includes: a first segment content set extracted from the first static image file at a first time node, the first segment content set being a segment content set of information segments included between a first marker code and a second marker code of the first static image file;

[0144] A first summary generating module 704 is configured to generate first summary information based on the first content set and a target obfuscated string by using a target summary algorithm;

[0145] The anti-counterfeiting image generating module 706 is configured to update the designated byte content in the information segment corresponding to the third marking code of the first static image file based on the first summary information to obtain the target image after anti-counterfeiting processing.

[0146] The image processing device in the embodiment of the present application, for the process of anti-counterfeiting processing of the target image, first obtains the first file structure data of the target image, and then uses the target summary algorithm to generate the first summary information based on the first content set and the target obfuscated character string in the first file structure data; then, based on the first summary information, updates the specified byte content in the information segment corresponding to the third mark code of the first static image file to obtain the target image after anti-counterfeiting processing; since the first summary information is directly obtained with the help of the first content set of the target image as the anti-counterfeiting mark, and the anti-counterfeiting mark is stored in the specified information segment of the image file structure data of the target image, before using the target image for business processing, the target image is first verified for anti-counterfeiting, that is, combined with the generation process of the first summary information, the same processing process is used to generate the second summary information for the target image to be used, so that as long as any information of the image is tampered with, it will lead to The image file structure data changes, which causes the second summary information to change as well. By comparing the first summary information with the second summary information, it is possible to identify whether the target image has been tampered with, thereby achieving the effect of image anti-counterfeiting; and when performing anti-counterfeiting processing on the target image, a target obfuscation string is introduced. Correspondingly, the second summary information generated during anti-counterfeiting verification is also related to the target obfuscation string. In this way, if an attacker tampers with the target image by image replacement, since the target obfuscation string cannot be known, the third summary information stored in the image file structure data of the replaced forged image by the attacker (that is, the forged summary information used by the attacker to impersonate the first summary information) is unrelated to the target obfuscation string, resulting in the second summary information being inconsistent with the third summary information used to impersonate the first summary information, thereby achieving rapid identification of whether the target image has been tampered with, and further achieving the purpose of responding to various attack methods.

[0147] It should be noted that the embodiment of the image processing device in the present application and the embodiment of the image processing method in the present application are based on the same inventive concept, so the specific implementation of this embodiment can refer to the implementation of the corresponding image processing method mentioned above, and the repeated parts will not be repeated.

[0148] Corresponding to the above Figure 6 Based on the same technical concept as the image processing method described above, the present application also provides an image processing device. Figure 8 A schematic diagram of the second module composition of the image processing device provided in the embodiment of the present application, the device is used to perform Figure 6 The image processing method described, such as Figure 8 As shown, the device comprises:

[0149] The anti-counterfeiting image acquisition module 802 is configured to acquire an image to be verified for anti-counterfeiting; wherein the image to be verified for anti-counterfeiting includes: Figure 1 The target image after anti-counterfeiting processing in the above Figure 1 A forged image of the target image in the image to be verified for anti-counterfeiting is a second static picture file;

[0150] The second acquisition module 804 is configured to acquire second file structure data of the image to be verified; wherein the second file structure data includes: a second segment content set extracted from the second static image file at a second time node, the second segment content set is a segment content set of information segments included between the first mark code and the second mark code of the second static image file, and the second time node is later than the first time node;

[0151] A second summary generating module 806 is configured to generate second summary information based on the second content set and the target obfuscated string using the target summary algorithm; and

[0152] The third summary acquisition module 808 is configured to acquire third summary information from the information segment corresponding to the third mark code of the second static image file; wherein the third summary information includes: the first summary information, or forged summary information used to impersonate the first summary information;

[0153] The image anti-counterfeiting verification module 810 is configured to generate an anti-counterfeiting verification result for the target image based on the third summary information and the second summary information.

[0154] The image processing device in the embodiment of the present application directly obtains the first summary information as an anti-counterfeiting mark by using the first content set of the target image, and stores the anti-counterfeiting mark in the specified information segment of the image file structure data of the target image. Therefore, before using the target image for business processing, the target image can be firstly verified for anti-counterfeiting, that is, in combination with the generation process of the first summary information, the second summary information is generated for the target image to be used by the same processing process. In this way, as long as any information of the image is tampered with, the image file structure data will be changed, thereby causing the second summary information to change. Then, by comparing the first summary information with the second summary information, it can be identified whether the target image has been tampered with, thereby achieving The image anti-counterfeiting effect is achieved; and the target obfuscation string is introduced when the anti-counterfeiting processing is performed on the target image. Correspondingly, the second summary information generated during the anti-counterfeiting verification is also related to the target obfuscation string. In this way, if the attacker tamperes with the target image by image replacement, since the target obfuscation string cannot be known, the third summary information stored by the attacker in the image file structure data of the replaced forged image (that is, the forged summary information used by the attacker to impersonate the first summary information) is unrelated to the target obfuscation string, resulting in the second summary information being inconsistent with the third summary information used to impersonate the first summary information, thereby achieving rapid identification of whether the target image has been tampered with, and further achieving the purpose of responding to various attack methods.

[0155] It should be noted that the embodiment of the image processing device in the present application and the embodiment of the image processing method in the present application are based on the same inventive concept, so the specific implementation of this embodiment can refer to the implementation of the corresponding image processing method mentioned above, and the repeated parts will not be repeated.

[0156] Furthermore, corresponding to the above Figures 1 to 6 Based on the same technical concept, the present application also provides an image processing device, which is used to execute the above-mentioned image processing method, such as Fig. 9 shown.

[0157] The image processing device may have relatively large differences due to different configurations or performances, and may include one or more processors 901 and memory 902, and the memory 902 may store one or more storage applications or data. Among them, the memory 902 may be a short-term storage or a persistent storage. The application stored in the memory 902 may include one or more modules (not shown in the figure), and each module may include a series of computer executable instructions in the image processing device. Furthermore, the processor 901 may be configured to communicate with the memory 902, and execute a series of computer executable instructions in the memory 902 on the image processing device. The image processing device may also include one or more power supplies 903, one or more wired or wireless network interfaces 904, one or more input and output interfaces 905, one or more keyboards 906, etc.

[0158] In a specific embodiment, the image processing device includes a memory and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer executable instructions for the image processing device, and the one or more programs are configured to be executed by one or more processors, including computer executable instructions for performing the following:

[0159] Acquire first file structure data of a target image; wherein the target image is a first static image file, and the first file structure data includes: a first segment content set extracted from the first static image file at a first time node, the first segment content set being a segment content set of information segments included between a first marker code and a second marker code of the first static image file;

[0160] Generate first summary information based on the first content set and the target obfuscated character string using a target summary algorithm;

[0161] Based on the first summary information, the designated byte content in the information segment corresponding to the third mark code of the first static image file is updated to obtain the target image after anti-counterfeiting processing.

[0162] In another specific embodiment, the image processing device includes a memory and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer-executable instructions for the image processing device, and the one or more programs are configured to be executed by one or more processors and include computer-executable instructions for performing the following:

[0163] Acquire an image to be verified for security purposes; wherein the image to be verified for security purposes includes: a target image after the anti-counterfeiting processing described above, or a forged image used to attack the target image described above, and the image to be verified for security purposes is a second static image file;

[0164] Acquire second file structure data of the image to be verified; wherein the second file structure data includes: a second segment content set extracted from the second static image file at a second time node, the second segment content set is a segment content set of information segments included between the first mark code and the second mark code of the second static image file, and the second time node is later than the first time node;

[0165] Using the target digest algorithm, based on the second content set and the target obfuscated character string, generating second digest information; and,

[0166] Acquire third summary information from the information segment corresponding to the third mark code of the second static picture file; wherein the third summary information includes: the first summary information, or forged summary information used to impersonate the first summary information;

[0167] An anti-counterfeiting verification result for the target image is generated based on the third summary information and the second summary information.

[0168] The image processing device in the embodiment of the present application directly obtains the first summary information as an anti-counterfeiting mark by means of the first content set of the target image, and stores the anti-counterfeiting mark in the specified information segment of the image file structure data of the target image. Therefore, before using the target image for business processing, the target image can be firstly verified for anti-counterfeiting, that is, the second summary information is generated for the target image to be used in combination with the generation process of the first summary information, using the same processing process. In this way, as long as any information of the image is tampered with, the image file structure data will be changed, thereby causing the second summary information to change. Then, by comparing the first summary information with the second summary information, it can be identified whether the target image has been tampered with, thereby achieving The image anti-counterfeiting effect is achieved; and the target obfuscation string is introduced when the anti-counterfeiting processing is performed on the target image. Correspondingly, the second summary information generated during the anti-counterfeiting verification is also related to the target obfuscation string. In this way, if the attacker tamperes with the target image by image replacement, since the target obfuscation string cannot be known, the third summary information stored by the attacker in the image file structure data of the replaced forged image (that is, the forged summary information used by the attacker to impersonate the first summary information) is unrelated to the target obfuscation string, resulting in the second summary information being inconsistent with the third summary information used to impersonate the first summary information, thereby achieving rapid identification of whether the target image has been tampered with, and further achieving the purpose of responding to various attack methods.

[0169] It should be noted that the embodiment of the image processing device in the present application and the embodiment of the image processing method in the present application are based on the same inventive concept. Therefore, the specific implementation of this embodiment can refer to the implementation of the corresponding image processing method mentioned above, and the repeated parts will not be repeated.

[0170] Furthermore, corresponding to the above Figures 1 to 6 The method shown, based on the same technical concept, the embodiment of the present application also provides a storage medium for storing computer executable instructions;

[0171] In a specific embodiment, the storage medium may be a USB flash drive, an optical disk, a hard disk, etc. When the computer executable instructions stored in the storage medium are executed by the processor, the following process can be implemented:

[0172] Acquire first file structure data of a target image; wherein the target image is a first static image file, and the first file structure data includes: a first segment content set extracted from the first static image file at a first time node, the first segment content set being a segment content set of information segments included between a first marker code and a second marker code of the first static image file;

[0173] Generate first summary information based on the first content set and the target obfuscated character string using a target summary algorithm;

[0174] Based on the first summary information, the designated byte content in the information segment corresponding to the third mark code of the first static image file is updated to obtain the target image after anti-counterfeiting processing.

[0175] In another specific embodiment, the storage medium may be a USB flash drive, an optical disk, a hard disk, etc. When the computer executable instructions stored in the storage medium are executed by the processor, the following process can be implemented:

[0176] Acquire an image to be verified for security purposes; wherein the image to be verified for security purposes includes: a target image after the anti-counterfeiting processing described above, or a forged image used to attack the target image described above, and the image to be verified for security purposes is a second static image file;

[0177] Acquire second file structure data of the image to be verified; wherein the second file structure data includes: a second segment content set extracted from the second static image file at a second time node, the second segment content set is a segment content set of information segments included between the first mark code and the second mark code of the second static image file, and the second time node is later than the first time node;

[0178] Using the target digest algorithm, based on the second content set and the target obfuscated character string, generating second digest information; and,

[0179] Acquire third summary information from the information segment corresponding to the third mark code of the second static picture file; wherein the third summary information includes: the first summary information, or forged summary information used to impersonate the first summary information;

[0180] An anti-counterfeiting verification result for the target image is generated based on the third summary information and the second summary information.

[0181] When the computer executable instructions stored in the storage medium in the embodiment of the present application are executed by the processor, the first summary information is directly obtained as an anti-counterfeiting mark with the help of the first content set of the target image, and the anti-counterfeiting mark is stored in the specified information segment of the image file structure data of the target image. In this way, before using the target image for business processing, the target image can be firstly verified for anti-counterfeiting, that is, in combination with the generation process of the first summary information, the second summary information is generated for the target image to be used using the same processing process. In this way, as long as any information of the image is tampered with, the image file structure data will be changed, thereby causing the second summary information to change. Then, by comparing the first summary information with the second summary information, it can be identified that the target image is whether it has been tampered with, thereby achieving the effect of image anti-counterfeiting; and when performing anti-counterfeiting processing on the target image, a target obfuscation string is introduced. Correspondingly, the second summary information generated during anti-counterfeiting verification is also related to the target obfuscation string. In this way, if an attacker tampers with the target image by image replacement, since the target obfuscation string cannot be known, the third summary information stored by the attacker in the image file structure data of the replaced forged image (that is, the forged summary information used by the attacker to impersonate the first summary information) is unrelated to the target obfuscation string, resulting in the second summary information being inconsistent with the third summary information used to impersonate the first summary information, thereby achieving rapid identification of whether the target image has been tampered with, and further achieving the purpose of responding to various attack methods.

[0182] It should be noted that the embodiment of the storage medium in the present application and the embodiment of the image processing method in the present application are based on the same inventive concept, so the specific implementation of this embodiment can refer to the implementation of the corresponding image processing method mentioned above, and the repeated parts will not be repeated.

[0183] The above describes specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0184] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the embodiments of the present application may adopt the form of complete hardware embodiments, complete software embodiments, or embodiments in combination with software and hardware. Moreover, the application may adopt the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0185] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0186] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0187] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0188] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0189] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0190] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0191] 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.

[0192] Embodiments of the present application may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. One or more embodiments of the present application may also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0193] 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 system 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.

[0194] The above description is only an embodiment of this document and is not intended to limit this document. For those skilled in the art, this document may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this document should be included in the scope of the claims of this document.

Claims

1. A method for processing an image, characterized in that: The method comprises: Acquire first file structure data of a target image; wherein the target image is a first static image file, and the first file structure data includes: a first segment content set extracted from the first static image file at a first time node, the first segment content set being a segment content set of information segments included between a first mark code and a second mark code of the first static image file; the starting position of the first segment content set is a first index position corresponding to the first mark code, and the length of the first segment content set is determined by the total byte length of the first static image file and the first index position; Generate first summary information based on the first content set and the target obfuscated character string using a target summary algorithm; Based on the first summary information, the designated byte content in the information segment corresponding to the third mark code of the first static image file is updated to obtain the target image after anti-counterfeiting processing.

2. The method according to claim 1, characterized in that The first marker code is a frame image start marker code, and the second marker code is an image file end marker code; The step of obtaining the first file structure data of the target image includes: Determine a first index position corresponding to the frame image start mark code; and Determine the total byte length of the first static picture file, wherein the total byte length is the total number of bytes contained between the image file start marker code and the image file end marker code of the first static picture file; Acquire the first content set at the first time node according to the first index position and the total byte length; The first content set is determined as the first file structure data.

3. The method according to claim 1, characterized in that The third marking code is the application reserved marking code n; The updating, based on the first summary information, of the specified byte content in the information segment corresponding to the third mark code of the first static image file to obtain the target image after anti-counterfeiting processing includes: Based on the first summary information, assigning a value to an Exif information object in an information segment corresponding to the application reserved mark code n of the first static image file; Based on the assigned first static image file, a target image after anti-counterfeiting processing is generated.

4. The method according to claim 1, characterized in that: Before obtaining the first file structure data of the target image, the method further includes: After detecting the user's identity authentication triggering operation, collecting video data of the target shooting object; wherein the target shooting object includes: any one of a target face, a target ID, and a target bank card; Among the plurality of video frames in the video data, a target image including the target photographed object is determined.

5. The method according to claim 4, characterized in that Before generating the first summary information based on the first content set and the target obfuscated character string by using the target summary algorithm, the method further includes: Determine the preset MD5 algorithm as the target digest algorithm; and, A preset obfuscated character string is determined as the target obfuscated character string.

6. The method according to claim 5, characterized in that Determining a target image containing the target photographed object from among the plurality of video frames in the video data comprises: Extracting at least one target video frame including the target photographed object from a plurality of video frames in the video data; The target video frame is determined to be a target image containing the target photographed object; wherein the image to be verified for anti-counterfeiting corresponding to the target image does not belong to the video data.

7. The method according to claim 4, characterized in that After detecting the user's identity authentication triggering operation, after collecting the video data of the target shooting object, and before using the target summary algorithm to generate the first summary information based on the first content set and the target obfuscated character string, the method further includes: Determine business-related data generated in response to the identity authentication trigger operation; wherein the business-related data includes: at least one of: identity authentication method, account security level, and shooting object type; Based on the business-related data and the first corresponding relationship, the target digest algorithm and / or the target obfuscated character string is determined.

8. The method according to claim 7, characterized in that Determining a target image containing the target photographed object from among the plurality of video frames in the video data comprises: Extracting at least one target video frame including the target photographed object from a plurality of video frames in the video data based on the business-related data and the second corresponding relationship; The target video frame is determined as the target image; wherein the image to be verified for anti-counterfeiting corresponding to the target image belongs to the video data.

9. The method according to claim 1, characterized in that: After updating the designated byte content in the information segment corresponding to the third mark code of the first static image file based on the first summary information to obtain the target image after anti-counterfeiting processing, the method further includes: Acquire an image to be verified for security purposes; wherein the image to be verified for security purposes includes: the target image after the security processing, or a forged image used to attack the target image, and the image to be verified for security purposes is a second static image file; Acquire second file structure data of the image to be verified; wherein the second file structure data includes: a second segment content set extracted from the second static image file at a second time node, the second segment content set is a segment content set of information segments included between the first mark code and the second mark code of the second static image file, and the second time node is later than the first time node; Using the target digest algorithm, based on the second content set and the target obfuscated character string, generating second digest information; and, Acquire third summary information from the information segment corresponding to the third mark code of the second static picture file; wherein the third summary information includes: the first summary information, or forged summary information used to impersonate the first summary information; An anti-counterfeiting verification result for the target image is generated based on the third summary information and the second summary information.

10. The method according to claim 9, characterized in that The generating, based on the third summary information and the second summary information, an anti-counterfeiting verification result for the target image includes: If the similarity between the third summary information and the second summary information is greater than or equal to a preset threshold, determining that the anti-counterfeiting verification result of the target image is passed; If the similarity between the third summary information and the second summary information is less than a preset threshold, it is determined that the anti-counterfeiting verification result of the target image is failed.

11. The method according to claim 9, characterized in that After generating an anti-counterfeiting verification result for the target image based on the third summary information and the second summary information, the method further includes: If the anti-counterfeiting verification result is passed, performing corresponding business processing operations based on the target image; If the anti-counterfeiting verification result is failed, abnormal prompt information indicating that the target image has been tampered with is generated.

12. A method for processing an image, characterized in that: The method comprises: Acquire an image to be verified for security purposes; wherein the image to be verified for security purposes comprises: a target image after the anti-counterfeiting process as claimed in any one of claims 1 to 8, or a forged image used to attack the target image as claimed in any one of claims 1 to 8, and the image to be verified for security purposes is a second static picture file; Obtaining second file structure data of the image to be verified for anti-counterfeiting; wherein the second file structure data includes: a second segment content set extracted from the second static image file at a second time node, the second segment content set being a segment content set of information segments contained between the first mark code and the second mark code of the second static image file, the second time node being later than the first time node; the starting position of the second segment content set being a first index position corresponding to the first mark code, and the length of the second segment content set being determined by the total byte length of the second static image file and the first index position; Using the target digest algorithm, based on the second content set and the target obfuscated character string, generating second digest information; and, Acquire third summary information from the information segment corresponding to the third mark code of the second static picture file; wherein the third summary information includes: the first summary information, or forged summary information used to impersonate the first summary information; An anti-counterfeiting verification result for the target image is generated based on the third summary information and the second summary information.

13. The method according to claim 12, characterized in that The generating, based on the third summary information and the second summary information, an anti-counterfeiting verification result for the target image includes: If the similarity between the third summary information and the second summary information is greater than or equal to a preset threshold, determining that the anti-counterfeiting verification result of the target image is passed; If the similarity between the third summary information and the second summary information is less than a preset threshold, it is determined that the anti-counterfeiting verification result of the target image is failed.

14. The method according to claim 12, characterized in that After generating an anti-counterfeiting verification result for the target image based on the third summary information and the second summary information, the method further includes: If the anti-counterfeiting verification result is passed, performing corresponding business processing operations based on the target image; If the anti-counterfeiting verification result is failed, abnormal prompt information indicating that the target image has been tampered with is generated.

15. An image processing device, characterized in that: include: A first acquisition module is configured to acquire first file structure data of a target image; wherein the target image is a first static image file, and the first file structure data includes: a first segment content set extracted from the first static image file at a first time node, the first segment content set being a segment content set of information segments included between a first mark code and a second mark code of the first static image file; a starting position of the first segment content set being a first index position corresponding to the first mark code, and a length of the first segment content set being determined by a total byte length of the first static image file and the first index position; A first summary generation module is configured to generate first summary information based on the first content set and a target obfuscated character string using a target summary algorithm; The anti-counterfeiting image generation module is configured to update the specified byte content in the information segment corresponding to the third mark code of the first static image file based on the first summary information to obtain the target image after anti-counterfeiting processing.

16. An image processing device, characterized in that: The device comprises: an anti-counterfeiting image acquisition module, configured to acquire an image to be verified for anti-counterfeiting; wherein the image to be verified for anti-counterfeiting comprises: a target image after anti-counterfeiting processing as claimed in any one of claims 1 to 8, or a forged image used to attack the target image as claimed in any one of claims 1 to 8, and the image to be verified for anti-counterfeiting is a second static picture file; A second acquisition module is configured to acquire second file structure data of the image to be verified for anti-counterfeiting; wherein the second file structure data includes: a second segment content set extracted from the second static image file at a second time node, the second segment content set being a segment content set of information segments contained between the first mark code and the second mark code of the second static image file, the second time node being later than the first time node; the starting position of the second segment content set being a first index position corresponding to the first mark code, and the length of the second segment content set being determined by the total byte length of the second static image file and the first index position; A second summary generation module is configured to generate second summary information based on the second content set and the target obfuscated character string using the target summary algorithm; and A third summary acquisition module is configured to acquire third summary information from the information segment corresponding to the third mark code of the second static image file; wherein the third summary information includes: the first summary information, or forged summary information used to impersonate the first summary information; The image anti-counterfeiting verification module is configured to generate an anti-counterfeiting verification result for the target image based on the third summary information and the second summary information.

17. An image processing device, characterized in that: The device comprises: Processor; and A memory arranged to store computer executable instructions, the executable instructions being configured to be executed by the processor, the executable instructions comprising instructions for performing the steps of the method according to any one of claims 1 to 11 or any one of claims 12 to 14.

18. A storage medium, characterized in that: The storage medium is used to store computer-executable instructions, and the executable instructions enable a computer to execute the method according to any one of claims 1 to 11 or any one of claims 12 to 14.