WO2024031282A1 - Slide verification method and apparatus, image generation method and apparatus, device, and storage medium - Google Patents

Slide verification method and apparatus, image generation method and apparatus, device, and storage medium Download PDF

Info

Publication number
WO2024031282A1
WO2024031282A1 PCT/CN2022/110962 CN2022110962W WO2024031282A1 WO 2024031282 A1 WO2024031282 A1 WO 2024031282A1 CN 2022110962 W CN2022110962 W CN 2022110962W WO 2024031282 A1 WO2024031282 A1 WO 2024031282A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
sub
cutting
verification
sliding
Prior art date
Application number
PCT/CN2022/110962
Other languages
French (fr)
Chinese (zh)
Inventor
李子兴
黄健
Original Assignee
广州酷狗计算机科技有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 广州酷狗计算机科技有限公司 filed Critical 广州酷狗计算机科技有限公司
Priority to PCT/CN2022/110962 priority Critical patent/WO2024031282A1/en
Priority to CN202280002775.5A priority patent/CN115552400A/en
Publication of WO2024031282A1 publication Critical patent/WO2024031282A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • G06F21/36User authentication by graphic or iconic representation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04845Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour

Definitions

  • This application relates to the fields of computer and Internet technologies, and in particular to a sliding verification method, image generation method, device, equipment and storage medium.
  • the slider verification code displays a background image and a slider puzzle.
  • the slider puzzle is a part of the image area in the gap position in the background image, and the initial display position of the slider puzzle is at any position in the background image except the gap position.
  • the user slides the slider puzzle to connect the slider puzzle with the gap position of the background image.
  • the human-machine verification is passed.
  • slider CAPTCHAs are easily cracked through color-picking scanning technology in computer programs.
  • a computer program can directly scan colors from the X-axis and Y-axis directions, scan out continuous color points, and then determine the position of the gap to calculate the sliding distance required for the slide puzzle.
  • This application provides a sliding verification method, image generation method, device, equipment and storage medium.
  • the technical solutions are as follows:
  • a sliding verification method is provided, the method is executed by a terminal, and the method includes:
  • the first cutting sub-image and/or the second cutting sub-image are controlled to slide; and in the case where the image contents are aligned, it is determined that the verification is successful.
  • a sliding verification method is provided, the method is executed by the first server, the method includes:
  • an image generation method is provided, the method is executed by a second server, the method includes:
  • a sliding verification device which device includes:
  • a display module configured to display the first cutting sub-image and the second cutting sub-image whose image contents are misaligned; the image content of the first cutting sub-image and the image content of the second cutting sub-image are cut with the verification image The content of the two images cut out by the line corresponds;
  • a processing module configured to control the first cutting sub-image and/or the second cutting sub-image to slide in response to a sliding operation; and determine that the verification is successful if the image contents are aligned.
  • a sliding verification device which device includes:
  • a sending module configured to send a first cutting sub-image and a second cutting sub-image whose image content is not aligned to the terminal; the image content of the first cutting sub-image and the image content of the second cutting sub-image, and the verification image The contents of the two images cut out by the cutting line correspond to each other;
  • a receiving module configured to receive sliding distance information sent by the terminal, where the sliding distance information is related to the relative sliding distance of the first cutting sub-image and/or the second cutting sub-image;
  • a verification module configured to determine that verification is successful when the image content is determined to be aligned based on the sliding distance information.
  • an image generating device comprising:
  • Acquisition module used to obtain verification images
  • a cutting module used to cut the two pieces of image content out of the verification image based on the cutting line to obtain the first cutting sub-image and the second cutting sub-image;
  • a generation module for generating a first cut sub-image and a second cut sub-image in which the image content is not aligned.
  • a terminal includes a processor and a memory. At least one program code is stored in the memory. The at least one program code is loaded and executed by the processor to Implement the above sliding verification method.
  • a server includes a processor and a memory. At least one program code is stored in the memory. The at least one program code is loaded and executed by the processor to Implement the above sliding verification method; or, implement the above image generation method.
  • a computer-readable storage medium is provided, executable instructions are stored in the computer-readable storage medium, and the executable instructions are loaded and executed by a processor to implement the above sliding verification method; Or, implement the above image generation method.
  • a computer program product includes computer instructions stored in a computer-readable storage medium.
  • the computer instructions are loaded and executed by a processor to implement The above sliding verification method; or, implement the above image generation method.
  • the first cutting sub-image and the second cutting sub-image are displayed with unaligned image contents, and in response to the sliding operation, the first cutting sub-image and/or the second cutting sub-image are controlled to slide, and in the image If the content is aligned, the verification is successful.
  • the embodiment of the present application provides a new type of sliding verification code and its sliding verification method. Since the boundaries of the two cut sub-figures are relatively hidden, it is difficult to predict the relative position relationship of the two cut sub-figures through color picking technology. The sliding The verification code is difficult and costly to crack, which can effectively improve the security of sliding verification and improve user experience to a certain extent.
  • Figure 1 is a schematic diagram of a graphic verification code in related technology provided by an embodiment of the present application.
  • Figure 2 is a schematic diagram of a slider verification code in related technology provided by an embodiment of the present application.
  • Figure 3 is a schematic diagram of the implementation environment of the sliding verification method provided by an embodiment of the present application.
  • Figure 4 is a schematic diagram of the implementation environment of the sliding verification method provided by an embodiment of the present application.
  • Figure 5 is a flow chart of a sliding verification method provided by an embodiment of the present application.
  • Figure 6 is a schematic interface diagram of a sliding verification method provided by an embodiment of the present application.
  • Figure 7 is a schematic interface diagram of a sliding verification method provided by an embodiment of the present application.
  • Figure 8 is a schematic interface diagram of a sliding verification method provided by an embodiment of the present application.
  • Figure 9 is a schematic interface diagram of a sliding verification method provided by an embodiment of the present application.
  • Figure 10 is a flow chart of a sliding verification method provided by an embodiment of the present application.
  • Figure 11 is a flow chart of a sliding verification method provided by an embodiment of the present application.
  • Figure 12 is a flow chart of a sliding verification method provided by an embodiment of the present application.
  • Figure 13 is a flow chart of a sliding verification method provided by an embodiment of the present application.
  • Figure 14 is a flow chart of a sliding verification method provided by an embodiment of the present application.
  • Figure 15 is a schematic interface diagram of the sliding verification method provided by an embodiment of the present application.
  • Figure 16 is a flow chart of a sliding verification method provided by an embodiment of the present application.
  • Figure 17 is a flow chart of an image generation method provided by an embodiment of the present application.
  • Figure 18 is a flow chart of an image generation method provided by an embodiment of the present application.
  • Figure 19 is a flow chart of an image generation method provided by an embodiment of the present application.
  • Figure 20 is a flow chart of an image generation method provided by an embodiment of the present application.
  • Figure 21 is a flow chart of an image generation method provided by an embodiment of the present application.
  • Figure 22 is a flow chart of an image generation method provided by an embodiment of the present application.
  • Figure 23 is a schematic diagram of an image generation method provided by an embodiment of the present application.
  • Figure 24 is a schematic diagram of an image generation method provided by an embodiment of the present application.
  • Figure 25 is a schematic diagram of an image generation method provided by an embodiment of the present application.
  • Figure 26 is a schematic diagram of an image generation method provided by an embodiment of the present application.
  • Figure 27 is a schematic diagram of an image generation method provided by an embodiment of the present application.
  • Figure 28 is a schematic diagram of an image generation method provided by an embodiment of the present application.
  • Figure 29 is a schematic diagram of an image generation method provided by an embodiment of the present application.
  • Figure 30 is a schematic diagram of an image generation method provided by an embodiment of the present application.
  • Figure 31 is a flow chart of an image generation method provided by an embodiment of the present application.
  • Figure 32 is a structural block diagram of a sliding verification device provided by an embodiment of the present application.
  • Figure 33 is a structural block diagram of a sliding verification device provided by an embodiment of the present application.
  • Figure 34 is a structural block diagram of an image generation device provided by an embodiment of the present application.
  • Figure 35 is a structural block diagram of a terminal provided by an embodiment of the present application.
  • Figure 36 is a structural block diagram of a server provided by an embodiment of the present application.
  • first, second, third, etc. may be used in this application to describe various information, the information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other.
  • first information may also be called second information, and similarly, the second information may also be called first information.
  • word “if” as used herein may be interpreted as "when” or “when” or “in response to determining.”
  • verification codes include graphic and text verification codes and slider verification codes.
  • Figure 1 shows a schematic diagram of a graphic verification code in the related art.
  • the graphic verification code includes letters and text. When the text in the graphic verification code is input in a designated area, the input text is the same as the text in the graphic verification code. If the text is consistent, the verification is passed. However, this kind of graphic verification code is easy to crack through optical character recognition (Optical Character Recognition, OCR) technology.
  • Figure 2 shows a schematic diagram of a slider verification code in the related art.
  • the slider verification code includes a slider puzzle A and a background image. There is a gap B in the background image. The image content of the slider puzzle A is part of the image in the background image.
  • the image content of area (notch B), and the initial display position of slider puzzle A is anywhere in the background image except the position of notch B.
  • the background image with gap B is generated by using an image mask.
  • image masking refers to using specific images, graphics or objects to block all or part of the background image.
  • a mask pattern such as slider puzzle A is used to block part of the background image to generate a background image with gap B.
  • the user slides to connect slider puzzle A and gap B.
  • the human-machine verification is passed.
  • the slider puzzle A and the gap B of this slider verification code are symmetrical up and down or left and right, and the corresponding points of the two are equidistant.
  • the computer program can perform color picking and scanning from the X-axis and Y-axis directions. , scan out the continuous color points, determine the center of gap B, and calculate the sliding distance required by the slider when sliding puzzle A to gap B, which is easy to crack.
  • Figure 3 shows a schematic diagram of the implementation environment of the sliding verification method provided by an exemplary embodiment of the present application.
  • This implementation environment can realize the system architecture that becomes the sliding verification method.
  • the implementation environment may include: a terminal 100 and a server 200, and the server 200 may also be called a first server.
  • the terminal 100 may be an electronic device such as a mobile phone, a tablet computer, a vehicle-mounted terminal (vehicle machine), a wearable device, a PC (Personal Computer), an unmanned reservation terminal, etc.
  • a client that runs a target application can be installed in the terminal 100.
  • the target application can be an application that requires sliding verification, or it can be another application that provides a sliding verification function. This application does not limit this.
  • this application does not limit the form of the target application, including but not limited to App (Application, application program) installed in the terminal 100, applet, etc., and may also be in the form of a web page.
  • the server 200 can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server, cloud database, cloud computing, cloud function, cloud storage, or network service that provides cloud computing services. , cloud communications, middleware services, domain name services, security services, content delivery network (Content Delivery Network, CDN), and cloud servers for basic cloud computing services such as big data and artificial intelligence platforms.
  • the server 200 may be a background server of the above-mentioned target application, and is used to provide background services for clients of the target application.
  • the terminal 100 and the server 200 can interact and cooperate to execute.
  • the server 200 generates the first cutting sub-image 10 and the second cutting sub-image 20 with unaligned image contents and sends them to the terminal 100, and the terminal 100 executes the sliding verification method, such as a client who installs and runs the target application in the terminal 100.
  • the terminal displays the first cutting sub-image 10 and the second cutting sub-image 20 whose image contents are not aligned; the terminal 100 responds to the sliding operation and controls the first cutting sub-image 10 and/or the second cutting sub-image 20 to slide.
  • the terminal 100 determines that the verification is successful when the image contents are aligned, or the server 200 determines that the verification is successful when the image contents are aligned, and sends the successful verification result to the terminal 100 for display.
  • FIG. 4 shows a schematic diagram of the implementation environment of the sliding verification method provided by an exemplary embodiment of the present application.
  • the implementation environment can also be implemented as a system architecture of the sliding verification method.
  • the implementation environment may include: terminal 100, server 200 and server 300.
  • the server 300 may also be called a second server.
  • the server 300 can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server, cloud database, cloud computing, cloud function, cloud storage, or network service that provides cloud computing services. , cloud communications, middleware services, domain name services, security services, content delivery network (Content Delivery Network, CDN), and cloud servers for basic cloud computing services such as big data and artificial intelligence platforms.
  • the server 300 may be a third-party server used to provide services for the server 200 or the client of the above-mentioned target application.
  • the terminal 100, the server 200 and the server 300 can interact and cooperate to execute.
  • the server 300 generates the first cutting sub-image 10 and the second cutting sub-image 20 whose image content is not aligned
  • the server 200 obtains the first cutting sub-image 10 and the second cutting sub-image 20 whose image content is not aligned from the server 300 and Sent to the terminal 100
  • the terminal 100 executes the sliding verification method.
  • the technical solution of this application can also be combined with blockchain technology.
  • some data involved in the sliding processing method disclosed in this application can be saved on the blockchain.
  • the terminal 100, server 200, and server 300 can communicate through a network, such as a wired or wireless network.
  • Figure 5 shows a flow chart of a sliding verification method provided by an exemplary embodiment of the present application.
  • terminal execution is taken as an example for illustration.
  • the method includes:
  • Step 520 Display the first cutting sub-image and the second cutting sub-image whose image contents are not aligned; the image content of the first cutting sub-image and the image content of the second cutting sub-image, and the two pieces of the verification image cut out by the cutting line Image content correspondence.
  • the verification image refers to the image used for swipe verification.
  • Image content refers to the element content contained in the image, such as colors, objects, text, etc.
  • the cutting line may be a straight line, a curve, a wavy line, a zigzag line, etc. In this embodiment, the cutting line is a straight line.
  • the first cutting sub-image and the second cutting sub-image are images obtained based on the content of the two pieces of image cut out by the cutting line of the verification image.
  • the contents of the two images cut using different cutting lines are inconsistent.
  • the image content of the first cut sub-image and the image content of the second cut sub-image are not aligned.
  • the image content of the first cutting sub-image and the image content of the second cutting sub-image correspond to the image content of the two pieces of the verification image cut out by the cutting line.
  • the image content misalignment may be a specified type of image content misalignment.
  • the specified type is text
  • specifying the type as building when the buildings in the first cutting image and the second cutting image are not aligned, or the same building split in the first cutting image and the second cutting image are not aligned, then determine the image Content is misaligned.
  • the image content is not aligned or the image content of the specified type is not aligned in a specified manner.
  • the text in the first cutting image and the second cutting image are not aligned in the horizontal direction, it is determined that the image content is not aligned.
  • the manner in which the image content of the first cutting sub-image and the image content of the second cutting sub-image are misaligned may be to move the first cutting sub-image and/or the second cutting sub-image by a certain distance in a certain direction
  • the first cutting sub-image and/or the second cutting sub-image may also be subjected to image processing.
  • the image processing may be one or a combination of size scaling, pixel filling, image flipping, and image rotation.
  • the first cutting sub-image and the second cutting sub-image may be determined based on the two image contents of the same verification image.
  • the two pieces of image content cut out by the cutting line of the same verification image may be directly used as the first cutting image and the second cutting image respectively.
  • the first cutting image and the second cutting image may also be obtained by performing a series of identical or different image processing on the two pieces of image content respectively.
  • the image processing may be one or a combination of size scaling, pixel filling, image flipping, and image rotation.
  • the first cutting sub-image and the second cutting sub-image may also be determined based on the two image contents of different verification images. For example, if the first verification image is cut into two pieces of image content by a cutting line, and the second verification image is cut into two pieces of image content by the same cutting line, a certain image content of the first verification image can be directly used as the first cutting image. Use a certain image content of the second verification image as the second cutting image. It is also possible to perform a series of image processing on a certain image content of the first verification image to obtain the first cutting image, and to perform a series of the same or different image processing on a certain image content of the second verification image to obtain the second cutting image. .
  • the terminal may receive the first cut sub-image and the second cut sub-image with unaligned image content sent by the server and display them.
  • the terminal can display a part of the first cutting sub-image and the second cutting sub-image based on the size of the display interface.
  • the specific part to be displayed can be determined by the terminal according to actual technical needs, or specified by the server.
  • the terminal displays the first cutting sub-image and the second cutting sub-image whose image contents are misaligned, there is no overlapping area between the first cutting sub-image and the second cutting sub-image.
  • the cutting line is a straight line
  • the image content of the first cutting sub-image 10 and the image content of the second cutting sub-image 20 correspond to the two image contents of the verification image cut out by the cutting line.
  • the terminal displays the first cutting sub-image 10 and the second cutting sub-image 20 whose image contents are not aligned, and when displayed, there is no overlapping area between the first cutting sub-image 10 and the second cutting sub-image 20 .
  • the first cutting sub-figure 10 shown in FIG. 6 may be part of the actual first cutting sub-figure
  • the second cutting sub-figure 20 shown may be part of the actual second cutting sub-figure.
  • Step 540 In response to the sliding operation, control the first cutting sub-image and/or the second cutting sub-image to slide; and if the image contents are aligned, determine that the verification is successful.
  • the sliding operation is an operation of sliding on the first cutting sub-image and/or the second cutting sub-image.
  • the user can directly drag the first cutting sub-figure and/or the second cutting sub-figure to slide.
  • the terminal controls the first cutting sub-picture and/or the second cutting sub-picture to slide.
  • a movable sub-picture and an immovable sub-picture in the first cutting sub-picture and the second cutting sub-picture may be determined by the terminal itself or specified by the server.
  • the first cutting sub-picture is a movable sub-picture
  • the second cutting sub-picture is an immovable sub-picture
  • the sliding operation can only slide the first cutting sub-picture, then the terminal controls the first cutting sub-picture to slide in response to the sliding operation .
  • the first cutting sub-picture is an immovable sub-picture
  • the second cutting sub-picture is a movable sub-picture
  • the sliding operation can only slide the second cutting sub-picture, then the terminal controls the second cutting sub-picture in response to the sliding operation. slide.
  • both the first cutting sub-picture and the second cutting sub-picture are movable sub-pictures, and the user can decide which one to slide.
  • the terminal controls the first cutting sub-picture to slide in response to the sliding operation.
  • the terminal controls the second cutting sub-picture to slide in response to the sliding operation.
  • You can also slide the first cutting sub-picture first, and then slide the second cutting sub-picture, or slide the second cutting sub-picture first, and then slide the first cutting sub-picture, and then the terminal controls the first cutting sub-picture and the first cutting sub-picture in response to the sliding operation.
  • Two cut subgraphs are slid.
  • determining whether the image content of the first cut sub-image and the image content of the second cut sub-image are aligned may be determined by the terminal itself. It may also be that the terminal sends relevant information of the sliding operation to the first server, and the first server determines and returns a result of whether the image content of the first cutting sub-image and the image content of the second cutting sub-image are aligned. With the image content aligned, the verification is determined to be successful.
  • the first cutting sub-picture 10 is a movable sub-picture
  • the second cutting sub-picture 20 is an immovable sub-picture
  • the terminal controls the first cutting sub-picture 10 to slide in response to the sliding operation; please refer to Figure 7, when the image content is aligned, it is determined that the verification is successful.
  • the terminal also displays a slider control, the slider control is used to receive a sliding operation, the slider control includes a slider, and the slider control includes one or more sliders.
  • the slider control is used to receive a sliding operation
  • the slider control includes a slider
  • the slider control includes one or more sliders.
  • the slider control includes one, and by sliding the slider control, the first cutting sub-picture or the second cutting sub-picture can be slid.
  • the slider control includes two. By sliding the first slider control, the sliding of the first cutting sub-picture is realized, and by sliding the second slider control, the sliding of the second cutting sub-picture is realized.
  • the terminal also displays a slider control 30 .
  • the slider control 30 is located below the display area where the first cutting sub-figure 10 and the second cutting sub-figure 20 are located. By sliding the slider control 30, the first cutting sub-picture 10 is slid. Refer to Figure 9 and confirm that the verification is successful when the image content is aligned.
  • the terminal can automatically jump to the next display interface.
  • the terminal can jump to the failure interface, or it can automatically refresh to display the new unaligned first cutting sub-image and the second cutting sub-image, or it can pop up a prompt message to remind Verification failed, etc.
  • the first cutting sub-image and the second cutting sub-image are displayed with unaligned image contents, and in response to the sliding operation, the first cutting sub-image and/or the second cutting sub-image are controlled to proceed. Swipe, and with the image content aligned, the verification is determined to be successful.
  • the embodiment of the present application provides a new type of sliding verification code and its sliding verification method. Since the boundaries of the two cut sub-figures are relatively hidden, it is difficult to predict the relative position relationship of the two cut sub-figures through color picking technology. The sliding The verification code is difficult and costly to crack, which can effectively improve the security of sliding verification and improve user experience to a certain extent.
  • the first cutting sub-image and the second cutting sub-image whose image contents are misaligned are obtained by sliding the two pieces of image content after cutting the same verification image by a first distance along the cutting line relative to the first direction.
  • the first cutting sub-image and the second cutting sub-image are obtained based on two image contents of the same verification image.
  • the first direction refers to the direction in which the two pieces of image content slide relative to each other along the cutting line.
  • Relative sliding means that one piece of image content slides relative to another piece of image content.
  • the first distance is the distance between two pieces of image content sliding relative to each other along the cutting line, and the first distance is a theoretical value.
  • image content 1 slides upward along the cutting line, and image content 2 does not slide. Then after image content 1 slides upward along the cutting line by a distance of 1, the first cutting sub-image and the second cutting sub-image can be obtained.
  • the distance 1 is the first distance, and the first direction is upward.
  • two pieces of image content slide upward along the cutting line. Image content 1 slides upward along the cutting line by a distance of 1, and image content 2 slides upward along the cutting line by a distance of 2. After the two pieces of image content respectively slide upward along the cutting line, , the first cutting sub-image and the second cutting sub-image can be obtained, then the first distance is determined based on the distance difference between distance 1 and distance 2, and the first direction is upward.
  • two pieces of image content slide in different directions along the cutting line.
  • Image content 1 slides upward along the cutting line by a distance of 1
  • image content 2 slides downward along the cutting line by a distance of 2.
  • the two pieces of image content slide upward or downward along the cutting line respectively.
  • the first cutting sub-image and the second cutting sub-image can be obtained.
  • the first distance is determined based on the distance difference between distance 1 and distance 2.
  • the first direction is based on the positive and negative distance difference and combines the two pieces.
  • the directions used by the image content sliding are jointly determined.
  • the first cutting sub-image and the second cutting sub-image are obtained by sliding the two pieces of image content after cutting the same verification image by a first distance along the cutting line relative to the first direction.
  • you want to align the image content of the first cutting sub-image with the image content of the second cutting sub-image you can slide in the opposite direction to the first direction.
  • Step 542 In the case where the first cutting sub-figure and/or the second cutting sub-figure slides a second distance along the cutting line relative to the second direction, and the difference between the second distance and the first distance is less than the threshold, determine that the verification is successful; Wherein, the first direction and the second direction are opposite.
  • the second direction refers to the direction in which the first cutting sub-figure and the second cutting sub-figure slide relatively along the cutting line.
  • the second distance is the distance between the first cutting sub-image and the second cutting sub-image relative to each other along the cutting line, and the second distance is an actual value.
  • the second direction is opposite to the first direction.
  • the threshold is determined based on actual technical needs, and may be a set value, or may be determined based on the theoretical value of the first distance.
  • the threshold may be ⁇ 1% of the first distance.
  • determining whether the difference between the second distance and the first distance is less than a threshold may be determined by the terminal itself or, after the sliding operation, information related to the sliding operation is sent to the first server, and the first server determines and Returns whether the difference between the second distance and the first distance is less than the threshold.
  • the information related to the sliding operation may be sliding distance information.
  • the method executed by the terminal also includes:
  • Step 544 Send the sliding distance information to the first server, so that the first server verifies whether the difference between the second distance and the first distance is less than a threshold based on the sliding distance information.
  • the sliding distance information can be a second distance
  • the first server can directly verify whether the difference between the second distance and the first distance is less than a threshold.
  • the threshold is a threshold corresponding to this type of sliding distance information, which can also be called first threshold.
  • the sliding distance information is the sliding distance of the sliding operation, that is, the sliding distance of sliding based on the slider control.
  • the sliding distance and the second distance may be different in size.
  • the first server verifies whether the difference between the sliding distance and the set distance is less than a threshold.
  • the threshold is a threshold corresponding to the type of sliding distance information, which may also be called a second threshold.
  • the set distance is converted based on the first distance.
  • the set distance is the horizontal axis component value of the first distance.
  • the set distance is the vertical axis component value of the first distance.
  • the terminal controls the first cutting sub-image and/or the second cutting sub-image to move simultaneously along the horizontal axis and along the vertical axis based on the sliding operation, where the distance moved along the horizontal axis is equal to the distance moved along the vertical axis.
  • the ratio may be the slope of the cutting line, so that visually, the first cutting sub-figure and/or the second cutting sub-figure moves along the cutting line.
  • different types of sliding distance information can be used to determine whether the first distance and the second distance are less than the threshold, which can improve the accuracy of the determination result.
  • control of the first cutting sub-image and/or the second cutting sub-image to slide in response to the sliding operation may also include:
  • Step 546 in response to the first sliding operation triggered on the first cutting sub-picture, control the first cutting sub-picture to slide following the sliding trajectory of the first sliding operation;
  • Step 548 In response to the second sliding operation triggered on the second cutting sub-picture, control the second cutting sub-picture to slide following the sliding trajectory of the second sliding operation.
  • the sliding operation triggered on the first cutting sub-graph is called the first sliding operation.
  • the sliding trajectory of the first sliding operation can be any possible trajectory, such as a straight line, a curve, or a trajectory sliding in any direction at any angle. etc., there is no restriction here.
  • the terminal controls the first cutting sub-picture to slide following the sliding trajectory of the first sliding operation.
  • the sliding operation triggered on the second cutting sub-graph is called the second sliding operation.
  • the sliding trajectory of the second sliding operation can be any possible trajectory, such as a straight line, a curve, or a trajectory sliding in any direction at any angle. etc., there is no restriction here.
  • the second sliding trajectory and the first sliding trajectory are independent.
  • the terminal controls the second cutting sub-picture to slide following the sliding trajectory of the second sliding operation.
  • the cutting sub-pictures can be controlled in a targeted manner, which can effectively improve the accuracy of terminal control.
  • Figure 13 shows a flow chart of a sliding verification method provided by an exemplary embodiment of the present application. This embodiment uses the execution of the first server as an example for illustration. The method includes:
  • Step 1020 Send the first cutting sub-image and the second cutting sub-image whose image contents are not aligned to the terminal; the image content of the first cutting sub-image and the image content of the second cutting sub-image are different from the verification image cut out by the cutting line. The content of the two images corresponds.
  • the image content of the first cut sub-image and the image content of the second cut sub-image are not aligned.
  • the image content of the first cutting sub-image and the image content of the second cutting sub-image correspond to the image content of the two pieces of the verification image cut out by the cutting line.
  • the first cutting sub-image and the second cutting sub-image with unaligned image content may be generated by the first server and sent to the terminal, or the first cutting sub-image and the second cutting sub-image with unaligned image content Generated by the second server, the first server obtains the first cut sub-image and the second cut sub-image with unaligned image content from the second server and sends them to the terminal.
  • Step 1040 Receive the sliding distance information sent by the terminal.
  • the sliding distance information is related to the relative sliding distance of the first cutting sub-image and/or the second cutting sub-image.
  • the sliding distance information is information related to the relative sliding distance of the first cutting sub-image and/or the second cutting sub-image sent by the terminal.
  • the terminal sends the sliding distance information to the first server, and the first server receives the sliding distance information sent by the terminal to determine whether the image content of the first cutting sub-image is aligned with the image content of the second cutting sub-image based on the sliding distance information.
  • Step 1060 When it is determined that the image content is aligned based on the sliding distance information, it is determined that the verification is successful.
  • the first server determines that the verification is successful when the image content is determined to be aligned based on the sliding distance information.
  • the first server may return a successful verification result to the terminal so that the terminal can perform subsequent operations.
  • the sliding verification code and the sliding verification method of the embodiment of the present application are difficult to crack and the cracking cost is high. They can effectively improve the security of sliding verification and can also improve the user experience to a certain extent.
  • the sliding distance information is a second distance
  • the second distance is a relative sliding distance of the first cutting sub-image and/or the second cutting sub-image along the cutting line.
  • determining that the verification is successful may also include:
  • Step 1062 If the difference between the first distance and the second distance is less than the first threshold, it is determined that the verification is successful; where the first distance is the distance between the two pieces of image content relative to each other along the cutting line.
  • the first cutting sub-image and the second cutting sub-image whose image content is not aligned are obtained by sliding the two pieces of image content after cutting the same verification image by a first distance relative to each other along the cutting line, that is, the first distance is two The relative sliding distance of the block image content along the cutting line.
  • the first server can directly verify whether the difference between the first distance and the second distance is less than the first threshold, so as to determine the image content of the first cut sub-image and the second cut sub-image. Whether the image content is aligned.
  • the difference between the first distance and the second distance is less than the first threshold, it is determined that the image content of the first cut sub-image and the image content of the second cut sub-image are aligned, and it is determined that the verification is successful.
  • the sliding distance information is the second distance AB
  • the second distance AB is the relative sliding distance of the first cutting sub-figure 10 and/or the second cutting sub-figure 20 along the cutting line.
  • the terminal also displays a slider control, and the slider control includes a slider.
  • a sliding operation is implemented by sliding the slider control, and the sliding operation is a sliding operation for the first cutting sub-picture and/or the second cutting sub-picture.
  • the sliding distance information is the sliding distance of the sliding operation, and the sliding distance and the second distance may be different in size.
  • determining that the verification is successful may also include:
  • Step 1064 When the difference between the sliding distance and the set distance is less than the second threshold, it is determined that the verification is successful; wherein the set distance is converted based on the first distance; the first distance is the relative sliding distance between the two pieces of image content along the cutting line. distance.
  • the first cutting sub-image and the second cutting sub-image whose image content is not aligned are obtained by sliding the two pieces of image content after cutting the same verification image by a first distance relative to each other along the cutting line, that is, the first distance is two The relative sliding distance of the block image content along the cutting line.
  • the first server may verify whether the difference between the sliding distance and the set distance is less than the second threshold, so as to determine the image content of the first cutting sub-image and the image content of the second cutting sub-image. Whether the image content is aligned.
  • the set distance is converted based on the first distance.
  • the set distance is the horizontal axis component value of the first distance.
  • the set distance is the vertical axis component value of the first distance.
  • the difference between the sliding distance and the set distance is less than the second threshold, it is determined that the image content of the first cutting sub-image and the image content of the second cutting sub-image are aligned, and it is determined that the verification is successful.
  • the terminal also displays a slider control 30.
  • the sliding distance information is the sliding distance CD of the sliding operation, and the sliding distance CD is different in size from the second distance AB.
  • the difference between the sliding distance CD and the set distance is less than the second threshold, it is determined that the image content of the first cutting sub-image 10 and the image content of the second cutting sub-image 20 are aligned, and it is determined that the verification is successful; where, the set distance Based on the first distance conversion, the set distance may be the horizontal axis component value of the first distance.
  • different types of sliding distance information can be used to determine whether the first distance and the second distance are less than the threshold, which can improve the accuracy of the determination result.
  • the method executed by the first server also includes:
  • Step 1066 Send a successful verification result to the terminal.
  • the first server after determining that the verification is successful, sends a successful verification result to the terminal so that the terminal can perform subsequent operations.
  • Figure 17 shows a flow chart of the sliding verification method provided by an exemplary embodiment of the present application.
  • This embodiment uses the execution of the second server as an example.
  • the second server and the first server may be the same server.
  • the second server The server can also be a third-party server.
  • the method includes:
  • Step 1220 obtain the verification image.
  • the verification image refers to the image used for swipe verification.
  • the shape of the verification image can be rectangular, square, circular, etc., and is not limited here.
  • Step 1240 Verify the content of the two pieces of image cut out of the image based on the cutting line pair, and obtain the first cut sub-image and the second cut sub-image.
  • the first cutting sub-image and the second cutting sub-image are images obtained based on the content of the two pieces of image cut out by the cutting line of the verification image.
  • the cutting line is a straight line.
  • the contents of the two images cut using different cutting lines are inconsistent.
  • the first cutting sub-image and the second cutting sub-image may be determined based on the content of two images of the same verification image, or may also be determined based on the content of two images of different verification images.
  • Step 1260 Generate a first cut sub-image and a second cut sub-image whose image contents are not aligned.
  • the image content of the first cut sub-image and the image content of the second cut sub-image are not aligned.
  • the first cutting sub-image and/or the second cutting sub-image may be moved a certain distance in a certain direction, so that the image content of the first cutting sub-image is consistent with the first cutting sub-image.
  • the image content of the two-cut subfigures is misaligned.
  • the method provided by the embodiments of the present application can improve the efficiency of image generation by generating a first cutting sub-image and a second cutting sub-image with unaligned image content on the second server, and the generated sliding
  • the verification code is difficult to crack, which can effectively improve the security of subsequent sliding verification.
  • Figure 18 shows a flow chart of an image generation method provided by an exemplary embodiment of the present application. Based on the cutting line pair, the content of the two pieces of image cut out of the verification image is obtained, and the first cutting sub-image and the second cutting sub-image are obtained. Subplots, including:
  • Step 1242 Determine the cutting line used this time.
  • a cutting line is used to cut the verification image.
  • the cutting line used for each cutting can be different.
  • the cutting line used this time can be determined first.
  • the difference in the cutting line may be due to different parameters of the cutting line, such as different slopes and intercepts of the cutting line.
  • different cutting lines are used for cutting, and the content of the two cut images is inconsistent.
  • Step 1246 Verify the contents of the two pieces of image cut out of the image based on the cutting line pair, and obtain the first cut sub-image and the second cut sub-image.
  • the verification image is cut using the cutting line used this time, and the two pieces of image content cut out of the verification image based on the cutting line are used to obtain the first cutting sub-image and the second cutting sub-image.
  • the first cutting sub-image and the second cutting sub-image can be generated at any angle and asymmetry, and finally a new sliding verification code is obtained, which improves the difficulty and difficulty of cracking the sliding verification code. Crack costs.
  • the verification image coordinate system in order to conveniently determine the position of the cutting line and use the cutting line to cut the verification image, after determining the cutting line used this time, the verification image coordinate system can also be established.
  • any reference point in the verification image is used as the origin.
  • the reference point can be a vertex or any point in the image. Take the positive direction of the vertical axis directly below the origin and the positive direction of the horizontal axis directly to the right of the origin to establish a verification image coordinate system.
  • establishing a verification image coordinate system facilitates the determination of each position and improves the efficiency of data processing.
  • the cutting line used this time is determined, including:
  • Step 1243 Randomly select a slope within the set slope range and determine it as the slope of the cutting line.
  • the slope can be used to characterize the inclination angle of the cutting line.
  • the set slope range can be set according to actual technical needs.
  • the set slope range is (-1,1) to cover all parts of a quadrant.
  • a slope can be randomly selected within the set slope range and determined as the slope of the cutting line.
  • Step 1244 Based on the slope and the size of the verification image, determine the intercept of the cutting line within the set intercept range.
  • the intercept is used to ensure that the contents of the two cut-out images are not too large or too small, and that the contents of the two images are not too different, so as to avoid inaccurate sliding verification.
  • the set intercept range can be set according to actual technical needs.
  • the intercept of the cutting line is determined within the set intercept range based on the slope and the size of the verification image.
  • the intercept of the cutting line as b.
  • the verification image is a rectangle.
  • the width of the verification image is X/2 and the height is Y/2.
  • Based on the slope a and the size of the verification image set 0.125 ⁇ b/ Y ⁇ 0.375, -a/2 ⁇ b/X ⁇ 1+a, determine the intercept b.
  • different cutting lines are determined by random values, and the first cutting sub-image and the second cutting sub-image can be generated at any angle and asymmetry, and finally a new sliding verification code is obtained, which improves the cracking of the sliding verification code. Difficulty and cost of cracking.
  • Figure 20 shows a flow chart of an image generation method provided by an exemplary embodiment of the present application.
  • the above-mentioned generation of first and second cutting sub-images with unaligned image content may include:
  • Step 1262 Slide the two pieces of image content relatively along the cutting line by a first distance to obtain a first cutting sub-image and a second cutting sub-image in which the image content is not aligned.
  • the first distance is the distance between two pieces of image content that slide relative to each other along the cutting line.
  • the first distance is a theoretical value and can be a randomly set distance.
  • the two pieces of image content are relatively slid by a first distance along the cutting line to obtain a first cutting sub-image and a second cutting sub-image in which the image content is not aligned.
  • the first distance may be set based on the size of the verification image and the slope and intercept of the cutting line.
  • the vertical axis proportion value is randomly selected within the set range
  • the horizontal axis proportion value is determined based on the vertical axis proportion value and the slope of the cutting line
  • the horizontal axis proportion value and the vertical axis proportion are determined based on the vertical axis proportion value and the slope of the cutting line.
  • the first distance is calculated from the value, the slope of the cutting line, and the intercept.
  • Figure 21 shows a flow chart of an image generation method provided by an exemplary embodiment of the present application.
  • the method executed by the second server also includes:
  • Step 1210 obtain the original image.
  • the verification image can be derived from the original image, in which case the verification image is part of the original image.
  • Raw images are available from publicly available datasets and can be of a specified type or image content.
  • Step 1212 Intercept the original image based on the reference points in the original image to obtain a verification image; where the size of the verification image is less than or equal to the size of the original image.
  • the reference point in the original image can be a vertex or any point within the image.
  • different verification images can be obtained by intercepting the original image according to different sizes.
  • different verification images can also be obtained by intercepting the original image according to the same size.
  • the reference point can be any vertex of the original image.
  • the reference point can be any point within the original image.
  • the verification image is obtained by intercepting the original image, which can selectively retain important image content in the original image, improve the recognition of the verification image, and facilitate the generation of sliding verification codes.
  • the original image coordinate system may be established after acquiring the original image.
  • any reference point in the original image is used as the origin.
  • the reference point can be a vertex or any point in the image. Take the positive direction of the vertical axis directly below the origin and the positive direction of the horizontal axis directly to the right of the origin to establish the original image coordinate system.
  • Figure 22 shows a flow chart of an image generation method provided by an exemplary embodiment of the present application.
  • the method executed by the second server also includes:
  • Step 1248 Expand the image content of the first cut sub-image and/or the image content of the second cut sub-image based on the image content adjacent to the verification image in the original image;
  • Step 1250 Based on the mirror image content of the first cut sub-image and/or the second cut sub-image, expand the image content of the first cut sub-figure and/or the image content of the second cut sub-figure.
  • expanding the image content of the first cut sub-figure and/or the image content of the second cut sub-figure may be to only expand the image content of the first cut sub-figure, or only to expand the image of the second cut sub-figure
  • the content may also be to simultaneously expand the image content of the first cut sub-picture and the image content of the second cut sub-picture.
  • augmentation includes size expansion and pixel padding.
  • the size of the first cutting sub-image and/or the second cutting sub-image may be expanded first, and then the expanded part may be filled with pixels to achieve expansion of the image content.
  • expanding the size of the first cutting sub-figure and/or the second cutting sub-figure may include extending the upper edge of the first cutting sub-figure and/or the second cutting sub-figure upward, the lower edge downward, and the left side.
  • One or a combination of left expansion and right expansion may be included.
  • the size of the first cutting sub-image and/or the second cutting sub-image is expanded.
  • the amount of expansion may be a preset value, or may be based on the original image of the first cutting sub-image and/or the second cutting sub-image.
  • Content size determination, etc. are not limited in this embodiment.
  • the image content of the first cut sub-image and/or the image content of the second cut sub-image are expanded based on the image content adjacent to the verification image in the original image.
  • the expanded part can be expanded based on the image content adjacent to the verification image in the original image. Partially filled with pixels.
  • the image content of the first cut sub-figure and/or the image content of the second cut sub-figure is expanded.
  • the image can be based on the mirror image of the first cut sub-image and/or the second cut sub-image.
  • Image content the expanded part will be filled with pixels.
  • the mirror image content refers to the image content of the mirror image.
  • the mirror image of the first cut sub-image can be based on the straight line where the edge of the extended part is exceeded as the designated axis, and the first cut sub-image is The cut sub-image is obtained after mirror flipping.
  • the pixels of the expanded image content can be made as continuous as possible, which can improve the user's visual experience to a certain extent.
  • expanding the image content of the first cutting sub-image and/or the image content of the second cutting sub-image may be two pieces of image content cut out of the verification image based on the cutting line to obtain the first cutting sub-image and It is performed after the second cut sub-image and before generating the first cut sub-image and the second cut sub-image in which the image content is not aligned. It may also be executed after generating the first cutting sub-image and the second cutting sub-image whose image contents are not aligned, and this embodiment does not limit this.
  • the specific steps of the image generation method include:
  • sub-image A and sub-image B Based on sub-image A and sub-image B, generate sub-image A and sub-image B whose image content is not aligned.
  • Figure 30 slide subgraph A and subgraph B relative to each other so that the upper right vertices are aligned.
  • the dotted area in Figure 30 is the user-visible area displayed on the terminal.
  • the method further includes:
  • Step 1280 Send the first cut sub-image and the second cut sub-image whose image contents are not aligned to the first server.
  • the second server when the second server is a third-party server used to generate the first cut sub-image and the second cut sub-image with unaligned image content, the second server may also send the first cut sub-image with unaligned image content to the first server.
  • a first cut sub-graph and a second cut sub-graph so that the first server can obtain and perform other processing.
  • the data processing efficiency can be effectively improved.
  • Figure 32 shows a structural block diagram of a sliding verification device provided by an exemplary embodiment of the present application.
  • the sliding verification device includes:
  • the display module 3210 is used to display the first cutting sub-image and the second cutting sub-image whose image contents are misaligned; the image content of the first cutting sub-image and the image content of the second cutting sub-image are different from the verification image.
  • the contents of the two images cut out by the cutting line correspond to each other.
  • the processing module 3220 is configured to control the first cutting sub-image and/or the second cutting sub-image to slide in response to a sliding operation; and determine that the verification is successful if the image contents are aligned.
  • the processing module 3220 is configured to control the first cutting sub-figure and/or the second cutting sub-figure to slide along the cutting line in response to a sliding operation.
  • the first cutting sub-image and the second cutting sub-image whose image contents are not aligned are obtained by sliding the two pieces of image content after cutting the same verification image along the cutting line relative to the first direction. Get after distance;
  • the processing module 3220 is configured to slide the first cutting sub-image and/or the second cutting sub-image along the cutting line by a second distance relative to the second direction, and the second distance and the If the difference between the first distances is less than the threshold, it is determined that the verification is successful; wherein the first direction and the second direction are opposite.
  • the device further includes a sending module; the sending module is configured to send sliding distance information to the first server, so that the first server verifies the second distance and the second distance based on the sliding distance information. Whether the difference between the first distances is less than the threshold.
  • the sliding distance information is the second distance; or the sliding distance information is the sliding distance of the sliding operation.
  • the display module 3210 is used to display a slider control, and the slider control is used to receive the sliding operation.
  • the processing module 3220 is configured to respond to the first sliding operation triggered on the first cutting sub-image, and control the first cutting sub-image to follow the sliding trajectory of the first sliding operation. slide.
  • the processing module 3220 is configured to respond to the second sliding operation triggered on the second cutting sub-image, and control the second cutting sub-image to follow the sliding trajectory of the second sliding operation. slide.
  • Figure 33 shows a structural block diagram of a sliding verification device provided by an exemplary embodiment of the present application.
  • the sliding verification device includes:
  • the sending module 3330 is configured to send the first cutting sub-image and the second cutting sub-image whose image content is not aligned to the terminal; the image content of the first cutting sub-image and the image content of the second cutting sub-image, and the verification The content of the two pieces of image cut out by the cutting line corresponds to each other.
  • the receiving module 3340 is configured to receive sliding distance information sent by the terminal, where the sliding distance information is related to the relative sliding distance of the first cutting sub-image and/or the second cutting sub-image.
  • the verification module 3350 is configured to determine that the verification is successful when it is determined that the image content is aligned based on the sliding distance information.
  • the sliding distance information is a second distance
  • the second distance is a relative sliding distance of the first cutting sub-figure and/or the second cutting sub-figure along the cutting line
  • the verification module 3350 is configured to determine that verification is successful when the difference between the first distance and the second distance is less than a first threshold; wherein the first distance is the length of the two pieces of image content along the cutting The relative sliding distance of the lines.
  • the sliding distance information is the sliding distance of a sliding operation;
  • the sliding operation is a sliding operation for the first cutting sub-picture and/or the second cutting sub-picture;
  • the verification module 3350 is configured to determine that the verification is successful when the difference between the sliding distance and the set distance is less than a second threshold; wherein the set distance is converted based on the first distance; the first distance is the relative sliding distance of the two pieces of image content along the cutting line.
  • the sending module 3330 is configured to send the successful verification result to the terminal.
  • Figure 34 shows a structural block diagram of an image generation device provided by an exemplary embodiment of the present application.
  • the image generation device includes:
  • the acquisition module 3460 is used to acquire the verification image.
  • the cutting module 3470 is used to cut the two pieces of image content out of the verification image based on the cutting line to obtain a first cut sub-image and a second cut sub-image.
  • Generating module 3480 configured to generate a first cut sub-image and a second cut sub-image in which the image content is not aligned.
  • the cutting module 3470 includes:
  • the cutting line determination unit is used to determine the cutting line used this time.
  • a cutting unit is configured to cut the two pieces of image content out of the verification image based on the cutting line to obtain a first cutting sub-image and a second cutting sub-image.
  • the cutting line determination unit includes:
  • a slope determination unit is used to randomly select a slope within the set slope range and determine it as the slope of the cutting line.
  • An intercept determination unit is configured to determine the intercept of the cutting line within a set intercept range based on the slope and the size of the verification image.
  • the generation module 3480 is used to relatively slide the two pieces of image content along the cutting line by a first distance to obtain a first cutting sub-image and a second cutting sub-image in which the image content is not aligned.
  • the device further includes an interception module
  • the acquisition module 3460 is used to acquire original images.
  • the interception module is configured to intercept the original image based on the reference point in the original image to obtain a verification image; wherein the size of the verification image is less than or equal to the size of the original image.
  • the device further includes an expansion module
  • the expansion module is configured to expand the image content of the first cut sub-image and/or the image content of the second cut sub-image based on the image content adjacent to the verification image in the original image. ;
  • the expansion module is configured to combine the image content of the first cutting sub-image and/or the second cutting sub-image based on the mirror image content of the first cutting sub-image and/or the second cutting sub-image.
  • the image content of the figure is expanded.
  • the device further includes a sending module
  • the sending module is configured to send the first cutting sub-image and the second cutting sub-image in which the image content is not aligned to the first server.
  • FIG 35 shows a structural block diagram of a terminal 3500 provided by an exemplary embodiment of the present application.
  • the terminal 3500 can be a portable mobile terminal, such as: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, moving picture experts compression standard audio layer 3), MP4 (Moving Picture Experts Group Audio Layer IV, dynamic Video Expert compresses standard audio levels 4) player, laptop or desktop computer.
  • Terminal 3500 may also be called user equipment, portable terminal, laptop terminal, desktop terminal, and other names.
  • the terminal 3500 includes: a processor 3501 and a memory 3502.
  • the processor 3501 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc.
  • the processor 3501 can adopt at least one hardware form among DSP (Digital Signal Processing, digital signal processing), FPGA (Field-Programmable Gate Array, field programmable gate array), and PLA (Programmable Logic Array, programmable logic array).
  • DSP Digital Signal Processing, digital signal processing
  • FPGA Field-Programmable Gate Array, field programmable gate array
  • PLA Programmable Logic Array, programmable logic array
  • the processor 3501 can also include a main processor and a co-processor.
  • the main processor is a processor used to process data in the wake-up state, also called CPU (Central Processing Unit, central processing unit); the co-processor is A low-power processor used to process data in standby mode.
  • the processor 3501 may be integrated with a GPU (Graphics Processing Unit, image processor), and the GPU is responsible for rendering and drawing the content that needs to be displayed on the display screen.
  • the processor 3501 may also include an AI (Artificial Intelligence, artificial intelligence) processor, which is used to process computing operations related to machine learning.
  • AI Artificial Intelligence, artificial intelligence
  • Memory 3502 may include one or more computer-readable storage media, which may be non-transitory. Memory 3502 may also include high-speed random access memory, and non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 3502 is used to store at least one instruction, and the at least one instruction is used to be executed by the processor 3501 to implement the sliding verification method provided by the method embodiment of the present application. .
  • the terminal 3500 optionally further includes: a peripheral device interface 3503 and at least one peripheral device.
  • the processor 3501, the memory 3502 and the peripheral device interface 3503 may be connected through a bus or a signal line.
  • Each peripheral device can be connected to the peripheral device interface 3503 through a bus, a signal line or a circuit board.
  • the peripheral device includes: at least one of a radio frequency circuit 3504, a display screen 3505, a camera component 3506, an audio circuit 3507, a positioning component 3508 and a power supply 3509.
  • the peripheral device interface 3503 may be used to connect at least one I/O (Input/Output) related peripheral device to the processor 3501 and the memory 3502 .
  • the processor 3501, the memory 3502, and the peripheral device interface 3503 are integrated on the same chip or circuit board; in some other embodiments, any one of the processor 3501, the memory 3502, and the peripheral device interface 3503 or Both of them can be implemented on separate chips or circuit boards, which is not limited in this embodiment.
  • Radio frequency circuit 3504 is used to receive and transmit RF (Radio Frequency, radio frequency) signals, also called electromagnetic signals. Radio frequency circuit 3504 communicates with communication networks and other communication devices through electromagnetic signals. The radio frequency circuit 3504 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. Optionally, the radio frequency circuit 3504 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and the like. Radio frequency circuitry 3504 can communicate with other terminals through at least one wireless communication protocol.
  • RF Radio Frequency, radio frequency
  • the wireless communication protocol includes but is not limited to: World Wide Web, metropolitan area network, intranet, mobile communication networks of all generations (2G, 3G, 4G and 5G), wireless LAN and/or WiFi (Wireless Fidelity, Wireless Fidelity) network.
  • the radio frequency circuit 3504 may also include NFC (Near Field Communication) related circuits, which is not limited in this application.
  • the display screen 3505 is used to display UI (User Interface, user interface).
  • the UI can include graphics, text, icons, videos, and any combination thereof.
  • display screen 3505 also has the ability to collect touch signals on or above the surface of display screen 3505.
  • the touch signal can be input to the processor 3501 as a control signal for processing.
  • the display screen 3505 can also be used to provide virtual buttons and/or virtual keyboards, also called soft buttons and/or soft keyboards.
  • the display screen 3505 there may be one display screen 3505, which is provided on the front panel of the terminal 3500; in other embodiments, there may be at least two display screens 3505, which are respectively provided on different surfaces of the terminal 3500 or have a folding design; In other embodiments, the display screen 3505 may be a flexible display screen disposed on a curved surface or a folding surface of the terminal 3500. Even the display screen 3505 can be set into a non-rectangular irregular shape, that is, a special-shaped screen.
  • the display screen 3505 can be made of LCD (Liquid Crystal Display, liquid crystal display), OLED (Organic Light-Emitting Diode, organic light-emitting diode) and other materials.
  • the camera component 3506 is used to capture images or videos.
  • the camera component 3506 includes a front camera and a rear camera.
  • the front camera is set on the front panel of the terminal, and the rear camera is set on the back of the terminal.
  • there are at least two rear cameras one of which is a main camera, a depth-of-field camera, a wide-angle camera, and a telephoto camera, so as to realize the integration of the main camera and the depth-of-field camera to realize the background blur function.
  • camera assembly 3506 may also include a flash.
  • the flash can be a single color temperature flash or a dual color temperature flash. Dual color temperature flash refers to a combination of warm light flash and cold light flash, which can be used for light compensation under different color temperatures.
  • Audio circuitry 3507 may include a microphone and speakers.
  • the microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals that are input to the processor 3501 for processing, or to the radio frequency circuit 3504 to implement voice communication.
  • the microphone can also be an array microphone or an omnidirectional collection microphone.
  • the speaker is used to convert electrical signals from the processor 3501 or the radio frequency circuit 3504 into sound waves.
  • the loudspeaker can be a traditional membrane loudspeaker or a piezoelectric ceramic loudspeaker.
  • audio circuitry 3507 may also include a headphone jack.
  • the positioning component 3508 is used to locate the current geographical location of the terminal 3500 to implement navigation or LBS (Location Based Service).
  • the positioning component 3508 may be a positioning component based on the American GPS (Global Positioning System), China's Beidou system, or Russia's Galileo system.
  • the power supply 3509 is used to power various components in the terminal 3500.
  • the power source 3509 may be AC, DC, disposable or rechargeable batteries.
  • the rechargeable battery may be a wired rechargeable battery or a wireless rechargeable battery. Wired rechargeable batteries are batteries that are charged through wired lines, and wireless rechargeable batteries are batteries that are charged through wireless coils.
  • the rechargeable battery can also be used to support fast charging technology.
  • terminal 3500 also includes one or more sensors 3510.
  • the one or more sensors 3510 include, but are not limited to: acceleration sensor 3511, gyro sensor 3512, pressure sensor 3513, fingerprint sensor 3514, optical sensor 3515 and proximity sensor 3516.
  • the acceleration sensor 3511 can detect the acceleration on the three coordinate axes of the coordinate system established by the terminal 3500.
  • the acceleration sensor 3511 can be used to detect the components of gravity acceleration on three coordinate axes.
  • the processor 3501 can control the display screen 3505 to display the user interface in a horizontal view or a vertical view according to the gravity acceleration signal collected by the acceleration sensor 3511.
  • the acceleration sensor 3511 can also be used to collect game or user motion data.
  • the gyro sensor 3512 can detect the body direction and rotation angle of the terminal 3500, and the gyro sensor 3512 can cooperate with the acceleration sensor 3511 to collect the user's 3D movements on the terminal 3500. Based on the data collected by the gyro sensor 3512, the processor 3501 can implement the following functions: motion sensing (such as changing the UI according to the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.
  • the pressure sensor 3513 may be provided on the side frame of the terminal 3500 and/or on the lower layer of the display screen 3505 .
  • the pressure sensor 3513 When the pressure sensor 3513 is installed on the side frame of the terminal 3500, it can detect the user's grip signal on the terminal 3500, and the processor 3501 performs left and right hand recognition or quick operation based on the grip signal collected by the pressure sensor 3513.
  • the processor 3501 controls the operability controls on the UI interface according to the user's pressure operation on the display screen 3505.
  • the operability control includes at least one of a button control, a scroll bar control, an icon control, and a menu control.
  • the fingerprint sensor 3514 is used to collect the user's fingerprint.
  • the processor 3501 identifies the user's identity based on the fingerprint collected by the fingerprint sensor 3514, or the fingerprint sensor 3514 identifies the user's identity based on the collected fingerprint.
  • the processor 3501 authorizes the user to perform relevant sensitive operations.
  • the sensitive operations include unlocking the screen, viewing encrypted information, downloading software, making payments, and changing settings.
  • the fingerprint sensor 3514 may be provided on the front, back or side of the terminal 3500. When the terminal 3500 is provided with a physical button or a manufacturer's logo, the fingerprint sensor 3514 can be integrated with the physical button or the manufacturer's logo.
  • the optical sensor 3515 is used to collect ambient light intensity.
  • the processor 3501 can control the display brightness of the display screen 3505 according to the ambient light intensity collected by the optical sensor 3515. Specifically, when the ambient light intensity is high, the display brightness of the display screen 3505 is increased; when the ambient light intensity is low, the display brightness of the display screen 3505 is decreased.
  • the processor 3501 can also dynamically adjust the shooting parameters of the camera assembly 3506 according to the ambient light intensity collected by the optical sensor 3515.
  • the proximity sensor 3516 also called a distance sensor, is usually provided on the front panel of the terminal 3500.
  • the proximity sensor 3516 is used to collect the distance between the user and the front of the terminal 3500.
  • the processor 3501 controls the display screen 3505 to switch from the bright screen state to the closed screen state; when the proximity sensor 3516 detects When the distance between the user and the front of the terminal 3500 gradually increases, the processor 3501 controls the display screen 3505 to switch from the screen-off state to the screen-on state.
  • Figure 35 does not constitute a limitation on the terminal 3500, and may include more or fewer components than shown, or combine certain components, or adopt different component arrangements.
  • An embodiment of the present application also provides a server, which includes: a processor and a memory, with a computer program stored in the memory; the processor is configured to execute the computer program in the memory to implement the above methods.
  • a server which includes: a processor and a memory, with a computer program stored in the memory; the processor is configured to execute the computer program in the memory to implement the above methods.
  • the sliding verification method and/or image generation method provided by the example.
  • FIG. 36 is a structural block diagram of a server provided by an exemplary embodiment of the present application.
  • the server 3600 includes: a processor 3601 and a memory 3602.
  • the processor 3601 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc.
  • the processor 3601 can adopt at least one hardware form among digital signal processing (Digital Signal Processing, DSP), field-programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). accomplish.
  • the processor 3601 can also include a main processor and a co-processor.
  • the main processor is a processor used to process data in the wake-up state, also called a central processing unit (Central Processing Unit, CPU); the co-processor is A low-power processor used to process data in standby mode.
  • CPU Central Processing Unit
  • the processor 3601 may be integrated with a graphics processor (Graphics Processing Unit, GPU), and the GPU is responsible for rendering and drawing content that needs to be displayed on the display screen.
  • the processor 3601 may also include an artificial intelligence (Artificial Intelligence, AI) processor, which is used to process computing operations related to machine learning.
  • AI Artificial Intelligence
  • Memory 3602 may include one or more computer-readable storage media, which may be non-transitory. Memory 3602 may also include high-speed random access memory, and non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 3602 is used to store at least one instruction, and the at least one instruction is used to be executed by the processor 3601 to implement the sliding verification provided by the method embodiments in this application. method and/or image generation method.
  • the server 3600 optionally further includes: an input interface 3603 and an output interface 3604.
  • the processor 3601, the memory 3602, the input interface 3603, and the output interface 3604 can be connected through a bus or signal line.
  • Each peripheral device can be connected to the input interface 3603 and the output interface 3604 through a bus, a signal line or a circuit board.
  • the input interface 3603 and the output interface 3604 may be used to connect at least one peripheral device related to input/output (I/O) to the processor 3601 and the memory 3602 .
  • the processor 3601, the memory 3602, the input interface 3603, and the output interface 3604 are integrated on the same chip or circuit board; in some other embodiments, the processor 3601, the memory 3602, the input interface 3603, and the output interface Any one or two of 3604 can be implemented on a separate chip or circuit board, which is not limited in the embodiment of the present application.
  • the server 3600 may include more or fewer components than shown, or combine certain components, or adopt different component arrangements.
  • a chip is also provided.
  • the chip includes programmable logic circuits and/or program instructions. When the chip is run on a terminal or server, it is used to implement the above sliding verification method and/or Image generation method.
  • a computer program product including computer instructions stored in a computer-readable storage medium.
  • the processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor reads and executes the computer instructions from the computer-readable storage medium to implement the above-mentioned sliding verification method and/or image generation method.
  • a computer-readable storage medium stores executable instructions, and the executable instructions are loaded and executed by the processor to implement the above methods provided by the embodiments. sliding verification method and/or image generation method.
  • Computer-readable media includes computer-readable storage media and communication media including any medium that facilitates transfer of a computer program from one place to another.
  • Storage media can be any available media that can be accessed by a general purpose or special purpose computer.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Human Computer Interaction (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The present application relates to the technical fields of computers and the Internet, and provides a slide verification method and apparatus, an image generation method and apparatus, a device, and a storage medium. The slide verification method comprises: displaying a first cut sub-image and a second cut sub-image which have image contents that are not aligned, the image content of the first cut sub-image and the image content of the second cut sub-image corresponding to contents of two images obtained by cutting a verification image by a cutting line; in response to a slide operation, controlling the first cut sub-image and/or the second cut sub-image to slide, and when the image contents are aligned, determining that verification is successful. Embodiments of the present application provide a novel slide captcha and a slide verification mode thereof; because the boundaries of the two cut sub-images are concealed, it is difficult to predict a relative positional relationship between the two cut sub-images by means of a color picking technology; and the slide captcha features high crack difficulty and high crack costs, and thus can effectively improve the security of slide verification and improve user experience to a certain extent.

Description

滑动验证方法、图像生成方法、装置、设备和存储介质Sliding verification method, image generation method, device, equipment and storage medium 技术领域Technical field
本申请涉及计算机和互联网技术领域,特别涉及一种滑动验证方法、图像生成方法、装置、设备和存储介质。This application relates to the fields of computer and Internet technologies, and in particular to a sliding verification method, image generation method, device, equipment and storage medium.
背景技术Background technique
在互联网常见的业务场景中,如登录、注册、活动等,一般会先通过滑块验证码进行人机验证。In common business scenarios on the Internet, such as login, registration, activities, etc., human-machine verification is generally performed through a slider verification code.
滑块验证码显示有背景图像和滑块拼图,滑块拼图是背景图像中的缺口位置中的一部分图像区域,且滑块拼图的初始显示位置在背景图像中除缺口位置之外的任意位置。用户滑动滑块拼图,以便将滑块拼图与背景图像的缺口位置进行拼接。当滑块拼图的滑动位置与背景图像的缺口位置接近,则通过人机验证。The slider verification code displays a background image and a slider puzzle. The slider puzzle is a part of the image area in the gap position in the background image, and the initial display position of the slider puzzle is at any position in the background image except the gap position. The user slides the slider puzzle to connect the slider puzzle with the gap position of the background image. When the sliding position of the slider puzzle is close to the gap position of the background image, the human-machine verification is passed.
但是,滑块验证码容易通过计算机程序中的拾色扫描技术进行破解。比如,计算机程序可以直接从X轴、Y轴方向进行拾色扫描,扫出连续色点,然后确定缺口位置,从而计算出滑块拼图需要的滑动距离。However, slider CAPTCHAs are easily cracked through color-picking scanning technology in computer programs. For example, a computer program can directly scan colors from the X-axis and Y-axis directions, scan out continuous color points, and then determine the position of the gap to calculate the sliding distance required for the slide puzzle.
发明内容Contents of the invention
本申请提供了一种滑动验证方法、图像生成方法、装置、设备和存储介质。所述技术方案如下:This application provides a sliding verification method, image generation method, device, equipment and storage medium. The technical solutions are as follows:
根据本申请的一方面,提供了一种滑动验证方法,所述方法由终端执行,所述方法包括:According to one aspect of the present application, a sliding verification method is provided, the method is executed by a terminal, and the method includes:
显示图像内容未对齐的第一切割子图和第二切割子图;所述第一切割子图的图像内容和所述第二切割子图的图像内容,与验证图像被切割线切割出的两块图像内容对应;Display the first cutting sub-image and the second cutting sub-image whose image content is not aligned; the image content of the first cutting sub-image and the image content of the second cutting sub-image are different from the two parts of the verification image cut by the cutting line. Block image content correspondence;
响应于滑动操作,控制所述第一切割子图和/或所述第二切割子图进行滑动;以及在所述图像内容对齐的情况下,确定验证成功。In response to the sliding operation, the first cutting sub-image and/or the second cutting sub-image are controlled to slide; and in the case where the image contents are aligned, it is determined that the verification is successful.
根据本申请的另一方面,提供了一种滑动验证方法,所述方法由第一服务器执行,所述方法包括:According to another aspect of the present application, a sliding verification method is provided, the method is executed by the first server, the method includes:
向终端发送图像内容未对齐的第一切割子图和第二切割子图;所述第一切割子图的图像内容和所述第二切割子图的图像内容,与验证图像被切割线切割出的两块图像内容对应;Send the first cutting sub-image and the second cutting sub-image whose image content is not aligned to the terminal; the image content of the first cutting sub-image and the image content of the second cutting sub-image are cut out by the cutting line with the verification image The two image contents correspond;
接收所述终端发送的滑动距离信息,所述滑动距离信息与所述第一切割子图和/或所述第二切割子图相对滑动的距离有关;Receive sliding distance information sent by the terminal, where the sliding distance information is related to the relative sliding distance of the first cutting sub-image and/or the second cutting sub-image;
在基于所述滑动距离信息确定所述图像内容对齐的情况下,确定验证成功。If it is determined that the image content is aligned based on the sliding distance information, it is determined that the verification is successful.
根据本申请的另一方面,提供了一种图像生成方法,所述方法由第二服务器执行,所述方法包括:According to another aspect of the present application, an image generation method is provided, the method is executed by a second server, the method includes:
获取验证图像;Get verification image;
基于切割线对所述验证图像切割出的两块图像内容,得到第一切割子图和第二切割子图;Based on the two pieces of image content cut out of the verification image based on the cutting line, a first cut sub-image and a second cut sub-image are obtained;
生成图像内容未对齐的第一切割子图和第二切割子图。Generate a first cut sub-image and a second cut sub-image with unaligned image content.
根据本申请的另一方面,提供了一种滑动验证装置,所述装置包括:According to another aspect of the present application, a sliding verification device is provided, which device includes:
显示模块,用于显示图像内容未对齐的第一切割子图和第二切割子图;所述第一切割子图的图像内容和所述第二切割子图的图像内容,与验证图像被切割线切割出的两块图像内容对应;A display module configured to display the first cutting sub-image and the second cutting sub-image whose image contents are misaligned; the image content of the first cutting sub-image and the image content of the second cutting sub-image are cut with the verification image The content of the two images cut out by the line corresponds;
处理模块,用于响应于滑动操作,控制所述第一切割子图和/或所述第二切割子图进行滑动;以及在所述图像内容对齐的情况下,确定验证成功。A processing module configured to control the first cutting sub-image and/or the second cutting sub-image to slide in response to a sliding operation; and determine that the verification is successful if the image contents are aligned.
根据本申请的另一方面,提供了一种滑动验证装置,所述装置包括:According to another aspect of the present application, a sliding verification device is provided, which device includes:
发送模块,用于向终端发送图像内容未对齐的第一切割子图和第二切割子图;所述第一切割子图的图像内容和所述第二切割子图的图像内容,与验证图像被切割线切割出的两块图 像内容对应;A sending module, configured to send a first cutting sub-image and a second cutting sub-image whose image content is not aligned to the terminal; the image content of the first cutting sub-image and the image content of the second cutting sub-image, and the verification image The contents of the two images cut out by the cutting line correspond to each other;
接收模块,用于接收所述终端发送的滑动距离信息,所述滑动距离信息与所述第一切割子图和/或所述第二切割子图相对滑动的距离有关;A receiving module configured to receive sliding distance information sent by the terminal, where the sliding distance information is related to the relative sliding distance of the first cutting sub-image and/or the second cutting sub-image;
验证模块,用于在基于所述滑动距离信息确定所述图像内容对齐的情况下,确定验证成功。A verification module, configured to determine that verification is successful when the image content is determined to be aligned based on the sliding distance information.
根据本申请的另一方面,提供了一种图像生成装置,所述装置包括:According to another aspect of the present application, an image generating device is provided, the device comprising:
获取模块,用于获取验证图像;Acquisition module, used to obtain verification images;
切割模块,用于基于切割线对所述验证图像切割出的两块图像内容,得到第一切割子图和第二切割子图;A cutting module, used to cut the two pieces of image content out of the verification image based on the cutting line to obtain the first cutting sub-image and the second cutting sub-image;
生成模块,用于生成图像内容未对齐的第一切割子图和第二切割子图。A generation module for generating a first cut sub-image and a second cut sub-image in which the image content is not aligned.
根据本申请的另一方面,提供了一种终端,所述终端包括处理器和存储器,所述存储器中存储有至少一条程序代码,所述至少一条程序代码由所述处理器加载并执行,以实现上述滑动验证方法。According to another aspect of the present application, a terminal is provided. The terminal includes a processor and a memory. At least one program code is stored in the memory. The at least one program code is loaded and executed by the processor to Implement the above sliding verification method.
根据本申请的另一方面,提供了一种服务器,所述服务器包括处理器和存储器,所述存储器中存储有至少一条程序代码,所述至少一条程序代码由所述处理器加载并执行,以实现上述滑动验证方法;或,实现上述图像生成方法。According to another aspect of the present application, a server is provided. The server includes a processor and a memory. At least one program code is stored in the memory. The at least one program code is loaded and executed by the processor to Implement the above sliding verification method; or, implement the above image generation method.
根据本申请的另一方面,提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有可执行指令,所述可执行指令由处理器加载并执行以实现上述滑动验证方法;或,实现上述图像生成方法。According to another aspect of the present application, a computer-readable storage medium is provided, executable instructions are stored in the computer-readable storage medium, and the executable instructions are loaded and executed by a processor to implement the above sliding verification method; Or, implement the above image generation method.
根据本申请的另一方面,提供了一种计算机程序产品,所述计算机程序产品包括计算机指令,所述计算机指令存储在计算机可读存储介质中,所述计算机指令由处理器加载并执行以实现上述滑动验证方法;或,实现上述图像生成方法。According to another aspect of the present application, a computer program product is provided. The computer program product includes computer instructions stored in a computer-readable storage medium. The computer instructions are loaded and executed by a processor to implement The above sliding verification method; or, implement the above image generation method.
本申请实施例提供的技术方案至少包括如下有益效果:The technical solutions provided by the embodiments of this application at least include the following beneficial effects:
本申请实施例中通过显示图像内容未对齐的第一切割子图和第二切割子图,并响应于滑动操作,控制第一切割子图和/或第二切割子图进行滑动,以及在图像内容对齐的情况下,确定验证成功。本申请实施例提供了一种新型的滑动验证码及其滑动验证方式,由于两个切割子图的边界较为隐蔽,很难通过拾色技术预测出两个切割子图的相对位置关系,该滑动验证码的破解难度、破解成本高,可以有效提高滑动验证安全性,还可以在一定程度上提高用户体验。In the embodiment of the present application, the first cutting sub-image and the second cutting sub-image are displayed with unaligned image contents, and in response to the sliding operation, the first cutting sub-image and/or the second cutting sub-image are controlled to slide, and in the image If the content is aligned, the verification is successful. The embodiment of the present application provides a new type of sliding verification code and its sliding verification method. Since the boundaries of the two cut sub-figures are relatively hidden, it is difficult to predict the relative position relationship of the two cut sub-figures through color picking technology. The sliding The verification code is difficult and costly to crack, which can effectively improve the security of sliding verification and improve user experience to a certain extent.
附图说明Description of drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without exerting creative efforts.
图1是本申请一个实施例提供的相关技术中的图文验证码的示意图;Figure 1 is a schematic diagram of a graphic verification code in related technology provided by an embodiment of the present application;
图2是本申请一个实施例提供的相关技术中的滑块验证码的示意图;Figure 2 is a schematic diagram of a slider verification code in related technology provided by an embodiment of the present application;
图3是本申请一个实施例提供的滑动验证方法的实施环境的示意图;Figure 3 is a schematic diagram of the implementation environment of the sliding verification method provided by an embodiment of the present application;
图4是本申请一个实施例提供的滑动验证方法的实施环境的示意图;Figure 4 is a schematic diagram of the implementation environment of the sliding verification method provided by an embodiment of the present application;
图5是本申请一个实施例提供的滑动验证方法的流程图;Figure 5 is a flow chart of a sliding verification method provided by an embodiment of the present application;
图6是本申请一个实施例提供的滑动验证方法的界面示意图;Figure 6 is a schematic interface diagram of a sliding verification method provided by an embodiment of the present application;
图7是本申请一个实施例提供的滑动验证方法的界面示意图;Figure 7 is a schematic interface diagram of a sliding verification method provided by an embodiment of the present application;
图8是本申请一个实施例提供的滑动验证方法的界面示意图;Figure 8 is a schematic interface diagram of a sliding verification method provided by an embodiment of the present application;
图9是本申请一个实施例提供的滑动验证方法的界面示意图;Figure 9 is a schematic interface diagram of a sliding verification method provided by an embodiment of the present application;
图10是本申请一个实施例提供的滑动验证方法的流程图;Figure 10 is a flow chart of a sliding verification method provided by an embodiment of the present application;
图11是本申请一个实施例提供的滑动验证方法的流程图;Figure 11 is a flow chart of a sliding verification method provided by an embodiment of the present application;
图12是本申请一个实施例提供的滑动验证方法的流程图;Figure 12 is a flow chart of a sliding verification method provided by an embodiment of the present application;
图13是本申请一个实施例提供的滑动验证方法的流程图;Figure 13 is a flow chart of a sliding verification method provided by an embodiment of the present application;
图14是本申请一个实施例提供的滑动验证方法的流程图;Figure 14 is a flow chart of a sliding verification method provided by an embodiment of the present application;
图15是本申请一个实施例提供的滑动验证方法的界面示意图;Figure 15 is a schematic interface diagram of the sliding verification method provided by an embodiment of the present application;
图16是本申请一个实施例提供的滑动验证方法的流程图;Figure 16 is a flow chart of a sliding verification method provided by an embodiment of the present application;
图17是本申请一个实施例提供的图像生成方法的流程图;Figure 17 is a flow chart of an image generation method provided by an embodiment of the present application;
图18是本申请一个实施例提供的图像生成方法的流程图;Figure 18 is a flow chart of an image generation method provided by an embodiment of the present application;
图19是本申请一个实施例提供的图像生成方法的流程图;Figure 19 is a flow chart of an image generation method provided by an embodiment of the present application;
图20是本申请一个实施例提供的图像生成方法的流程图;Figure 20 is a flow chart of an image generation method provided by an embodiment of the present application;
图21是本申请一个实施例提供的图像生成方法的流程图;Figure 21 is a flow chart of an image generation method provided by an embodiment of the present application;
图22是本申请一个实施例提供的图像生成方法的流程图;Figure 22 is a flow chart of an image generation method provided by an embodiment of the present application;
图23是本申请一个实施例提供的图像生成方法的示意图;Figure 23 is a schematic diagram of an image generation method provided by an embodiment of the present application;
图24是本申请一个实施例提供的图像生成方法的示意图;Figure 24 is a schematic diagram of an image generation method provided by an embodiment of the present application;
图25是本申请一个实施例提供的图像生成方法的示意图;Figure 25 is a schematic diagram of an image generation method provided by an embodiment of the present application;
图26是本申请一个实施例提供的图像生成方法的示意图;Figure 26 is a schematic diagram of an image generation method provided by an embodiment of the present application;
图27是本申请一个实施例提供的图像生成方法的示意图;Figure 27 is a schematic diagram of an image generation method provided by an embodiment of the present application;
图28是本申请一个实施例提供的图像生成方法的示意图;Figure 28 is a schematic diagram of an image generation method provided by an embodiment of the present application;
图29是本申请一个实施例提供的图像生成方法的示意图;Figure 29 is a schematic diagram of an image generation method provided by an embodiment of the present application;
图30是本申请一个实施例提供的图像生成方法的示意图;Figure 30 is a schematic diagram of an image generation method provided by an embodiment of the present application;
图31是本申请一个实施例提供的图像生成方法的流程图;Figure 31 is a flow chart of an image generation method provided by an embodiment of the present application;
图32是本申请一个实施例提供的滑动验证装置的结构框图;Figure 32 is a structural block diagram of a sliding verification device provided by an embodiment of the present application;
图33是本申请一个实施例提供的滑动验证装置的结构框图;Figure 33 is a structural block diagram of a sliding verification device provided by an embodiment of the present application;
图34是本申请一个实施例提供的图像生成装置的结构框图;Figure 34 is a structural block diagram of an image generation device provided by an embodiment of the present application;
图35是本申请一个实施例提供的终端的结构框图;Figure 35 is a structural block diagram of a terminal provided by an embodiment of the present application;
图36是本申请一个实施例提供的服务器的结构框图。Figure 36 is a structural block diagram of a server provided by an embodiment of the present application.
具体实施方式Detailed ways
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本申请相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本申请的一些方面相一致的装置和方法的例子。In order to make the purpose, technical solutions and advantages of the present application clearer, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings. Exemplary embodiments will be described in detail herein, examples of which are illustrated in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings refer to the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with this application. Rather, they are merely examples of apparatus and methods consistent with aspects of the application as detailed in the appended claims.
在本申请使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本申请。在本申请和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本文中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a," "the" and "the" are intended to include the plural forms as well, unless the context clearly dictates otherwise. It will also be understood that the term "and/or" as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.
应当理解,尽管在本申请可能采用术语第一、第二、第三等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本申请范围的情况下,第一信息也可以被称为第二信息,类似地,第二信息也可以被称为第一信息。取决于语境,如在此所使用的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”。It should be understood that although the terms first, second, third, etc. may be used in this application to describe various information, the information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of the present application, the first information may also be called second information, and similarly, the second information may also be called first information. Depending on the context, the word "if" as used herein may be interpreted as "when" or "when" or "in response to determining."
相关技术中,验证码包括图文验证码和滑块验证码。图1示出了相关技术中的图文验证码的示意图,该图文验证码中包括字母和文字,当在指定区域内输入图文验证码中的文字,输入的文字与图文验证码中的文字一致即通过验证。但是,这种图文验证码容易通过光学字符识别(Optical Character Recognition,OCR)技术进行破解。图2示出了相关技术中的滑块验证码的示意图,滑块验证码包括滑块拼图A和背景图像,该背景图像存在缺口B,滑块拼图A的图像内容是背景图像中的一部分图像区域(缺口B)的图像内容,且滑块拼图A的初 始显示位置在背景图像中除缺口B位置之外的任意位置。该存在缺口B的背景图像通过图像掩膜的方式生成。其中,图像掩膜是指用特定的图像、图形或者物体,对背景图像的全部或局部进行遮挡。比如,采用如滑块拼图A的掩膜图形对背景图像的局部进行遮挡,以生成存在缺口B的背景图像。用户通过滑动,将滑块拼图A与缺口B进行拼接,当滑块拼图A位置与缺口B位置接近,则通过人机验证。但是,这种滑块验证码的滑块拼图A与缺口B是上下对称或左右对称的,且两者相对应的点的距离等距,计算机程序可以从X轴、Y轴方向进行拾色扫描,扫描出连续色点,确定缺口B的中心,计算出将滑块拼图A滑动至缺口B时滑块需要的滑动距离,容易进行破解。In related technologies, verification codes include graphic and text verification codes and slider verification codes. Figure 1 shows a schematic diagram of a graphic verification code in the related art. The graphic verification code includes letters and text. When the text in the graphic verification code is input in a designated area, the input text is the same as the text in the graphic verification code. If the text is consistent, the verification is passed. However, this kind of graphic verification code is easy to crack through optical character recognition (Optical Character Recognition, OCR) technology. Figure 2 shows a schematic diagram of a slider verification code in the related art. The slider verification code includes a slider puzzle A and a background image. There is a gap B in the background image. The image content of the slider puzzle A is part of the image in the background image. The image content of area (notch B), and the initial display position of slider puzzle A is anywhere in the background image except the position of notch B. The background image with gap B is generated by using an image mask. Among them, image masking refers to using specific images, graphics or objects to block all or part of the background image. For example, a mask pattern such as slider puzzle A is used to block part of the background image to generate a background image with gap B. The user slides to connect slider puzzle A and gap B. When the position of slider puzzle A and gap B are close to each other, the human-machine verification is passed. However, the slider puzzle A and the gap B of this slider verification code are symmetrical up and down or left and right, and the corresponding points of the two are equidistant. The computer program can perform color picking and scanning from the X-axis and Y-axis directions. , scan out the continuous color points, determine the center of gap B, and calculate the sliding distance required by the slider when sliding puzzle A to gap B, which is easy to crack.
基于上述问题,图3示出了本申请一个示例性实施例提供的滑动验证方法的实施环境的示意图。该实施环境可以实现成为滑动验证方法的***架构。该实施环境可以包括:终端100和服务器200,该服务器200也可称为第一服务器。Based on the above problems, Figure 3 shows a schematic diagram of the implementation environment of the sliding verification method provided by an exemplary embodiment of the present application. This implementation environment can realize the system architecture that becomes the sliding verification method. The implementation environment may include: a terminal 100 and a server 200, and the server 200 may also be called a first server.
终端100可以是诸如手机、平板电脑、车载终端(车机)、可穿戴设备、PC(Personal Computer,个人计算机)、无人预定终端等电子设备。终端100中可以安装运行目标应用程序的客户端,该目标应用程序可以是需要进行滑动验证的应用程序,也可以是提供有滑动验证功能的其他应用程序,本申请对此不作限定。另外,本申请对该目标应用程序的形式不作限定,包括但不限于安装在终端100中的App(Application,应用程序)、小程序等,还可以是网页形式。The terminal 100 may be an electronic device such as a mobile phone, a tablet computer, a vehicle-mounted terminal (vehicle machine), a wearable device, a PC (Personal Computer), an unmanned reservation terminal, etc. A client that runs a target application can be installed in the terminal 100. The target application can be an application that requires sliding verification, or it can be another application that provides a sliding verification function. This application does not limit this. In addition, this application does not limit the form of the target application, including but not limited to App (Application, application program) installed in the terminal 100, applet, etc., and may also be in the form of a web page.
服务器200可以是独立的物理服务器,也可以是多个物理服务器构成的服务器集群或者分布式***,还可以是提供云计算服务的云服务器、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、内容分发网络(Content Delivery Network,CDN)、以及大数据和人工智能平台等基础云计算服务的云服务器。服务器200可以是上述目标应用程序的后台服务器,用于为目标应用程序的客户端提供后台服务。The server 200 can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server, cloud database, cloud computing, cloud function, cloud storage, or network service that provides cloud computing services. , cloud communications, middleware services, domain name services, security services, content delivery network (Content Delivery Network, CDN), and cloud servers for basic cloud computing services such as big data and artificial intelligence platforms. The server 200 may be a background server of the above-mentioned target application, and is used to provide background services for clients of the target application.
以图3所示的实施环境为例,可以由终端100和服务器200交互配合执行。例如,由服务器200生成图像内容未对齐的第一切割子图10和第二切割子图20并发送给终端100,由终端100执行滑动验证方法,比如终端100中安装运行的目标应用程序的客户端显示图像内容未对齐的第一切割子图10和第二切割子图20;终端100响应于滑动操作,控制第一切割子图10和/或第二切割子图20进行滑动。终端100在图像内容对齐的情况下,确定验证成功,或者,服务器200在图像内容对齐的情况下,确定验证成功,并将验证成功的结果发送至终端100显示。Taking the implementation environment shown in Figure 3 as an example, the terminal 100 and the server 200 can interact and cooperate to execute. For example, the server 200 generates the first cutting sub-image 10 and the second cutting sub-image 20 with unaligned image contents and sends them to the terminal 100, and the terminal 100 executes the sliding verification method, such as a client who installs and runs the target application in the terminal 100. The terminal displays the first cutting sub-image 10 and the second cutting sub-image 20 whose image contents are not aligned; the terminal 100 responds to the sliding operation and controls the first cutting sub-image 10 and/or the second cutting sub-image 20 to slide. The terminal 100 determines that the verification is successful when the image contents are aligned, or the server 200 determines that the verification is successful when the image contents are aligned, and sends the successful verification result to the terminal 100 for display.
在一些实施例中,图4示出了本申请一个示例性实施例提供的滑动验证方法的实施环境的示意图,实施环境也可以实现成为滑动验证方法的***架构。该实施环境可以包括:终端100、服务器200和服务器300。该服务器300也可称为第二服务器。In some embodiments, FIG. 4 shows a schematic diagram of the implementation environment of the sliding verification method provided by an exemplary embodiment of the present application. The implementation environment can also be implemented as a system architecture of the sliding verification method. The implementation environment may include: terminal 100, server 200 and server 300. The server 300 may also be called a second server.
服务器300可以是独立的物理服务器,也可以是多个物理服务器构成的服务器集群或者分布式***,还可以是提供云计算服务的云服务器、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、内容分发网络(Content Delivery Network,CDN)、以及大数据和人工智能平台等基础云计算服务的云服务器。服务器300可以是第三方服务器,用于为服务器200或上述目标应用程序的客户端提供服务。The server 300 can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server, cloud database, cloud computing, cloud function, cloud storage, or network service that provides cloud computing services. , cloud communications, middleware services, domain name services, security services, content delivery network (Content Delivery Network, CDN), and cloud servers for basic cloud computing services such as big data and artificial intelligence platforms. The server 300 may be a third-party server used to provide services for the server 200 or the client of the above-mentioned target application.
以图4所示的实施环境为例,可以由终端100、服务器200和服务器300交互配合执行。例如,由服务器300生成图像内容未对齐的第一切割子图10和第二切割子图20,服务器200从服务器300获取图像内容未对齐的第一切割子图10和第二切割子图20并发送给终端100,由终端100执行滑动验证方法。Taking the implementation environment shown in Figure 4 as an example, the terminal 100, the server 200 and the server 300 can interact and cooperate to execute. For example, the server 300 generates the first cutting sub-image 10 and the second cutting sub-image 20 whose image content is not aligned, and the server 200 obtains the first cutting sub-image 10 and the second cutting sub-image 20 whose image content is not aligned from the server 300 and Sent to the terminal 100, the terminal 100 executes the sliding verification method.
此外,本申请技术方案还可以和区块链技术相结合。例如,本申请所公开的滑动处理方法,其中涉及的一些数据可以保存于区块链上。终端100、服务器200、服务器300之间可以通过网络进行通信,如有线或无线网络。In addition, the technical solution of this application can also be combined with blockchain technology. For example, some data involved in the sliding processing method disclosed in this application can be saved on the blockchain. The terminal 100, server 200, and server 300 can communicate through a network, such as a wired or wireless network.
图5示出了本申请一个示例性实施例提供的滑动验证方法的流程图,本实施例终端执行为例进行说明,该方法包括:Figure 5 shows a flow chart of a sliding verification method provided by an exemplary embodiment of the present application. In this embodiment, terminal execution is taken as an example for illustration. The method includes:
步骤520,显示图像内容未对齐的第一切割子图和第二切割子图;第一切割子图的图像内容和第二切割子图的图像内容,与验证图像被切割线切割出的两块图像内容对应。Step 520: Display the first cutting sub-image and the second cutting sub-image whose image contents are not aligned; the image content of the first cutting sub-image and the image content of the second cutting sub-image, and the two pieces of the verification image cut out by the cutting line Image content correspondence.
验证图像是指用于进行滑动验证的图像。图像内容是指图像中包含的元素内容,比如颜色、物体、文字等。采用一条切割线对验证图像进行切割,可以得到该验证图像被切割线切割后的两块图像内容。可选地,切割线可以是直线、曲线、波浪线、锯齿线等,本实施例中切割线为直线。The verification image refers to the image used for swipe verification. Image content refers to the element content contained in the image, such as colors, objects, text, etc. Using a cutting line to cut the verification image, two pieces of image content can be obtained after the verification image is cut by the cutting line. Alternatively, the cutting line may be a straight line, a curve, a wavy line, a zigzag line, etc. In this embodiment, the cutting line is a straight line.
第一切割子图和第二切割子图是基于验证图像被切割线切割出的两块图像内容所得到的图像。可选地,对于同一验证图像,采用不同切割线切割出的两块图像内容不一致。The first cutting sub-image and the second cutting sub-image are images obtained based on the content of the two pieces of image cut out by the cutting line of the verification image. Optionally, for the same verification image, the contents of the two images cut using different cutting lines are inconsistent.
第一切割子图的图像内容和第二切割子图的图像内容未对齐。第一切割子图的图像内容和第二切割子图的图像内容,与验证图像被切割线切割出的两块图像内容对应。The image content of the first cut sub-image and the image content of the second cut sub-image are not aligned. The image content of the first cutting sub-image and the image content of the second cutting sub-image correspond to the image content of the two pieces of the verification image cut out by the cutting line.
可选地,图像内容未对齐可以是指定类型的图像内容未对齐。例如,指定类型为文字,当第一切割图像与第二切割图像的文字未对齐,或被拆分在第一切割图像与第二切割图像中的同一文字未对齐,则确定图像内容未对齐。又例如,指定类型为建筑物,当第一切割图像与第二切割图像的建筑物未对齐,或被拆分在第一切割图像与第二切割图像中的同一建筑物未对齐,则确定图像内容未对齐。Optionally, the image content misalignment may be a specified type of image content misalignment. For example, if the specified type is text, when the text of the first cut image and the second cut image are not aligned, or the same text split in the first cut image and the second cut image is not aligned, it is determined that the image content is not aligned. For another example, specifying the type as building, when the buildings in the first cutting image and the second cutting image are not aligned, or the same building split in the first cutting image and the second cutting image are not aligned, then determine the image Content is misaligned.
可选地,图像内容未对齐还可以是指定类型的图像内容未按照指定方式对齐。例如,指定第一切割图像与第二切割图像中的文字沿水平方向对齐,当第一切割图像与第二切割图像中的文字沿水平方向未对齐则确定图像内容未对齐。Optionally, the image content is not aligned or the image content of the specified type is not aligned in a specified manner. For example, it is specified that the text in the first cutting image and the second cutting image are aligned in the horizontal direction. When the text in the first cutting image and the second cutting image are not aligned in the horizontal direction, it is determined that the image content is not aligned.
可选地,使得第一切割子图的图像内容和第二切割子图的图像内容未对齐的方式,可以是将第一切割子图和/或第二切割子图按照一定方向移动一段距离,还可以是将第一切割子图和/或第二切割子图进行图像处理。该图像处理可以是尺寸缩放、像素填充、图像翻转、图像旋转中的一种或多种的组合。Optionally, the manner in which the image content of the first cutting sub-image and the image content of the second cutting sub-image are misaligned may be to move the first cutting sub-image and/or the second cutting sub-image by a certain distance in a certain direction, The first cutting sub-image and/or the second cutting sub-image may also be subjected to image processing. The image processing may be one or a combination of size scaling, pixel filling, image flipping, and image rotation.
可选地,第一切割子图和第二切割子图可以基于同一验证图像的两块图像内容确定。例如,可以是直接将同一验证图像被切割线切割出的两块图像内容分别作为第一切割图像和第二切割图像。还可以是分别对两块图像内容进行一系列相同或不同的图像处理得到第一切割图像和第二切割图像。该图像处理可以是尺寸缩放、像素填充、图像翻转、图像旋转中的一种或多种的组合。Optionally, the first cutting sub-image and the second cutting sub-image may be determined based on the two image contents of the same verification image. For example, the two pieces of image content cut out by the cutting line of the same verification image may be directly used as the first cutting image and the second cutting image respectively. The first cutting image and the second cutting image may also be obtained by performing a series of identical or different image processing on the two pieces of image content respectively. The image processing may be one or a combination of size scaling, pixel filling, image flipping, and image rotation.
可选地,第一切割子图和第二切割子图还可以基于不同验证图像的两块图像内容确定。例如,第一验证图像被切割线切割出两块图像内容,第二验证图像被同一切割线切割出两块图像内容,可以是直接将第一验证图像的某个图像内容作为第一切割图像,将第二验证图像的某个图像内容作为第二切割图像。还可以是分别对将第一验证图像的某个图像内容进行一系列图像处理得到第一切割图像,将第二验证图像的某个图像内容进行一系列相同或不同的图像处理得到第二切割图像。Optionally, the first cutting sub-image and the second cutting sub-image may also be determined based on the two image contents of different verification images. For example, if the first verification image is cut into two pieces of image content by a cutting line, and the second verification image is cut into two pieces of image content by the same cutting line, a certain image content of the first verification image can be directly used as the first cutting image. Use a certain image content of the second verification image as the second cutting image. It is also possible to perform a series of image processing on a certain image content of the first verification image to obtain the first cutting image, and to perform a series of the same or different image processing on a certain image content of the second verification image to obtain the second cutting image. .
可选地,终端可以接收服务器发送的图像内容未对齐的第一切割子图和第二切割子图并显示。终端可以基于显示界面的大小,显示第一切割子图和第二切割子图的一部分,具体显示哪一部分可以由终端根据实际技术需要自行确定,或由服务器指定。Optionally, the terminal may receive the first cut sub-image and the second cut sub-image with unaligned image content sent by the server and display them. The terminal can display a part of the first cutting sub-image and the second cutting sub-image based on the size of the display interface. The specific part to be displayed can be determined by the terminal according to actual technical needs, or specified by the server.
可选地,终端在显示图像内容未对齐的第一切割子图和第二切割子图时,第一切割子图和第二切割子图不存在重叠区域。Optionally, when the terminal displays the first cutting sub-image and the second cutting sub-image whose image contents are misaligned, there is no overlapping area between the first cutting sub-image and the second cutting sub-image.
作为示例,请参阅图6,切割线为直线,第一切割子图10的图像内容和第二切割子图20的图像内容,与验证图像被切割线切割出的两块图像内容对应。终端显示图像内容未对齐的第一切割子图10和第二切割子图20,且显示时,第一切割子图10和第二切割子图20不存在重叠区域。需要说明,图6显示的第一切割子图10可以是实际的第一切割子图的一部分,显示的第二切割子图20可以是实际的第二切割子图的一部分。As an example, please refer to FIG. 6 , the cutting line is a straight line, and the image content of the first cutting sub-image 10 and the image content of the second cutting sub-image 20 correspond to the two image contents of the verification image cut out by the cutting line. The terminal displays the first cutting sub-image 10 and the second cutting sub-image 20 whose image contents are not aligned, and when displayed, there is no overlapping area between the first cutting sub-image 10 and the second cutting sub-image 20 . It should be noted that the first cutting sub-figure 10 shown in FIG. 6 may be part of the actual first cutting sub-figure, and the second cutting sub-figure 20 shown may be part of the actual second cutting sub-figure.
步骤540,响应于滑动操作,控制第一切割子图和/或第二切割子图进行滑动;以及在图像内容对齐的情况下,确定验证成功。Step 540: In response to the sliding operation, control the first cutting sub-image and/or the second cutting sub-image to slide; and if the image contents are aligned, determine that the verification is successful.
滑动操作是针对第一切割子图和/或第二切割子图进行滑动的操作。比如,用户可以直接拖动第一切割子图和/或第二切割子图进行滑动。则终端响应于滑动操作,控制第一切割子图和/或第二切割子图进行滑动。The sliding operation is an operation of sliding on the first cutting sub-image and/or the second cutting sub-image. For example, the user can directly drag the first cutting sub-figure and/or the second cutting sub-figure to slide. Then, in response to the sliding operation, the terminal controls the first cutting sub-picture and/or the second cutting sub-picture to slide.
可选地,第一切割子图和第二切割子图中可存在一个可移动子图与一个不可移动子图,具体哪个为可移动子图可以由终端自行确定,或由服务器指定。例如,第一切割子图为可移动子图,第二切割子图为不可移动子图,滑动操作仅可滑动第一切割子图,则终端响应于滑动操作,控制第一切割子图进行滑动。又例如,第一切割子图为不可移动子图,第二切割子图为可移动子图,滑动操作仅可滑动第二切割子图,则终端响应于滑动操作,控制第二切割子图进行滑动。Optionally, there may be a movable sub-picture and an immovable sub-picture in the first cutting sub-picture and the second cutting sub-picture. Which one is the movable sub-picture can be determined by the terminal itself or specified by the server. For example, the first cutting sub-picture is a movable sub-picture, the second cutting sub-picture is an immovable sub-picture, and the sliding operation can only slide the first cutting sub-picture, then the terminal controls the first cutting sub-picture to slide in response to the sliding operation . For another example, the first cutting sub-picture is an immovable sub-picture, the second cutting sub-picture is a movable sub-picture, and the sliding operation can only slide the second cutting sub-picture, then the terminal controls the second cutting sub-picture in response to the sliding operation. slide.
可选地,第一切割子图和第二切割子图均为可移动子图,用户可自行确定针对哪个进行滑动。例如,可以仅滑动第一切割子图,则终端响应于滑动操作,控制第一切割子图进行滑动。或仅滑动第二切割子图,则终端响应于滑动操作,控制第二切割子图进行滑动。还可以先滑动第一切割子图,再滑动第二切割子图,或先滑动第二切割子图,再滑动第一切割子图,则终端响应于滑动操作,控制第一切割子图和第二切割子图进行滑动。Optionally, both the first cutting sub-picture and the second cutting sub-picture are movable sub-pictures, and the user can decide which one to slide. For example, only the first cutting sub-picture can be slid, and the terminal controls the first cutting sub-picture to slide in response to the sliding operation. Or only slide the second cutting sub-picture, then the terminal controls the second cutting sub-picture to slide in response to the sliding operation. You can also slide the first cutting sub-picture first, and then slide the second cutting sub-picture, or slide the second cutting sub-picture first, and then slide the first cutting sub-picture, and then the terminal controls the first cutting sub-picture and the first cutting sub-picture in response to the sliding operation. Two cut subgraphs are slid.
可选地,确定第一切割子图的图像内容和第二切割子图的图像内容是否对齐,可以是由终端自行确定。还可以是终端将滑动操作的相关信息发送给第一服务器,由第一服务器确定并返回第一切割子图的图像内容和第二切割子图的图像内容是否对齐的结果。在图像内容对齐的情况下,确定验证成功。Optionally, determining whether the image content of the first cut sub-image and the image content of the second cut sub-image are aligned may be determined by the terminal itself. It may also be that the terminal sends relevant information of the sliding operation to the first server, and the first server determines and returns a result of whether the image content of the first cutting sub-image and the image content of the second cutting sub-image are aligned. With the image content aligned, the verification is determined to be successful.
作为示例,请参阅图6,第一切割子图10为可移动子图,第二切割子图20为不可移动子图,终端响应于滑动操作,控制第一切割子图10进行滑动;请参阅图7,在图像内容对齐的情况下,确定验证成功。As an example, please refer to Figure 6 , the first cutting sub-picture 10 is a movable sub-picture, the second cutting sub-picture 20 is an immovable sub-picture, and the terminal controls the first cutting sub-picture 10 to slide in response to the sliding operation; please refer to Figure 7, when the image content is aligned, it is determined that the verification is successful.
可选地,终端还显示滑块控件,滑块控件用于接收滑动操作,滑块控件包括滑块,滑块控件包括一个或多个。本实施例中,对于滑块控件的形状、大小、位置等不做限制。Optionally, the terminal also displays a slider control, the slider control is used to receive a sliding operation, the slider control includes a slider, and the slider control includes one or more sliders. In this embodiment, there are no restrictions on the shape, size, position, etc. of the slider control.
比如,滑块控件包括一个,通过对滑块控件进行滑动,实现针对第一切割子图或第二切割子图进行滑动。又比如,滑块控件包括两个,通过对第一滑块控件进行滑动,实现针对第一切割子图进行滑动,通过对第二滑块控件进行滑动,实现针对第二切割子图进行滑动。For example, the slider control includes one, and by sliding the slider control, the first cutting sub-picture or the second cutting sub-picture can be slid. For another example, the slider control includes two. By sliding the first slider control, the sliding of the first cutting sub-picture is realized, and by sliding the second slider control, the sliding of the second cutting sub-picture is realized.
作为示例,请参阅图8,终端还显示一个滑块控件30,滑块控件30位于第一切割子图10和第二切割子图20所在显示区域的下方。通过对滑块控件30进行滑动,实现针对第一切割子图10进行滑动。请参阅图9,在图像内容对齐的情况下,确定验证成功。As an example, please refer to FIG. 8 . The terminal also displays a slider control 30 . The slider control 30 is located below the display area where the first cutting sub-figure 10 and the second cutting sub-figure 20 are located. By sliding the slider control 30, the first cutting sub-picture 10 is slid. Refer to Figure 9 and confirm that the verification is successful when the image content is aligned.
可选地,在确定验证成功后,终端可自动跳转到下一显示界面。当确定验证失败时,终端可以是跳转到失败界面,还可以是自动刷新,以显示新的图像未对齐的第一切割子图和第二切割子图,还可以是弹出提示信息,以提醒验证失败等。Optionally, after determining that the verification is successful, the terminal can automatically jump to the next display interface. When it is determined that the verification fails, the terminal can jump to the failure interface, or it can automatically refresh to display the new unaligned first cutting sub-image and the second cutting sub-image, or it can pop up a prompt message to remind Verification failed, etc.
综上所述,本申请实施例中通过显示图像内容未对齐的第一切割子图和第二切割子图,并响应于滑动操作,控制第一切割子图和/或第二切割子图进行滑动,以及在图像内容对齐的情况下,确定验证成功。本申请实施例提供了一种新型的滑动验证码及其滑动验证方式,由于两个切割子图的边界较为隐蔽,很难通过拾色技术预测出两个切割子图的相对位置关系,该滑动验证码的破解难度、破解成本高,可以有效提高滑动验证安全性,还可以在一定程度上提高用户体验。To sum up, in the embodiment of the present application, the first cutting sub-image and the second cutting sub-image are displayed with unaligned image contents, and in response to the sliding operation, the first cutting sub-image and/or the second cutting sub-image are controlled to proceed. Swipe, and with the image content aligned, the verification is determined to be successful. The embodiment of the present application provides a new type of sliding verification code and its sliding verification method. Since the boundaries of the two cut sub-figures are relatively hidden, it is difficult to predict the relative position relationship of the two cut sub-figures through color picking technology. The sliding The verification code is difficult and costly to crack, which can effectively improve the security of sliding verification and improve user experience to a certain extent.
在一个示例中,图像内容未对齐的第一切割子图和第二切割子图,是将同一验证图像切割后的两块图像内容沿切割线相对于第一方向滑动第一距离后得到。In one example, the first cutting sub-image and the second cutting sub-image whose image contents are misaligned are obtained by sliding the two pieces of image content after cutting the same verification image by a first distance along the cutting line relative to the first direction.
可选地,第一切割子图和第二切割子图是基于同一验证图像的两块图像内容得到。第一方向是指两块图像内容沿切割线相对滑动的方向。相对滑动是指一块图像内容对于另一块图像内容而言是滑动的。第一距离是两块图像内容沿切割线相对滑动的距离,该第一距离为理论值。Optionally, the first cutting sub-image and the second cutting sub-image are obtained based on two image contents of the same verification image. The first direction refers to the direction in which the two pieces of image content slide relative to each other along the cutting line. Relative sliding means that one piece of image content slides relative to another piece of image content. The first distance is the distance between two pieces of image content sliding relative to each other along the cutting line, and the first distance is a theoretical value.
例如,两块图像内容中图像内容1沿切割线向上滑动,图像内容2不滑动,则在图像内 容1沿切割线向上滑动距离1后,可得到第一切割子图和第二切割子图,该距离1即为第一距离,第一方向即为向上。又例如,两块图像内容均沿切割线向上滑动,图像内容1沿切割线向上滑动距离1,图像内容2沿切割线向上滑动距离2,则在两块图像内容沿切割线分别向上滑动完毕后,可得到第一切割子图和第二切割子图,则第一距离基于距离1与距离2的距离差值确定,第一方向即为向上。再例如,两块图像内容均沿切割线不同方向滑动,图像内容1沿切割线向上滑动距离1,图像内容2沿切割线向下滑动距离2,则在两块图像内容沿切割线分别向上或向下滑动完毕后,可得到第一切割子图和第二切割子图,则第一距离基于距离1与距离2的距离差值确定,第一方向基于距离差值的正负并结合两块图像内容滑动分别使用的方向共同确定。For example, in two pieces of image content, image content 1 slides upward along the cutting line, and image content 2 does not slide. Then after image content 1 slides upward along the cutting line by a distance of 1, the first cutting sub-image and the second cutting sub-image can be obtained. The distance 1 is the first distance, and the first direction is upward. For another example, two pieces of image content slide upward along the cutting line. Image content 1 slides upward along the cutting line by a distance of 1, and image content 2 slides upward along the cutting line by a distance of 2. After the two pieces of image content respectively slide upward along the cutting line, , the first cutting sub-image and the second cutting sub-image can be obtained, then the first distance is determined based on the distance difference between distance 1 and distance 2, and the first direction is upward. For another example, two pieces of image content slide in different directions along the cutting line. Image content 1 slides upward along the cutting line by a distance of 1, and image content 2 slides downward along the cutting line by a distance of 2. Then the two pieces of image content slide upward or downward along the cutting line respectively. After sliding down, the first cutting sub-image and the second cutting sub-image can be obtained. The first distance is determined based on the distance difference between distance 1 and distance 2. The first direction is based on the positive and negative distance difference and combines the two pieces. The directions used by the image content sliding are jointly determined.
可选地,在图像内容未对齐的第一切割子图和第二切割子图,是将同一验证图像切割后的两块图像内容沿切割线相对于第一方向滑动第一距离后得到的情况下,若要将第一切割子图的图像内容和第二切割子图的图像内容对齐,则可按照与第一方向相反的方向进行滑动。Optionally, when the image contents are misaligned, the first cutting sub-image and the second cutting sub-image are obtained by sliding the two pieces of image content after cutting the same verification image by a first distance along the cutting line relative to the first direction. Next, if you want to align the image content of the first cutting sub-image with the image content of the second cutting sub-image, you can slide in the opposite direction to the first direction.
在本申请的一个可能的实现方式中,如图10所示,在图像内容对齐的情况下,确定验证成功,包括:In a possible implementation of this application, as shown in Figure 10, when the image content is aligned, it is determined that the verification is successful, including:
步骤542,在第一切割子图和/或第二切割子图沿切割线相对于第二方向滑动第二距离,且第二距离和第一距离之差小于阈值的情况下,确定验证成功;其中,第一方向和第二方向相反。Step 542: In the case where the first cutting sub-figure and/or the second cutting sub-figure slides a second distance along the cutting line relative to the second direction, and the difference between the second distance and the first distance is less than the threshold, determine that the verification is successful; Wherein, the first direction and the second direction are opposite.
第二方向是指第一切割子图与第二切割子图沿切割线相对滑动的方向。第二距离是第一切割子图与第二切割子图沿切割线相对滑动的距离,该第二距离为实际值。其中,第二方向与第一方向相反。The second direction refers to the direction in which the first cutting sub-figure and the second cutting sub-figure slide relatively along the cutting line. The second distance is the distance between the first cutting sub-image and the second cutting sub-image relative to each other along the cutting line, and the second distance is an actual value. Wherein, the second direction is opposite to the first direction.
可选地,阈值根据实际技术需要确定,可以是设定值,还可以基于第一距离这一理论值确定。比如,阈值可以是第一距离的±1%。在第一切割子图和/或第二切割子图沿切割线相对于第二方向滑动第二距离,且第二距离和第一距离之差小于阈值的情况下,确定验证成功。Optionally, the threshold is determined based on actual technical needs, and may be a set value, or may be determined based on the theoretical value of the first distance. For example, the threshold may be ±1% of the first distance. When the first cutting sub-figure and/or the second cutting sub-figure slides a second distance along the cutting line relative to the second direction, and the difference between the second distance and the first distance is less than the threshold, it is determined that the verification is successful.
可选地,确定第二距离和第一距离之差是否小于阈值,可以是终端自行确定还可以是在滑动操作后,将与滑动操作的相关信息发送给第一服务器,由第一服务器确定并返回第二距离和第一距离之差是否小于阈值的结果。Optionally, determining whether the difference between the second distance and the first distance is less than a threshold may be determined by the terminal itself or, after the sliding operation, information related to the sliding operation is sent to the first server, and the first server determines and Returns whether the difference between the second distance and the first distance is less than the threshold.
可选地,滑动操作的相关信息可以是滑动距离信息。如图11所示,由终端执行的该方法还包括:Optionally, the information related to the sliding operation may be sliding distance information. As shown in Figure 11, the method executed by the terminal also includes:
步骤544,向第一服务器发送滑动距离信息,以便第一服务器基于滑动距离信息验证第二距离和第一距离之差是否小于阈值。Step 544: Send the sliding distance information to the first server, so that the first server verifies whether the difference between the second distance and the first distance is less than a threshold based on the sliding distance information.
可选地,滑动距离信息可以为第二距离,则第一服务器可直接验证第二距离和第一距离之差是否小于阈值,该阈值为滑动距离信息的该类型对应的阈值,也可称为第一阈值。Optionally, the sliding distance information can be a second distance, and the first server can directly verify whether the difference between the second distance and the first distance is less than a threshold. The threshold is a threshold corresponding to this type of sliding distance information, which can also be called first threshold.
可选地,滑动距离信息为滑动操作的滑动距离,即基于滑块控件进行滑动的滑动距离,该滑动距离与第二距离的大小可以不同。则第一服务器验证滑动距离与设定距离之差是否小于阈值,该阈值为滑动距离信息的该类型对应的阈值,也可称为第二阈值。其中,设定距离基于第一距离换算得到。一个可能的实现方式中,在滑动操作是沿水平方向滑动时,设定距离是第一距离的横轴分量值。在滑动操作时沿纵轴方向滑动时,设定距离是第一距离的纵轴分量值。Optionally, the sliding distance information is the sliding distance of the sliding operation, that is, the sliding distance of sliding based on the slider control. The sliding distance and the second distance may be different in size. Then the first server verifies whether the difference between the sliding distance and the set distance is less than a threshold. The threshold is a threshold corresponding to the type of sliding distance information, which may also be called a second threshold. The set distance is converted based on the first distance. In a possible implementation, when the sliding operation is sliding along the horizontal direction, the set distance is the horizontal axis component value of the first distance. When sliding along the vertical axis direction during the sliding operation, the set distance is the vertical axis component value of the first distance.
需要说明,滑动操作时,终端基于滑动操作控制第一切割子图和/或第二切割子图沿横轴和沿纵轴同时移动,其中,沿横轴移动的距离与沿纵轴移动的距离呈比例,该比例可以是切割线的斜率,从而在视觉上,第一切割子图和/或第二切割子图是沿切割线进行移动。It should be noted that during the sliding operation, the terminal controls the first cutting sub-image and/or the second cutting sub-image to move simultaneously along the horizontal axis and along the vertical axis based on the sliding operation, where the distance moved along the horizontal axis is equal to the distance moved along the vertical axis. In proportion, the ratio may be the slope of the cutting line, so that visually, the first cutting sub-figure and/or the second cutting sub-figure moves along the cutting line.
本实施例中,通过不同类型的滑动距离信息,均可以确定出第一距离与第二距离是否小于阈值,能够提高确定结果的准确性In this embodiment, different types of sliding distance information can be used to determine whether the first distance and the second distance are less than the threshold, which can improve the accuracy of the determination result.
在本申请的一个示例中,如图12所示,上述响应于滑动操作,控制第一切割子图和/或第二切割子图进行滑动,还可以包括:In an example of this application, as shown in Figure 12, the above-mentioned control of the first cutting sub-image and/or the second cutting sub-image to slide in response to the sliding operation may also include:
步骤546,响应于第一切割子图上触发的第一滑动操作,控制第一切割子图跟随第一滑动操作的滑动轨迹进行滑动; Step 546, in response to the first sliding operation triggered on the first cutting sub-picture, control the first cutting sub-picture to slide following the sliding trajectory of the first sliding operation;
或,or,
步骤548,响应于第二切割子图上触发的第二滑动操作,控制第二切割子图跟随第二滑动操作的滑动轨迹进行滑动。Step 548: In response to the second sliding operation triggered on the second cutting sub-picture, control the second cutting sub-picture to slide following the sliding trajectory of the second sliding operation.
可选地,将在第一切割子图上触发的滑动操作称为第一滑动操作,第一滑动操作的滑动轨迹可以是任意可能的轨迹,比如直线、曲线、沿任意方向滑动任意角度的轨迹等,在此不做限制。终端则响应于第一切割子图上触发的第一滑动操作,控制第一切割子图跟随第一滑动操作的滑动轨迹进行滑动。Optionally, the sliding operation triggered on the first cutting sub-graph is called the first sliding operation. The sliding trajectory of the first sliding operation can be any possible trajectory, such as a straight line, a curve, or a trajectory sliding in any direction at any angle. etc., there is no restriction here. In response to the first sliding operation triggered on the first cutting sub-picture, the terminal controls the first cutting sub-picture to slide following the sliding trajectory of the first sliding operation.
可选地,将在第二切割子图上触发的滑动操作称为第二滑动操作,第二滑动操作的滑动轨迹可以是任意可能的轨迹,比如直线、曲线、沿任意方向滑动任意角度的轨迹等,在此不做限制。第二滑动轨迹与第一滑动轨迹是各自独立的。终端则响应于第二切割子图上触发的第二滑动操作,控制第二切割子图跟随第二滑动操作的滑动轨迹进行滑动。Optionally, the sliding operation triggered on the second cutting sub-graph is called the second sliding operation. The sliding trajectory of the second sliding operation can be any possible trajectory, such as a straight line, a curve, or a trajectory sliding in any direction at any angle. etc., there is no restriction here. The second sliding trajectory and the first sliding trajectory are independent. In response to the second sliding operation triggered on the second cutting sub-picture, the terminal controls the second cutting sub-picture to slide following the sliding trajectory of the second sliding operation.
本实施例中,通过响应于在不同切割子图上的不同滑动操作,可以对切割子图进行针对性控制,可以有效提高终端控制的精准度。In this embodiment, by responding to different sliding operations on different cutting sub-pictures, the cutting sub-pictures can be controlled in a targeted manner, which can effectively improve the accuracy of terminal control.
图13示出了本申请一个示例性实施例提供的滑动验证方法的流程图,本实施例以第一服务器执行为例进行说明,该方法包括:Figure 13 shows a flow chart of a sliding verification method provided by an exemplary embodiment of the present application. This embodiment uses the execution of the first server as an example for illustration. The method includes:
步骤1020,向终端发送图像内容未对齐的第一切割子图和第二切割子图;第一切割子图的图像内容和第二切割子图的图像内容,与验证图像被切割线切割出的两块图像内容对应。Step 1020: Send the first cutting sub-image and the second cutting sub-image whose image contents are not aligned to the terminal; the image content of the first cutting sub-image and the image content of the second cutting sub-image are different from the verification image cut out by the cutting line. The content of the two images corresponds.
第一切割子图的图像内容和第二切割子图的图像内容未对齐。第一切割子图的图像内容和第二切割子图的图像内容,与验证图像被切割线切割出的两块图像内容对应。The image content of the first cut sub-image and the image content of the second cut sub-image are not aligned. The image content of the first cutting sub-image and the image content of the second cutting sub-image correspond to the image content of the two pieces of the verification image cut out by the cutting line.
可选地,图像内容未对齐的第一切割子图和第二切割子图可以是由第一服务器生成并发送给终端,或,图像内容未对齐的第一切割子图和第二切割子图由第二服务器生成,第一服务器从第二服务器中获取图像内容未对齐的第一切割子图和第二切割子图并发送给终端。Optionally, the first cutting sub-image and the second cutting sub-image with unaligned image content may be generated by the first server and sent to the terminal, or the first cutting sub-image and the second cutting sub-image with unaligned image content Generated by the second server, the first server obtains the first cut sub-image and the second cut sub-image with unaligned image content from the second server and sends them to the terminal.
步骤1040,接收终端发送的滑动距离信息,滑动距离信息与第一切割子图和/或第二切割子图相对滑动的距离有关。Step 1040: Receive the sliding distance information sent by the terminal. The sliding distance information is related to the relative sliding distance of the first cutting sub-image and/or the second cutting sub-image.
可选地,滑动距离信息是由终端发送的与第一切割子图和/或第二切割子图相对滑动的距离有关的信息。终端向第一服务器发送滑动距离信息,第一服务器接收终端发送的滑动距离信息,以便基于滑动距离信息确定第一切割子图的图像内容与第二切割子图的图像内容是否对齐。Optionally, the sliding distance information is information related to the relative sliding distance of the first cutting sub-image and/or the second cutting sub-image sent by the terminal. The terminal sends the sliding distance information to the first server, and the first server receives the sliding distance information sent by the terminal to determine whether the image content of the first cutting sub-image is aligned with the image content of the second cutting sub-image based on the sliding distance information.
步骤1060,在基于滑动距离信息确定图像内容对齐的情况下,确定验证成功。Step 1060: When it is determined that the image content is aligned based on the sliding distance information, it is determined that the verification is successful.
可选地,第一服务器在基于滑动距离信息确定图像内容对齐的情况下,确定验证成功。第一服务器可以向终端返回验证成功的结果,以便终端执行后续操作。Optionally, the first server determines that the verification is successful when the image content is determined to be aligned based on the sliding distance information. The first server may return a successful verification result to the terminal so that the terminal can perform subsequent operations.
综上所述,本申请实施例的滑动验证码及其滑动验证方式的破解难度、破解成本高,可以有效提高滑动验证安全性,还可以在一定程度上提高用户体验。To sum up, the sliding verification code and the sliding verification method of the embodiment of the present application are difficult to crack and the cracking cost is high. They can effectively improve the security of sliding verification and can also improve the user experience to a certain extent.
在一个可能的实现方式中,滑动距离信息为第二距离,第二距离为第一切割子图和/或第二切割子图沿切割线相对滑动的距离。如图14所示,上述在基于滑动距离信息确定图像内容对齐的情况下,确定验证成功,还可以包括:In a possible implementation, the sliding distance information is a second distance, and the second distance is a relative sliding distance of the first cutting sub-image and/or the second cutting sub-image along the cutting line. As shown in Figure 14, in the above case of determining image content alignment based on sliding distance information, determining that the verification is successful may also include:
步骤1062,在第一距离与第二距离之差小于第一阈值的情况下,确定验证成功;其中,第一距离为两块图像内容沿切割线相对滑动的距离。Step 1062: If the difference between the first distance and the second distance is less than the first threshold, it is determined that the verification is successful; where the first distance is the distance between the two pieces of image content relative to each other along the cutting line.
可选地,图像内容未对齐的第一切割子图和第二切割子图,是将同一验证图像切割后的两块图像内容沿切割线相对滑动第一距离后得到,即第一距离为两块图像内容沿切割线相对滑动的距离。在滑动距离信息为第二距离的情况下,第一服务器可以直接验证第一距离与第二距离之差是否小于第一阈值,以便确定第一切割子图的图像内容和第二切割子图的图像内容是否对齐。Optionally, the first cutting sub-image and the second cutting sub-image whose image content is not aligned are obtained by sliding the two pieces of image content after cutting the same verification image by a first distance relative to each other along the cutting line, that is, the first distance is two The relative sliding distance of the block image content along the cutting line. In the case where the sliding distance information is the second distance, the first server can directly verify whether the difference between the first distance and the second distance is less than the first threshold, so as to determine the image content of the first cut sub-image and the second cut sub-image. Whether the image content is aligned.
可选地,在第一距离与第二距离之差小于第一阈值的情况下,即确定第一切割子图的图像内容和第二切割子图的图像内容对齐,确定验证成功。Optionally, when the difference between the first distance and the second distance is less than the first threshold, it is determined that the image content of the first cut sub-image and the image content of the second cut sub-image are aligned, and it is determined that the verification is successful.
作为示例,请参阅图15,滑动距离信息为第二距离AB,第二距离AB为第一切割子图10和/或第二切割子图20沿切割线相对滑动的距离。在第一距离与第二距离AB之差小于第一阈值的情况下,即确定第一切割子图10的图像内容和第二切割子图20的图像内容对齐,确定验证成功。As an example, please refer to FIG. 15 , the sliding distance information is the second distance AB, and the second distance AB is the relative sliding distance of the first cutting sub-figure 10 and/or the second cutting sub-figure 20 along the cutting line. When the difference between the first distance and the second distance AB is less than the first threshold, it is determined that the image content of the first cut sub-image 10 and the image content of the second cut sub-image 20 are aligned, and it is determined that the verification is successful.
在另一个可能的实现方式中,终端还显示了滑块控件,滑块控件包括滑块。通过滑动该滑块控件实现滑动操作,滑动操作为针对第一切割子图和/或第二切割子图进行滑动的操作。滑动距离信息为滑动操作的滑动距离,该滑动距离与第二距离的大小可以不同。如图14所示,上述在基于滑动距离信息确定图像内容对齐的情况下,确定验证成功,还可以包括:In another possible implementation, the terminal also displays a slider control, and the slider control includes a slider. A sliding operation is implemented by sliding the slider control, and the sliding operation is a sliding operation for the first cutting sub-picture and/or the second cutting sub-picture. The sliding distance information is the sliding distance of the sliding operation, and the sliding distance and the second distance may be different in size. As shown in Figure 14, in the above case of determining image content alignment based on sliding distance information, determining that the verification is successful may also include:
步骤1064,在滑动距离与设定距离之差小于第二阈值的情况下,确定验证成功;其中,设定距离基于第一距离换算得到;第一距离为两块图像内容沿切割线相对滑动的距离。Step 1064: When the difference between the sliding distance and the set distance is less than the second threshold, it is determined that the verification is successful; wherein the set distance is converted based on the first distance; the first distance is the relative sliding distance between the two pieces of image content along the cutting line. distance.
可选地,图像内容未对齐的第一切割子图和第二切割子图,是将同一验证图像切割后的两块图像内容沿切割线相对滑动第一距离后得到,即第一距离为两块图像内容沿切割线相对滑动的距离。在滑动距离信息为滑动操作的滑动距离的情况下,第一服务器可以验证滑动距离与设定距离之差是否小于第二阈值,以便确定第一切割子图的图像内容和第二切割子图的图像内容是否对齐。其中,设定距离基于第一距离换算得到。一个可能的实现方式中,在滑动操作是沿水平方向滑动时,设定距离是第一距离的横轴分量值。在滑动操作时沿纵轴方向滑动时,设定距离是第一距离的纵轴分量值。Optionally, the first cutting sub-image and the second cutting sub-image whose image content is not aligned are obtained by sliding the two pieces of image content after cutting the same verification image by a first distance relative to each other along the cutting line, that is, the first distance is two The relative sliding distance of the block image content along the cutting line. In the case where the sliding distance information is the sliding distance of the sliding operation, the first server may verify whether the difference between the sliding distance and the set distance is less than the second threshold, so as to determine the image content of the first cutting sub-image and the image content of the second cutting sub-image. Whether the image content is aligned. The set distance is converted based on the first distance. In a possible implementation, when the sliding operation is sliding along the horizontal direction, the set distance is the horizontal axis component value of the first distance. When sliding along the vertical axis direction during the sliding operation, the set distance is the vertical axis component value of the first distance.
可选地,在滑动距离与设定距离之差小于第二阈值的情况下,即确定第一切割子图的图像内容和第二切割子图的图像内容对齐,确定验证成功。Optionally, when the difference between the sliding distance and the set distance is less than the second threshold, it is determined that the image content of the first cutting sub-image and the image content of the second cutting sub-image are aligned, and it is determined that the verification is successful.
作为示例,请参阅图15,终端还显示了滑块控件30,滑动距离信息为滑动操作的滑动距离CD,该滑动距离CD与第二距离AB的大小不同。在滑动距离CD与设定距离之差小于第二阈值的情况下,即确定第一切割子图10的图像内容和第二切割子图20的图像内容对齐,确定验证成功;其中,设定距离基于第一距离换算得到,设定距离可以是第一距离的横轴分量值。As an example, please refer to Figure 15. The terminal also displays a slider control 30. The sliding distance information is the sliding distance CD of the sliding operation, and the sliding distance CD is different in size from the second distance AB. When the difference between the sliding distance CD and the set distance is less than the second threshold, it is determined that the image content of the first cutting sub-image 10 and the image content of the second cutting sub-image 20 are aligned, and it is determined that the verification is successful; where, the set distance Based on the first distance conversion, the set distance may be the horizontal axis component value of the first distance.
本实施例中,通过不同类型的滑动距离信息,均可以确定出第一距离与第二距离是否小于阈值,能够提高确定结果的准确性。In this embodiment, different types of sliding distance information can be used to determine whether the first distance and the second distance are less than the threshold, which can improve the accuracy of the determination result.
在一些实施例中,如图16所示,第一服务器执行的该方法还包括:In some embodiments, as shown in Figure 16, the method executed by the first server also includes:
步骤1066,向终端发送验证成功的结果。Step 1066: Send a successful verification result to the terminal.
可选地,第一服务器在确定验证成功后,向终端发送验证成功的结果,以便终端执行后续操作。Optionally, after determining that the verification is successful, the first server sends a successful verification result to the terminal so that the terminal can perform subsequent operations.
本实施例中,通过直接向终端发送验证成功的结果,有利于终端执行后续操作,还可以提高终端的数据处理效率,还可以在一定程度上降低终端的成本。In this embodiment, by directly sending the successful verification result to the terminal, it is beneficial for the terminal to perform subsequent operations, it can also improve the terminal's data processing efficiency, and it can also reduce the cost of the terminal to a certain extent.
图17示出了本申请一个示例性实施例提供的滑动验证方法的流程图,本实施例以第二服务器执行为例进行说明,该第二服务器与第一服务器可以是同一服务器,该第二服务器还可以是第三方服务器,该方法包括:Figure 17 shows a flow chart of the sliding verification method provided by an exemplary embodiment of the present application. This embodiment uses the execution of the second server as an example. The second server and the first server may be the same server. The second server The server can also be a third-party server. The method includes:
步骤1220,获取验证图像。 Step 1220, obtain the verification image.
验证图像是指用于进行滑动验证的图像。可选地,可以是从公开的数据集中获取图像作为验证图像,还可以是获取指定类型或指定图像内容的图像作为验证图像。验证图像的形状可以是矩形、正方形、圆形等,在此不做限制。The verification image refers to the image used for swipe verification. Optionally, you can obtain an image from a public data set as a verification image, or you can obtain an image of a specified type or specified image content as a verification image. The shape of the verification image can be rectangular, square, circular, etc., and is not limited here.
步骤1240,基于切割线对验证图像切割出的两块图像内容,得到第一切割子图和第二切割子图。Step 1240: Verify the content of the two pieces of image cut out of the image based on the cutting line pair, and obtain the first cut sub-image and the second cut sub-image.
采用一条切割线对验证图像进行切割,可以得到该验证图像被切割线切割后的两块图像内容。第一切割子图和第二切割子图是基于验证图像被切割线切割出的两块图像内容所得到 的图像。本实施例中,切割线为直线。Using a cutting line to cut the verification image, two pieces of image content can be obtained after the verification image is cut by the cutting line. The first cutting sub-image and the second cutting sub-image are images obtained based on the content of the two pieces of image cut out by the cutting line of the verification image. In this embodiment, the cutting line is a straight line.
可选地,对于同一验证图像,采用不同切割线切割出的两块图像内容不一致。第一切割子图和第二切割子图可以基于同一验证图像的两块图像内容确定,还可以基于不同验证图像的两块图像内容确定。Optionally, for the same verification image, the contents of the two images cut using different cutting lines are inconsistent. The first cutting sub-image and the second cutting sub-image may be determined based on the content of two images of the same verification image, or may also be determined based on the content of two images of different verification images.
步骤1260,生成图像内容未对齐的第一切割子图和第二切割子图。Step 1260: Generate a first cut sub-image and a second cut sub-image whose image contents are not aligned.
可选地,第一切割子图的图像内容和第二切割子图的图像内容未对齐。在得到第一切割子图和第二切割子图后,可以是将第一切割子图和/或第二切割子图按照一定方向移动一段距离,以使得第一切割子图的图像内容与第二切割子图的图像内容未对齐。Optionally, the image content of the first cut sub-image and the image content of the second cut sub-image are not aligned. After obtaining the first cutting sub-image and the second cutting sub-image, the first cutting sub-image and/or the second cutting sub-image may be moved a certain distance in a certain direction, so that the image content of the first cutting sub-image is consistent with the first cutting sub-image. The image content of the two-cut subfigures is misaligned.
综上所述,本申请实施例提供的方法,通过在第二服务器上生成生成图像内容未对齐的第一切割子图和第二切割子图,可以提高图像生成的效率,而且,生成的滑动验证码的破解难度高,可以有效提高后续滑动验证的安全性。In summary, the method provided by the embodiments of the present application can improve the efficiency of image generation by generating a first cutting sub-image and a second cutting sub-image with unaligned image content on the second server, and the generated sliding The verification code is difficult to crack, which can effectively improve the security of subsequent sliding verification.
在一个示例中,图18示出了本申请一个示例性实施例提供的图像生成方法的流程图,基于切割线对验证图像切割出的两块图像内容,得到第一切割子图和第二切割子图,包括:In one example, Figure 18 shows a flow chart of an image generation method provided by an exemplary embodiment of the present application. Based on the cutting line pair, the content of the two pieces of image cut out of the verification image is obtained, and the first cutting sub-image and the second cutting sub-image are obtained. Subplots, including:
步骤1242,确定本次使用的切割线。Step 1242: Determine the cutting line used this time.
可选地,采用切割线对验证图像进行切割,每次切割使用的切割线可以不同,可以先确定本次使用的切割线。其中,切割线的不同可以是切割线的参数不同,比如切割线的斜率、截距不同。对于同一验证图像,采用不同的切割线进行切割,切割出的两块图像内容不一致。Optionally, a cutting line is used to cut the verification image. The cutting line used for each cutting can be different. The cutting line used this time can be determined first. The difference in the cutting line may be due to different parameters of the cutting line, such as different slopes and intercepts of the cutting line. For the same verification image, different cutting lines are used for cutting, and the content of the two cut images is inconsistent.
步骤1246,基于切割线对验证图像切割出的两块图像内容,得到第一切割子图和第二切割子图。Step 1246: Verify the contents of the two pieces of image cut out of the image based on the cutting line pair, and obtain the first cut sub-image and the second cut sub-image.
可选地,采用本次使用的切割线对验证图像进行切割,基于切割线对验证图像切割出的两块图像内容,得到第一切割子图和第二切割子图。Optionally, the verification image is cut using the cutting line used this time, and the two pieces of image content cut out of the verification image based on the cutting line are used to obtain the first cutting sub-image and the second cutting sub-image.
本实施例中,通过确定本次使用的切割线,可以生成任意角度、非对称的第一切割子图和第二切割子图,最终得到新型的滑动验证码,提高滑动验证码的破解难度和破解成本。In this embodiment, by determining the cutting line used this time, the first cutting sub-image and the second cutting sub-image can be generated at any angle and asymmetry, and finally a new sliding verification code is obtained, which improves the difficulty and difficulty of cracking the sliding verification code. Crack costs.
在一些实施例中,为了方便确定切割线的位置,以便采用切割线对验证图像进行切割,在确定本次使用的切割线之后,还可以建立验证图像坐标系。In some embodiments, in order to conveniently determine the position of the cutting line and use the cutting line to cut the verification image, after determining the cutting line used this time, the verification image coordinate system can also be established.
比如,以验证图像的任一个参考点作为原点,参考点可以是顶点或图像内任一点。以该原点的正下方为纵轴正方向,以该原点的正右方为横轴正方向,建立验证图像坐标系。For example, any reference point in the verification image is used as the origin. The reference point can be a vertex or any point in the image. Take the positive direction of the vertical axis directly below the origin and the positive direction of the horizontal axis directly to the right of the origin to establish a verification image coordinate system.
本实施例中,通过建立验证图像坐标系,有利于各个位置的确定,可以提高数据处理的效率。In this embodiment, establishing a verification image coordinate system facilitates the determination of each position and improves the efficiency of data processing.
在一个可能的实现方式中,如图19所示,确定本次使用的切割线,包括:In a possible implementation, as shown in Figure 19, the cutting line used this time is determined, including:
步骤1243,在设定斜率范围内随机选择一个斜率,确定为切割线的斜率。Step 1243: Randomly select a slope within the set slope range and determine it as the slope of the cutting line.
可选地,斜率可用于表征切割线的倾斜角,设定斜率范围可以根据实际技术需要进行设置,本实施例中的设定斜率范围是(-1,1),用以涵盖一个象限的所有可能的切割线的斜率。在确定本次使用的切割线时,可在设定斜率范围内随机选择一个斜率,确定为切割线的斜率。Optionally, the slope can be used to characterize the inclination angle of the cutting line. The set slope range can be set according to actual technical needs. In this embodiment, the set slope range is (-1,1) to cover all parts of a quadrant. The slope of the possible cutting line. When determining the cutting line used this time, a slope can be randomly selected within the set slope range and determined as the slope of the cutting line.
可选地,将切割线的斜率表示为a,则-1<a<1。Optionally, express the slope of the cutting line as a, then -1<a<1.
步骤1244,基于斜率与验证图像的尺寸,在设定截距范围内确定切割线的截距。Step 1244: Based on the slope and the size of the verification image, determine the intercept of the cutting line within the set intercept range.
可选地,截距用于使得切割出的两块图像内容不会过大或过小,两块图像内容不至于相差过大,以免造成滑动验证不准确。设定截距范围可以根据实际技术需要进行设置,本实施例是基于斜率与验证图像的尺寸,在设定截距范围内确定切割线的截距。Optionally, the intercept is used to ensure that the contents of the two cut-out images are not too large or too small, and that the contents of the two images are not too different, so as to avoid inaccurate sliding verification. The set intercept range can be set according to actual technical needs. In this embodiment, the intercept of the cutting line is determined within the set intercept range based on the slope and the size of the verification image.
可选地,将切割线的截距表示为b,假设验证图像是矩形,验证图像的宽为X/2,高为Y/2,基于斜率a以及验证图像的尺寸,设定0.125<b/Y<0.375,-a/2<b/X<1+a,确定出截距b。Optionally, express the intercept of the cutting line as b. Assume that the verification image is a rectangle. The width of the verification image is X/2 and the height is Y/2. Based on the slope a and the size of the verification image, set 0.125<b/ Y<0.375, -a/2<b/X<1+a, determine the intercept b.
本实施例中,通过随机取值确定出不同的切割线,可以生成任意角度、非对称的第一切割子图和第二切割子图,最终得到新型的滑动验证码,提高滑动验证码的破解难度和破解成本。In this embodiment, different cutting lines are determined by random values, and the first cutting sub-image and the second cutting sub-image can be generated at any angle and asymmetry, and finally a new sliding verification code is obtained, which improves the cracking of the sliding verification code. Difficulty and cost of cracking.
图20示出了本申请一个示例性实施例提供的图像生成方法的流程图,上述生成图像内容 未对齐的第一切割子图和第二切割子图,可以包括:Figure 20 shows a flow chart of an image generation method provided by an exemplary embodiment of the present application. The above-mentioned generation of first and second cutting sub-images with unaligned image content may include:
步骤1262,将两块图像内容沿切割线相对滑动第一距离,得到图像内容未对齐的第一切割子图和第二切割子图。Step 1262: Slide the two pieces of image content relatively along the cutting line by a first distance to obtain a first cutting sub-image and a second cutting sub-image in which the image content is not aligned.
可选地,第一距离是两块图像内容沿切割线相对滑动的距离,该第一距离为理论值,可以是随机设置的距离。将两块图像内容沿切割线相对滑动第一距离,得到图像内容未对齐的第一切割子图和第二切割子图。Optionally, the first distance is the distance between two pieces of image content that slide relative to each other along the cutting line. The first distance is a theoretical value and can be a randomly set distance. The two pieces of image content are relatively slid by a first distance along the cutting line to obtain a first cutting sub-image and a second cutting sub-image in which the image content is not aligned.
可选地,该第一距离可以基于验证图像的尺寸和切割线的斜率、截距设置。例如,基于验证图像的尺寸和切割线的斜率,在设定范围内随机选取纵轴比例值,基于纵轴比例值和切割线的斜率确定横轴比例值,基于横轴比例值、纵轴比例值、切割线的斜率和截距计算出第一距离。Optionally, the first distance may be set based on the size of the verification image and the slope and intercept of the cutting line. For example, based on the size of the verification image and the slope of the cutting line, the vertical axis proportion value is randomly selected within the set range, the horizontal axis proportion value is determined based on the vertical axis proportion value and the slope of the cutting line, and the horizontal axis proportion value and the vertical axis proportion are determined based on the vertical axis proportion value and the slope of the cutting line. The first distance is calculated from the value, the slope of the cutting line, and the intercept.
可选地,假设验证图像是矩形,验证图像的宽为X/2,高为Y/2,将纵轴比例值表示为dy,设置0<dy/X<-a/2,将横轴比例值表示为dx,设置dx=dy*(-a),第一距离表示为r,计算公式为:Optionally, assume that the verification image is a rectangle, the width of the verification image is The value is expressed as dx, set dx=dy*(-a), the first distance is expressed as r, and the calculation formula is:
Figure PCTCN2022110962-appb-000001
Figure PCTCN2022110962-appb-000001
本实施例中,通过确定生成图像内容未对齐的第一切割子图和第二切割子图,最终得到新型的滑动验证码,提高滑动验证码的破解难度和破解成本。In this embodiment, by determining the first cutting sub-image and the second cutting sub-image whose image contents are not aligned, a new type of sliding verification code is finally obtained, which improves the difficulty and cost of cracking the sliding verification code.
图21示出了本申请一个示例性实施例提供的图像生成方法的流程图,由第二服务器执行的该方法还包括:Figure 21 shows a flow chart of an image generation method provided by an exemplary embodiment of the present application. The method executed by the second server also includes:
步骤1210,获取原始图像。 Step 1210, obtain the original image.
可选地,验证图像可以来源于原始图像,则验证图像是原始图像的一部分。原始图像可从公开的数据集中获得,可以是指定类型或指定图像内容的图像。Optionally, the verification image can be derived from the original image, in which case the verification image is part of the original image. Raw images are available from publicly available datasets and can be of a specified type or image content.
步骤1212,基于原始图像中的参考点对原始图像进行截取,得到验证图像;其中,验证图像的尺寸小于或等于原始图像的尺寸。Step 1212: Intercept the original image based on the reference points in the original image to obtain a verification image; where the size of the verification image is less than or equal to the size of the original image.
可选地,原始图像中的参考点可以为顶点或图像内任一点。基于原始图像中的相同的参考点,按照不同尺寸大小对原始图像进行截取,可得到不同的验证图像。基于原始图像中的不同的参考点,按照相同尺寸大小对原始图像进行截取,也可得到不同的验证图像。Optionally, the reference point in the original image can be a vertex or any point within the image. Based on the same reference point in the original image, different verification images can be obtained by intercepting the original image according to different sizes. Based on different reference points in the original image, different verification images can also be obtained by intercepting the original image according to the same size.
可选地,验证图像的尺寸小于或等于原始图像的尺寸。在验证图像的尺寸等于原始图像的尺寸的情况下,参考点可以是原始图像的任一顶点。在验证图像的尺寸小于原始图像的尺寸的情况下,参考点可以是原始图像内任一点。Optionally, verify that the dimensions of the image are less than or equal to the dimensions of the original image. In the case where the dimensions of the verification image are equal to the dimensions of the original image, the reference point can be any vertex of the original image. In the case where the size of the verification image is smaller than the size of the original image, the reference point can be any point within the original image.
本实施例中,通过对原始图像进行截取得到验证图像,可以选择性保留原始图像中的重要的图像内容,提高验证图像的辨识度,有利于生成滑动验证码。In this embodiment, the verification image is obtained by intercepting the original image, which can selectively retain important image content in the original image, improve the recognition of the verification image, and facilitate the generation of sliding verification codes.
在一些实施例中,为了方便对原始图像进行截取,在获取原始图像后还可以建立原始图像坐标系。In some embodiments, in order to facilitate interception of the original image, the original image coordinate system may be established after acquiring the original image.
比如,以原始图像的任一个参考点作为原点,参考点可以是顶点或图像内任一点。以该原点的正下方为纵轴正方向,以该原点的正右方为横轴正方向,建立原始图像坐标系。For example, any reference point in the original image is used as the origin. The reference point can be a vertex or any point in the image. Take the positive direction of the vertical axis directly below the origin and the positive direction of the horizontal axis directly to the right of the origin to establish the original image coordinate system.
本实施例中,通过建立原始图像坐标系,有利于各个位置的确定,可以提高数据处理的效率。In this embodiment, by establishing the original image coordinate system, the determination of each position is facilitated, and the efficiency of data processing can be improved.
在一个示例中,图22示出了本申请一个示例性实施例提供的图像生成方法的流程图,由第二服务器执行的该方法还包括:In one example, Figure 22 shows a flow chart of an image generation method provided by an exemplary embodiment of the present application. The method executed by the second server also includes:
步骤1248,基于原始图像中与验证图像相邻的图像内容,将第一切割子图的图像内容和/或第二切割子图的图像内容进行扩充;Step 1248: Expand the image content of the first cut sub-image and/or the image content of the second cut sub-image based on the image content adjacent to the verification image in the original image;
或,or,
步骤1250,基于第一切割子图和/或第二切割子图的镜像图像内容,将第一切割子图的图像内容和/或第二切割子图的图像内容进行扩充。Step 1250: Based on the mirror image content of the first cut sub-image and/or the second cut sub-image, expand the image content of the first cut sub-figure and/or the image content of the second cut sub-figure.
可选地,针对第一切割子图的图像内容和/或第二切割子图的图像内容进行扩充,可以是仅扩充第一切割子图的图像内容,或仅扩充第二切割子图的图像内容,还可以是同时扩充第一切割子图的图像内容和第二切割子图的图像内容。Optionally, expanding the image content of the first cut sub-figure and/or the image content of the second cut sub-figure may be to only expand the image content of the first cut sub-figure, or only to expand the image of the second cut sub-figure The content may also be to simultaneously expand the image content of the first cut sub-picture and the image content of the second cut sub-picture.
可选地,扩充包括尺寸扩展和像素填充。在可能的实现方式中,可以先将第一切割子图和/或第二切割子图进行尺寸扩展,再将扩展部分进行像素填充,以实现图像内容的扩充。Optionally, augmentation includes size expansion and pixel padding. In a possible implementation, the size of the first cutting sub-image and/or the second cutting sub-image may be expanded first, and then the expanded part may be filled with pixels to achieve expansion of the image content.
需要说明,尺寸扩展时,第一切割子图与第二切割子图的原有的图像内容的大小不变,通过将第一切割子图与第二切割子图的边缘向外扩展实现尺寸扩展。It should be noted that when the size is expanded, the size of the original image content of the first cutting sub-image and the second cutting sub-image remains unchanged, and the size expansion is achieved by extending the edges of the first cutting sub-image and the second cutting sub-image outward. .
可选地,将第一切割子图和/或第二切割子图进行尺寸扩展,可以是将第一切割子图和/或第二切割子图的上边向上扩展、下边向下扩展、左边向左扩展、右边向右扩展中的一种或多种的组合。Optionally, expanding the size of the first cutting sub-figure and/or the second cutting sub-figure may include extending the upper edge of the first cutting sub-figure and/or the second cutting sub-figure upward, the lower edge downward, and the left side. One or a combination of left expansion and right expansion.
可选地,将第一切割子图和/或第二切割子图进行尺寸扩展,扩展多少可以是预设值,还可以基于第一切割子图和/或第二切割子图的原始的图像内容的尺寸确定等,本实施例对此不作限制。Optionally, the size of the first cutting sub-image and/or the second cutting sub-image is expanded. The amount of expansion may be a preset value, or may be based on the original image of the first cutting sub-image and/or the second cutting sub-image. Content size determination, etc. are not limited in this embodiment.
可选地,基于原始图像中与验证图像相邻的图像内容,将第一切割子图的图像内容和/或第二切割子图的图像内容进行扩充。比如,在将第一切割子图和/或第二切割子图进行尺寸扩展后,若扩展部分并未超出原始图像的边缘,则可基于原始图像中与验证图像相邻的图像内容,将扩展部分进行像素填充。Optionally, the image content of the first cut sub-image and/or the image content of the second cut sub-image are expanded based on the image content adjacent to the verification image in the original image. For example, after the first cut sub-image and/or the second cut sub-image are expanded in size, if the extended part does not exceed the edge of the original image, the expanded part can be expanded based on the image content adjacent to the verification image in the original image. Partially filled with pixels.
可选地,基于第一切割子图和/或第二切割子图的镜像图像内容,将第一切割子图的图像内容和/或第二切割子图的图像内容进行扩充。比如,在将第一切割子图和/或第二切割子图进行尺寸扩展后,若扩展部分超出了原始图像的边缘,则可基于第一切割子图和/或第二切割子图的镜像图像内容,将扩展部分进行像素填充。Optionally, based on the mirror image content of the first cut sub-figure and/or the second cut sub-figure, the image content of the first cut sub-figure and/or the image content of the second cut sub-figure is expanded. For example, after the first cut sub-image and/or the second cut sub-image are expanded in size, if the expanded part exceeds the edge of the original image, the image can be based on the mirror image of the first cut sub-image and/or the second cut sub-image. Image content, the expanded part will be filled with pixels.
示例性的,镜像图像内容是指镜像图像的图像内容,以第一切割子图为例,第一切割子图的镜像图像可以是以扩展部分所超出的边缘所在直线作为指定轴,将第一切割子图进行了镜像翻转后得到。Illustratively, the mirror image content refers to the image content of the mirror image. Taking the first cut sub-image as an example, the mirror image of the first cut sub-image can be based on the straight line where the edge of the extended part is exceeded as the designated axis, and the first cut sub-image is The cut sub-image is obtained after mirror flipping.
采用上述扩充方式,可以尽量使得扩充后的图像内容的像素点是连续的,可以在一定程度上提高用户的视觉体验。Using the above expansion method, the pixels of the expanded image content can be made as continuous as possible, which can improve the user's visual experience to a certain extent.
需要说明,将第一切割子图的图像内容和/或第二切割子图的图像内容进行扩充,可以是在基于切割线对验证图像切割出的两块图像内容,得到第一切割子图和第二切割子图之后,在生成图像内容未对齐的第一切割子图和第二切割子图之前执行。还可以是在生成图像内容未对齐的第一切割子图和第二切割子图之后执行,本实施例对此不做限制。It should be noted that expanding the image content of the first cutting sub-image and/or the image content of the second cutting sub-image may be two pieces of image content cut out of the verification image based on the cutting line to obtain the first cutting sub-image and It is performed after the second cut sub-image and before generating the first cut sub-image and the second cut sub-image in which the image content is not aligned. It may also be executed after generating the first cutting sub-image and the second cutting sub-image whose image contents are not aligned, and this embodiment does not limit this.
作为示例,请参阅图23-30,图像生成方法的具体步骤包括:As an example, please refer to Figure 23-30. The specific steps of the image generation method include:
1.准备一组矩形图。1. Prepare a set of rectangular diagrams.
2.随机抽取一个矩形图M,假设矩形图M的宽为X,高为Y。2. Randomly select a rectangular image M, assuming that the width of the rectangular image M is X and the height is Y.
示例性的,请参阅图23,矩形图M的宽X=400,高Y=400。For example, please refer to Figure 23. The width of the rectangular diagram M is X=400, and the height Y=400.
3.随机选取切割线的斜率a(-1<a<1),随机选取切割线的截距b(0.125<b/Y<0.375,-a/2<b/X<1+a),随机选取纵轴比例值dy(0<dy/X<-a/2),横轴比例值dx=dy*(-a),第一距离r的计算公式为:3. Randomly select the slope a of the cutting line (-1<a<1), randomly select the intercept b of the cutting line (0.125<b/Y<0.375, -a/2<b/X<1+a), randomly Select the vertical axis proportion value dy (0<dy/X<-a/2), the horizontal axis proportion value dx=dy*(-a), and the calculation formula of the first distance r is:
Figure PCTCN2022110962-appb-000002
Figure PCTCN2022110962-appb-000002
示例性的,选取a=-0.48,b=96,dy=31,计算dx=dy*(-a)≈65,r≈149.83。For example, select a=-0.48, b=96, dy=31, and calculate dx=dy*(-a)≈65, r≈149.83.
4.以矩形图M的左上顶点为原点,正下方为y轴正方向,正右方为x轴正方向,随机选取点P0(x0,y0)(X/4<x0<X/2,Y/4<y0<Y/2)。4. Taking the upper left vertex of the rectangular graph M as the origin, directly below it as the positive direction of the y-axis, and directly to the right as the positive direction of the x-axis, randomly select point P0 (x0, y0) (X/4<x0<X/2, Y /4<y0<Y/2).
示例性的,请参阅图24,选取P0(110,123)。For example, please refer to Figure 24 and select P0(110,123).
5.以P0为左上顶点,宽X/2,高Y/2,截取得到验证图像M'。5. With P0 as the upper left vertex, width X/2, height Y/2, intercept the verification image M'.
示例性的,请参阅图24,以P0为左上顶点,宽200(X/2),高200(Y/2),截取得到验 证图像M’。For example, please refer to Figure 24. With P0 as the upper left vertex, width 200 (X/2), height 200 (Y/2), the verification image M' is intercepted.
6.以P0为原点,正下方为y轴正方向,正右方为x轴正方向,作切割线y=a*x+b,将验证图像M'分割为图像内容Ma(任意p∈Ma,yp<a*xp+b)和图像内容Mb(任意p∈Mb,yp>a*xp+b)。6. Taking P0 as the origin, directly below is the positive direction of the y-axis, and directly to the right is the positive direction of the x-axis. Draw a cutting line y=a*x+b, and divide the verification image M' into image content Ma (any p∈Ma , yp<a*xp+b) and image content Mb (any p∈Mb, yp>a*xp+b).
示例性的,请参阅图25,以P0为原点,正下方为y轴正方向,正右方为x轴正方向,作直线y=-0.48x+96将验证图像M'分割为两块图像内容。For example, please refer to Figure 25. Taking P0 as the origin, directly below is the positive direction of the y-axis, and directly to the right is the positive direction of the x-axis. Draw a straight line y=-0.48x+96 to divide the verification image M' into two images. content.
7.取形状大小与图像内容Mb相同的空白图片与图像内容Ma组成M1,取形状大小与图像内容Ma相同的空白图片与图像内容Mb组成M2,使得M1、M2宽高与验证图像M'相同。7. Take a blank picture with the same shape and size as the image content Mb and the image content Ma to form M1, take a blank picture with the same shape and size as the image content Ma and the image content Mb to form M2, so that the width and height of M1 and M2 are the same as the verification image M' .
示例性的,请参阅图26和图27,将分割后的两块图像内容分别用空白补全,得到宽、高相同的M1、M2,宽200(X/2),高200(Y/2)。For example, please refer to Figure 26 and Figure 27. Fill the contents of the two divided images with blanks to obtain M1 and M2 with the same width and height, with a width of 200 (X/2) and a height of 200 (Y/2 ).
8.将M1向左平移X/2,向下平移b-dy,得到M1'。8. Translate M1 to the left by X/2 and downward by b-dy to obtain M1'.
需要说明,该步骤在图中未示出。It should be noted that this step is not shown in the figure.
9.将M1'左边向左扩展X/2,右边向右扩展X/2,上边向上扩展b,下边向下扩展Y/2,得到子图A(宽1.5X,高Y,且任意p∈A,yp<a*xp+b);将M2左边向左扩展X/2,下边和右边可以左边为基准进行扩展得到子图B(宽X,高Y/2,且任意p∈B,yp>a*xp+b);扩展后进行像素填充。9. Expand the left side of M1' to the left by X/2, the right side to the right by A, yp<a*xp+b); expand the left side of M2 to the left by X/2, and the lower and right sides can be extended based on the left side to obtain subgraph B (width >a*xp+b); perform pixel filling after expansion.
示例性的,请参阅图28,将M1'左边向左扩展200(X/2),右边向右扩展200(X/2),上边向上扩展96,下边向下扩展200(Y/2),像素填充后得到子图A;请参阅图29,将M2左边向左扩展200(X/2),像素填充后得到子图B。For example, please refer to Figure 28, expand the left side of M1' to the left by 200 (X/2), the right side by 200 (X/2), the upper side by 96, and the lower side by 200 (Y/2). After pixel filling, sub-image A is obtained; please refer to Figure 29, expand the left side of M2 by 200 (X/2) to the left, and after pixel filling, sub-image B is obtained.
10.基于子图A与子图B生成图像内容未对齐的子图A和子图B。10. Based on sub-image A and sub-image B, generate sub-image A and sub-image B whose image content is not aligned.
示例性的,请参阅图30,将子图A与子图B进行相对滑动以使得右上顶点对齐。图30中的虚线区域即为在终端显示的用户可见区域。For example, please refer to Figure 30, slide subgraph A and subgraph B relative to each other so that the upper right vertices are aligned. The dotted area in Figure 30 is the user-visible area displayed on the terminal.
本实施例中,通过对第一切割子图的图像内容和/或第二切割子图的图像内容进行扩充,在终端进行滑动验证的过程中,可以跟随滑动操作显示出更多的图像内容,避免缺失图像内容,有利于提高用户体验。In this embodiment, by expanding the image content of the first cutting sub-image and/or the image content of the second cutting sub-image, during the sliding verification process of the terminal, more image content can be displayed following the sliding operation. Avoiding missing image content will help improve user experience.
在一些实施例中,如图31所示,该方法还包括:In some embodiments, as shown in Figure 31, the method further includes:
步骤1280,向第一服务器发送图像内容未对齐的第一切割子图和第二切割子图。Step 1280: Send the first cut sub-image and the second cut sub-image whose image contents are not aligned to the first server.
可选地,当第二服务器为第三方服务器,用于生成图像内容未对齐的第一切割子图和第二切割子图,则第二服务器还可以向第一服务器发送图像内容未对齐的第一切割子图和第二切割子图,以便第一服务器获取并进行其他处理。Optionally, when the second server is a third-party server used to generate the first cut sub-image and the second cut sub-image with unaligned image content, the second server may also send the first cut sub-image with unaligned image content to the first server. A first cut sub-graph and a second cut sub-graph so that the first server can obtain and perform other processing.
本实施例中,通过在第二服务器上生成图像内容未对齐的第一切割子图和第二切割子图,并发送给第一服务器,可以有效提高数据处理效率。In this embodiment, by generating the first cut sub-image and the second cut sub-image with unaligned image content on the second server and sending them to the first server, the data processing efficiency can be effectively improved.
下述为本申请装置实施例,可以用于执行本申请方法实施例。对于本申请装置实施例中未披露的细节,请参照本申请方法实施例。The following are device embodiments of the present application, which can be used to execute method embodiments of the present application. For details not disclosed in the device embodiments of this application, please refer to the method embodiments of this application.
图32示出了本申请一个示例性实施例提供的滑动验证装置的结构框图。该滑动验证装置包括:Figure 32 shows a structural block diagram of a sliding verification device provided by an exemplary embodiment of the present application. The sliding verification device includes:
显示模块3210,用于显示图像内容未对齐的第一切割子图和第二切割子图;所述第一切割子图的图像内容和所述第二切割子图的图像内容,与验证图像被切割线切割出的两块图像内容对应。The display module 3210 is used to display the first cutting sub-image and the second cutting sub-image whose image contents are misaligned; the image content of the first cutting sub-image and the image content of the second cutting sub-image are different from the verification image. The contents of the two images cut out by the cutting line correspond to each other.
处理模块3220,用于响应于滑动操作,控制所述第一切割子图和/或所述第二切割子图进行滑动;以及在所述图像内容对齐的情况下,确定验证成功。The processing module 3220 is configured to control the first cutting sub-image and/or the second cutting sub-image to slide in response to a sliding operation; and determine that the verification is successful if the image contents are aligned.
在一个实施例中,所述处理模块3220,用于响应于滑动操作,控制所述第一切割子图和/或所述第二切割子图沿所述切割线滑动。In one embodiment, the processing module 3220 is configured to control the first cutting sub-figure and/or the second cutting sub-figure to slide along the cutting line in response to a sliding operation.
在一个实施例中,所述图像内容未对齐的第一切割子图和第二切割子图,是将同一验证图像切割后的两块图像内容沿所述切割线相对于第一方向滑动第一距离后得到;In one embodiment, the first cutting sub-image and the second cutting sub-image whose image contents are not aligned are obtained by sliding the two pieces of image content after cutting the same verification image along the cutting line relative to the first direction. Get after distance;
所述处理模块3220,用于在所述第一切割子图和/或所述第二切割子图沿所述切割线相对于第二方向滑动第二距离,且所述第二距离和所述第一距离之差小于阈值的情况下,确定验证成功;其中,所述第一方向和所述第二方向相反。The processing module 3220 is configured to slide the first cutting sub-image and/or the second cutting sub-image along the cutting line by a second distance relative to the second direction, and the second distance and the If the difference between the first distances is less than the threshold, it is determined that the verification is successful; wherein the first direction and the second direction are opposite.
在一个实施例中,所述装置还包括发送模块;所述发送模块,用于向第一服务器发送滑动距离信息,以便所述第一服务器基于所述滑动距离信息验证所述第二距离和所述第一距离之差是否小于所述阈值。In one embodiment, the device further includes a sending module; the sending module is configured to send sliding distance information to the first server, so that the first server verifies the second distance and the second distance based on the sliding distance information. Whether the difference between the first distances is less than the threshold.
在一个实施例中,所述滑动距离信息为第二距离;或,所述滑动距离信息为所述滑动操作的滑动距离。In one embodiment, the sliding distance information is the second distance; or the sliding distance information is the sliding distance of the sliding operation.
在一个实施例中,所述显示模块3210,用于显示滑块控件,所述滑块控件用于接收所述滑动操作。In one embodiment, the display module 3210 is used to display a slider control, and the slider control is used to receive the sliding operation.
在一个实施例中,所述处理模块3220,用于响应于所述第一切割子图上触发的第一滑动操作,控制所述第一切割子图跟随所述第一滑动操作的滑动轨迹进行滑动。In one embodiment, the processing module 3220 is configured to respond to the first sliding operation triggered on the first cutting sub-image, and control the first cutting sub-image to follow the sliding trajectory of the first sliding operation. slide.
在一个实施例中,所述处理模块3220,用于响应于所述第二切割子图上触发的第二滑动操作,控制所述第二切割子图跟随所述第二滑动操作的滑动轨迹进行滑动。In one embodiment, the processing module 3220 is configured to respond to the second sliding operation triggered on the second cutting sub-image, and control the second cutting sub-image to follow the sliding trajectory of the second sliding operation. slide.
图33示出了本申请一个示例性实施例提供的滑动验证装置的结构框图。该滑动验证装置包括:Figure 33 shows a structural block diagram of a sliding verification device provided by an exemplary embodiment of the present application. The sliding verification device includes:
发送模块3330,用于向终端发送图像内容未对齐的第一切割子图和第二切割子图;所述第一切割子图的图像内容和所述第二切割子图的图像内容,与验证图像被切割线切割出的两块图像内容对应。The sending module 3330 is configured to send the first cutting sub-image and the second cutting sub-image whose image content is not aligned to the terminal; the image content of the first cutting sub-image and the image content of the second cutting sub-image, and the verification The content of the two pieces of image cut out by the cutting line corresponds to each other.
接收模块3340,用于接收所述终端发送的滑动距离信息,所述滑动距离信息与所述第一切割子图和/或所述第二切割子图相对滑动的距离有关。The receiving module 3340 is configured to receive sliding distance information sent by the terminal, where the sliding distance information is related to the relative sliding distance of the first cutting sub-image and/or the second cutting sub-image.
验证模块3350,用于在基于所述滑动距离信息确定所述图像内容对齐的情况下,确定验证成功。The verification module 3350 is configured to determine that the verification is successful when it is determined that the image content is aligned based on the sliding distance information.
在一个实施例中,所述滑动距离信息为第二距离,所述第二距离为所述第一切割子图和/或所述第二切割子图沿所述切割线相对滑动的距离;In one embodiment, the sliding distance information is a second distance, and the second distance is a relative sliding distance of the first cutting sub-figure and/or the second cutting sub-figure along the cutting line;
所述验证模块3350,用于在第一距离与所述第二距离之差小于第一阈值的情况下,确定验证成功;其中,所述第一距离为所述两块图像内容沿所述切割线相对滑动的距离。The verification module 3350 is configured to determine that verification is successful when the difference between the first distance and the second distance is less than a first threshold; wherein the first distance is the length of the two pieces of image content along the cutting The relative sliding distance of the lines.
在一个实施例中,所述滑动距离信息为滑动操作的滑动距离;所述滑动操作为针对所述第一切割子图和/或所述第二切割子图进行滑动的操作;In one embodiment, the sliding distance information is the sliding distance of a sliding operation; the sliding operation is a sliding operation for the first cutting sub-picture and/or the second cutting sub-picture;
所述验证模块3350,用于在所述滑动距离与设定距离之差小于第二阈值的情况下,确定验证成功;其中,所述设定距离基于第一距离换算得到;所述第一距离为所述两块图像内容沿所述切割线相对滑动的距离。The verification module 3350 is configured to determine that the verification is successful when the difference between the sliding distance and the set distance is less than a second threshold; wherein the set distance is converted based on the first distance; the first distance is the relative sliding distance of the two pieces of image content along the cutting line.
在一个实施例中,所述发送模块3330,用于向所述终端发送所述验证成功的结果。In one embodiment, the sending module 3330 is configured to send the successful verification result to the terminal.
图34示出了本申请一个示例性实施例提供的图像生成装置的结构框图。该图像生成装置包括:Figure 34 shows a structural block diagram of an image generation device provided by an exemplary embodiment of the present application. The image generation device includes:
获取模块3460,用于获取验证图像。The acquisition module 3460 is used to acquire the verification image.
切割模块3470,用于基于切割线对所述验证图像切割出的两块图像内容,得到第一切割子图和第二切割子图。The cutting module 3470 is used to cut the two pieces of image content out of the verification image based on the cutting line to obtain a first cut sub-image and a second cut sub-image.
生成模块3480,用于生成图像内容未对齐的第一切割子图和第二切割子图。 Generating module 3480, configured to generate a first cut sub-image and a second cut sub-image in which the image content is not aligned.
在一个实施例中,所述切割模块3470,包括:In one embodiment, the cutting module 3470 includes:
切割线确定单元,用于确定本次使用的切割线。The cutting line determination unit is used to determine the cutting line used this time.
切割单元,基于所述切割线对所述验证图像切割出的两块图像内容,得到第一切割子图和第二切割子图。A cutting unit is configured to cut the two pieces of image content out of the verification image based on the cutting line to obtain a first cutting sub-image and a second cutting sub-image.
在一个实施例中,切割线确定单元,包括:In one embodiment, the cutting line determination unit includes:
斜率确定单元,用于在设定斜率范围内随机选择一个斜率,确定为所述切割线的斜率。A slope determination unit is used to randomly select a slope within the set slope range and determine it as the slope of the cutting line.
截距确定单元,用于基于所述斜率与所述验证图像的尺寸,在设定截距范围内确定所述切割线的截距。An intercept determination unit is configured to determine the intercept of the cutting line within a set intercept range based on the slope and the size of the verification image.
在一个实施例中,所述生成模块3480,用于将所述两块图像内容沿所述切割线相对滑动第一距离,得到图像内容未对齐的第一切割子图和第二切割子图。In one embodiment, the generation module 3480 is used to relatively slide the two pieces of image content along the cutting line by a first distance to obtain a first cutting sub-image and a second cutting sub-image in which the image content is not aligned.
在一个实施例中,所述装置还包括截取模块;In one embodiment, the device further includes an interception module;
所述获取模块3460,用于获取原始图像。The acquisition module 3460 is used to acquire original images.
所述截取模块,用于基于所述原始图像中的参考点对所述原始图像进行截取,得到验证图像;其中,所述验证图像的尺寸小于或等于所述原始图像的尺寸。The interception module is configured to intercept the original image based on the reference point in the original image to obtain a verification image; wherein the size of the verification image is less than or equal to the size of the original image.
在一个实施例中,所述装置还包括扩充模块;In one embodiment, the device further includes an expansion module;
所述扩充模块,用于基于所述原始图像中与所述验证图像相邻的图像内容,将所述第一切割子图的图像内容和/或所述第二切割子图的图像内容进行扩充;The expansion module is configured to expand the image content of the first cut sub-image and/or the image content of the second cut sub-image based on the image content adjacent to the verification image in the original image. ;
或,or,
所述扩充模块,用于基于所述第一切割子图和/或所述第二切割子图的镜像图像内容,将所述第一切割子图的图像内容和/或所述第二切割子图的图像内容进行扩充。The expansion module is configured to combine the image content of the first cutting sub-image and/or the second cutting sub-image based on the mirror image content of the first cutting sub-image and/or the second cutting sub-image. The image content of the figure is expanded.
在一个实施例中,所述装置还包括发送模块;In one embodiment, the device further includes a sending module;
所述发送模块,用于向第一服务器发送所述图像内容未对齐的第一切割子图和第二切割子图。The sending module is configured to send the first cutting sub-image and the second cutting sub-image in which the image content is not aligned to the first server.
图35示出了本申请一个示例性实施例提供的终端3500的结构框图。该终端3500可以是便携式移动终端,比如:智能手机、平板电脑、MP3播放器(Moving Picture Experts Group Audio Layer III,动态影像专家压缩标准音频层面3)、MP4(Moving Picture Experts Group Audio Layer IV,动态影像专家压缩标准音频层面4)播放器、笔记本电脑或台式电脑。终端3500还可能被称为用户设备、便携式终端、膝上型终端、台式终端等其他名称。Figure 35 shows a structural block diagram of a terminal 3500 provided by an exemplary embodiment of the present application. The terminal 3500 can be a portable mobile terminal, such as: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, moving picture experts compression standard audio layer 3), MP4 (Moving Picture Experts Group Audio Layer IV, dynamic Video Expert compresses standard audio levels 4) player, laptop or desktop computer. Terminal 3500 may also be called user equipment, portable terminal, laptop terminal, desktop terminal, and other names.
通常,终端3500包括有:处理器3501和存储器3502。Generally, the terminal 3500 includes: a processor 3501 and a memory 3502.
处理器3501可以包括一个或多个处理核心,比如4核心处理器、8核心处理器等。处理器3501可以采用DSP(Digital Signal Processing,数字信号处理)、FPGA(Field-Programmable Gate Array,现场可编程门阵列)、PLA(Programmable Logic Array,可编程逻辑阵列)中的至少一种硬件形式来实现。处理器3501也可以包括主处理器和协处理器,主处理器是用于对在唤醒状态下的数据进行处理的处理器,也称CPU(Central Processing Unit,中央处理器);协处理器是用于对在待机状态下的数据进行处理的低功耗处理器。在一些实施例中,处理器3501可以集成有GPU(Graphics Processing Unit,图像处理器),GPU用于负责显示屏所需要显示的内容的渲染和绘制。一些实施例中,处理器3501还可以包括AI(Artificial Intelligence,人工智能)处理器,该AI处理器用于处理有关机器学习的计算操作。The processor 3501 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 3501 can adopt at least one hardware form among DSP (Digital Signal Processing, digital signal processing), FPGA (Field-Programmable Gate Array, field programmable gate array), and PLA (Programmable Logic Array, programmable logic array). accomplish. The processor 3501 can also include a main processor and a co-processor. The main processor is a processor used to process data in the wake-up state, also called CPU (Central Processing Unit, central processing unit); the co-processor is A low-power processor used to process data in standby mode. In some embodiments, the processor 3501 may be integrated with a GPU (Graphics Processing Unit, image processor), and the GPU is responsible for rendering and drawing the content that needs to be displayed on the display screen. In some embodiments, the processor 3501 may also include an AI (Artificial Intelligence, artificial intelligence) processor, which is used to process computing operations related to machine learning.
存储器3502可以包括一个或多个计算机可读存储介质,该计算机可读存储介质可以是非暂态的。存储器3502还可包括高速随机存取存储器,以及非易失性存储器,比如一个或多个磁盘存储设备、闪存存储设备。在一些实施例中,存储器3502中的非暂态的计算机可读存储介质用于存储至少一个指令,该至少一个指令用于被处理器3501所执行以实现本申请方法实施例提供的滑动验证方法。 Memory 3502 may include one or more computer-readable storage media, which may be non-transitory. Memory 3502 may also include high-speed random access memory, and non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 3502 is used to store at least one instruction, and the at least one instruction is used to be executed by the processor 3501 to implement the sliding verification method provided by the method embodiment of the present application. .
在一些实施例中,终端3500还可选包括有:***设备接口3503和至少一个***设备。处理器3501、存储器3502和***设备接口3503之间可以通过总线或信号线相连。各个***设备可以通过总线、信号线或电路板与***设备接口3503相连。具体地,***设备包括:射频电路3504、显示屏3505、摄像头组件3506、音频电路3507、定位组件3508和电源3509中的至少一种。In some embodiments, the terminal 3500 optionally further includes: a peripheral device interface 3503 and at least one peripheral device. The processor 3501, the memory 3502 and the peripheral device interface 3503 may be connected through a bus or a signal line. Each peripheral device can be connected to the peripheral device interface 3503 through a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 3504, a display screen 3505, a camera component 3506, an audio circuit 3507, a positioning component 3508 and a power supply 3509.
***设备接口3503可被用于将I/O(Input/Output,输入/输出)相关的至少一个***设备连接到处理器3501和存储器3502。在一些实施例中,处理器3501、存储器3502和***设备接口3503被集成在同一芯片或电路板上;在一些其他实施例中,处理器3501、存储器3502 和***设备接口3503中的任意一个或两个可以在单独的芯片或电路板上实现,本实施例对此不加以限定。The peripheral device interface 3503 may be used to connect at least one I/O (Input/Output) related peripheral device to the processor 3501 and the memory 3502 . In some embodiments, the processor 3501, the memory 3502, and the peripheral device interface 3503 are integrated on the same chip or circuit board; in some other embodiments, any one of the processor 3501, the memory 3502, and the peripheral device interface 3503 or Both of them can be implemented on separate chips or circuit boards, which is not limited in this embodiment.
射频电路3504用于接收和发射RF(Radio Frequency,射频)信号,也称电磁信号。射频电路3504通过电磁信号与通信网络以及其他通信设备进行通信。射频电路3504将电信号转换为电磁信号进行发送,或者,将接收到的电磁信号转换为电信号。可选地,射频电路3504包括:天线***、RF收发器、一个或多个放大器、调谐器、振荡器、数字信号处理器、编解码芯片组、用户身份模块卡等等。射频电路3504可以通过至少一种无线通信协议来与其它终端进行通信。该无线通信协议包括但不限于:万维网、城域网、内联网、各代移动通信网络(2G、3G、4G及5G)、无线局域网和/或WiFi(Wireless Fidelity,无线保真)网络。在一些实施例中,射频电路3504还可以包括NFC(Near Field Communication,近距离无线通信)有关的电路,本申请对此不加以限定。 Radio frequency circuit 3504 is used to receive and transmit RF (Radio Frequency, radio frequency) signals, also called electromagnetic signals. Radio frequency circuit 3504 communicates with communication networks and other communication devices through electromagnetic signals. The radio frequency circuit 3504 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. Optionally, the radio frequency circuit 3504 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and the like. Radio frequency circuitry 3504 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes but is not limited to: World Wide Web, metropolitan area network, intranet, mobile communication networks of all generations (2G, 3G, 4G and 5G), wireless LAN and/or WiFi (Wireless Fidelity, Wireless Fidelity) network. In some embodiments, the radio frequency circuit 3504 may also include NFC (Near Field Communication) related circuits, which is not limited in this application.
显示屏3505用于显示UI(User Interface,用户界面)。该UI可以包括图形、文本、图标、视频及其它们的任意组合。当显示屏3505是触摸显示屏时,显示屏3505还具有采集在显示屏3505的表面或表面上方的触摸信号的能力。该触摸信号可以作为控制信号输入至处理器3501进行处理。此时,显示屏3505还可以用于提供虚拟按钮和/或虚拟键盘,也称软按钮和/或软键盘。在一些实施例中,显示屏3505可以为一个,设置在终端3500的前面板;在另一些实施例中,显示屏3505可以为至少两个,分别设置在终端3500的不同表面或呈折叠设计;在另一些实施例中,显示屏3505可以是柔性显示屏,设置在终端3500的弯曲表面上或折叠面上。甚至,显示屏3505还可以设置成非矩形的不规则图形,也即异形屏。显示屏3505可以采用LCD(Liquid Crystal Display,液晶显示屏)、OLED(Organic Light-Emitting Diode,有机发光二极管)等材质制备。The display screen 3505 is used to display UI (User Interface, user interface). The UI can include graphics, text, icons, videos, and any combination thereof. When display screen 3505 is a touch display screen, display screen 3505 also has the ability to collect touch signals on or above the surface of display screen 3505. The touch signal can be input to the processor 3501 as a control signal for processing. At this time, the display screen 3505 can also be used to provide virtual buttons and/or virtual keyboards, also called soft buttons and/or soft keyboards. In some embodiments, there may be one display screen 3505, which is provided on the front panel of the terminal 3500; in other embodiments, there may be at least two display screens 3505, which are respectively provided on different surfaces of the terminal 3500 or have a folding design; In other embodiments, the display screen 3505 may be a flexible display screen disposed on a curved surface or a folding surface of the terminal 3500. Even the display screen 3505 can be set into a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 3505 can be made of LCD (Liquid Crystal Display, liquid crystal display), OLED (Organic Light-Emitting Diode, organic light-emitting diode) and other materials.
摄像头组件3506用于采集图像或视频。可选地,摄像头组件3506包括前置摄像头和后置摄像头。通常,前置摄像头设置在终端的前面板,后置摄像头设置在终端的背面。在一些实施例中,后置摄像头为至少两个,分别为主摄像头、景深摄像头、广角摄像头、长焦摄像头中的任意一种,以实现主摄像头和景深摄像头融合实现背景虚化功能、主摄像头和广角摄像头融合实现全景拍摄以及VR(Virtual Reality,虚拟现实)拍摄功能或者其它融合拍摄功能。在一些实施例中,摄像头组件3506还可以包括闪光灯。闪光灯可以是单色温闪光灯,也可以是双色温闪光灯。双色温闪光灯是指暖光闪光灯和冷光闪光灯的组合,可以用于不同色温下的光线补偿。The camera component 3506 is used to capture images or videos. Optionally, the camera component 3506 includes a front camera and a rear camera. Usually, the front camera is set on the front panel of the terminal, and the rear camera is set on the back of the terminal. In some embodiments, there are at least two rear cameras, one of which is a main camera, a depth-of-field camera, a wide-angle camera, and a telephoto camera, so as to realize the integration of the main camera and the depth-of-field camera to realize the background blur function. Integrated with a wide-angle camera to achieve panoramic shooting and VR (Virtual Reality, virtual reality) shooting functions or other integrated shooting functions. In some embodiments, camera assembly 3506 may also include a flash. The flash can be a single color temperature flash or a dual color temperature flash. Dual color temperature flash refers to a combination of warm light flash and cold light flash, which can be used for light compensation under different color temperatures.
音频电路3507可以包括麦克风和扬声器。麦克风用于采集用户及环境的声波,并将声波转换为电信号输入至处理器3501进行处理,或者输入至射频电路3504以实现语音通信。出于立体声采集或降噪的目的,麦克风可以为多个,分别设置在终端3500的不同部位。麦克风还可以是阵列麦克风或全向采集型麦克风。扬声器则用于将来自处理器3501或射频电路3504的电信号转换为声波。扬声器可以是传统的薄膜扬声器,也可以是压电陶瓷扬声器。当扬声器是压电陶瓷扬声器时,不仅可以将电信号转换为人类可听见的声波,也可以将电信号转换为人类听不见的声波以进行测距等用途。在一些实施例中,音频电路3507还可以包括耳机插孔。Audio circuitry 3507 may include a microphone and speakers. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals that are input to the processor 3501 for processing, or to the radio frequency circuit 3504 to implement voice communication. For the purpose of stereo collection or noise reduction, there can be multiple microphones, which are respectively arranged at different parts of the terminal 3500. The microphone can also be an array microphone or an omnidirectional collection microphone. The speaker is used to convert electrical signals from the processor 3501 or the radio frequency circuit 3504 into sound waves. The loudspeaker can be a traditional membrane loudspeaker or a piezoelectric ceramic loudspeaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert electrical signals into sound waves that are audible to humans, but also convert electrical signals into sound waves that are inaudible to humans for purposes such as ranging. In some embodiments, audio circuitry 3507 may also include a headphone jack.
定位组件3508用于定位终端3500的当前地理位置,以实现导航或LBS(Location Based Service,基于位置的服务)。定位组件3508可以是基于美国的GPS(Global Positioning System,全球定位***)、中国的北斗***或俄罗斯的伽利略***的定位组件。The positioning component 3508 is used to locate the current geographical location of the terminal 3500 to implement navigation or LBS (Location Based Service). The positioning component 3508 may be a positioning component based on the American GPS (Global Positioning System), China's Beidou system, or Russia's Galileo system.
电源3509用于为终端3500中的各个组件进行供电。电源3509可以是交流电、直流电、一次性电池或可充电电池。当电源3509包括可充电电池时,该可充电电池可以是有线充电电池或无线充电电池。有线充电电池是通过有线线路充电的电池,无线充电电池是通过无线线圈充电的电池。该可充电电池还可以用于支持快充技术。The power supply 3509 is used to power various components in the terminal 3500. The power source 3509 may be AC, DC, disposable or rechargeable batteries. When the power source 3509 includes a rechargeable battery, the rechargeable battery may be a wired rechargeable battery or a wireless rechargeable battery. Wired rechargeable batteries are batteries that are charged through wired lines, and wireless rechargeable batteries are batteries that are charged through wireless coils. The rechargeable battery can also be used to support fast charging technology.
在一些实施例中,终端3500还包括有一个或多个传感器3510。该一个或多个传感器3510 包括但不限于:加速度传感器3511、陀螺仪传感器3512、压力传感器3513、指纹传感器3514、光学传感器3515以及接近传感器3516。In some embodiments, terminal 3500 also includes one or more sensors 3510. The one or more sensors 3510 include, but are not limited to: acceleration sensor 3511, gyro sensor 3512, pressure sensor 3513, fingerprint sensor 3514, optical sensor 3515 and proximity sensor 3516.
加速度传感器3511可以检测以终端3500建立的坐标系的三个坐标轴上的加速度大小。比如,加速度传感器3511可以用于检测重力加速度在三个坐标轴上的分量。处理器3501可以根据加速度传感器3511采集的重力加速度信号,控制显示屏3505以横向视图或纵向视图进行用户界面的显示。加速度传感器3511还可以用于游戏或者用户的运动数据的采集。The acceleration sensor 3511 can detect the acceleration on the three coordinate axes of the coordinate system established by the terminal 3500. For example, the acceleration sensor 3511 can be used to detect the components of gravity acceleration on three coordinate axes. The processor 3501 can control the display screen 3505 to display the user interface in a horizontal view or a vertical view according to the gravity acceleration signal collected by the acceleration sensor 3511. The acceleration sensor 3511 can also be used to collect game or user motion data.
陀螺仪传感器3512可以检测终端3500的机体方向及转动角度,陀螺仪传感器3512可以与加速度传感器3511协同采集用户对终端3500的3D动作。处理器3501根据陀螺仪传感器3512采集的数据,可以实现如下功能:动作感应(比如根据用户的倾斜操作来改变UI)、拍摄时的图像稳定、游戏控制以及惯性导航。The gyro sensor 3512 can detect the body direction and rotation angle of the terminal 3500, and the gyro sensor 3512 can cooperate with the acceleration sensor 3511 to collect the user's 3D movements on the terminal 3500. Based on the data collected by the gyro sensor 3512, the processor 3501 can implement the following functions: motion sensing (such as changing the UI according to the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.
压力传感器3513可以设置在终端3500的侧边框和/或显示屏3505的下层。当压力传感器3513设置在终端3500的侧边框时,可以检测用户对终端3500的握持信号,由处理器3501根据压力传感器3513采集的握持信号进行左右手识别或快捷操作。当压力传感器3513设置在显示屏3505的下层时,由处理器3501根据用户对显示屏3505的压力操作,实现对UI界面上的可操作性控件进行控制。可操作性控件包括按钮控件、滚动条控件、图标控件、菜单控件中的至少一种。The pressure sensor 3513 may be provided on the side frame of the terminal 3500 and/or on the lower layer of the display screen 3505 . When the pressure sensor 3513 is installed on the side frame of the terminal 3500, it can detect the user's grip signal on the terminal 3500, and the processor 3501 performs left and right hand recognition or quick operation based on the grip signal collected by the pressure sensor 3513. When the pressure sensor 3513 is provided on the lower layer of the display screen 3505, the processor 3501 controls the operability controls on the UI interface according to the user's pressure operation on the display screen 3505. The operability control includes at least one of a button control, a scroll bar control, an icon control, and a menu control.
指纹传感器3514用于采集用户的指纹,由处理器3501根据指纹传感器3514采集到的指纹识别用户的身份,或者,由指纹传感器3514根据采集到的指纹识别用户的身份。在识别出用户的身份为可信身份时,由处理器3501授权该用户执行相关的敏感操作,该敏感操作包括解锁屏幕、查看加密信息、下载软件、支付及更改设置等。指纹传感器3514可以被设置在终端3500的正面、背面或侧面。当终端3500上设置有物理按键或厂商Logo时,指纹传感器3514可以与物理按键或厂商Logo集成在一起。The fingerprint sensor 3514 is used to collect the user's fingerprint. The processor 3501 identifies the user's identity based on the fingerprint collected by the fingerprint sensor 3514, or the fingerprint sensor 3514 identifies the user's identity based on the collected fingerprint. When the user's identity is recognized as a trusted identity, the processor 3501 authorizes the user to perform relevant sensitive operations. The sensitive operations include unlocking the screen, viewing encrypted information, downloading software, making payments, and changing settings. The fingerprint sensor 3514 may be provided on the front, back or side of the terminal 3500. When the terminal 3500 is provided with a physical button or a manufacturer's logo, the fingerprint sensor 3514 can be integrated with the physical button or the manufacturer's logo.
光学传感器3515用于采集环境光强度。在一个实施例中,处理器3501可以根据光学传感器3515采集的环境光强度,控制显示屏3505的显示亮度。具体地,当环境光强度较高时,调高显示屏3505的显示亮度;当环境光强度较低时,调低显示屏3505的显示亮度。在另一个实施例中,处理器3501还可以根据光学传感器3515采集的环境光强度,动态调整摄像头组件3506的拍摄参数。The optical sensor 3515 is used to collect ambient light intensity. In one embodiment, the processor 3501 can control the display brightness of the display screen 3505 according to the ambient light intensity collected by the optical sensor 3515. Specifically, when the ambient light intensity is high, the display brightness of the display screen 3505 is increased; when the ambient light intensity is low, the display brightness of the display screen 3505 is decreased. In another embodiment, the processor 3501 can also dynamically adjust the shooting parameters of the camera assembly 3506 according to the ambient light intensity collected by the optical sensor 3515.
接近传感器3516,也称距离传感器,通常设置在终端3500的前面板。接近传感器3516用于采集用户与终端3500的正面之间的距离。在一个实施例中,当接近传感器3516检测到用户与终端3500的正面之间的距离逐渐变小时,由处理器3501控制显示屏3505从亮屏状态切换为息屏状态;当接近传感器3516检测到用户与终端3500的正面之间的距离逐渐变大时,由处理器3501控制显示屏3505从息屏状态切换为亮屏状态。The proximity sensor 3516, also called a distance sensor, is usually provided on the front panel of the terminal 3500. The proximity sensor 3516 is used to collect the distance between the user and the front of the terminal 3500. In one embodiment, when the proximity sensor 3516 detects that the distance between the user and the front of the terminal 3500 gradually becomes smaller, the processor 3501 controls the display screen 3505 to switch from the bright screen state to the closed screen state; when the proximity sensor 3516 detects When the distance between the user and the front of the terminal 3500 gradually increases, the processor 3501 controls the display screen 3505 to switch from the screen-off state to the screen-on state.
本领域技术人员可以理解,图35中示出的结构并不构成对终端3500的限定,可以包括比图示更多或更少的组件,或者组合某些组件,或者采用不同的组件布置。Those skilled in the art can understand that the structure shown in Figure 35 does not constitute a limitation on the terminal 3500, and may include more or fewer components than shown, or combine certain components, or adopt different component arrangements.
本申请实施例还提供了一种服务器,该服务器包括:处理器和存储器,存储器中存储有计算机程序;所述处理器,用于执行所述存储器中的所述计算机程序以实现上述各方法实施例提供的滑动验证方法和/或图像生成方法。An embodiment of the present application also provides a server, which includes: a processor and a memory, with a computer program stored in the memory; the processor is configured to execute the computer program in the memory to implement the above methods. The sliding verification method and/or image generation method provided by the example.
示例地,图36是本申请一个示例性实施例提供的服务器的结构框图。For example, FIG. 36 is a structural block diagram of a server provided by an exemplary embodiment of the present application.
通常,服务器3600包括有:处理器3601和存储器3602。Generally, the server 3600 includes: a processor 3601 and a memory 3602.
处理器3601可以包括一个或多个处理核心,比如4核心处理器、8核心处理器等。处理器3601可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable Logic Array,PLA)中的至少一种硬件形式来实现。处理器3601也可以包括主处理器和协处理器,主处理器是用于对在唤醒状态下的数据进行处理的处理器,也称中央处理器(Central Processing Unit,CPU);协处理器是用于对在待机状态下的数据进行处理的低功耗处理器。在一些实施例中,处理器 3601可以在集成有图像处理器(Graphics Processing Unit,GPU),GPU用于负责显示屏所需要显示的内容的渲染和绘制。一些实施例中,处理器3601还可以包括人工智能(Artificial Intelligence,AI)处理器,该AI处理器用于处理有关机器学习的计算操作。The processor 3601 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 3601 can adopt at least one hardware form among digital signal processing (Digital Signal Processing, DSP), field-programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). accomplish. The processor 3601 can also include a main processor and a co-processor. The main processor is a processor used to process data in the wake-up state, also called a central processing unit (Central Processing Unit, CPU); the co-processor is A low-power processor used to process data in standby mode. In some embodiments, the processor 3601 may be integrated with a graphics processor (Graphics Processing Unit, GPU), and the GPU is responsible for rendering and drawing content that needs to be displayed on the display screen. In some embodiments, the processor 3601 may also include an artificial intelligence (Artificial Intelligence, AI) processor, which is used to process computing operations related to machine learning.
存储器3602可以包括一个或多个计算机可读存储介质,该计算机可读存储介质可以是非暂态的。存储器3602还可包括高速随机存取存储器,以及非易失性存储器,比如一个或多个磁盘存储设备、闪存存储设备。在一些实施例中,存储器3602中的非暂态的计算机可读存储介质用于存储至少一个指令,该至少一个指令用于被处理器3601所执行以实现本申请中方法实施例提供的滑动验证方法和/或图像生成方法。 Memory 3602 may include one or more computer-readable storage media, which may be non-transitory. Memory 3602 may also include high-speed random access memory, and non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 3602 is used to store at least one instruction, and the at least one instruction is used to be executed by the processor 3601 to implement the sliding verification provided by the method embodiments in this application. method and/or image generation method.
在一些实施例中,服务器3600还可选包括有:输入接口3603和输出接口3604。处理器3601、存储器3602和输入接口3603、输出接口3604之间可以通过总线或信号线相连。各个***设备可以通过总线、信号线或电路板与输入接口3603、输出接口3604相连。输入接口3603、输出接口3604可被用于将输入/输出(Input/Output,I/O)相关的至少一个***设备连接到处理器3601和存储器3602。在一些实施例中,处理器3601、存储器3602和输入接口3603、输出接口3604被集成在同一芯片或电路板上;在一些其他实施例中,处理器3601、存储器3602和输入接口3603、输出接口3604中的任意一个或两个可以在单独的芯片或电路板上实现,本申请实施例对此不加以限定。In some embodiments, the server 3600 optionally further includes: an input interface 3603 and an output interface 3604. The processor 3601, the memory 3602, the input interface 3603, and the output interface 3604 can be connected through a bus or signal line. Each peripheral device can be connected to the input interface 3603 and the output interface 3604 through a bus, a signal line or a circuit board. The input interface 3603 and the output interface 3604 may be used to connect at least one peripheral device related to input/output (I/O) to the processor 3601 and the memory 3602 . In some embodiments, the processor 3601, the memory 3602, the input interface 3603, and the output interface 3604 are integrated on the same chip or circuit board; in some other embodiments, the processor 3601, the memory 3602, the input interface 3603, and the output interface Any one or two of 3604 can be implemented on a separate chip or circuit board, which is not limited in the embodiment of the present application.
本领域技术人员可以理解,上述示出的结构并不构成对服务器3600的限定,服务器3600可以包括比图示更多或更少的组件,或者组合某些组件,或者采用不同的组件布置。Those skilled in the art can understand that the structure shown above does not constitute a limitation on the server 3600. The server 3600 may include more or fewer components than shown, or combine certain components, or adopt different component arrangements.
在示例性实施例中,还提供了一种芯片,所述芯片包括可编程逻辑电路和/或程序指令,当所述芯片在终端或服务器上运行时,用于实现上述滑动验证方法和/或图像生成方法。In an exemplary embodiment, a chip is also provided. The chip includes programmable logic circuits and/or program instructions. When the chip is run on a terminal or server, it is used to implement the above sliding verification method and/or Image generation method.
在示例性实施例中,还提供了一种计算机程序产品,该计算机程序产品包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器从计算机可读存储介质读取并执行该计算机指令,以实现上述滑动验证方法和/或图像生成方法。In an exemplary embodiment, a computer program product is also provided, the computer program product including computer instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor reads and executes the computer instructions from the computer-readable storage medium to implement the above-mentioned sliding verification method and/or image generation method.
在示例性实施例中,还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有可执行指令,所述可执行指令由处理器加载并执行以实现上述各方法实施例提供的滑动验证方法和/或图像生成方法。In an exemplary embodiment, a computer-readable storage medium is also provided. The computer-readable storage medium stores executable instructions, and the executable instructions are loaded and executed by the processor to implement the above methods provided by the embodiments. sliding verification method and/or image generation method.
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps to implement the above embodiments can be completed by hardware, or can be completed by instructing relevant hardware through a program. The program can be stored in a computer-readable storage medium. The above-mentioned The storage media mentioned can be read-only memory, magnetic disks or optical disks, etc.
本领域技术人员应该可以意识到,在上述一个或多个示例中,本申请实施例所描述的功能可以用硬件、软件、固件或它们的任意组合来实现。当使用软件实现时,可以将这些功能存储在计算机可读介质中或者作为计算机可读介质上的一个或多个指令或代码进行传输。计算机可读介质包括计算机可读存储介质和通信介质,其中通信介质包括便于从一个地方向另一个地方传送计算机程序的任何介质。存储介质可以是通用或专用计算机能够存取的任何可用介质。Those skilled in the art should realize that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented using hardware, software, firmware, or any combination thereof. When implemented using software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes computer-readable storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. Storage media can be any available media that can be accessed by a general purpose or special purpose computer.
以上所述仅为本申请的可选实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。The above are only optional embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection of the present application. within the range.

