Image verification method and system and storage medium

In the image transmission system, the client modifys the specified information on the images taken in the application and verifies the legitimacy of the images by specifying information on the server, solving the problems of high computing power costs and difficult to guarantee the accuracy in the prior art, and achieving efficient and accurate image verification.

CN120201299APending Publication Date: 2025-06-24NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510152609.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-11
Publication Date
2025-06-24

AI Technical Summary

Technical Problem

The existing tamper-proof image transmission technology has high computing power and is difficult to guarantee, so it is impossible to effectively identify the images tampered by the client.

Method used

The client receives the specified information sent by the server, modifys the images captured in the application, generates a second image carrying the specified information, and verifies the legality of the image through the specified information on the server to ensure that the image has not been tampered with.

Benefits of technology

The computing power cost of image verification is reduced, the accuracy of verification is improved, the legality of the image is ensured, and the upload of illegally tampered images is prevented.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120201299A_ABST
    Figure CN120201299A_ABST
Patent Text Reader

Abstract

The invention provides an image verification method and system and a storage medium. The method is applied to the image verification system, the system comprises a client side and a first server side, and the method comprises the steps that the client side receives specified information sent by the first server side; the client obtains a first image in response to a shooting instruction triggered by the target application; the client modifies the first image according to the specified information to obtain a second image; the client sends a first verification request for the first to-be-verified image to the first server; if the first to-be-verified image contains the specified information, the first server side determines that the verification of the second image is successful; otherwise, the verification fails. According to the method and the device, illegal tampering of the image can be accurately identified by using relatively low computing power cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of file transfer, and in particular, to an image verification method, system, and storage medium. Background Art

[0002] Taking pictures within an application is a common function. For example, in a virtual game, a player can use the in-game camera control to take a picture of the current game scene and share it on the game's social platform. However, some players may crack the client and replace the screenshot with a custom image by modifying the memory or the underlying graphics interface.

[0003] Existing anti-tampering image transfer technologies usually identify whether the image requested to be uploaded by the client is the same as the image taken during shooting through artificial intelligence algorithms, which has high computing power costs and difficult to guarantee accuracy. Summary of the Invention

[0004] In view of this, an object of the present disclosure is to provide an image verification method, system, and storage medium, which can accurately identify illegal tampering of images with relatively low computing power costs.

[0005] In a first aspect, an embodiment of the present disclosure provides an image verification method, which is applied to an image verification system. The system includes a client and a first server. The method includes: the client receives specified information sent by the first server; the client obtains a first image in response to a shooting instruction triggered by a target application; the client modifies the first image according to the specified information to obtain a second image; the client sends a first verification request for a first image to be verified to the first server; if the first image to be verified contains the specified information, the first server determines that the second image passes the verification; otherwise, the verification fails.

[0006] In a second aspect, an embodiment of the present disclosure provides another image verification method, which is applied to a client. The method includes: receiving specified information sent by a first server; obtaining a first image in response to a shooting instruction triggered by a target application; modifying the first image according to the specified information to obtain a second image; sending a first verification request for a first image to be verified to the first server; if the result of the first verification request indicates that the first image to be verified contains the specified information, receiving the first image and target encryption information sent by the first server; sending a second verification request for a second image to be verified and encrypted information to be verified to a second server; if the second server indicates that the second image to be verified is the same as the first image, receiving the access address of the first image sent by the second server.

[0007] In a third aspect, an image verification system according to an embodiment of the present disclosure includes a client and a first server; the client is configured to: receive specified information sent by the first server; the client is configured to: in response to a shooting instruction triggered by a target application, obtain a first image; the client is configured to: modify the first image according to the specified information to obtain a second image; the client is configured to: send a first verification request for a first image to be verified to the first server; if the first image to be verified contains the specified information, the first server is configured to: determine that the second image is successfully verified; otherwise, the verification fails.

[0008] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium storing computer-executable instructions that, when called and executed by a processor, cause the processor to implement the above image verification method.

[0009] The embodiments of the present disclosure bring the following beneficial effects:

[0010] In the above image verification method, system, and storage medium, the client pre-receives specified information sent by the first server. When the client triggers in-application photographing, the client modifies the first image taken in the application according to the specified information to obtain a second image carrying the specified information, so that when the first server verifies the first image to be verified requested by the client, it verifies whether it is the second image through the specified information, ensuring that the image requested by the client is an untampered image, which can greatly reduce the computing power cost and improve the verification accuracy.

[0011] Other features and advantages of the present disclosure will be described in the following specification, and will, in part, be apparent from the specification, or be learned by practicing the present disclosure. The objectives and other advantages of the present disclosure are realized and attained by the structures particularly pointed out in the specification, claims, and drawings.

[0012] To make the above objectives, features, and advantages of the present disclosure more comprehensible, the following preferred embodiments are specifically described in conjunction with the accompanying drawings as follows. Description of the Drawings

[0013] To more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the prior art, the following will briefly introduce the drawings required for the description of the specific embodiments or the prior art. Obviously, the following drawings are some embodiments of the present disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative efforts.

[0014] Figure 1A flowchart of an embodiment of the image verification method in an embodiment of the present disclosure;

[0015] Figure 2 A flowchart of another embodiment of the image verification method in an embodiment of the present disclosure;

[0016] Figure 3 A schematic diagram of an embodiment of the image verification system in an embodiment of the present disclosure;

[0017] Figure 4 Another schematic diagram of the image verification system in an embodiment of the present disclosure. Detailed implementation manners

[0018] To make the objectives, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions of the present disclosure will be clearly and completely described below with reference to the accompanying drawings. Apparently, the described embodiments are some but not all of the embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present disclosure.

