WO2021027113A1 - 图片验证方法、装置、计算机设备及存储介质 - Google Patents
图片验证方法、装置、计算机设备及存储介质 Download PDFInfo
- Publication number
- WO2021027113A1 WO2021027113A1 PCT/CN2019/116355 CN2019116355W WO2021027113A1 WO 2021027113 A1 WO2021027113 A1 WO 2021027113A1 CN 2019116355 W CN2019116355 W CN 2019116355W WO 2021027113 A1 WO2021027113 A1 WO 2021027113A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- target picture
- image
- fragment
- verification
- picture
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/40—Scaling of whole images or parts thereof, e.g. expanding or contracting
- G06T3/4038—Image mosaicing, e.g. composing plane images from plane sub-images
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/50—Image enhancement or restoration using two or more images, e.g. averaging or subtraction
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/77—Retouching; Inpainting; Scratch removal
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/08—Network architectures or network communication protocols for network security for authentication of entities
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20081—Training; Learning
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20084—Artificial neural networks [ANN]
Definitions
- the embodiments of the present application relate to the field of data security, in particular, a method, device, computer equipment, and storage medium for image verification.
- the prior art provides an image verification method.
- a verification picture is sent to the client, and the verification information is on the verification picture, and the client sends the verification information to the user.
- the user can perform further operations only after completing verification according to the verification information recorded in the verification picture.
- the inventor of the present application found in research that in the prior art, the verification pictures sent from the server to the user are easily intercepted, and the verification information is extracted by using image recognition technology to complete verification. Therefore, there are greater security risks in the image verification technology, and further optimization is required.
- the embodiment of the application provides a picture verification method, device, and computer equipment that divide the picture into several fragmented images during picture transmission, and only after correctly splicing several fragmented images, can the verification information be recognized. And storage media.
- a technical solution adopted in the embodiment of the present application is to provide a picture verification method, including: obtaining a fragmented atlas that is segmented from a target picture, wherein the fragmented atlas includes several fragments Image; according to preset restoration rules to splice the several fragment images to generate the target picture, wherein the restoration rules record the positional relationship of each fragment image in the target picture; place the target picture in Display in the set verification area, so that the user can learn the verification information recorded in the target picture through the target picture.
- an embodiment of the present application further provides a picture verification device, including: an acquisition module for acquiring a fragmented atlas divided by a target picture, wherein the fragmented atlas includes a plurality of fragmented images A processing module for splicing the plurality of fragment images to generate the target picture according to a preset restoration rule, wherein the restoration rule records the position relationship of each fragment image in the target picture; execution module , Used to display the target picture in the set verification area, so that the user can learn the verification information recorded in the target picture through the target picture.
- an embodiment of the present application further provides a computer device including a memory and a processor.
- the memory stores computer-readable instructions.
- the The processor executes the following steps of a picture verification method: obtaining a fragmented atlas divided by a target picture, wherein the fragmented atlas includes a plurality of fragmented images; according to a preset restoration rule, the fragmented atlas The fragment images are spliced to generate the target picture, wherein the restoration rule records the position relationship of each fragment image in the target picture; the target picture is displayed in the set verification area, so that the user The verification information recorded in the target picture is obtained through the target picture.
- embodiments of the present application also provide a storage medium storing computer-readable instructions.
- the computer-readable instructions When executed by one or more processors, one or more processors execute a The following steps of the image verification method: Obtain a fragmented atlas divided by the target picture, wherein the fragmented atlas includes a number of fragment images; according to a preset restoration rule, the fragment images are spliced to generate The target picture, wherein the restoration rule records the positional relationship of each fragment image in the target picture; the target picture is displayed in a set verification area, so that the user can learn from the target picture The verification information recorded in the target picture.
- the server side when the server side sends a target picture to the user side, it needs to segment the target picture to generate several fragment images, and package the fragment images into a fragmented atlas to send to the user side.
- the user terminal receives the fragmented atlas to splice several fragmented images according to the preset restoration rules, and after the splicing is completed, a target picture with verification information is obtained. Since the splicing method of the fragmented image to generate the target picture is unique, if the receiver does not have a consensus restoration rule with the server side, even if the fragmented atlas is obtained, the target picture cannot be restored quickly, and then quickly obtained Verification information recorded in it. Therefore, the method of segmenting and transmitting the target picture can effectively increase the difficulty of image verification and improve the security of image verification.
- FIG. 1 is a schematic diagram of the basic flow of a picture verification method according to an embodiment of the application
- FIG. 2 is a schematic diagram of a flow of generating splicing buffer bands according to an embodiment of the application
- FIG. 3 is a schematic diagram of the first flow of splicing fragment images according to an embodiment of the application
- FIG. 4 is a schematic diagram of a process of cropping when splicing fragment images according to an embodiment of the application
- FIG. 5 is a schematic diagram of the process of image stitching through image numbers according to an embodiment of the application.
- FIG. 6 is a schematic diagram of a process of obtaining a target picture in a display area according to an embodiment of the application
- FIG. 7 is a schematic diagram of the process of judging whether the target picture is consistent with the screenshot picture according to an embodiment of the application.
- FIG. 8 is a schematic diagram of the basic structure of a picture verification device according to an embodiment of the application.
- Figure 9 is a block diagram of the basic structure of a computer device according to an embodiment of the application.
- terminal and “terminal equipment” used herein include both wireless signal receiver equipment, equipment that only has wireless signal receivers without transmitting capability, and equipment receiving and transmitting hardware.
- a device which has a device capable of performing two-way communication receiving and transmitting hardware on a two-way communication link.
- Such equipment may include: cellular or other communication equipment, which has a single-line display or multi-line display or cellular or other communication equipment without a multi-line display; PCS (Personal Communications Service, personal communication system), which can combine voice and data Processing, fax and/or data communication capabilities; PDA (Personal Digital Assistant), which can include radio frequency receivers, pagers, Internet/Intranet access, web browsers, notepads, calendars and/or GPS (Global Positioning System (Global Positioning System) receiver; a conventional laptop and/or palmtop computer or other device, which has and/or includes a radio frequency receiver, a conventional laptop and/or palmtop computer or other device.
- PCS Personal Communications Service, personal communication system
- PDA Personal Digital Assistant
- GPS Global Positioning System (Global Positioning System) receiver
- a conventional laptop and/or palmtop computer or other device which has and/or includes a radio frequency receiver, a conventional laptop and/or palmtop computer or other device.
- terminal and terminal equipment used here may be portable, transportable, installed in vehicles (aviation, sea and/or land), or suitable and/or configured to operate locally, and/or In a distributed form, it runs on the earth and/or any other location in space.
- the "terminal” and “terminal device” used here can also be communication terminals, Internet terminals, music/video playback terminals, such as PDA, MID (Mobile Internet Device, mobile Internet device) and/or music/video playback Functional mobile phones can also be devices such as smart TVs and set-top boxes.
- FIG. 1 is a schematic diagram of the basic flow of the image verification method in this embodiment.
- a picture verification method includes:
- the method of segmentation can be: segmentation according to a fixed format, for example, divide the target picture into 9 pictures in a nine-square grid; according to the content of the target picture Perform segmentation, for example, using image key point segmentation.
- the segmented image generated after the target picture is segmented is defined as a fragmented image.
- Each target picture is divided into at least 2 fragmented images, but it is not limited to this. According to different application scenarios, the target picture can be divided into 4 fragments. , 9, 16 or more fragment images. Each fragment image is a component of the target picture, therefore, all fragment images can be combined and restored into the target picture.
- the target picture is a verification picture containing verification information.
- the content recorded in the target picture is not limited to this, and the content recorded in the target picture can be of any style according to different specific application scenarios.
- S1200 Splicing the several fragment images according to a preset restoration rule to generate the target picture, wherein the restoration rule records the position relationship of each fragment image in the target picture;
- the user side After the user side receives the fragmented atlas sent by the server side, it needs to stitch several fragment images through restoration rules, where the restoration rule is the policy data that records the location of each fragment image in the target picture.
- the restoration rule is the policy data that records the location of each fragment image in the target picture.
- the restoration rule is a consensus policy file reached by the server and the client.
- the segmentation method is to divide the target picture into 4 fragment images. And the 4 fragment images are numbered from left to right: 05236, 06978, 28645, and 36785, and the restoration rule reached by the server and the client is: the number is 05236, set in the first digit of the first row from the left, number 06978 is placed in the second digit of the first row from the left, the number 28645 is placed in the first digit of the second row from the left, and the number 36785 is placed in the second digit of the second row from the left.
- the user terminal can quickly realize the splicing of the target pictures.
- the server side executes the above naming rules during segmentation, the user side can realize quick stitching according to the number of fragment images.
- the same method can be extended to target picture mosaics with any number of fragmented images.
- the server side when the server side divides the target picture in an unordered manner, the server side needs to number the image for each fragmented image divided by the server side, and mark the number in the same specification as the target picture. On the blank canvas, after the target image is divided, the number of each fragment image is also marked on the blank canvas. Then the canvas that records the number of each fragment image is sent to the client before the fragmentation atlas. The client first receives the number distribution map, then receives the fragmentation atlas, and finally divides each fragment image by number according to the number distribution map Stitch to generate the target image.
- the client Since the verification information is recorded in the target picture, the client displays the target picture after the splicing of the target picture on the client side is completed, so that the user can learn the verification information recorded in the target picture through the target picture.
- the fixed area of the display screen or display window of the user terminal is divided into a verification area, and the target picture is displayed in the verification area.
- the server side when the server side sends a target picture to the user side, it needs to segment the target picture to generate several fragment images, and package the fragment images into a fragmented atlas and send it to the user side.
- the user terminal receives the fragmented atlas to splice several fragmented images according to the preset restoration rules, and after the splicing is completed, a target picture with verification information is obtained. Since the splicing method of the fragmented image to generate the target picture is unique, if the receiver does not have a consensus restoration rule with the server side, even if the fragmented atlas is obtained, the target picture cannot be restored quickly, and then quickly obtained Verification information recorded in it. Therefore, the method of segmenting and transmitting the target picture can effectively increase the difficulty of image verification and improve the security of image verification.
- the compression algorithm when performing image stitching in the prior art, will make the colors of two adjacent pixels approaching, that is, the average color value will be calculated according to the color value of the pixel at the edge position of the stitched image, and then Modify the color value of the pixels at the adjacent splicing point to the average color value, to achieve the problem of color transition during splicing.
- this method when this method is used in image stitching with large color difference values, it will cause image distortion at the stitching position, which will cause the verification information recorded in the target image to be difficult to identify or even make mistakes. Therefore, it is necessary to check each fragment before image stitching.
- the edge of the image extends out of the splicing buffer zone.
- FIG. 2 is a schematic diagram of the process of generating splicing buffer bands in this embodiment.
- the client After the client obtains the fragmented atlas, it reads the edge pixels of each fragmented image in the fragmented atlas.
- the edge pixels are the outermost pixels of each fragment image.
- the detection method is: place the fragment image on the transparent canvas, and then detect the edge of the boundary between the fragment image and the transparent canvas, and the pixel at the edge position is the edge pixel.
- n (n ⁇ 1) pixels are extended outwards from the edge pixel. Pixels and edge pixels have the same color value.
- the extended pixels form a stitching buffer zone at the edge of each fragment image. The number of pixels extending from the edge position directly determines the width of the splicing buffer.
- FIG. 3 is a schematic diagram of the first process of splicing fragment images in this embodiment.
- S1200 includes:
- the restoration rule is a consensus policy file reached by the server and the client.
- the segmentation method is to divide the target image into 4 fragment images and compare the 4 fragment images.
- the numbers from left to right are: 05236, 06978, 28645, and 36785.
- the restoration rules reached by the server and the client are: the number 05236 is set in the first row from the left, and the number 06978 is set from the left.
- the second digit of the first row, the number 28645 is placed in the first digit of the second row from the left, and the number 36785 is placed in the second digit of the second row from the left.
- S1212 Offset the stitching buffer strips at the edges of any two adjacent fragment images to eliminate the cracks caused by stitching.
- the pixel points at the stitching buffer zone will be forced to equalize the color value during image stitching, that is, the color values of the two fragment images at the stitching position tend to be the same. Therefore, it is necessary to set an equivalent offset strategy, the same color
- the pixel points of the value of the value cancel each other when splicing, and the width of the offset pixel point of each fragment image is the same as the width of the pixel point extending out.
- the pixels of the splicing buffer zone will be canceled each other. Then, there is no loss of the edge pixels of the fragmented images during the final splicing, which realizes the lossless splicing of the images.
- FIG. 4 is a schematic diagram of a process of cropping when splicing fragment images in this embodiment.
- the distribution relationship of the fragment images adjacent to different sides of each fragment image is read. For example, if a fragment image is located on the side of the target picture, and the fragment image is rectangular, the three sides of the fragment image are all adjacent to other fragment images, but the one side on the edge of the target picture is adjacent to other fragment images. Fragment images are not adjacent. Therefore, statistics on the neighboring relationship distribution of different side edges of different fragment images can confirm the side edges of the fragment images located at the edge of the target picture.
- S1222 Cut the splicing buffer strips on the sides that do not have an adjacent distribution relationship to remove splicing buffer strips generated at the edge of the target picture.
- the stitching buffer zone of the side edge is cropped.
- the cutting method is to cut the sides that do not have adjacent distribution relationships, and the width of the cut is n pixels. After cutting, the stitching buffers of the sides that do not have adjacent distribution relationships are removed, and then The stitching buffer zone generated by the edge of the target picture is removed.
- FIG. 5 is a schematic diagram of a process of image splicing by image number in this embodiment.
- S1200 includes:
- the restoration rule is a consensus policy file reached by the server and the client.
- the segmentation method is to divide the target image into 4 fragment images and compare the 4 fragment images. The numbers from left to right are: 05236, 06978, 28645 and 36785.
- the fragment images are spliced according to the arrangement relationship of image numbers to generate the target picture.
- the restoration rule reached by the server and the client is: the number 05236 is set in the first row from the left, the number 06978 is set in the first row from the left and the second place, and the number 28645 is set in the second row from the left.
- the first digit, numbered 36785, is placed in the second digit in the second row from the left.
- FIG. 6 is a schematic diagram of a process of obtaining a target picture in a display area in this embodiment.
- step S1300 shown in FIG. 1 it includes:
- the user terminal When the user terminal displays the target image, it needs to store the verification page including the target image in the frame buffer memory, that is, the frame buffer memory is a direct image of the screen displayed on the screen, also known as a bit map. That is, the data is displayed.
- the frame buffer memory is a direct image of the screen displayed on the screen, also known as a bit map. That is, the data is displayed.
- the data area representing the content of the verification area is extracted from the bitmap to generate a local bitmap, that is, the target data that represents the display content of the target image .
- S1313 Convert the target data into a picture format to generate a screenshot screen.
- the verification method is virtual verification.
- FIG. 7 is a schematic diagram of the process of judging whether the target image is consistent with the screenshot image in this embodiment.
- the server Before segmenting the target picture, the server needs to perform feature extraction on the target picture, and the feature extraction is extracted through a neural network model trained to a convergent state. After the neural network is extracted, the target feature vector of the target picture is generated.
- the screenshot picture and the target feature vector are input into a preset verification judgment model, where the verification judgment model is a neural network model that is pre-trained to a convergence state for judging whether the images are the same.
- the verification judgment model can be a convolutional neural network model (CNN) that has been trained to a convergent state, but is not limited to this.
- the verification judgment model can also be: deep neural network model (DNN), recurrent neural network model (RNN) or a deformed model of the above three network models.
- DNN deep neural network model
- RNN recurrent neural network model
- the verification and judgment model used on the client side is the same as the neural network model on the server side.
- the verification judgment model is a neural network model of convergence, and the verification judgment model used on the client side is the same as the neural network model on the server side. Therefore, the feature vector in the screenshot can be extracted accurately and quickly, and then compared with the Whether the feature vector and the target feature vector are the same or different.
- S1323 Send verification information to the server according to the judgment result output by the verification judgment model.
- the judgment result output by the verification judgment model contains a judgment conclusion that the verification judgment model judges whether the screenshot screen is the same as the target feature vector. If the judgment result records that the screenshot screen is the same as the target feature vector, the client verification result is passed, and the final verification result is passed verification; if the judgment result records that the screenshot screen is different from the target feature vector, the client sends the judgment result to the server. After the server side receives the judgment result, the user side verification result is not passed, and no matter whether the verification result sent by the user side to the server side is passed or not, the final verification result is not passed.
- the client side judges whether the target feature vector and the screenshot are the same, which can prevent the virtual verifier from writing image data to the frame buffer memory by deception to avoid detection, which improves the accuracy of verification and further ensures the network data. safety.
- an embodiment of the present application also provides a picture verification device.
- FIG. 8 is a schematic diagram of the basic structure of the image verification device in this embodiment.
- a picture verification device includes: an acquisition module 2100, a processing module 2200, and an execution module 2300.
- the acquisition module 2100 is used to acquire a fragmented atlas formed by segmenting the target picture, wherein the fragmented atlas includes several fragment images
- the processing module 2200 is used to splice several fragment images to generate a target according to preset restoration rules Picture, where the restoration rule records the positional relationship of each fragment image in the target picture
- the execution module 2300 is used to display the target picture in the set verification area, so that the user can learn from the target picture what is recorded in the target picture verify message.
- the server in the picture verification device When sending the target picture to the client, the server in the picture verification device needs to segment the target picture to generate several fragmented images, and package the fragmented images into a fragmented atlas to send to the user.
- the user terminal receives the fragmented atlas to splice several fragmented images according to the preset restoration rules, and after the splicing is completed, a target picture with verification information is obtained. Since the splicing method of the fragmented image to generate the target picture is unique, if the receiver does not have a consensus restoration rule with the server side, even if the fragmented atlas is obtained, the target picture cannot be restored quickly, and then quickly obtained Verification information recorded in it. Therefore, the method of segmenting and transmitting the target picture can effectively increase the difficulty of image verification and improve the security of image verification.
- the image verification device further includes: a first reading submodule and a first processing submodule.
- the first reading sub-module is used to read the edge pixels of each fragment image in the fragmented atlas; the first processing sub-module is used to generate at least one pixel point according to the edge pixels extending outward to generate the stitching buffer of each fragment image band.
- the image verification apparatus further includes: a second processing submodule and a first execution submodule.
- the second processing sub-module is used to splice several fragment images into target pictures with cracks according to the restoration rules;
- the first execution sub-module is used to offset the splicing buffer bands at the edges of any two adjacent fragment images to cancel each other out. Eliminate cracks due to splicing.
- the image verification device further includes: a first acquisition submodule and a second execution submodule.
- the first acquisition sub-module is used to acquire the distribution relationship of the fragment images adjacent to different sides in each fragment image;
- the second execution sub-module is used to cut the stitching buffer strips of the sides that do not have the adjacent distribution relationship, To remove the stitching buffer zone generated by the edge of the target picture.
- each fragmented image in the fragmented atlas has a corresponding image number, and the relative arrangement relationship between each image number is recorded in the restoration rule.
- the image verification device further includes: a second acquisition submodule and a third processing Submodule. Among them, the second acquisition sub-module is used to acquire the image number corresponding to each fragment image in the fragmented atlas; the third processing sub-module is used to splice each fragment image according to the arrangement relationship of the image numbers according to the restoration rule to generate the target picture.
- the image verification device further includes: a third acquisition submodule, a fourth processing submodule, and a third execution submodule.
- the third acquisition sub-module is used to acquire the display data in the frame buffer memory
- the fourth processing sub-module is used to extract the target data representing the display content of the verification area from the display data according to the position of the verification area
- the third execution sub-module is used To convert the target data into a picture format to generate a screenshot screen.
- the image verification apparatus further includes: a fourth acquisition submodule, a fifth processing submodule, and a fourth execution submodule.
- the fourth acquisition sub-module is used to acquire the target feature vector of the target picture
- the fifth processing sub-module is used to input the screenshot picture and the target feature vector into a preset verification judgment model, wherein the verification judgment model is pre-trained to The convergence state is used to determine whether the images are the same neural network model
- the fourth execution sub-module is used to send verification information to the server according to the judgment result output by the verification judgment model.
- FIG. 9 is a block diagram of the basic structure of the computer device in this embodiment.
- the computer device includes a processor, a nonvolatile storage medium, a memory, and a network interface connected through a system bus.
- the non-volatile storage medium of the computer device stores an operating system, a database, and computer-readable instructions.
- the database may store control information sequences.
- the processor can realize a An image verification method.
- the processor of the computer equipment is used to provide calculation and control capabilities, and supports the operation of the entire computer equipment.
- a computer readable instruction may be stored in the memory of the computer device, and when the computer readable instruction is executed by the processor, the processor may execute a picture verification method.
- the network interface of the computer device is used to connect and communicate with the terminal.
- FIG. 9 is only a block diagram of part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied.
- the specific computer device may Including more or less parts than shown in the figure, or combining some parts, or having a different part arrangement.
- the processor is used to execute the specific functions of the acquisition module 2100, the processing module 2200, and the execution module 2300 in FIG. 8, and the memory stores the program codes and various data required to execute the above modules.
- the network interface is used for data transmission between user terminals or servers.
- the memory in this embodiment stores the program codes and data required to execute all the sub-modules in the human face image key point detection device, and the server can call the program codes and data of the server to execute the functions of all the sub-modules.
- the computer device When the computer device sends a target picture to the client at the receiving server, it needs to segment the target picture to generate a number of fragmented images, and package the fragmented images into a fragmented atlas to send to the client.
- the user terminal receives the fragmented atlas and stitches several fragmented images according to the preset restoration rules. After the stitching is completed, the target image with verification information is obtained. Since the splicing method of the fragmented image to generate the target picture is unique, if the receiver does not have a consensus restoration rule with the server side, even if the fragmented atlas is obtained, the target picture cannot be restored quickly, and then quickly obtained Verification information recorded in it. Therefore, the method of segmenting and transmitting the target picture can effectively increase the difficulty of image verification and improve the security of image verification.
- the present application also provides a storage medium storing computer-readable instructions.
- the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the image verification method in any one of the foregoing embodiments.
- the computer program can be stored in a computer readable storage medium. When executed, it may include the processes of the above-mentioned method embodiments.
- the aforementioned storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM), or a volatile storage medium (Random Access Memory, RAM), etc. Storage medium.
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Computer Security & Cryptography (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Image Processing (AREA)
Abstract
本申请实施例公开了一种图片验证方法、装置、计算机设备及存储介质。所述方法包括:获取由目标图片分割而成的碎片化图集,其中,所述碎片化图集中包括若干碎片图像;根据预设的还原规则对所述若干碎片图像进行拼接生成所述目标图片;将所述目标图片在设定的验证区域内进行显示,以使用户通过所述目标图片获知所述目标图片中记载的验证信息。碎片图像拼接生成目标图片的拼接方式是唯一的,因此,如果接收方不具有与服务器端具有共识的还原规则,即使在得到了碎片化图集也无法快速的还原目标图片,进而快速获取记载在其中的验证信息。所以,对目标图片进行分割传输的方法,能够有效地提高图像验证的破解难度,提高了图像验证的安全性。
Description
本申请要求于2019年8月14日提交中国专利局、申请号为201910750386.0,发明名称为“图片验证方法、装置、计算机设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请实施例涉及数据安全领域,尤其是一种图片验证方法、装置、计算机设备及存储介质。
伴随着科学技术的发展,信息化时代的来临为我们带来了很多的便利,同时,也为人们的生活带来诸多的困扰。例如,通过互联网进行网络购票时,常常有不法商贩通过开发应用程序快速的进行刷票,然后高价进行转卖获得暴利,而真正需要购买的用户却无法通过互联网接口进行购买,且现实生活中,类似的互联网资源抢夺发生在各个领域,通过应用程序快速刷票和领取佣金的行为难以被杜绝。
为解决上述技术问题,现有技术中提供一种图像验证方式,在用户请求登录或者接入互联网或者访问服务器端时,向该用户端发送验证图片,验证图片上具有验证信息,用户端向用户展示该验证图片后,用户根据验证图片中记载的验证信息完成验证后,才能够进行进一步地操作。
但是本申请的发明人在研究中发现,现有技术中服务器端发送至用户端的验证图片容易被截获,并使用图像识别技术提取其中的验证信息,进而完成验证。因此,图像验证技术中存在较大的安全隐患,需要进一步的优化。
发明内容
本申请实施例提供一种在进行图片传输时,将图片分割为若干碎片化的图像,只有正确的拼接了若干碎片化的图像后,才能够识别其中验证信息的图片验证方法、装置、计算机设备及存储介质。
为解决上述技术问题,本申请实施例采用的一个技术方案是:提供一种图片验证方法,包括:获取由目标图片分割而成的碎片化图集,其中,所述碎片化图集中包括若干碎片图像;根据预设的还原规则对所述若干碎片图像进行拼接生成所述目标图片,其中,所述还原规则中记载有各个碎片图像在所述目标图片中的位置关系;将所述目标图片在设定的验证区域内进行显示,以使用户通过所述目标图片获知所述目标图片 中记载的验证信息。
为解决上述技术问题,本申请实施例还提供一种图片验证装置,包括:获取模块,用于获取由目标图片分割而成的碎片化图集,其中,所述碎片化图集中包括若干碎片图像;处理模块,用于根据预设的还原规则对所述若干碎片图像进行拼接生成所述目标图片,其中,所述还原规则中记载有各个碎片图像在所述目标图片中的位置关系;执行模块,用于将所述目标图片在设定的验证区域内进行显示,以使用户通过所述目标图片获知所述目标图片中记载的验证信息。
为解决上述技术问题,本申请实施例还提供一种计算机设备,包括存储器和处理器,所述存储器中存储有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行一种图片验证方法的下述步骤:获取由目标图片分割而成的碎片化图集,其中,所述碎片化图集中包括若干碎片图像;根据预设的还原规则对所述若干碎片图像进行拼接生成所述目标图片,其中,所述还原规则中记载有各个碎片图像在所述目标图片中的位置关系;将所述目标图片在设定的验证区域内进行显示,以使用户通过所述目标图片获知所述目标图片中记载的验证信息。
为解决上述技术问题,本申请实施例还提供一种存储有计算机可读指令的存储介质,所述计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行一种图片验证方法的下述步骤:获取由目标图片分割而成的碎片化图集,其中,所述碎片化图集中包括若干碎片图像;根据预设的还原规则对所述若干碎片图像进行拼接生成所述目标图片,其中,所述还原规则中记载有各个碎片图像在所述目标图片中的位置关系;将所述目标图片在设定的验证区域内进行显示,以使用户通过所述目标图片获知所述目标图片中记载的验证信息。
本申请实施例中服务器端在向用户端发送目标图片时,需要将目标图片进行分割生成若干碎片图像,并将碎片图像打包成碎片化图集发送至用户端。用户端接收到该碎片化图集根据预设的还原规则对若干碎片图像进行拼接,拼接完成后得到具有验证信息的目标图片。由于,碎片图像拼接生成目标图片的拼接方式是唯一的,因此,如果接收方不具有与服务器端具有共识的还原规则,即使在得到了碎片化图集也无法快速的还原目标图片,进而快速获取记载在其中的验证信息。所以,对目标图片进行分割传输的方法,能够有效地提高图像验证的破解难度,提高了图像验证的安全性。
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例, 对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请实施例图片验证方法的基本流程示意图;
图2为本申请实施例生成拼接缓冲带的流程示意图;
图3为本申请实施例进行碎片图像拼接的第一种流程示意图;
图4为本申请实施例进行碎片图像拼接时裁剪的一种流程示意图;
图5为本申请实施例通过图像编号进行图像拼接的流程示意图;
图6为本申请实施例获取显示区域中目标图片的流程示意图;
图7为本申请实施例判断目标图片与截图画面是否一致的流程示意图;
图8为本申请实施例图片验证装置基本结构示意图;
图9为本申请实施例计算机设备基本结构框图。
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。
在本申请的说明书和权利要求书及上述附图中的描述的一些流程中,包含了按照特定顺序出现的多个操作,但是应该清楚了解,这些操作可以不按照其在本文中出现的顺序来执行或并行执行,操作的序号如101、102等,仅仅是用于区分开各个不同的操作,序号本身不代表任何的执行顺序。另外,这些流程可以包括更多或更少的操作,并且这些操作可以按顺序执行或并行执行。需要说明的是,本文中的“第一”、“第二”等描述,是用于区分不同的消息、设备、模块等,不代表先后顺序,也不限定“第一”和“第二”是不同的类型。
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本技术领域技术人员可以理解,这里所使用的“终端”、“终端设备”既包括无线信号接收器的设备,其仅具备无发射能力的无线信号接收器的设备,又包括接收和发射硬件的设备,其具有能够在双向通信链路上,执行双向通信的接收和发射硬件的设备。这种设备可以包括:蜂窝或其他通信设备,其具有单线路显示器或多线路显示器或没有多线路显示器的蜂窝或其他通信设备;PCS(Personal Communications Service,个人通信系统),其可以组合语音、数据处理、传真和/或数据通信能力;PDA(Personal Digital Assistant,个人数字助理),其可以包括射频接收器、寻呼机、互联网/内联网访问、网络浏览器、记事本、日历和/或GPS(Global Positioning System,全球定位系统)接收器;常规膝上型和/或掌上型计算机或其他设备,其具有和/或包括射频接收器的常规膝上型和/或掌上型计算机或其他设备。这里所使用的“终端”、“终端设备”可以是便携式、可运输、安装在交通工具(航空、海运和/或陆地)中的,或者适合于和/或配置为在本地运行,和/或以分布形式,运行在地球和/或空间的任何其他位置运行。这里所使用的“终端”、“终端设备”还可以是通信终端、上网终端、音乐/视频播放终端,例如可以是PDA、MID(Mobile Internet Device,移动互联网设备)和/或具有音乐/视频播放功能的移动电话,也可以是智能电视、机顶盒等设备。
具体请参阅图1,图1为本实施例图片验证方法的基本流程示意图。
如图1所示,一种图片验证方法,包括:
S1100、获取由目标图片分割而成的碎片化图集,其中,所述碎片化图集中包括若干碎片图像;
服务器端在向用户端发送目标图片时,需要将目标图片进行分割,分割的方式能够为:根据固定格式进行分割,例如,将目标图片按照九宫格的方式划分为9张图片;根据目标图片的内容进行分割,例如,采用图像关键点分割法。
目标图片被分割后生成的分割图像被定义为碎片图像,每一张目标图片至少被分割为2张碎片图像,但是不局限于此,根据具体应用场景的不同,目标图片能够被分割为4张、9张、16张或者更多张碎片图像。每一张碎片图像均属于目标图片的组成部分,因此,所有的碎片图像能够被组合还原成为目标图片。
本实施方式中,目标图片为包含验证信息的验证图片,但是,目标图片中记载的内容不局限于此,根据具体应用场景的不同,目标图片中记载的内容能够为任意风格。
S1200、根据预设的还原规则对所述若干碎片图像进行拼接生成所述目标图片,其中,所述还原规则中记载有各个碎片图像在所述目标图片中的位置关系;
用户端在接收到服务器端发送的碎片化图集后,需要通过还原规则对若干碎片图像进行拼接,其中,还原规则就是记载各个碎片图像在目标图片中所在的位置的策略数据。
在一些实施方式中,通过规则分割的方式对目标图片进行分割时,还原规则为服务器端和用户端达成的具有共识的策略文件,例如,分割方式为将目标图片等分为4张碎片图像,并对4张碎片图像自左向右依次标号为:05236、06978、28645和36785,而服务器端与用户端达成共识的还原规则为:编号为05236设置于左起第一行第一位, 编号为06978设置于左起第一行第二位,编号为28645设置于左起第二行第一位,编号为36785设置于左起第二行第二位。根据上述的还原规则,用户端就能够快速地实现目标图片的拼接。而只要服务器端在分割时执行上述命名规则,用户端就能够根据碎片图像的编号实现快速拼接。以此类推,同样的方式可以扩展到具有任意张数碎片图像的目标图片拼接中。
在一些实施方式中,当服务器端通过无序的方式对目标图片进行分割时,服务器端每分割出一张碎片图像均要对该图像进行编号,并将该编号标记在与目标图片同等规格的空白画布上,将目标图片分割完成后,空白画布上也标记了各个碎片图像的编号。然后将记录各个碎片图像的编号的画布在碎片化图集之前发送至用户端,用户端首先接收到编号分布图,然后再接收碎片化图集,最后根据编号分布图将各个碎片图像按编号进行拼接,生成目标图片。
S1300、将所述目标图片在设定的验证区域内进行显示,以使用户通过所述目标图片获知所述目标图片中记载的验证信息。
由于,目标图片中记载有验证信息,因此,当目标图片在用户端拼接完成后,客户端对目标图片进行显示,以使用户通过目标图片获知该目标图片中记载的验证信息。
在一些实施方式中,用户端的显示屏幕或者显示窗口的固定区域被划分为验证区域,目标图片被显示在该验证区域内。
上述实施方式中服务器端在向用户端发送目标图片时,需要将目标图片进行分割生成若干碎片图像,并将碎片图像打包成碎片化图集发送至用户端。用户端接收到该碎片化图集根据预设的还原规则对若干碎片图像进行拼接,拼接完成后得到具有验证信息的目标图片。由于,碎片图像拼接生成目标图片的拼接方式是唯一的,因此,如果接收方不具有与服务器端具有共识的还原规则,即使在得到了碎片化图集也无法快速的还原目标图片,进而快速获取记载在其中的验证信息。所以,对目标图片进行分割传输的方法,能够有效地提高图像验证的破解难度,提高了图像验证的安全性。
在一些实施方式中,现有技术进行图片拼接时,压缩算法将会使两个相邻像素的颜色趋于接近,即会根据拼接图像的边缘位置处像素点的色值计算平均色值,然后把相邻拼接处的像素点的色值修改为平均色值,达到拼接时颜色过渡的问题。但是,这种方式使用在色差值较大的图像拼接时,会在拼接位置造成图像失真,进而导致目标图片中记录的验证信息难以辨识甚至发生错误,因此,需要在图像拼接之前在各个碎片图像的边缘延伸出拼接缓冲带,拼接缓冲带在拼接时被算法强制性的趋于相同后,设定抵消规则使拼接缓冲带的像素点相互抵消,最终保护了碎片图像边缘的像素点不 被色值调整,防止拼接导致的图像失真现象。请参阅图2,图2为本实施例生成拼接缓冲带的流程示意图。
如图2所示,S1200之前,包括:
S1111、读取所述碎片化图集中各个碎片图像的边缘像素点;
在客户端获取到碎片化图集后,读取碎片化图集中各个碎片图像的边缘像素点。边缘像素点为各个碎片图像最外侧的像素点。检测的方式为:将碎片图像放置在透明画布上,然后检测碎片图像与透明画布交界的边缘,位于该边缘位置处的像素点为边缘像素点。
S1112、根据所述边缘像素点向外延伸生至少一个像素点生成所述各个碎片图像的拼接缓冲带。
读取各个碎片图像的边缘后,读取边缘像素点的色值,根据各个边缘像素点的色值,在边缘像素点的外侧向外延伸出n(n≥1)个像素点,延伸出的像素点与边缘像素点具有相同的色值。当每个边缘像素点均延伸出n个像素点后,延伸出的像素点在各个碎片图像边缘形成拼接缓冲带。边缘位置延伸出的像素点的多寡,直接决定了拼接缓冲带的宽窄。
拼接缓冲带位置处的像素点在进行图像拼接时,会被强制均衡色值,即拼接位置处的两个碎片图像的色值趋于相同,因此,需要设置一种等同抵消的策略,相同色值的像素点在拼接时相互抵消,且各碎片图像抵消的像素点宽度与外延伸出的像素点宽度相同。根据上述抵消规则,在碎片图像拼接时,拼接缓冲带的像素点会被相互抵消,则最终拼接时,碎片图像的边缘像素点没有任何损失,实现了图像的无损拼接。请参阅图3,图3为本实施例进行碎片图像拼接的第一种流程示意图。
如图3所示,S1200包括:
S1211、根据所述还原规则将所述若干碎片图像拼接成具有裂纹的目标图片;
通过规则分割的方式对目标图片进行分割时,还原规则为服务器端和用户端达成的具有共识的策略文件,例如,分割方式为将目标图片等分为4张碎片图像,并对4张碎片图像自左向右依次标号为:05236、06978、28645和36785,而服务器端与用户端达成共识的还原规则为:编号为05236设置于左起第一行第一位,编号为06978设置于左起第一行第二位,编号为28645设置于左起第二行第一位,编号为36785设置于左起第二行第二位。
碎片图像排布完成后,各个拼接位置是留有间隙的,该间隙形成了具有裂纹的目标图片。
S1212、将任意两个相邻的碎片图像边缘的拼接缓冲带进行相互抵消,以消弭由于拼接产生的裂纹。
拼接缓冲带位置处的像素点在进行图像拼接时,会被强制均衡色值,即拼接位置处的两个碎片图像的色值趋于相同,因此,需要设置一种等同抵消的策略,相同色值的像素点在拼接时相互抵消,且各碎片图像抵消的像素点宽度与外延伸出的像素点宽度相同。根据上述抵消规则,在碎片图像拼接时,拼接缓冲带的像素点会被相互抵消,则最终拼接时,碎片图像的边缘像素点没有任何损失,实现了图像的无损拼接。
在一些实施方式中,当碎片图像的边缘延伸出拼接缓冲带,在拼接时部分拼接缓冲带由于像素点的相互抵消而消失,但是,位于目标图片最外侧的接缓冲带由于无法被抵消,会在目标图片边缘位置产生环绕目标图片的拼接缓冲带,因此,需要将该部分的拼接缓冲带予以裁剪。请参阅图4,图4为本实施例进行碎片图像拼接时裁剪的一种流程示意图。
如图4所示,S1212之前,包括:
S1221、获取各个碎片图像中不同侧边相邻的碎片图像的分布关系;
将各个碎片图像进行拼接生成具有裂纹的目标图片后,读取各个碎片图像不同侧边相邻的碎片图像的分布关系。例如,某个碎片图像位于目标图片的侧边位置处,且该碎片图像为长方形,则该碎片图像的三条边均与其他的碎片图像相邻,但是位于目标图片边缘的一条侧边则与其他碎片图像不相邻,因此,统计不同碎片图像不同侧边的相邻关系分布关系,能够确认碎片图像中位于目标图片边缘的侧边。
S1222、将不具有相邻分布关系的侧边的所述拼接缓冲带进行裁剪,以去除所述目标图片边缘产生的拼接缓冲带。
在确定了碎片图像中不具有相邻分布关系的侧边,则对该侧边的拼接缓冲带进行裁剪。裁剪的方式为将不具有相邻分布关系的侧边进行剪切,剪切的宽度为n个像素点,则经过剪切后不具有相邻分布关系的侧边的拼接缓冲带被去除,进而去除了目标图片边缘产生的拼接缓冲带。
在一些实施方式中,当服务器端采用规则的裁剪方式对目标图片进行裁剪时,用户端通过图像编号对碎片图像进行拼接,以生成目标图片。请参阅图5,图5为本实施例通过图像编号进行图像拼接的流程示意图。
如图5所示,S1200包括:
S1231、获取所述碎片化图集中各个碎片图像对应的图像编号;
通过规则分割的方式对目标图片进行分割时,还原规则为服务器端和用户端达成 的具有共识的策略文件,例如,分割方式为将目标图片等分为4张碎片图像,并对4张碎片图像自左向右依次标号为:05236、06978、28645和36785。
S1332、根据所述还原规则将所述各个碎片图像按图像编号的排布关系进行拼接生成所述目标图片。
服务器端与用户端达成共识的还原规则为:编号为05236设置于左起第一行第一位,编号为06978设置于左起第一行第二位,编号为28645设置于左起第二行第一位,编号为36785设置于左起第二行第二位。根据上述的还原规则,用户端就能够快速的实现目标图片的拼接。而只要服务器端在分割时执行上述命名规则,用户端就能够根据碎片图像的编号实现快速拼接。以此类推,同样的方式可以扩展到具有任意张数碎片图像的目标图片拼接中。
在一些实施方式中,部分非人工验证的验证方式直接提取后台的目标图片,经过计算后将验证参数进行上传,完成验证。为限制该模拟验证的行为,需要通过图像分类的方法对验证完成时的验证画面进行判断,以确定是否进行了真实的图片验证。请参阅图6,图6为本实施例获取显示区域中目标图片的流程示意图。
如图6所示,图1所示的S1300步骤之后,包括:
S1311、获取帧缓冲存储器内的显示数据;
用户端对目标图片进行显示时,需要将包括目标图片的验证页面存储在帧缓冲存储器内,即帧缓冲存储器内是屏幕所显示画面的一个直接映像,又称为位映射图(Bit Map),也即显示数据。
S1312、根据所述验证区域的位置在所述显示数据内提取表征所述验证区域显示内容的目标数据;
由于,目标图片在位映射图中的具有设定的区域,根据设定区域的信息,在位映射图提取表征验证区域内容的数据区域生成局部位映射图,即表征目标图片显示内容的目标数据。
S1313、将所述目标数据转换为图片格式生成截图画面。
最后将目标数据转换为常规的图片格式,例如(不限于)JPG、PNG或者TIF等格式,生成截图画面,由于,截图画面是验证区域内的图像,因此,正常验证显示时截图画面的内容与目标图片的内容一致。
在一些实施方式中,在帧缓冲存储器内无法获取到截图画面时,则表明该验证方式为虚拟验证。
通过对验证页面中目标图片进行验证,能够有效地防止通过虚拟验证的进行数据 上传的验证漏洞,大大地提高了验证的安全性。
在一些实施方式中,为避免机械识别通过在帧缓冲存储器内存储固定的图片,蒙蔽通过帧缓冲存储器内数据进行检测的结果,需要对生成的截图画面进行判断,判断截图画面与目标图片是否一致。请参阅图7,图7为本实施例判断目标图片与截图画面是否一致的流程示意图。
如图7所示,图6所示的S1313步骤之后,包括:
S1321、获取所述目标图片的目标特征向量;
服务器端在对目标图片进行分割之前,需要对目标图片进行特征提取,特征提取通过训练至收敛状态的神经网络模型进行提取。经过神经网络提取后,生成目标图片的目标特征向量。
S1322、将所述截图画面与所述目标特征向量输入至预设的验证判断模型中,其中,所述验证判断模型为预先训练至收敛状态,用于判断图像是否相同的神经网络模型;
将截图画面与目标特征向量输入至预设的验证判断模型中,其中,验证判断模型为预先训练至收敛状态用于判断图像是否相同的神经网络模型。
本实施方式中验证判断模型能够为已经训练至收敛状态的卷积神经网络模型(CNN),但是,不局限于此,验证判断模型还能够是:深度神经网络模型(DNN)、循环神经网络模型(RNN)或者上述三种网络模型的变形模型。用户端使用的验证判断模型与服务器端的神经网络模型相同。
验证判断模型为收敛形态的神经网络模型,且用户端使用的验证判断模型与服务器端的神经网络模型相同,因此,能够准确快速地提取到截图画面中的特征向量,然后,比对截图画面中的特征向量与目标特征向量是否相同或者不相同。
S1323、根据所述验证判断模型输出的判断结果向服务器端发送验证信息。
验证判断模型输出的判断结果中,记载有验证判断模型判断截图画面与目标特征向量是否相同的判断结论。若判断结果记载截图画面与目标特征向量相同,则用户端验证结果通过,最终的验证结果为通过验证;若判断结果记载截图画面与目标特征向量不相同,则用户端向服务器端发送该判断结果,服务器端接收到该判断结果后,则用户端验证结果不通过,且无论用户端发送给服务器端的验证结果是否通过,最终的验证结果均为不通过。
用户端对目标特征向量和截图画面是否相同进行判断,能够避免虚拟验证者通过欺骗手段往帧缓冲存储器随意写入图像数据避免检测的手段,提高了验证的准确率,进一步地保证了网络数据的安全性。
为解决上述技术问题,本申请实施例还提供一种图片验证装置。
具体请参阅图8,图8为本实施例图片验证装置基本结构示意图。
如图8所示,一种图片验证装置,包括:获取模块2100、处理模块2200和执行模块2300。其中,获取模块2100用于获取由目标图片分割而成的碎片化图集,其中,碎片化图集中包括若干碎片图像;处理模块2200用于根据预设的还原规则对若干碎片图像进行拼接生成目标图片,其中,还原规则中记载有各个碎片图像在目标图片中的位置关系;执行模块2300用于将目标图片在设定的验证区域内进行显示,以使用户通过目标图片获知目标图片中记载的验证信息。
图片验证装置中服务器端在向用户端发送目标图片时,需要将目标图片进行分割生成若干碎片图像,并将碎片图像打包成碎片化图集发送至用户端。用户端接收到该碎片化图集根据预设的还原规则对若干碎片图像进行拼接,拼接完成后得到具有验证信息的目标图片。由于,碎片图像拼接生成目标图片的拼接方式是唯一的,因此,如果接收方不具有与服务器端具有共识的还原规则,即使在得到了碎片化图集也无法快速的还原目标图片,进而快速获取记载在其中的验证信息。所以,对目标图片进行分割传输的方法,能够有效地提高图像验证的破解难度,提高了图像验证的安全性。
在一些实施方式中,图片验证装置还包括:第一读取子模块和第一处理子模块。其中,第一读取子模块用于读取碎片化图集中各个碎片图像的边缘像素点;第一处理子模块用于根据边缘像素点向外延伸生至少一个像素点生成各个碎片图像的拼接缓冲带。
在一些实施方式中,图片验证装置还包括:第二处理子模块和第一执行子模块。其中,第二处理子模块用于根据还原规则将若干碎片图像拼接成具有裂纹的目标图片;第一执行子模块用于将任意两个相邻的碎片图像边缘的拼接缓冲带进行相互抵消,以消弭由于拼接产生的裂纹。
在一些实施方式中,图片验证装置还包括:第一获取子模块和第二执行子模块。其中,第一获取子模块用于获取各个碎片图像中不同侧边相邻的碎片图像的分布关系;第二执行子模块用于将不具有相邻分布关系的侧边的拼接缓冲带进行裁剪,以去除目标图片边缘产生的拼接缓冲带。
在一些实施方式中,碎片化图集中各个碎片图像均具有对应的图像编号,还原规则中记载各个图像编号之间相对的排布关系,图片验证装置还包括:第二获取子模块和第三处理子模块。其中,第二获取子模块用于获取碎片化图集中各个碎片图像对应的图像编号;第三处理子模块用于根据还原规则将各个碎片图像按图像编号的排布关 系进行拼接生成目标图片。
在一些实施方式中,图片验证装置还包括:第三获取子模块、第四处理子模块和第三执行子模块。其中,第三获取子模块用于获取帧缓冲存储器内的显示数据;第四处理子模块用于根据验证区域的位置在显示数据内提取表征验证区域显示内容的目标数据;第三执行子模块用于将目标数据转换为图片格式生成截图画面。
在一些实施方式中,图片验证装置还包括:第四获取子模块、第五处理子模块和第四执行子模块。其中,第四获取子模块用于获取目标图片的目标特征向量;第五处理子模块用于将截图画面与目标特征向量输入至预设的验证判断模型中,其中,验证判断模型为预先训练至收敛状态,用于判断图像是否相同的神经网络模型;第四执行子模块用于根据验证判断模型输出的判断结果向服务器端发送验证信息。
为解决上述技术问题,本申请实施例还提供计算机设备。具体请参阅图9,图9为本实施例计算机设备基本结构框图。
如图9所示,计算机设备的内部结构示意图。该计算机设备包括通过系统总线连接的处理器、非易失性存储介质、存储器和网络接口。其中,该计算机设备的非易失性存储介质存储有操作系统、数据库和计算机可读指令,数据库中可存储有控件信息序列,该计算机可读指令被处理器执行时,可使得处理器实现一种图片验证方法。该计算机设备的处理器用于提供计算和控制能力,支撑整个计算机设备的运行。该计算机设备的存储器中可存储有计算机可读指令,该计算机可读指令被处理器执行时,可使得处理器执行一种图片验证方法。该计算机设备的网络接口用于与终端连接通信。本领域技术人员可以理解,图9中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
本实施方式中处理器用于执行图8中获取模块2100、处理模块2200和执行模块2300的具体功能,存储器存储有执行上述模块所需的程序代码和各类数据。网络接口用于向用户终端或服务器之间的数据传输。本实施方式中的存储器存储有人脸图像关键点检测装置中执行所有子模块所需的程序代码及数据,服务器能够调用服务器的程序代码及数据执行所有子模块的功能。
计算机设备在接收服务器端向用户端发送目标图片时,需要将目标图片进行分割生成若干碎片图像,并将碎片图像打包成碎片化图集发送至用户端。用户端接收到该碎片化图集根据预设的还原规则对若干碎片图像进行拼接,拼接完成后得到具有验证 信息的目标图片。由于,碎片图像拼接生成目标图片的拼接方式是唯一的,因此,如果接收方不具有与服务器端具有共识的还原规则,即使在得到了碎片化图集也无法快速的还原目标图片,进而快速获取记载在其中的验证信息。所以,对目标图片进行分割传输的方法,能够有效地提高图像验证的破解难度,提高了图像验证的安全性。
本申请还提供一种存储有计算机可读指令的存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行上述任一实施例图片验证方法的步骤。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,该计算机程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,前述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)等非易失性存储介质,或随机存储记忆体(Random Access Memory,RAM)等易失性存储介质。
应该理解的是,虽然附图的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,其可以以其他的顺序执行。而且,附图的流程图中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,其执行顺序也不必然是依次进行,而是可以与其他步骤或者其他步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。
Claims (20)
- 一种图片验证方法,包括:获取由目标图片分割而成的碎片化图集,其中,所述碎片化图集中包括若干碎片图像;根据预设的还原规则对所述若干碎片图像进行拼接生成所述目标图片,其中,所述还原规则中记载有各个碎片图像在所述目标图片中的位置关系;将所述目标图片在设定的验证区域内进行显示,以使用户通过所述目标图片获知所述目标图片中记载的验证信息。
- 根据权利要求1所述的图片验证方法,所述根据预设的还原规则对所述若干碎片图像进行拼接生成所述目标图片之前,包括:读取所述碎片化图集中各个碎片图像的边缘像素点;根据所述边缘像素点向外延伸生至少一个像素点生成所述各个碎片图像的拼接缓冲带。
- 根据权利要求2所述的图片验证方法,所述根据预设的还原规则对所述若干碎片图像进行拼接生成所述目标图片,包括:根据所述还原规则将所述若干碎片图像拼接成具有裂纹的目标图片;将任意两个相邻的碎片图像边缘的拼接缓冲带进行相互抵消,以消弭由于拼接产生的裂纹。
- 根据权利要求3所述的图片验证方法,所述将任意两个相邻的碎片图像边缘的拼接缓冲带进行相互抵消,以消弭由于拼接产生的裂纹之前,包括:获取各个碎片图像中不同侧边相邻的碎片图像的分布关系;将不具有相邻分布关系的侧边的所述拼接缓冲带进行裁剪,以去除所述目标图片边缘产生的拼接缓冲带。
- 根据权利要求1所述的图片验证方法,所述碎片化图集中各个碎片图像均具有对应的图像编号,所述还原规则中记载各个图像编号之间相对的排布关系,所述根据预设的还原规则对所述若干碎片图像进行拼接生成所述目标图片,包括:获取所述碎片化图集中各个碎片图像对应的图像编号;根据所述还原规则将所述各个碎片图像按图像编号的排布关系进行拼接生成所述目标图片。
- 根据权利要求1所述的图片验证方法,所述将所述目标图片在设定的验证区域内进行显示,以使用户通过所述目标图片获知所述目标图片中记载的验证信息之后,包 括:获取帧缓冲存储器内的显示数据;根据所述验证区域的位置在所述显示数据内提取表征所述验证区域显示内容的目标数据;将所述目标数据转换为图片格式生成截图画面。
- 根据权利要求6所述的图片验证方法,所述将所述目标数据转换为图片格式生成所述截图画面之后,包括:获取所述目标图片的目标特征向量;将所述截图画面与所述目标特征向量输入至预设的验证判断模型中,其中,所述验证判断模型为预先训练至收敛状态,用于判断图像是否相同的神经网络模型;根据所述验证判断模型输出的判断结果向服务器端发送验证信息。
- 一种图片验证装置,包括:获取模块,用于获取由目标图片分割而成的碎片化图集,其中,所述碎片化图集中包括若干碎片图像;处理模块,用于根据预设的还原规则对所述若干碎片图像进行拼接生成所述目标图片,其中,所述还原规则中记载有各个碎片图像在所述目标图片中的位置关系;执行模块,用于将所述目标图片在设定的验证区域内进行显示,以使用户通过所述目标图片获知所述目标图片中记载的验证信息。
- 一种计算机设备,包括存储器和处理器,所述存储器中存储有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行一种图片验证方法的下述步骤:获取由目标图片分割而成的碎片化图集,其中,所述碎片化图集中包括若干碎片图像;根据预设的还原规则对所述若干碎片图像进行拼接生成所述目标图片,其中,所述还原规则中记载有各个碎片图像在所述目标图片中的位置关系;将所述目标图片在设定的验证区域内进行显示,以使用户通过所述目标图片获知所述目标图片中记载的验证信息。
- 根据权利要求9所述的计算机设备,所述根据预设的还原规则对所述若干碎片图像进行拼接生成所述目标图片之前,包括:读取所述碎片化图集中各个碎片图像的边缘像素点;根据所述边缘像素点向外延伸生至少一个像素点生成所述各个碎片图像的拼接缓 冲带。
- 根据权利要求10所述的计算机设备,所述根据预设的还原规则对所述若干碎片图像进行拼接生成所述目标图片,包括:根据所述还原规则将所述若干碎片图像拼接成具有裂纹的目标图片;将任意两个相邻的碎片图像边缘的拼接缓冲带进行相互抵消,以消弭由于拼接产生的裂纹。
- 根据权利要求11所述的计算机设备,所述将任意两个相邻的碎片图像边缘的拼接缓冲带进行相互抵消,以消弭由于拼接产生的裂纹之前,包括:获取各个碎片图像中不同侧边相邻的碎片图像的分布关系;将不具有相邻分布关系的侧边的所述拼接缓冲带进行裁剪,以去除所述目标图片边缘产生的拼接缓冲带。
- 根据权利要求9所述的计算机设备,所述碎片化图集中各个碎片图像均具有对应的图像编号,所述还原规则中记载各个图像编号之间相对的排布关系,所述根据预设的还原规则对所述若干碎片图像进行拼接生成所述目标图片,包括:获取所述碎片化图集中各个碎片图像对应的图像编号;根据所述还原规则将所述各个碎片图像按图像编号的排布关系进行拼接生成所述目标图片。
- 根据权利要求9所述的计算机设备,所述将所述目标图片在设定的验证区域内进行显示,以使用户通过所述目标图片获知所述目标图片中记载的验证信息之后,包括:获取帧缓冲存储器内的显示数据;根据所述验证区域的位置在所述显示数据内提取表征所述验证区域显示内容的目标数据;将所述目标数据转换为图片格式生成截图画面。
- 根据权利要求14所述的计算机设备,所述将所述目标数据转换为图片格式生成所述截图画面之后,包括:获取所述目标图片的目标特征向量;将所述截图画面与所述目标特征向量输入至预设的验证判断模型中,其中,所述验证判断模型为预先训练至收敛状态,用于判断图像是否相同的神经网络模型;根据所述验证判断模型输出的判断结果向服务器端发送验证信息。
- 一种存储有计算机可读指令的存储介质,所述计算机可读指令被一个或多个处 理器执行时,使得一个或多个处理器执行一种图片验证方法的下述步骤:获取由目标图片分割而成的碎片化图集,其中,所述碎片化图集中包括若干碎片图像;根据预设的还原规则对所述若干碎片图像进行拼接生成所述目标图片,其中,所述还原规则中记载有各个碎片图像在所述目标图片中的位置关系;将所述目标图片在设定的验证区域内进行显示,以使用户通过所述目标图片获知所述目标图片中记载的验证信息。
- 根据权利要求16所述的存储介质,所述根据预设的还原规则对所述若干碎片图像进行拼接生成所述目标图片之前,包括:读取所述碎片化图集中各个碎片图像的边缘像素点;根据所述边缘像素点向外延伸生至少一个像素点生成所述各个碎片图像的拼接缓冲带。
- 根据权利要求17所述的存储介质,所述根据预设的还原规则对所述若干碎片图像进行拼接生成所述目标图片,包括:根据所述还原规则将所述若干碎片图像拼接成具有裂纹的目标图片;将任意两个相邻的碎片图像边缘的拼接缓冲带进行相互抵消,以消弭由于拼接产生的裂纹。
- 根据权利要求18所述的存储介质,所述将任意两个相邻的碎片图像边缘的拼接缓冲带进行相互抵消,以消弭由于拼接产生的裂纹之前,包括:获取各个碎片图像中不同侧边相邻的碎片图像的分布关系;将不具有相邻分布关系的侧边的所述拼接缓冲带进行裁剪,以去除所述目标图片边缘产生的拼接缓冲带。
- 根据权利要求16所述的存储介质,所述碎片化图集中各个碎片图像均具有对应的图像编号,所述还原规则中记载各个图像编号之间相对的排布关系,所述根据预设的还原规则对所述若干碎片图像进行拼接生成所述目标图片,包括:获取所述碎片化图集中各个碎片图像对应的图像编号;根据所述还原规则将所述各个碎片图像按图像编号的排布关系进行拼接生成所述目标图片。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910750386.0A CN110572369A (zh) | 2019-08-14 | 2019-08-14 | 图片验证方法、装置、计算机设备及存储介质 |
| CN201910750386.0 | 2019-08-14 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2021027113A1 true WO2021027113A1 (zh) | 2021-02-18 |
Family
ID=68775374
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2019/116355 Ceased WO2021027113A1 (zh) | 2019-08-14 | 2019-11-07 | 图片验证方法、装置、计算机设备及存储介质 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN110572369A (zh) |
| WO (1) | WO2021027113A1 (zh) |
Families Citing this family (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111461985A (zh) * | 2020-03-31 | 2020-07-28 | 维沃移动通信有限公司 | 图片处理方法及电子设备 |
| CN111859354B (zh) | 2020-07-21 | 2023-09-01 | 百度在线网络技术(北京)有限公司 | 图片验证方法、装置、电子设备、存储介质和程序产品 |
| CN111862412A (zh) * | 2020-07-21 | 2020-10-30 | 上海茂声智能科技有限公司 | 用于智能门锁的图片获取方法、装置及智能门锁系统 |
| CN116051405B (zh) * | 2022-12-28 | 2026-02-27 | 浙江工业大学 | 基于验证图片的多目标数据训练集生成方法 |
| CN116846586A (zh) * | 2023-05-11 | 2023-10-03 | 北京天融信网络安全技术有限公司 | 一种安全校验的方法、装置、存储介质及电子设备 |
| CN116883346B (zh) * | 2023-07-05 | 2024-03-15 | 新疆青卫舜源信息科技有限公司 | 一种基于人工智能的目标图像质量筛选方法 |
Citations (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| EP1154373A2 (en) * | 2000-05-10 | 2001-11-14 | Japan Gain the Summit Co., Ltd. | Information code product, manufacturing device and method for manufacturing the same, information code reading device, authentication system, authentication terminal, authentication server, and authentication method |
| CN103312512A (zh) * | 2013-06-07 | 2013-09-18 | 深圳第七大道网络技术有限公司 | 一种图片验证码的生成方法及装置、身份验证方法及装置 |
| CN104462930A (zh) * | 2014-11-18 | 2015-03-25 | 百度在线网络技术(北京)有限公司 | 验证码生成方法和装置 |
| CN104580104A (zh) * | 2013-10-24 | 2015-04-29 | 深圳市腾讯计算机系统有限公司 | 身份验证的方法、装置及系统 |
| CN105306603A (zh) * | 2015-12-04 | 2016-02-03 | 中国联合网络通信集团有限公司 | 网络验证系统及方法、客户端、服务器 |
| CN105323065A (zh) * | 2014-07-21 | 2016-02-10 | 腾讯科技(深圳)有限公司 | 一种安全验证方法及装置 |
| CN107153786A (zh) * | 2017-05-26 | 2017-09-12 | 北京奇点数聚科技有限公司 | 一种人机识别方法、系统及终端设备、可读存储介质 |
| CN107360137A (zh) * | 2017-06-15 | 2017-11-17 | 深圳市牛鼎丰科技有限公司 | 用于验证码识别的神经网络模型的构建方法和装置 |
Family Cites Families (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108881230B (zh) * | 2018-06-21 | 2020-09-22 | 佛山科学技术学院 | 一种政务大数据的安全传输方法及装置 |
| CN109040173A (zh) * | 2018-06-21 | 2018-12-18 | 佛山科学技术学院 | 一种政务大数据的可靠储存方法及装置 |
| CN109858230A (zh) * | 2019-01-08 | 2019-06-07 | 平安科技(深圳)有限公司 | 滑块验证方法、装置、计算机设备及存储介质 |
| CN109886010B (zh) * | 2019-01-28 | 2023-10-17 | 平安科技(深圳)有限公司 | 验证图片发送方法、合成方法及装置、存储介质和终端 |
-
2019
- 2019-08-14 CN CN201910750386.0A patent/CN110572369A/zh active Pending
- 2019-11-07 WO PCT/CN2019/116355 patent/WO2021027113A1/zh not_active Ceased
Patent Citations (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| EP1154373A2 (en) * | 2000-05-10 | 2001-11-14 | Japan Gain the Summit Co., Ltd. | Information code product, manufacturing device and method for manufacturing the same, information code reading device, authentication system, authentication terminal, authentication server, and authentication method |
| CN103312512A (zh) * | 2013-06-07 | 2013-09-18 | 深圳第七大道网络技术有限公司 | 一种图片验证码的生成方法及装置、身份验证方法及装置 |
| CN104580104A (zh) * | 2013-10-24 | 2015-04-29 | 深圳市腾讯计算机系统有限公司 | 身份验证的方法、装置及系统 |
| CN105323065A (zh) * | 2014-07-21 | 2016-02-10 | 腾讯科技(深圳)有限公司 | 一种安全验证方法及装置 |
| CN104462930A (zh) * | 2014-11-18 | 2015-03-25 | 百度在线网络技术(北京)有限公司 | 验证码生成方法和装置 |
| CN105306603A (zh) * | 2015-12-04 | 2016-02-03 | 中国联合网络通信集团有限公司 | 网络验证系统及方法、客户端、服务器 |
| CN107153786A (zh) * | 2017-05-26 | 2017-09-12 | 北京奇点数聚科技有限公司 | 一种人机识别方法、系统及终端设备、可读存储介质 |
| CN107360137A (zh) * | 2017-06-15 | 2017-11-17 | 深圳市牛鼎丰科技有限公司 | 用于验证码识别的神经网络模型的构建方法和装置 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN110572369A (zh) | 2019-12-13 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2021027113A1 (zh) | 图片验证方法、装置、计算机设备及存储介质 | |
| US11354797B2 (en) | Method, device, and system for testing an image | |
| US12579838B2 (en) | Perspective distortion correction on faces | |
| CN109871845B (zh) | 证件图像提取方法及终端设备 | |
| US11978216B2 (en) | Patch-based image matting using deep learning | |
| US20150371613A1 (en) | Obscurely rendering content using image splitting techniques | |
| WO2016024173A1 (en) | Image processing apparatus and method, and electronic device | |
| WO2020082731A1 (zh) | 电子装置、证件识别方法及存储介质 | |
| JP2020127194A (ja) | コンピュータシステムおよびプログラム | |
| US20200184098A1 (en) | Systems and Methods for Secure Obfuscation of Sensitive Information in Images | |
| CN111325107A (zh) | 检测模型训练方法、装置、电子设备和可读存储介质 | |
| US20240249448A1 (en) | Method and device for synthesizing background and face by considering face shape and using deep learning network | |
| WO2021232865A1 (zh) | 一种对象识别方法、装置、设备及介质 | |
| Song et al. | Learning structural similarity with evolutionary-GAN: A new face de-identification method | |
| CN113011254B (zh) | 一种视频数据处理方法、计算机设备及可读存储介质 | |
| CN118540161A (zh) | 一种隐私保护的云数据安全共享的方法、系统及装置 | |
| CN113780330A (zh) | 图像校正方法及装置、计算机存储介质、电子设备 | |
| US20240303369A1 (en) | Key update using comparison of transformed feature sets for extended reality privacy | |
| CN114882557B (zh) | 一种人脸识别方法和装置 | |
| CN108776959B (zh) | 图像处理方法、装置及终端设备 | |
| CN120744981A (zh) | Pdf文档自动脱敏系统、方法、电子设备及计算机程序产品 | |
| Yakushev et al. | Docmarking: Real-time screen-cam robust document image watermarking | |
| CN118070343B (zh) | 一种大模型数据脱敏方法及系统 | |
| CN102385760A (zh) | 用于保护模型数据的方法及系统 | |
| CN116383797B (zh) | 一种无缺口滑动验证码及其生成方法 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19941676 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 19941676 Country of ref document: EP Kind code of ref document: A1 |