Claims (25)

  1. 一种滑动验证方法,其特征在于,所述方法由终端执行,所述方法包括:A sliding verification method, characterized in that the method is executed by a terminal, and the method includes:
    显示图像内容未对齐的第一切割子图和第二切割子图;所述第一切割子图的图像内容和所述第二切割子图的图像内容,与验证图像被切割线切割出的两块图像内容对应;Display the first cutting sub-image and the second cutting sub-image whose image content is not aligned; the image content of the first cutting sub-image and the image content of the second cutting sub-image are different from the two parts of the verification image cut by the cutting line. Block image content correspondence;
    响应于滑动操作,控制所述第一切割子图和/或所述第二切割子图进行滑动;以及在所述图像内容对齐的情况下,确定验证成功。In response to the sliding operation, the first cutting sub-image and/or the second cutting sub-image are controlled to slide; and in the case where the image contents are aligned, it is determined that the verification is successful.
  2. 根据权利要求1所述的方法,其特征在于,所述响应于滑动操作,控制所述第一切割子图和/或所述第二切割子图进行滑动,包括:The method according to claim 1, characterized in that, in response to a sliding operation, controlling the first cutting sub-image and/or the second cutting sub-image to slide includes:
    响应于滑动操作,控制所述第一切割子图和/或所述第二切割子图沿所述切割线滑动。In response to the sliding operation, the first cutting sub-figure and/or the second cutting sub-figure is controlled to slide along the cutting line.
  3. 根据权利要求2所述的方法,其特征在于,所述图像内容未对齐的第一切割子图和第二切割子图,是将同一验证图像切割后的两块图像内容沿所述切割线相对于第一方向滑动第一距离后得到;The method according to claim 2, characterized in that, the first cutting sub-image and the second cutting sub-image whose image contents are not aligned are two pieces of image content after cutting the same verification image, facing each other along the cutting line. Obtained after sliding the first distance in the first direction;
    所述在所述图像内容对齐的情况下,确定验证成功,包括:Determining that the verification is successful when the image contents are aligned includes:
    在所述第一切割子图和/或所述第二切割子图沿所述切割线相对于第二方向滑动第二距离,且所述第二距离和所述第一距离之差小于阈值的情况下,确定验证成功;When the first cutting sub-figure and/or the second cutting sub-figure slides a second distance along the cutting line relative to the second direction, and the difference between the second distance and the first distance is less than a threshold In this case, it is determined that the verification is successful;
    其中,所述第一方向和所述第二方向相反。Wherein, the first direction and the second direction are opposite.
  4. 根据权利要求3所述的方法,其特征在于,所述方法还包括:The method of claim 3, further comprising:
    向第一服务器发送滑动距离信息,以便所述第一服务器基于所述滑动距离信息验证所述第二距离和所述第一距离之差是否小于所述阈值。Sliding distance information is sent to the first server, so that the first server verifies whether the difference between the second distance and the first distance is less than the threshold based on the sliding distance information.
  5. 根据权利要求4所述的方法,其特征在于,所述滑动距离信息为第二距离;The method according to claim 4, wherein the sliding distance information is a second distance;
    或,or,
    所述滑动距离信息为所述滑动操作的滑动距离。The sliding distance information is the sliding distance of the sliding operation.
  6. 根据权利要求2所述的方法,其特征在于,所述方法还包括:The method of claim 2, further comprising:
    显示滑块控件,所述滑块控件用于接收所述滑动操作。A slider control is displayed, and the slider control is used to receive the sliding operation.
  7. 根据权利要求1所述的方法,其特征在于,所述响应于滑动操作,控制所述第一切割子图和/或所述第二切割子图进行滑动,包括:The method according to claim 1, characterized in that, in response to a sliding operation, controlling the first cutting sub-image and/or the second cutting sub-image to slide includes:
    响应于所述第一切割子图上触发的第一滑动操作,控制所述第一切割子图跟随所述第一滑动操作的滑动轨迹进行滑动;In response to the first sliding operation triggered on the first cutting sub-picture, controlling the first cutting sub-picture to slide following the sliding trajectory of the first sliding operation;
    或,or,
    响应于所述第二切割子图上触发的第二滑动操作,控制所述第二切割子图跟随所述第二滑动操作的滑动轨迹进行滑动。In response to the second sliding operation triggered on the second cutting sub-picture, the second cutting sub-picture is controlled to slide following the sliding trajectory of the second sliding operation.
  8. 一种滑动验证方法,其特征在于,所述方法由第一服务器执行,所述方法包括:A sliding verification method, characterized in that the method is executed by a first server, and the method includes:
    向终端发送图像内容未对齐的第一切割子图和第二切割子图;所述第一切割子图的图像内容和所述第二切割子图的图像内容,与验证图像被切割线切割出的两块图像内容对应;Send the first cutting sub-image and the second cutting sub-image whose image content is not aligned to the terminal; the image content of the first cutting sub-image and the image content of the second cutting sub-image are cut out by the cutting line with the verification image The two image contents correspond;
    接收所述终端发送的滑动距离信息,所述滑动距离信息与所述第一切割子图和/或所述第二切割子图相对滑动的距离有关;Receive sliding distance information sent by the terminal, where the sliding distance information is related to the relative sliding distance of the first cutting sub-image and/or the second cutting sub-image;
    在基于所述滑动距离信息确定所述图像内容对齐的情况下,确定验证成功。If it is determined that the image content is aligned based on the sliding distance information, it is determined that the verification is successful.
  9. 根据权利要求8所述的方法,其特征在于,所述滑动距离信息为第二距离,所述第二距离为所述第一切割子图和/或所述第二切割子图沿所述切割线相对滑动的距离;The method according to claim 8, characterized in that the sliding distance information is a second distance, and the second distance is a distance along the cutting sub-image of the first cutting sub-image and/or the second cutting sub-image. The distance the lines slide relative to each other;
    所述在基于所述滑动距离信息确定所述图像内容对齐的情况下,确定验证成功,包括:Determining that the verification is successful when the image content is determined to be aligned based on the sliding distance information includes:
    在第一距离与所述第二距离之差小于第一阈值的情况下,确定验证成功;When the difference between the first distance and the second distance is less than the first threshold, it is determined that the verification is successful;
    其中,所述第一距离为所述两块图像内容沿所述切割线相对滑动的距离。Wherein, the first distance is the relative sliding distance of the two pieces of image content along the cutting line.
  10. 根据权利要求8所述的方法,其特征在于,所述滑动距离信息为滑动操作的滑动距离;所述滑动操作为针对所述第一切割子图和/或所述第二切割子图进行滑动的操作;The method according to claim 8, wherein the sliding distance information is a sliding distance of a sliding operation; and the sliding operation is sliding on the first cutting sub-image and/or the second cutting sub-image. operations;
    所述在基于所述滑动距离信息确定所述图像内容对齐的情况下,确定验证成功,包括:Determining that the verification is successful when the image content is determined to be aligned based on the sliding distance information includes:
    在所述滑动距离与设定距离之差小于第二阈值的情况下,确定验证成功;When the difference between the sliding distance and the set distance is less than the second threshold, it is determined that the verification is successful;
    其中,所述设定距离基于第一距离换算得到;所述第一距离为所述两块图像内容沿所述切割线相对滑动的距离。Wherein, the set distance is converted based on the first distance; the first distance is the relative sliding distance of the two pieces of image content along the cutting line.
  11. 根据权利要求8至10任一所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 8 to 10, characterized in that the method further includes:
    向所述终端发送所述验证成功的结果。Send the successful verification result to the terminal.
  12. 一种图像生成方法,其特征在于,所述方法由第二服务器执行,所述方法包括:An image generation method, characterized in that the method is executed by a second server, and the method includes:
    获取验证图像;Get verification image;
    基于切割线对所述验证图像切割出的两块图像内容,得到第一切割子图和第二切割子图;Based on the two pieces of image content cut out of the verification image based on the cutting line, a first cut sub-image and a second cut sub-image are obtained;
    生成图像内容未对齐的第一切割子图和第二切割子图。Generate a first cut sub-image and a second cut sub-image with unaligned image content.
  13. 根据权利要求12所述的方法,其特征在于,所述基于切割线对所述验证图像切割出的两块图像内容,得到第一切割子图和第二切割子图,包括:The method according to claim 12, characterized in that the two pieces of image content cut out of the verification image based on the cutting line to obtain the first cut sub-image and the second cut sub-image include:
    确定本次使用的切割线;Determine the cutting line used this time;
    基于所述切割线对所述验证图像切割出的两块图像内容,得到第一切割子图和第二切割子图。Based on the two pieces of image content cut out of the verification image based on the cutting line, a first cut sub-image and a second cut sub-image are obtained.
  14. 根据权利要求13所述的方法,其特征在于,所述确定本次使用的切割线,包括:The method according to claim 13, characterized in that determining the cutting line used this time includes:
    在设定斜率范围内随机选择一个斜率,确定为所述切割线的斜率;Randomly select a slope within the set slope range and determine it as the slope of the cutting line;
    基于所述斜率与所述验证图像的尺寸,在设定截距范围内确定所述切割线的截距。Based on the slope and the size of the verification image, the intercept of the cutting line is determined within a set intercept range.
  15. 根据权利要求12至14任一所述的方法,其特征在于,所述生成图像内容未对齐的第一切割子图和第二切割子图,包括:The method according to any one of claims 12 to 14, characterized in that generating the first cutting sub-image and the second cutting sub-image with unaligned image contents includes:
    将所述两块图像内容沿所述切割线相对滑动第一距离,得到图像内容未对齐的第一切割子图和第二切割子图。The two pieces of image content are relatively slid by a first distance along the cutting line to obtain a first cutting sub-image and a second cutting sub-image in which the image content is not aligned.
  16. 根据权利要求12所述的方法,其特征在于,所述方法还包括:The method of claim 12, further comprising:
    获取原始图像;Get the original image;
    基于所述原始图像中的参考点对所述原始图像进行截取,得到验证图像;Intercept the original image based on the reference points in the original image to obtain a verification image;
    其中,所述验证图像的尺寸小于或等于所述原始图像的尺寸。Wherein, the size of the verification image is smaller than or equal to the size of the original image.
  17. 根据权利要求16所述的方法,其特征在于,所述方法还包括:The method of claim 16, further comprising:
    基于所述原始图像中与所述验证图像相邻的图像内容,将所述第一切割子图的图像内容和/或所述第二切割子图的图像内容进行扩充;Expand the image content of the first cut sub-image and/or the image content of the second cut sub-image based on the image content adjacent to the verification image in the original image;
    或,or,
    基于所述第一切割子图和/或所述第二切割子图的镜像图像内容,将所述第一切割子图的图像内容和/或所述第二切割子图的图像内容进行扩充。Based on the mirror image content of the first cut sub-image and/or the second cut sub-image, the image content of the first cut sub-image and/or the image content of the second cut sub-image is expanded.
  18. 根据权利要求12至17任一所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 12 to 17, characterized in that the method further includes:
    向第一服务器发送所述图像内容未对齐的第一切割子图和第二切割子图。A first cut sub-image and a second cut sub-image in which the image content is not aligned are sent to the first server.
  19. 一种滑动验证装置,其特征在于,所述装置包括:A sliding verification device, characterized in that the device includes:
    显示模块,用于显示图像内容未对齐的第一切割子图和第二切割子图;所述第一切割子图的图像内容和所述第二切割子图的图像内容,与验证图像被切割线切割出的两块图像内容对应;A display module configured to display the first cutting sub-image and the second cutting sub-image whose image contents are misaligned; the image content of the first cutting sub-image and the image content of the second cutting sub-image are cut with the verification image The content of the two images cut out by the line corresponds;
    处理模块,用于响应于滑动操作,控制所述第一切割子图和/或所述第二切割子图进行滑动;以及在所述图像内容对齐的情况下,确定验证成功。A processing module configured to control the first cutting sub-image and/or the second cutting sub-image to slide in response to a sliding operation; and determine that the verification is successful if the image contents are aligned.
  20. 一种滑动验证装置,其特征在于,所述装置包括:A sliding verification device, characterized in that the device includes:
    发送模块,用于向终端发送图像内容未对齐的第一切割子图和第二切割子图;所述第一切割子图的图像内容和所述第二切割子图的图像内容,与验证图像被切割线切割出的两块图像内容对应;A sending module, configured to send a first cutting sub-image and a second cutting sub-image whose image content is not aligned to the terminal; the image content of the first cutting sub-image and the image content of the second cutting sub-image, and the verification image The contents of the two images cut out by the cutting line correspond to each other;
    接收模块,用于接收所述终端发送的滑动距离信息,所述滑动距离信息与所述第一切割 子图和/或所述第二切割子图相对滑动的距离有关;A receiving module, configured to receive sliding distance information sent by the terminal, where the sliding distance information is related to the relative sliding distance of the first cutting sub-image and/or the second cutting sub-image;
    验证模块,用于在基于所述滑动距离信息确定所述图像内容对齐的情况下,确定验证成功。A verification module, configured to determine that verification is successful when the image content is determined to be aligned based on the sliding distance information.
  21. 一种图像生成装置,其特征在于,所述装置包括:An image generating device, characterized in that the device includes:
    获取模块,用于获取验证图像;Acquisition module, used to obtain verification images;
    切割模块,用于基于切割线对所述验证图像切割出的两块图像内容,得到第一切割子图和第二切割子图;A cutting module, used to cut the two pieces of image content out of the verification image based on the cutting line to obtain the first cutting sub-image and the second cutting sub-image;
    生成模块,用于生成图像内容未对齐的第一切割子图和第二切割子图。A generation module for generating a first cut sub-image and a second cut sub-image in which the image content is not aligned.
  22. 一种终端,其特征在于,所述终端包括处理器和存储器,所述存储器中存储有至少一条程序代码,所述至少一条程序代码由所述处理器加载并执行,以实现如权利要求1至7任一所述的滑动验证方法。A terminal, characterized in that the terminal includes a processor and a memory, at least one program code is stored in the memory, and the at least one program code is loaded and executed by the processor to implement the requirements of claims 1 to 1. 7 any of the sliding verification methods.
  23. 一种服务器,其特征在于,所述服务器包括处理器和存储器,所述存储器中存储有至少一条程序代码,所述至少一条程序代码由所述处理器加载并执行,以实现如权利要求8至11任一所述的滑动验证方法;或,实现如权利要求12至18任一所述的图像生成方法。A server, characterized in that the server includes a processor and a memory, at least one program code is stored in the memory, and the at least one program code is loaded and executed by the processor to implement claims 8 to 11. The sliding verification method as described in any one of claims 11 to 18; or, implementing the image generation method as described in any one of claims 12 to 18.
  24. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有可执行指令,所述可执行指令由处理器加载并执行以实现如权利要求1至7任一所述的滑动验证方法;或,实现如权利要求8至11任一所述的滑动验证方法;或,实现如权利要求12至18任一所述的图像生成方法。A computer-readable storage medium, characterized in that executable instructions are stored in the computer-readable storage medium, and the executable instructions are loaded and executed by a processor to implement any one of claims 1 to 7 Sliding verification method; or, implement the sliding verification method as described in any one of claims 8 to 11; or, implement the image generation method as described in any one of claims 12 to 18.
  25. 一种计算机程序产品,其特征在于,所述计算机程序产品包括计算机指令,所述计算机指令存储在计算机可读存储介质中,所述计算机指令由处理器加载并执行以实现如权利要求1至7任一所述的滑动验证方法;或,实现如权利要求8至11任一所述的滑动验证方法;或,实现如权利要求12至18任一所述的图像生成方法。A computer program product, characterized in that the computer program product includes computer instructions, the computer instructions are stored in a computer-readable storage medium, and the computer instructions are loaded and executed by a processor to implement claims 1 to 7 Any one of the sliding verification methods; or, the sliding verification method as described in any one of claims 8 to 11 is implemented; or, the image generation method as described in any one of claims 12 to 18 is implemented.