[0019] The terms "first", "second", "third", "fourth", etc. (if any) in the specification, claims and drawings of the present disclosure are used to distinguish similar objects and do not necessarily describe a specific order or sequence. It should be understood that such data may be interchanged under appropriate circumstances so that the embodiments described herein can be implemented in an order different from that shown or described herein. In addition, the terms "include" or "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units does not necessarily limit to those clearly listed steps or units, but may include other steps or units not clearly listed or inherent to these process, method, product or device.

[0020] It should be noted that the embodiments of the present disclosure are applied to an image verification system, which includes a client and a first server. Among them, the client is the upload end of the image, and the first server is the receiving end of the image. The storage end of the image may be the first server or other servers, and specific details are not limited here.

[0021] It can be understood that the purpose of the image verification system is to prevent the client from uploading the pictures taken in the application after tampering to the first server, identify the behavior of the client illegally tampering and uploading the image, and avoid the appearance of vulgar, in bad taste, or other illegal images on the image display platform, which affects the user experience and leads to the out-of-control management of the platform.

[0022] It should be noted that the images obtained by photographing the interfaces of application programs can be used not only for display on an image display platform (such as the social platform of a game), but also for monitoring the operation behaviors of application programs, such as monitoring cheating behaviors, etc., and can also have other uses. Therefore, ensuring that the photographed images of application program interfaces cannot be tampered with is an important part of application program supervision.

[0023] It can be understood that, different from the client uploading custom pictures, during the process of photographing and uploading the image of the application program interface, for the user of the client, the image cannot be customized, and the uploaded image must be the same as all the pictures presented by the application program during shooting, or the same as all the pictures captured by the virtual camera defined by the application program. If they are the same, it means the image has not been tampered with; if they are different, it means the image has been tampered with.

[0024] In some application programs, the client tampers with the images captured by the application program through memory modification technology or by modifying the underlying graphics interface. If the client cannot identify whether the image has been tampered with and directly transmits the image to the server, it will increase the computing cost of the server in image discrimination and the risk of unrecognized tampering. Therefore, the embodiments of the present disclosure, through the cooperation between the client and the server, make the tampered transmission of images easier to identify, with higher identification accuracy, and lower computing power cost required for identification, which is a clever design with multiple wins.

[0025] For ease of understanding, the specific process of the embodiments of the present disclosure will be described below. The embodiments of the present disclosure are applied to an image verification system, and the system includes a client and a first server. Please refer to Figure 1 One embodiment of the image verification method in the embodiments of the present disclosure includes:

[0026] Step S10: The client receives the specified information sent by the first server;

[0027] It can be understood that the specified information is information used to instruct the client to modify the images captured within the application. Different types of specified information can correspond to different modification methods, such as pixel modification method, size modification method, or modification methods of other image attributes, etc. The modification method can be one or more than one, and specific details are not limited here. By modifying the first image according to the modification method corresponding to the specified information, the photographed application program image can carry specific information for verifying its legality and verifying whether it has been tampered with.

[0028] In one embodiment, the specified information includes specified screen coordinates, which can be used to indicate the pixel coordinates to be modified in the first image. Alternatively, by using paired screen coordinates in the specified screen coordinates, at least the pixel coordinates for position swapping in the first image can be determined. For example, assuming a pair of screen coordinates is (200, 200) and (300, 300), then when modifying the first image, the pixel values at (200, 200) and (300, 300) in the first image can be swapped to obtain the second image.

[0029] In one embodiment, when the specified screen coordinates in the specified information are used to indicate the pixel coordinates to be modified in the first image, the specified information may further include a specified pixel value, which is used to indicate that the pixel value at the specified screen coordinates in the first image is to be modified to the corresponding specified pixel value. Here, the specified pixel values corresponding to all specified screen coordinates may be the same or different, and no specific limitation is imposed here.

[0030] In one embodiment, both the specified screen coordinates and / or the specified pixel values in the specified information can be generated by a preset algorithm, can be fixed data, or can be random data. When there are multiple specified screen coordinates, the specified pixel values corresponding to each specified screen coordinate may be the same or different, and no specific limitation is imposed here. In the case where the specified information is variable, the security of image transmission can be improved, making it more difficult to crack image verification.

[0031] In one embodiment, the specified information can also be used to indicate a size modification or an image attribute modification to the first image. For example, size modification methods such as splitting and cropping, and image attribute modification methods such as brightness, transparency, contrast, and saturation are not specifically limited here.

[0032] Step S20: The client obtains a first image in response to a shooting instruction triggered within the target application.

[0033] It should be noted that taking a photo within the application means recording the screen of the application program as an image to obtain the first image. Here, the screen of the application program can be the screen presented on the client when the shooting instruction is triggered, can be the screen captured by a virtual camera defined by the application program when the shooting instruction is triggered, or can be an application program screen generated by other means, such as synthesized, spliced, beautified, etc. The generation method is set within the target application and is not specifically limited here.

[0034] It can be understood that the shooting instruction can be triggered by a control provided in the interface of the application program, or can be automatically triggered by the application program. For example, operations such as sharing, screenshotting, and screen capturing in the target application can trigger the shooting instruction. Another example is that when it is necessary to capture the interface image of the application program to identify the cheating behavior of the client, the in-application shooting instruction can be automatically triggered by the client application program; the shooting instruction can also be triggered by other means, which are not specifically limited here.

[0035] S30. The client modifies the first image according to the specified information to obtain a second image.

[0036] In this embodiment, the client modifies the first image in a specified modification manner according to the specified information to obtain a second image, so that the second image carries the corresponding modification information for the verification of the first server. It should be noted that before modifying the first image, the original information corresponding to the first image is recorded according to the specified information. The original information can be recorded on the client or uploaded to the server, and can be used to restore the first image.

[0037] In one embodiment, when there are multiple modification methods corresponding to the specified information, one of the modification methods can be specified as the target modification method in a specific manner, or one of the multiple modification methods can be randomly selected as the target modification method to modify the first image, making it more difficult to crack the image verification technology.

[0038] It should be noted that the original information to be modified by the modification methods corresponding to different specified information is different. For example, assuming that the modification method is pixel transposition, then the original information is the pixel value to be transposed in the first image before pixel transposition; if the modification method is image attribute modification, then the original information is the attribute value to be modified in the first image before pixel attribute modification; if the modification method is splitting, cropping, or size modification, then the original information can be the original size of the first image; other modification methods can correspond to other original information, which will not be elaborated here.

[0039] It should be noted that the second image can include one or more. For example, if the modification method is splitting or cropping, etc., which will divide the first image into multiple images, then the second image includes more than one, which is not specifically limited here.

[0040] Step S40. The client sends a first verification request for the first image to be verified to the first server.

[0041] It can be understood that when the client requests to upload an in-app captured image to the first server, uploading an illegally tampered image to the first server is the main way for the client to implement the tampering behavior. Therefore, when the client requests to upload an in-app captured image to the first server, the image requested to be uploaded is not necessarily the second image and may be an illegally tampered image. In this embodiment, through the first verification request, the client requests the first server to verify the first image to be verified to ensure that the first image to be verified is the second image, that is, to ensure that the client has not tampered with the second image.

[0042] In one embodiment, to enable the first server to restore the second image, when the client sends the first verification request to the first server, the original information in the first image corresponding to the specified information can also be uploaded, so that when the first server determines that the first image to be verified has not been illegally tampered with, that is, when the first image to be verified is the second image, the second image can be restored to the first image.

[0043] Step S50: If the first image to be verified contains the specified information, the first server determines that the verification of the second image is successful; otherwise, the verification fails.

[0044] In this embodiment, by identifying whether the first image to be verified contains the specified information, it is determined whether the first image to be verified is the second image. If it contains, it is determined that the first image to be verified is the second image and the verification of the second image is successful. If it does not contain, it is determined that the first image to be verified is not the second image and the verification of the second image fails.

[0045] Furthermore, according to the specified information, it can be identified whether the first image to be verified and / or the attributes of the first image to be verified contain the specified information. For example, assuming that the specified information includes specified screen coordinates and specified pixel values, then it can be identified whether the pixel value corresponding to the specified screen coordinates in the first image to be verified is the corresponding specified pixel value. Assuming that the specified information includes image attributes, then it can be identified whether the corresponding image attributes of the first image to be verified are the image attributes in the specified information. If the specified information includes size attributes such as segmentation or cropping, then it can be identified whether the corresponding size attributes of the first image to be verified are the size attributes in the specified information. The specific details are not limited here.

[0046] In one embodiment, if the first server determines that the second image passes the verification, that is, determines that the first image to be verified is the second image, it can restore and save the second image that has passed the verification, and generate an access address for the client. It can also directly send the second image that has passed the verification to other servers for restoration and saving, and let other servers generate an access address for the client. It can also send the second image that has passed the verification to other servers for restoration and saving through the client, and let other servers generate an access address for the client. Specifically, it is not limited here.

[0047] In one embodiment, if the first server determines that the second image fails the verification, that is, determines that the first image to be verified is not the second image, indicating that the second image has been illegally tampered with, the first server can reject any request from the client for the first image to be verified, thereby preventing the upload or display of illegal images and achieving the purpose of image anti-tampering.

[0048] In one embodiment, after the first server determines that the second image passes the verification, it can also obtain the original information corresponding to the specified information in the first image, and then restore the second image that has passed the verification according to the original information, so that the first server obtains the first image, thereby ensuring that the image obtained by the first server is the original image that has not been illegally tampered with.

[0049] For the image verification method provided in the above embodiment, the client pre-receives the specified information sent by the first server. When the client triggers in-app photo taking, the client modifies the first image taken in the app according to the specified information to obtain a second image carrying the specified information, so that when the first server verifies the first image to be verified requested by the client, it verifies whether it is the second image through the specified information, ensuring that the image requested by the client is an untampered image, which can greatly reduce the computing power cost and make the verification accuracy higher.

[0050] Next, the specific recognition method of image verification will be described.

[0051] In one embodiment, before the client receives the specified information sent by the first server, the first server generates multiple random screen coordinates and the corresponding random pixel values for each screen coordinate to obtain the specified information; the first server sends the specified information to the client.

[0052] It can be understood that either the first server or the client can be used to generate the specified information. In this embodiment, to increase the difficulty of cracking the anti-tampering transmission method, the specified information includes multiple random screen coordinates and random pixel values, where each random screen coordinate corresponds to a random pixel value. For example, a random screen coordinate can be (201, 546), and the random pixel value corresponding to this screen coordinate can be (0, 255, 145), and specific values are not limited here.

[0053] In one embodiment, when generating multiple random screen coordinates on the first server, multiple values can be randomly selected according to a preset size range to obtain the random screen coordinates. The preset size range can be configured according to the in-app shooting function of the target application or can be preset as a secure size range, and specific values are not limited here.

[0054] For example, assuming that the preset size range is 300 pixels in width and 200 pixels in height, then the x-axis coordinate of the random screen coordinate can be randomly generated within the range of [0, 300], and the y-axis coordinate of the screen coordinate can be randomly generated within the range of [0, 200], thereby obtaining the specified information.

[0055] By way of example and not limitation, assuming that the specified information includes p random screen coordinates and the maximum screen size indicated by the preset size range is m×n, then the generated random screen coordinates include: (x1, y1), (x2, y2)…(x n ,y n ),(x1, x2,…, x n ) and (y1, y2,…, y n ) are all random values, where,

[0056] (x1, x2,…, xn) ∈ m

[0057] (y1, y2,…, yn) ∈ n

[0058] In addition, the random pixel values corresponding to (x1, y1), (x2, y2)…(x n ,y n ) are (r1, g1, b1), (r2, g2, b2)…(r n ,g n ,b n ), (r1, r2,…, r n ), (g1, g2,…, g n ) and (b1, b2,…, b n ) are also all random values, and the value range is [0, 255], and specific values are not limited here.