PCT/CN2022/110962 2022-08-08 2022-08-08 Slide verification method and apparatus, image generation method and apparatus, device, and storage medium WO2024031282A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2022/110962 WO2024031282A1 (en) 2022-08-08 2022-08-08 Slide verification method and apparatus, image generation method and apparatus, device, and storage medium
CN202280002775.5A CN115552400A (en) 2022-08-08 2022-08-08 Sliding verification method, image generation method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/110962 WO2024031282A1 (en) 2022-08-08 2022-08-08 Slide verification method and apparatus, image generation method and apparatus, device, and storage medium

Publications (1)

Publication Number Publication Date
WO2024031282A1 true WO2024031282A1 (en) 2024-02-15

Family

ID=84722120

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/110962 WO2024031282A1 (en) 2022-08-08 2022-08-08 Slide verification method and apparatus, image generation method and apparatus, device, and storage medium

Country Status (2)

Country Link
CN (1) CN115552400A (en)
WO (1) WO2024031282A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110213205A (en) * 2018-03-27 2019-09-06 腾讯科技(深圳)有限公司 Verification method, device and equipment
CN111859354A (en) * 2020-07-21 2020-10-30 百度在线网络技术(北京)有限公司 Picture verification method and device, electronic equipment and computer-readable storage medium
CN112651010A (en) * 2020-12-28 2021-04-13 深圳赛安特技术服务有限公司 Method and device for verifying sliding verification code, computer equipment and medium
CN114840837A (en) * 2022-03-29 2022-08-02 壹沓科技(上海)有限公司 Picture risk assessment method, device and equipment and readable storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110213205A (en) * 2018-03-27 2019-09-06 腾讯科技(深圳)有限公司 Verification method, device and equipment
CN111859354A (en) * 2020-07-21 2020-10-30 百度在线网络技术(北京)有限公司 Picture verification method and device, electronic equipment and computer-readable storage medium
CN112651010A (en) * 2020-12-28 2021-04-13 深圳赛安特技术服务有限公司 Method and device for verifying sliding verification code, computer equipment and medium
CN114840837A (en) * 2022-03-29 2022-08-02 壹沓科技(上海)有限公司 Picture risk assessment method, device and equipment and readable storage medium