[0059] In one embodiment, when the client modifies the first image according to the specified information to obtain the second image, the client replaces the pixel values of multiple random screen coordinates in the first image with the random pixel values corresponding to the corresponding random screen coordinates in the specified information to obtain the second image.

[0060] It can be understood that the specified information obtained by generating multiple random screen coordinates and the random pixel values corresponding to each random screen coordinate can modify the first image through the modification method of pixel replacement, so as to obtain the second image. Specifically, the client replaces the pixel values of each random screen coordinate in the first image with the random pixel values of the corresponding random screen coordinates, and the second image can be obtained, so that the second image contains the specified information and can be used for verification. For example, the client replaces the pixel values of the coordinates (x1, y1), (x2, y2)... (x n , y n ) in the first image with (r1, g1, b1), (r2, g2, b2)... (r n , g n , b n ) in turn to obtain the second image.

[0061] Based on the above, in one embodiment, if the first image to be verified contains the specified information, the steps for the first server to determine that the second image verification is successful include: the first server responds to the first verification request of the client and obtains the first image to be verified submitted by the client; the first server identifies whether the pixel values of the random screen coordinates in the first image to be verified are the same as the corresponding random pixel values in the specified information; if they are the same, the first server determines that the second image verification is successful.

[0062] In this embodiment, the first server identifies whether the pixel values of the coordinates (x1, y1), (x2, y2)... (x n , y n ) in the first image to be verified requested by the client are (r1, g1, b1), (r2, g2, b2)... (r n , g n , b n ). If so, it means that the first image to be verified requested by the client contains the specified information, the first image to be verified requested by the client has not been illegally tampered with, and the first image to be verified is consistent with the second image; otherwise, it means that the first image to be verified requested by the client does not contain the specified information, the first image to be verified requested by the client has been illegally tampered with, and the first image to be verified is inconsistent with the second image.

[0063] It should be noted that, the more the number of random screen coordinates, the better the effect of anti-tampering transmission; the fewer the number of random screen coordinates, the higher the efficiency of anti-tampering transmission. Therefore, the number of random screen coordinates can be equal to a preset value to make the effect of anti-tampering transmission and the efficiency of anti-tampering transmission more balanced. The preset value is not limited here.

[0064] It can be understood that, in some cases, the logical processing and data storage of the application program are completed by different servers. In the embodiments of the present disclosure, the first server can be a server for processing the logic of the target application, and the second server can be used to store the data of the target application, such as the first image captured in the target application. Therefore, during the process of storing the first image captured in the client application to the second server, illegal tampering of the image may also occur. The embodiments of the present disclosure also provide an image verification method for this process. Next, the image verification method for this process will be specifically described.

[0065] It should be noted that, after the above steps S10 - S50, when the first server determines that the second image verification is successful, the first server can ensure that the first image to be verified requested by the client has not been illegally tampered with, and moreover, the first server obtains the second image that has not been illegally tampered with. Therefore, by using the endorsement of the first server after verifying the image, the computing power required by the second server for image verification can be reduced. Through the cooperation of the first server and the second server, extremely high accuracy can be obtained without using a complex artificial intelligence model for image recognition for image verification.

[0066] In one implementation manner, the system further includes: a second server; after the first server determines that the second image verification is successful, it further includes: the first server restores the verified second image to obtain the first image; the first server encrypts the first image through a preset encryption algorithm to obtain target encryption information; the first server sends the first image and the target encryption information to the client; the client receives the first image and the target encryption information sent by the first server, and sends a second verification request for the second image to be verified and the encryption information to be verified to the second server; the second server responds to the second image verification request of the client, and verifies whether the second image to be verified is consistent with the first image according to the encryption information to be verified; if they are consistent, the second server determines that the second image to be verified is successfully verified and obtains the first image.

[0067] It can be understood that after the first server determines that the first image to be verified requested by the client has not been illegally tampered with, the first server can endorse the first image to be verified requested by the client. By means of the original information corresponding to the specified information, the first image to be verified requested by the client can be restored to obtain the original image captured by the client within the application, that is, the second image. Among them, the original image corresponding to the specified information can be obtained from the client, and the specific details are not elaborated here.

[0068] In this embodiment, after the first server obtains the first image, the first image is encrypted by a preset encryption algorithm to obtain target encryption information, which is used to verify whether the corresponding image is the first image. Then, the first server transmits the first image and the target encryption information to the client. The client sends a second verification request to the second server to request verification of whether the second image to be verified is the same as the first image. After receiving the second image to be verified and the encryption information to be verified requested by the client, the second server determines whether the second image to be verified based on the encryption information to be verified is the same as the first image, so that the second server determines that the second image to be verified requested by the server has not been illegally tampered with, and the second image to be verified is the first image.

[0069] In one embodiment, when the second server verifies whether the second image to be verified is the same as the first image according to the encryption information to be verified, the second image to be verified can be encrypted by the preset encryption algorithm used by the first server to encrypt the first image to obtain second encryption information, and then the second encryption information is compared with the encryption information to be verified. If they are the same, it is determined that the second image to be verified is the same as the first image; otherwise, it is determined that the second image to be verified is not the same as the first image.

[0070] In another embodiment, when the second server verifies whether the second image to be verified is the same as the first image according to the encryption information to be verified, the encryption information to be verified can also be decrypted according to the decryption algorithm corresponding to the above preset encryption algorithm, and whether the second image to be verified is the same as the first image is determined according to the decryption result.

[0071] It should be noted that when the second server verifies whether the second image to be verified is the same as the first image according to the encryption information to be verified, the second server does not need to transmit data with the first server, and the second server does not need the first server to send a key or other verification information, and can verify the second image to be verified and the encryption information to be verified by itself, thereby improving the security of the data.