Also Published As

Publication number Publication date
CN115552400A (en) 2022-12-30

Similar Documents

Publication Publication Date Title
US11151773B2 (en) Method and apparatus for adjusting viewing angle in virtual environment, and readable storage medium
US20230143323A1 (en) Shadow rendering method and apparatus, computer device, and storage medium
US20200316470A1 (en) Method and terminal for displaying distance information in virtual scene
CN108710525B (en) Map display method, device, equipment and storage medium in virtual scene
US9075429B1 (en) Distortion correction for device display
CN108595239B (en) Picture processing method, device, terminal and computer readable storage medium
WO2020253655A1 (en) Method for controlling multiple virtual characters, device, apparatus, and storage medium
CN110427110B (en) Live broadcast method and device and live broadcast server
CN110971930A (en) Live virtual image broadcasting method, device, terminal and storage medium
WO2019196863A1 (en) Content display method and apparatus
CN107982918B (en) Game game result display method and device and terminal
US11954200B2 (en) Control information processing method and apparatus, electronic device, and storage medium
CN112118477B (en) Virtual gift display method, device, equipment and storage medium
WO2019179237A1 (en) Satellite-view electronic map acquisition method and device, apparatus, and storage medium
JP7487293B2 (en) Method and device for controlling virtual camera movement, and computer device and program
WO2019149028A1 (en) Application download method and terminal
WO2022134632A1 (en) Work processing method and apparatus
CN112565806B (en) Virtual gift giving method, device, computer equipment and medium
US20240144617A1 (en) Methods and systems for anchoring objects in augmented or virtual reality
CN110839174A (en) Image processing method and device, computer equipment and storage medium
CN113384880A (en) Virtual scene display method and device, computer equipment and storage medium
CN111897465A (en) Popup display method, device, equipment and storage medium
WO2022199102A1 (en) Image processing method and device
WO2018058673A1 (en) 3d display method and user terminal
CN112381729B (en) Image processing method, device, terminal and storage medium

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: 22954262

Country of ref document: EP

Kind code of ref document: A1