[0072] It should be noted that the preset encryption algorithm and the preset decryption algorithm correspond to each other, and the following is a separate description. In one implementation, when the first server encrypts the first image through the preset encryption algorithm to obtain the target encrypted information, the first server calculates the hash value of the first image to obtain the target hash value; encodes the target hash value to obtain the target encoded value; encrypts the target encoded value through the preset encryption algorithm and key to obtain the target signature; and concatenates the target signature and the target encoded value to obtain the target encrypted information.

[0073] In this implementation, to make the transmission of the image from the client to the second server more secure, that is, the anti-tampering property of the image is better, when generating the target encrypted information, a complex encrypted information is generated by concatenating the signature and the encoding. Specifically, first, calculate the hash value of the first image to obtain the target hash value. Here, the hash value is also called the hash value or digest value, which is a fixed-length string obtained by calculating any length of data through a hash function. The hash values calculated from the same data must be the same. The hash function can be MD5 (Message-Digest Algorithm 5), SHA (Secure Hash Algorithm) series, Cyclic redundancy check (CRC) function, etc., and specific details are not limited here.

[0074] Next, encode the target hash value through the preset encoding algorithm to obtain the target encoded value. Here, the preset encoding algorithm can be the Base32 encoding algorithm, the Base64 encoding algorithm, the Base16 encoding algorithm, etc., and specific details are not limited here.

[0075] Furthermore, after obtaining the target encoded value, encrypt the target encoded value through the preset encryption algorithm and key to obtain the target signature. Finally, concatenate the target signature and the target encoded value as the target encrypted information.

[0076] Relatively, the algorithm used for decryption verification corresponds to the generation method of the above target encrypted information. In one implementation, when the second server responds to the second verification request of the client and verifies whether the second image to be verified is consistent with the first image according to the encrypted information to be verified, it includes: the second server responds to the second image verification request of the client, decrypts and verifies the encrypted information to be verified according to the decryption algorithm corresponding to the preset encryption algorithm to obtain the target verification result; the second server verifies whether the second image to be verified is consistent with the first image according to the target verification result.

[0077] In this embodiment, the decryption algorithm corresponding to the preset encryption algorithm is used to decrypt and verify the encrypted information to be verified, so as to obtain a target verification result for verifying whether the second image to be verified is the same as the first image. Among them, the decryption algorithm corresponding to the preset encryption algorithm may include one or more of a decryption algorithm, a key, and a decoding algorithm, and specific details are not limited here.

[0078] In one embodiment, when decrypting and verifying the encrypted information to be verified according to the decryption algorithm corresponding to the preset encryption algorithm to obtain a target verification result, it includes: the second server splits the encrypted information to be verified according to the preset splicing rule to obtain a first verification value and a second verification value; encrypts the first verification value through the preset encryption algorithm and the preset key to obtain an encrypted verification value; performs a consistency check on the encrypted verification value and the second verification value to obtain a first verification result; decodes the first verification value through the decoding algorithm corresponding to the above encoding algorithm to obtain a decoded verification value; generates a hash value for the second image to be verified to obtain a first hash value; performs a consistency check on the first hash value and the decoded verification value to obtain a second verification result; combines the first verification result and the second verification result to obtain a target verification result.

[0079] In this embodiment, according to the splicing rule of the target signature and the target encoding value in the target encrypted information, the encrypted information to be verified is split into a first verification value and a second verification value (in a specific order). For example, assuming that in the target encrypted information, the target encoding value is spliced after the target signature, then the first verification value corresponds to the signature, and the second verification value corresponds to the encoding value, and vice versa. Specific details are not elaborated here.

[0080] Next, the first verification value corresponding to the signature is encrypted through the preset encryption algorithm and key to obtain an encrypted verification value. Among them, this encryption algorithm is the same as the above encryption algorithm. If the encrypted information to be verified requested by the second verification request is the same as the target encrypted information, the encrypted verification value obtained here should be the same as the second verification value, otherwise they are different, and a first verification result is obtained.

[0081] Furthermore, the first verification value is decoded through the decoding algorithm corresponding to the above encoding algorithm to obtain a decoded verification value, and then the hash value of the second image to be verified is calculated to obtain a first hash value. If the second image to be verified is the same as the first image, the obtained second verification result should indicate that the decoded verification value is the same as the first hash value, otherwise the second verification result should indicate that they are different.

[0082] Specifically, in one embodiment, when the second server verifies whether the second image to be verified is the same as the first image according to the target verification result, if the target verification result indicates that the encrypted verification value and the second verification value are the same, and the first hash value and the decoded verification value are the same, it is determined that the second image to be verified is the same as the first image.

[0083] If the first verification result indicates that the encrypted verification value is consistent with the second verification value, the signature verification in the encrypted information to be verified is successful, indicating that the encrypted information to be verified is the same as the target encrypted information. If the first verification result indicates that the encrypted verification value is inconsistent with the second verification value, the signature verification in the encrypted information to be verified fails, indicating that the encrypted information to be verified is different from the target encrypted information. If the obtained target verification result indicates that the second image to be verified is inconsistent with the first image, and the image stored on the second server requested by the client has been illegally tampered with, then the second server blocks the image upload by the client.

[0084] Based on the above, if the first verification result indicates that the encrypted verification value and the second verification value are consistent, and the second verification result indicates that the first hash value and the decoded verification value are consistent, then the target verification result indicates that the second image to be verified is consistent with the first image; otherwise, they are inconsistent. Verifying the consistency of images through the encrypted information of the images can accurately and effectively prevent the tampered transmission of images, without the need to identify the consistency of images through artificial intelligence algorithms, thus reducing the computing power cost.

[0085] Next, a specific description of the image verification method applied to the client will be given. Please refer to Figure 2 Another embodiment of the image verification method in the embodiments of the present disclosure includes:

[0086] S201. Receive the specified information sent by the first server;

[0087] S202. In response to the shooting instruction triggered by the target application, obtain the first image;

[0088] S203. Modify the first image according to the specified information to obtain the second image;

[0089] S204. Send a first verification request for the first image to be verified to the first server;

[0090] S205. If the result of the first verification request indicates that the first image to be verified contains the specified information, receive the first image and the target encrypted information sent by the first server;

[0091] S206. Send a second verification request for the second image to be verified and the encrypted information to be verified to the second server;

[0092] S207. If the second verification request indicates that the second image to be verified is consistent with the first image, receive the access address of the first image sent by the second server.

[0093] In an embodiment of the present disclosure, when the client executes the image verification method, it first receives the specified information sent by the first server and stores it locally. When the shooting instruction of the target application installed on the client is triggered, the screen of the target application is recorded as the first image, and then the first image is modified according to the specified information saved locally to obtain the second image.

[0094] Next, a first verification request for the first image to be verified is sent to the first server, and the result of the first verification request returned by the first server is received. If the result indicates that the first image to be verified contains the specified information, or indicates that the second image or the first image to be verified is successfully verified, the restored first image and the target encryption information sent by the first server can be received.

[0095] Furthermore, a second verification request for the second image to be verified and the encryption information to be verified is sent to the second server. If the second server indicates that the second image to be verified is the same as the first image, the client can receive the access address of the first image sent by the second server. This access address can be used for the client to display the first image or perform other processing, which is not specifically limited here.

[0096] Corresponding to the above method embodiment, refer to Figure 3 A schematic diagram of an image verification system as shown. The above image verification system includes a client 30 and a first server 32;

[0097] The client 30 is configured to: receive the specified information sent by the first server 32;

[0098] The client 30 is configured to: in response to the shooting instruction triggered by the target application, obtain the first image;

[0099] The client 30 is configured to: modify the first image according to the specified information to obtain the second image;

[0100] The client 30 is configured to: send a first verification request for the first image to be verified to the first server 32;

[0101] If the first image to be verified contains the specified information, the first server 32 is configured to: determine that the second image is successfully verified; otherwise, the verification fails.

[0102] The above image verification system allows the client to pre-receive specified information sent by the first server. When the client triggers in-app photo taking, the client modifies the first image taken within the app according to the specified information to obtain a second image carrying the specified information. This enables the first server to verify whether the first image to be verified in the client's request is the second image through the specified information, ensuring that the image requested by the client is an untampered image, which can greatly reduce the computing power cost and improve the verification accuracy to a large extent.

[0103] Optionally, the first server is configured to: generate multiple random screen coordinates and corresponding random pixel values for each screen coordinate to obtain specified information; the first server is configured to: send the specified information to the client.

[0104] Optionally, the client is configured to: replace the pixel values of the multiple random screen coordinates in the first image with the random pixel values corresponding to the random screen coordinates in the specified information to obtain a second image.

[0105] Optionally, the first server is configured to: in response to the first verification request from the client, obtain the first image to be verified submitted by the client; the first server is configured to: identify whether the pixel values of the random screen coordinates in the first image to be verified are the same as the corresponding random pixel values in the specified information; if they are the same, the first server is configured to: determine that the second image verification is successful.

[0106] Corresponding to the above method embodiment, refer to Figure 4 Another schematic diagram of the image verification system shown. The above image verification system includes a client 30 and a first server 32;

[0107] The client 30 is configured to: receive the specified information sent by the first server 32;

[0108] The client 30 is configured to: in response to a shooting instruction triggered by a target application, obtain a first image;

[0109] The client 30 is configured to: modify the first image according to the specified information to obtain a second image;

[0110] The client 30 is configured to: send a first verification request for the first image to be verified to the first server 32;

[0111] If the first image to be verified contains the specified information, the first server 32 is configured to: determine that the second image verification is successful; otherwise, the verification fails.

[0112] The above image verification system. The client pre-receives the specified information sent by the first server. When the client triggers in-app photo taking, the client modifies the first image taken in the app according to the specified information to obtain a second image carrying the specified information, so that when the first server verifies the first image to be verified in the client request, it verifies whether it is the second image through the specified information, ensuring that the image requested by the client is an untampered image, which can greatly reduce the computing power cost and make the verification accuracy higher.

[0113] Optionally, the system further includes: a second server 34; the first server is configured to: restore the verified second image to obtain the first image; the first server is configured to: encrypt the first image through a preset encryption algorithm to obtain target encryption information; the first server is configured to: send the first image and the target encryption information to the client; the client is configured to: receive the first image and the target encryption information sent by the first server, and send a second verification request for a second image to be verified and encrypted information to be verified to the second server; the second server is configured to: in response to the second image verification request of the client, verify whether the second image to be verified is consistent with the first image according to the encrypted information to be verified; if consistent, the second server is configured to: determine that the verification of the second image to be verified is successful and obtain the first image.

[0114] Optionally, the first server is configured to: calculate the hash value of the first image to obtain a target hash value; encode the target hash value to obtain a target encoded value; encrypt the target encoded value through a preset encryption algorithm and a key to obtain a target signature; splice the target signature and the target encoded value to obtain target encryption information.

[0115] Optionally, the second server is configured to: in response to the second image verification request of the client, decrypt and verify the encrypted information to be verified according to the decryption algorithm corresponding to the preset encryption algorithm to obtain a target verification result; the second server is configured to: verify whether the second image to be verified is consistent with the first image according to the target verification result.

[0116] Optionally, the second server is configured to: split the encrypted information to be verified according to a preset splicing rule to obtain a first verification value and a second verification value; encrypt the first verification value through a preset encryption algorithm and a preset key to obtain an encrypted verification value; perform a consistency check on the encrypted verification value and the second verification value to obtain a first verification result; decode the first verification value to obtain a decoded verification value; generate a hash value for the second image to be verified to obtain a first hash value; perform a consistency check on the first hash value and the decoded verification value to obtain a second verification result; combine the first verification result and the second verification result to obtain a target verification result.

[0117] Optionally, if the target verification result indicates that the encrypted verification value is consistent with the second verification value, and the first hash value is consistent with the decoded verification value, it is determined that the second image to be verified is consistent with the first image.

[0118] This embodiment also provides a computer-readable storage medium storing computer-executable instructions, which, when called and executed by a processor, cause the processor to implement the above image verification method. For example:

[0119] When applied to an image verification system, the system includes a client and a first server. The method includes: the client receives specified information sent by the first server; the client obtains a first image in response to a shooting instruction triggered by a target application; the client modifies the first image according to the specified information to obtain a second image; the client sends a first verification request for the first image to be verified to the first server; if the first image to be verified contains the specified information, the first server determines that the second image verification is successful; otherwise, the verification fails.

[0120] In this method, the client pre-receives specified information sent by the first server. When the client triggers in-application photographing, the client modifies the first image captured in the application according to the specified information to obtain a second image carrying the specified information, so that when the first server verifies the first image to be verified requested by the client, it can verify whether it is the second image through the specified information, ensuring that the image requested by the client is an untampered image, which can greatly reduce the computing power cost and improve the verification accuracy.

[0121] Optionally, before the step where the client receives the specified information sent by the first server, the method further includes: the first server generates a plurality of random screen coordinates and corresponding random pixel values for each screen coordinate to obtain the specified information; the first server sends the specified information to the client.

[0122] Optionally, the step of the client modifying the first image according to the specified information to obtain a second image includes: the client replacing the pixel values at multiple random screen coordinates in the first image with the random pixel values corresponding to the random screen coordinates in the specified information to obtain the second image.

[0123] Optionally, if the first image to be verified contains the specified information, the step for the first server to determine that the second image is verified successfully includes: the first server, in response to the first verification request from the client, obtaining the first image to be verified submitted by the client; the first server identifying whether the pixel values at the random screen coordinates in the first image to be verified are the same as the corresponding random pixel values in the specified information; if they are the same, the first server determines that the second image is verified successfully.

[0124] Optionally, the system further includes: a second server; after the step where the first server determines that the second image is verified successfully, the method further includes: the first server restoring the verified second image to obtain the first image; the first server encrypting the first image through a preset encryption algorithm to obtain target encrypted information; the first server sending the first image and the target encrypted information to the client; the client receiving the first image and the target encrypted information sent by the first server and sending a second verification request for a second image to be verified and encrypted information to be verified to the second server; the second server, in response to the second image verification request from the client, verifying whether the second image to be verified is consistent with the first image according to the encrypted information to be verified; if they are consistent, the second server determines that the second image to be verified is verified successfully and obtains the first image.

[0125] Optionally, the step of the first server encrypting the first image through a preset encryption algorithm to obtain target encrypted information includes: the first server calculating the hash value of the first image to obtain a target hash value; encoding the target hash value to obtain a target encoded value; encrypting the target encoded value through a preset encryption algorithm and a key to obtain a target signature; concatenating the target signature and the target encoded value to obtain the target encrypted information.

[0126] Optionally, the step of the second server, in response to the second verification request from the client, verifying whether the second image to be verified is consistent with the first image according to the encrypted information to be verified includes: the second server, in response to the second image verification request from the client, decrypting and verifying the encrypted information to be verified according to the decryption algorithm corresponding to the preset encryption algorithm to obtain a target verification result; the second server verifying whether the second image to be verified is consistent with the first image according to the target verification result.

[0127] Optionally, the step of decrypting and verifying the encrypted information to be verified according to the decryption algorithm corresponding to the preset encryption algorithm to obtain the target verification result includes: the second server splitting the encrypted information to be verified according to the preset splicing rule to obtain a first verification value and a second verification value; encrypting the first verification value through the preset encryption algorithm and the preset secret key to obtain an encrypted verification value; performing a consistency verification on the encrypted verification value and the second verification value to obtain a first verification result; decoding the first verification value to obtain a decoded verification value; generating a hash value for the second image to be verified to obtain a first hash value; performing a consistency verification on the first hash value and the decoded verification value to obtain a second verification result; and combining the first verification result and the second verification result to obtain the target verification result.

[0128] Optionally, the step of the second server verifying whether the second image to be verified is consistent with the first image according to the target verification result includes: if the target verification result indicates that the encrypted verification value and the second verification value are consistent, and the first hash value and the decoded verification value are consistent, determining that the second image to be verified is consistent with the first image.

[0129] When applied to the client, the method includes: receiving the specified information sent by the first server; in response to the shooting instruction triggered by the target application, obtaining the first image; modifying the first image according to the specified information to obtain the second image; sending a first verification request for the first image to be verified to the first server; if the result of the first verification request indicates that the first image to be verified contains the specified information, receiving the first image and the target encrypted information sent by the first server; sending a second verification request for the second image to be verified and the encrypted information to be verified to the second server; and if the second server indicates that the second image to be verified is consistent with the first image, receiving the access address of the first image sent by the second server.

[0130] The computer program product of the image verification method, system, and storage medium provided by the embodiments of the present disclosure includes a computer-readable storage medium storing program code, and the instructions included in the program code can be used to execute the methods described in the foregoing method embodiments. For the specific implementation, reference can be made to the method embodiments and will not be elaborated here.

[0131] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems and devices described above can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated here.

[0132] In addition, in the description of the embodiments of the present disclosure, unless otherwise clearly specified and limited, the terms "installed", "connected", and "coupled" should be understood in a broad sense. For example, it may be a fixed connection, a detachable connection, or an integral connection; it may be a mechanical connection or an electrical connection; it may be directly connected or indirectly connected through an intermediate medium, and it may be the communication inside two components. For those skilled in the art, the specific meanings of the above terms in the present disclosure can be understood according to specific situations.

[0133] If the above-mentioned functions are implemented in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present disclosure, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present disclosure. The foregoing storage medium includes: various media that can store program codes such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs.

[0134] In the description of the present disclosure, it should be noted that the orientation or positional relationship indicated by the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. is based on the orientation or positional relationship shown in the drawings. It is only for the convenience of describing the present disclosure and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus should not be construed as a limitation to the present disclosure. In addition, the terms "first", "second", and "third" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.

[0135] Finally, it should be noted that the above embodiments are only specific implementation manners of the present disclosure to illustrate the technical solutions of the present disclosure, rather than limiting them. The protection scope of the present disclosure is not limited thereto. Although the present disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art within the technical scope disclosed by the present disclosure can still modify the technical solutions recorded in the foregoing embodiments, or can easily think of changes, or perform equivalent replacements for some of the technical features; and these modifications, changes, or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should all be covered by the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be subject to the protection scope of the claims.

Claims

1. An image verification method, applied to an image verification system, the system comprising a client and a first server, characterized in that: The method comprises: The client receives the specified information sent by the first server; The client obtains a first image in response to a shooting instruction triggered by a target application; The client modifies the first image according to the specified information to obtain a second image; The client sends a first verification request for a first image to be verified to the first server; If the first image to be verified contains the specified information, the first server determines that the verification of the second image is successful; otherwise, the verification fails.

2. The method according to claim 1, characterized in that Before the step of the client receiving the specified information sent by the first server, the method further includes: The first server generates a plurality of random screen coordinates and a random pixel value corresponding to each screen coordinate to obtain designated information; The first server sends the specified information to the client.

3. The method according to claim 2, characterized in that The step of the client modifying the first image according to the specified information to obtain the second image includes: The client replaces the pixel values ​​of the multiple random screen coordinates in the first image with the random pixel values ​​corresponding to the random screen coordinates in the designated information to obtain a second image.

4. The method according to claim 3, characterized in that The step of determining by the first server whether verification of the second image is successful if the first image to be verified contains the specified information comprises: The first server obtains a first image to be verified submitted by the client in response to a first verification request from the client; The first server identifies whether the pixel value of the random screen coordinate in the first image to be verified is the same as the random pixel value corresponding to the specified information; If they are the same, the first server determines that the second image verification is successful.

5. The method according to claim 2, characterized in that: The system further includes: a second server; After the first server determines that the second image verification is successful, the method further includes: The first server restores the second image that has been successfully verified to obtain the first image; The first server encrypts the first image using a preset encryption algorithm to obtain target encrypted information; The first server sends the first image and the target encrypted information to the client; The client receives the first image and target encrypted information sent by the first server, and sends a second verification request for the second image to be verified and the encrypted information to be verified to the second server; The second server verifies, in response to the second image verification request of the client, whether the second image to be verified is consistent with the first image according to the encrypted information to be verified; If they are consistent, the second server determines that the second image to be verified is verified successfully and obtains the first image.

6. The method according to claim 5, characterized in that The first server encrypts the first image using a preset encryption algorithm to obtain target encrypted information, including: The first server calculates a hash value of the first image to obtain a target hash value; Encoding the target hash value to obtain a target encoded value; The target code value is encrypted by a preset encryption algorithm and key to obtain a target signature; The target signature and the target encoding value are concatenated to obtain target encryption information.

7. The method according to claim 5, characterized in that The step of the second server end verifying, in response to the second verification request of the client end, whether the second image to be verified is consistent with the first image according to the encrypted information to be verified includes: The second server, in response to the second image verification request of the client, performs decryption verification on the encrypted information to be verified according to the decryption algorithm corresponding to the preset encryption algorithm to obtain a target verification result; The second server verifies whether the second image to be verified is consistent with the first image according to the target verification result.

8. The method according to claim 7, characterized in that The step of decrypting and verifying the encrypted information to be verified according to the decryption algorithm corresponding to the preset encryption algorithm to obtain a target verification result includes: The second server splits the encrypted information to be verified according to a preset splicing rule to obtain a first verification value and a second verification value; Encrypting the first verification value by using a preset encryption algorithm and a preset key to obtain an encrypted verification value; Performing a consistency check on the encrypted check value and the second check value to obtain a first check result; Decoding the first check value to obtain a decoded check value; Generating a hash value for the second image to be verified to obtain a first hash value; Performing a consistency check on the first hash value and the decoding check value to obtain a second check result; The first verification result and the second verification result are combined to obtain a target verification result.

9. The method according to claim 8, characterized in that The step of the second server verifying whether the second image to be verified is consistent with the first image according to the target verification result includes: If the target verification result indicates that the encryption verification value and the second verification value are consistent, and the first hash value and the decoding verification value are consistent, it is determined that the second image to be verified is consistent with the first image.

10. An image verification method, applied to a client, characterized in that: The method comprises: Receiving specified information sent by the first server; In response to a shooting instruction triggered by a target application, obtaining a first image; Modify the first image according to the specified information to obtain a second image; Sending a first verification request for a first image to be verified to a first server; If the result of the first verification request indicates that the first image to be verified contains the specified information, receiving the first image and target encrypted information sent by the first server; Sending a second verification request for the second image to be verified and the encrypted information to be verified to the second server; If the second server indicates that the second image to be verified is consistent with the first image, an access address of the first image sent by the second server is received.

11. An image verification system, characterized in that: The system includes a client and a first server; The client is used to: receive the specified information sent by the first server; The client is used to: obtain a first image in response to a shooting instruction triggered by a target application; The client is used to: modify the first image according to the specified information to obtain a second image; The client is used to: send a first verification request for a first image to be verified to the first server; If the first image to be verified includes the specified information, the first server is used to: determine that the verification of the second image is successful; otherwise, the verification fails.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the image verification method according to any one of claims 1 to 10.