Enhanced verification code implementation method, device and medium based on 3D space particle rotation
By converting the text content of the verification code into a QR code image of 3D spatial particles, the problem that traditional verification codes are easily broken by AI is solved, and higher security and complexity are achieved.
Patent Information
- Application Number
- CN202410847559.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-27
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2044-06-27
AI Technical Summary
The existing SMS verification codes are costly, and simple arithmetic, slider puzzle image verification methods and text verification codes are easily broken by AI.
By converting the random verification code text content into a QR code image and performing grayscale processing, each pixel in the QR code image is converted into 3D spatial particles, and the plane coordinates of the particles are adjusted according to the pixel position to disrupt the vertical of the particles Coordinates to increase the complexity of the verification code.
It improves the complexity and cracking difficulty of verification codes, prevents playback attacks and pattern recognition, enhances the security of verification codes, and avoids the risk of being broken by AI.
Smart Images

Figure CN118734281B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of three-dimensional rendering technology, and in particular to a method, device and medium for implementing an enhanced verification code based on 3D spatial particle rotation. Background Art
[0002] At present, with the rapid development of network technology and the widespread application of artificial intelligence, network security issues are becoming increasingly prominent. As a common means of identity authentication, verification codes are widely used in various network services and applications to confirm user identities and prevent automated attacks and malicious logins. However, traditional verification code technology faces many challenges.
[0003] Although SMS verification codes are relatively secure, their costs are also relatively high, and there is a risk of being intercepted or abused. In addition, although simple arithmetic verification codes, sliding block puzzle verification codes, and text verification codes can improve network security to a certain extent, with the continuous advancement of artificial intelligence technology, these traditional verification code methods are becoming more and more vulnerable to AI algorithms. In particular, existing image verification codes, such as sliding block puzzles and simple arithmetic problems, mainly rely on the processing and recognition of 2D images. However, the security of 2D images is gradually reduced in the face of complex image processing and pattern recognition technologies. At the same time, text verification codes also face similar problems. Even if distortion, interference lines and other technologies are used to increase the difficulty of recognition, it is still difficult to resist the attack of advanced optical character recognition (OCR) technology. Summary of the invention
[0004] The embodiments of the present application provide a method, device and medium for implementing an enhanced verification code based on 3D spatial particle rotation, so as to solve the technical problems that the existing SMS verification code has high cost, simple arithmetic, image verification methods of sliding block puzzles and text verification codes are easily broken by AI.
[0005] On the one hand, the embodiment of the present application provides a method for implementing a strengthened verification code based on 3D space particle rotation, including:
[0006] Determine the random verification code text content, convert the random verification code text content into a corresponding two-dimensional code image, and perform grayscale processing on the two-dimensional code image;
[0007] Through the particle manager, each pixel in the grayscale two-dimensional code image is converted into a 3D space particle, and according to the pixel position of each pixel in the two-dimensional code image, the plane coordinates of the corresponding 3D space particle are adjusted to obtain the target two-dimensional code image corresponding to the 3D space particle;
[0008] Adjusting the vertical coordinate of each 3D space particle in the target two-dimensional code image to obtain disrupted 3D space particles, and displaying the disrupted 3D space particles on the operation panel based on the verification trigger of the verification code;
[0009] Based on the operation instruction received by the operation panel, the disrupted 3D space particles are adjusted, and the adjusted two-dimensional code image is recognized, and according to the recognition result, it is determined whether the verification based on the enhanced verification code is passed.
[0010] In one implementation of the present application, grayscale processing is performed on the two-dimensional code image, specifically including:
[0011] Create a canvas, and determine the number of canvas pixels corresponding to the canvas based on the canvas width and canvas height of the canvas;
[0012] Obtaining a canvas context object corresponding to the canvas, so as to draw the two-dimensional code image onto the canvas based on the canvas context object;
[0013] Pixel data of each pixel in the two-dimensional code image on the canvas is obtained, and for each pixel, the three-color channel values in the pixel data of the pixel are averaged to perform grayscale processing on the two-dimensional code image.
[0014] In one implementation of the present application, the particle manager converts each pixel in the grayscale two-dimensional code image into a 3D space particle, specifically including:
[0015] Create a grid object through the particle manager, and create 3D space particles with the number of canvas pixels by indexing;
[0016] Create materials as many as the number of pixels of the canvas, and bind the materials to the particle manager in the order in which the materials are created;
[0017] According to the material creation order and based on the index information of the 3D space particle, the material corresponding to the 3D space particle is determined to bind the 3D space particle to the corresponding material, thereby completing the transformation of the 3D space particle.
[0018] In one implementation of the present application, adjusting the plane coordinates of the corresponding 3D space particle according to the pixel position of each pixel in the two-dimensional code image to obtain the plane image corresponding to the 3D space particle specifically includes:
[0019] Based on the two-dimensional code image, determine the pixel position corresponding to each pixel, and determine the 3D space particle corresponding to each pixel;
[0020] Determine the plane coordinates of each transformed 3D spatial particle in the plane coordinate system, and determine the abscissa deviation and ordinate deviation corresponding to the 3D spatial particle according to the pixel position of the pixel corresponding to the 3D spatial particle;
[0021] Based on the abscissa deviation and the ordinate deviation, the plane coordinates of the 3D space particle are adjusted to obtain a target two-dimensional code image corresponding to the 3D space particle.
[0022] In one implementation of the present application, the vertical coordinate of each 3D space particle in the target two-dimensional code image is adjusted to obtain the disrupted 3D space particles, specifically including:
[0023] In the three-dimensional space coordinate system, determine the vertical coordinate corresponding to each 3D space particle in the target two-dimensional code image;
[0024] When the horizontal coordinate and the horizontal coordinate of each 3D space particle are fixed, the vertical coordinate of each 3D space particle is randomly adjusted to disrupt the target two-dimensional code image and obtain the disrupted 3D space particles corresponding to the target two-dimensional code image.
[0025] In one implementation of the present application, the verification code-based verification trigger displays the disrupted 3D space particles on the operation panel, specifically including:
[0026] Determine a user to be verified who has a verification request, and return an operation panel to the user to be verified based on a verification trigger of a verification code by the user to be verified;
[0027] Based on the operation panel, the disrupted 3D space particles are displayed to the user to be verified, so that the user to be verified uploads operation instructions for the disrupted 3D space particles through the operation panel.
[0028] In one implementation of the present application, adjusting the disrupted 3D space particles based on the operation instruction received by the operation panel specifically includes:
[0029] Based on the operation panel, receiving an operation instruction of the user to be verified for the disrupted 3D space particles, and adjusting the disrupted 3D space particles according to the operation instruction;
[0030] Generating an adjusted two-dimensional code image corresponding to the disrupted 3D spatial particles, and comparing the adjusted two-dimensional code image with the target two-dimensional code image;
[0031] According to the comparison result, it is determined whether there is a deviation between the adjusted two-dimensional code image and the target two-dimensional code image quality inspection, and if so, the corresponding degree of deviation is determined.
[0032] In one implementation of the present application, the step of identifying the adjusted two-dimensional code image and determining whether the verification based on the enhanced verification code is passed according to the identification result specifically includes:
[0033] Determine whether the deviation between the adjusted two-dimensional code image and the target two-dimensional code image is less than a preset deviation threshold, and if not, determine that the verification based on the enhanced verification code fails;
[0034] If so, the adjusted QR code image is identified based on a pre-deployed QR code automatic recognition program. If the adjusted QR code image can be identified and the adjusted QR code image is consistent with the preset verification rules, it is determined that the verification based on the enhanced verification code has passed.
[0035] On the other hand, the embodiment of the present application further provides a device for implementing a strengthened verification code based on 3D space particle rotation, the device comprising:
[0036] at least one processor;
[0037] and, a memory communicatively coupled to the at least one processor;
[0038] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned method for implementing a strengthened verification code based on 3D space particle rotation.
[0039] On the other hand, an embodiment of the present application further provides a non-volatile computer storage medium storing computer executable instructions, which, when executed, implement the above-mentioned method for implementing an enhanced verification code based on 3D space particle rotation.
[0040] The embodiments of the present application provide a method, device and medium for implementing a strengthened verification code based on 3D spatial particle rotation, which at least have the following beneficial effects:
[0041] By converting the random verification code text content into a QR code image and performing grayscale processing, the subsequent image processing steps are simplified while maintaining the key information of the verification code; by converting the two-dimensional verification code image into a particle representation in three-dimensional space, the complexity and cracking difficulty of the verification code are greatly increased, and by adjusting the plane coordinates of the 3D space particles, the consistency of the particle arrangement with the original QR code image can be ensured; by disrupting the vertical coordinates of the annoying 3D space particles, the verification code presents a dynamic and random state, and the particle arrangement is different each time the verification is performed, which effectively prevents replay attacks and pattern recognition; based on the operation instructions received by the operation panel, user interaction is introduced as part of the verification, which increases the security of the verification code, because only real users can correctly adjust the 3D space particles in the three-dimensional space through intuition and operation experience, which improves the verification strength and effectively avoids the verification being broken by AI. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0043] Figure 1 A flow chart of a method for implementing a strengthened verification code based on 3D space particle rotation provided in an embodiment of the present application;
[0044] Figure 2 A schematic diagram of the internal structure of a device for implementing an enhanced verification code based on 3D spatial particle rotation provided in an embodiment of the present application. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0046] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.
[0047] Figure 1 A flowchart of a method for implementing a strengthened verification code based on 3D spatial particle rotation provided in an embodiment of the present application.
[0048] The analysis method involved in the embodiments of the present application can be implemented by a terminal device or a server, and the present application does not impose any special restrictions on this. For the convenience of understanding and description, the following embodiments are described in detail by taking a server as an example.
[0049] It should be noted that the server may be a single device or a system consisting of multiple devices, that is, a distributed server, and this application does not make any specific limitation on this.
[0050] like Figure 1 As shown, the method for implementing a strengthened verification code based on 3D space particle rotation provided in an embodiment of the present application includes:
[0051] 101. Determine the text content of the random verification code, convert the text content of the random verification code into a corresponding two-dimensional code image, and perform grayscale processing on the two-dimensional code image.
[0052] The server determines the random verification code text content in a variety of ways, such as numbers or text of a specified character length.
[0053] Specifically, in one embodiment of the present application, the server creates a canvas and determines the number of canvas pixels corresponding to the canvas based on the canvas width and canvas height of the canvas; obtains a canvas context object corresponding to the canvas to draw a two-dimensional code image onto the canvas based on the canvas context object; obtains pixel data of each pixel in the two-dimensional code image on the canvas, and for each pixel, averages the three-color channel values in the pixel data of the pixel to perform grayscale processing on the two-dimensional code image.
[0054] In one embodiment, the built-in method of the Babylon.js 3D engine is used to initialize the scene Scene, camera Camera, and ambient light HemisphericLight, and a mesh model is created or introduced as needed. Only a canvas is created and its reference variable canvas is obtained through the browser API document.createElement('canvas'), the canvas width (width) and canvas height (height) of the canvas are determined, and the corresponding number of canvas pixels pixs=width*height is calculated based on the canvas width and canvas height, and the canvas context object ctx used for drawing is obtained through canvas.getContext('2d').
[0055] The QR code image is drawn into the canvas through the drawImage() method of the canvas context object ctx, and the r\g\b\a channel data of the entire canvas is obtained through the getImageData() method. Each set of r\g\b\a channel data represents the color information of a pixel on the canvas, and the image is grayed out by taking the average of the r, g, and b color channel values.
[0056] 102. Through the particle manager, each pixel in the grayscale two-dimensional code image is converted into a 3D space particle, and according to the pixel position of each pixel in the two-dimensional code image, the plane coordinates of the corresponding 3D space particle are adjusted to obtain the target two-dimensional code image corresponding to the 3D space particle.
[0057] Specifically, the server creates a grid object through the particle manager, and creates 3D space particles of the same number as the canvas pixels by indexing; creates materials of the same number as the canvas pixels, and binds the materials to the particle manager in the order in which the materials are created; determines the materials corresponding to the 3D space particles in the order in which the materials are created and based on the index information of the 3D space particles, so as to bind the 3D space particles to the corresponding materials and complete the conversion of the 3D space particles.
[0058] In one embodiment, in order to facilitate management and reduce rendering pressure, the particle manager SPS in the babylon.js framework is used to create rendering content.
[0059] First, create a mesh object spsMesh through the SPS.buildMesh() method, then create 3D space particles with the same number of canvas pixels pixs through SPS.particles[index], and create the same number of materials through the newBABYLON.StandardMaterial() method, and bind each material to the particle manager SPS in turn according to the material creation order, and then match the particles and the materials of the particles through the sequential index, so that each pixel in the QR code image is converted into a one-to-one corresponding particle in the 3D space. It should be noted that the color displayed by the 3D space particles in the embodiment of the present application is determined by the material to which it is bound.
[0060] In one embodiment of the present application, the server determines the pixel position corresponding to each pixel based on the two-dimensional code image, and determines the 3D space particle corresponding to each pixel; determines the plane coordinates of each converted 3D space particle in the plane coordinate system, and determines the horizontal coordinate deviation and vertical coordinate deviation corresponding to the 3D space particle based on the pixel position of the pixel corresponding to the 3D space particle; based on the horizontal coordinate deviation and the vertical coordinate deviation, adjusts the plane coordinates of the 3D space particle to obtain a target two-dimensional code image corresponding to the 3D space particle.
[0061] In one embodiment, a two-dimensional code image is first obtained. This image consists of multiple pixels, and each pixel has a certain position. The goal is to convert these two-dimensional pixels into particles in three-dimensional space and maintain the consistency of their relative positions to form a 3D two-dimensional code image. First, traverse each pixel in the two-dimensional code image and record the position of each pixel in the image. Then, for each pixel, determine the 3D space particle corresponding to the pixel. These particles may all be located on the same plane in the initial state, such as the plane of z=0.
[0062] Next, determine the initial plane coordinates of each 3D space particle in the plane coordinate system. This plane coordinate system can be a two-dimensional coordinate system corresponding to the two-dimensional code image, in which the initial x-coordinate and y-coordinate of each particle can correspond to its column index and row index in the two-dimensional code image, respectively. Then, in order to make the arrangement of the 3D space particles more realistically reflect the details of the two-dimensional code image, it is necessary to adjust the plane coordinates of the corresponding particles according to the specific position of each pixel in the two-dimensional code image. Specifically, calculate the relative deviation of the pixel position of each particle corresponding to the pixel and the center of the image or a reference point, and this deviation includes the horizontal coordinate deviation and the vertical coordinate deviation. For example, if the center point of the two-dimensional code image is (cx, cy), and the position of a pixel is (px, py), then the horizontal coordinate deviation of the 3D space particle corresponding to the pixel is px-cx, and the vertical coordinate deviation is py-cy.
[0063] Finally, the calculated horizontal and vertical coordinate deviations are used to adjust the plane coordinates of each 3D space particle. Specifically, the x-coordinate of each particle is added with its horizontal coordinate deviation, and the y-coordinate is added with its vertical coordinate deviation. In this way, the adjusted 3D space particles will form a target QR code image that is visually similar to the original QR code image but has a three-dimensional effect.
[0064] 103. Adjust the vertical coordinate of each 3D space particle in the target two-dimensional code image to obtain scrambled 3D space particles, and display the scrambled 3D space particles on the operation panel based on the verification trigger of the verification code.
[0065] Specifically, the server determines the vertical coordinate corresponding to each 3D space particle in the target two-dimensional code image in the three-dimensional space coordinate system; when the horizontal coordinate and the abscissa of each 3D space particle remain unchanged, the vertical coordinate of each 3D space particle is randomly adjusted to scramble the target two-dimensional code image, and obtain the scrambled 3D space particles corresponding to the target two-dimensional code image.
[0066] In one embodiment, in a 3D graphics processing scenario, a 3D spatial particle representation of a target two-dimensional code image has been generated through the previous steps. The goal now is to randomly adjust the vertical coordinate (z coordinate) of each particle while keeping the horizontal coordinate (x coordinate) and vertical coordinate (y coordinate) of each particle unchanged, so as to disrupt the 3D two-dimensional code image and enhance its security.
[0067] First, the vertical coordinates of each 3D space particle in the target QR code image are determined in the three-dimensional spatial coordinate system. These coordinates include three dimensions, x, y, and z, where the x and y coordinates have been set according to the pixel position of the QR code image, and the z coordinate may be initialized to a uniform value, such as 0. Next, in order to disrupt the 3D QR code image, the z coordinate of each 3D space particle is randomly adjusted. This adjustment can be made within a predetermined range, such as between -1 and 1, to ensure that the disrupted image still maintains a certain degree of recognizability. Specifically, a random number generator is used to generate a new z coordinate value for each particle. This value can be any number within the above range, thereby ensuring that the position of each particle on the z axis is randomly adjusted.
[0068] Through this random adjustment process, a scrambled 3D QR code image is obtained. This image may present a chaotic but interesting effect visually, and its randomness also greatly enhances the security of the verification code. It will be difficult for attackers to crack this scrambled 3D QR code image through simple pattern recognition or AI recognition. Finally, this scrambled 3D QR code image is displayed to the user as part of the verification code. The user needs to restore the image through interactive operations or identify specific information in it to complete the verification process.
[0069] In one embodiment of the present application, the server determines the user to be verified who has a verification request, and based on the verification trigger of the verification code by the user to be verified, returns an operation panel to the user to be verified; based on the operation panel, the scrambled 3D space particles are displayed to the user to be verified, so that the user to be verified can upload operation instructions for the scrambled 3D space particles through the operation panel.
[0070] In one embodiment, in a login verification process of an online service platform, the system first identifies a user to be verified with a verification request. The user attempts to log in to his account and triggers the verification code verification process. Once the user triggers the verification request, the system generates a verification code containing scrambled 3D space particles and prepares to return a special operation panel to the user. The operation panel is an interactive interface through which the user can interact with the system to complete the verification process.
[0071] The system displays the operation panel to the user through a web page or mobile application. On the operation panel, the user can see a visualization area showing scrambled 3D space particles. These particles are arranged in a chaotic manner in three-dimensional space, forming a unique verification code pattern. In order to pass the verification, the user needs to operate these scrambled 3D space particles through the operation panel. Specifically, the user may need to drag, rotate or rearrange these particles to try to restore a recognizable QR code image or a specific pattern.
[0072] During the user's operation, the operation panel will receive and record the user's operation instructions in real time. These instructions are then transmitted back to the server for verification. The server will determine whether the user's operation is correct based on the preset verification rules, and decide whether to grant the user access rights accordingly.
[0073] 104. Based on the operation instruction received by the operation panel, the disrupted 3D space particles are adjusted, and the adjusted two-dimensional code image is recognized, and according to the recognition result, it is determined whether the verification based on the enhanced verification code is passed.
[0074] Specifically, based on the operation panel, the server receives operation instructions from the user to be verified for the scrambled 3D space particles, and adjusts the scrambled 3D space particles according to the operation instructions; generates an adjusted two-dimensional code image corresponding to the scrambled 3D space particles, and compares the adjusted two-dimensional code image with the target two-dimensional code image; based on the comparison result, determines whether there is a deviation between the adjusted two-dimensional code image and the target two-dimensional code image, and if so, determines the corresponding degree of deviation.
[0075] In one embodiment, in an online verification system, the user to be verified performs a series of operations on the disrupted 3D space particles through the operation panel, trying to restore it to the original two-dimensional code image. The system receives the operation instructions sent by the user through the operation panel, which include dragging, rotating and rearranging 3D space particles. According to the operation instructions sent by the user, the system makes corresponding adjustments to the disrupted 3D space particles. For example, if the user drags a particle to a new position, the system will update the spatial coordinates of the particle; if the user rotates a particle, the system will adjust the orientation of the particle.
[0076] After adjusting the 3D space particles, the system generates a new QR code image that reflects the arrangement state of the 3D space particles after the user's operation. Next, the system compares this new QR code image with the original target QR code image. During the comparison process, the system first checks whether the position and color of each pixel in the two QR code images are consistent. If any inconsistencies are found, the system will record these deviations and calculate the degree of deviation. For example, the system can measure the size of the deviation by calculating the number and degree of pixel differences between the two images.
[0077] Based on the comparison results, the system determines whether there is a deviation between the adjusted QR code image and the target QR code image, and the degree of the deviation. If the deviation is small or no deviation, it means that the user has successfully restored the original QR code image and the verification is passed; if the deviation is large, it means that the user's operation needs further adjustment and the verification fails.
[0078] In one embodiment of the present application, the server determines whether the degree of deviation between the adjusted QR code image and the target QR code image is less than a preset deviation threshold. If not, it is determined that the verification based on the enhanced verification code has failed. If so, the adjusted QR code image is identified based on a pre-deployed QR code automatic recognition program. If the adjusted QR code image can be identified and the adjusted QR code image is consistent with the preset verification rules, it is determined that the verification based on the enhanced verification code has passed.
[0079] In one embodiment, in a security verification scenario, the system has compared the QR code image adjusted by the user with the target QR code image and calculated the degree of deviation between the two. At this time, the system needs to determine whether the degree of deviation is within an acceptable range, that is, whether it is less than a preset deviation threshold.
[0080] The system first obtains the preset deviation threshold, which is set based on security requirements and user experience. Then, the calculated deviation degree is compared with this threshold. If the deviation degree is greater than or equal to the preset deviation threshold, it means that the QR code image adjusted by the user is too different from the target image, and the system directly determines that the verification based on the enhanced verification code has failed. At this time, an error prompt may be fed back to the user, requiring the user to perform the operation again. If the deviation degree is less than the preset deviation threshold, it means that the QR code image adjusted by the user is closer to the target image. At this time, the system needs to further verify the validity of this QR code image.
[0081] The system calls the pre-deployed QR code automatic recognition program to recognize the QR code image adjusted by the user. This program can automatically parse the information in the QR code and convert it into a readable format. During the recognition process, if the program can successfully recognize the adjusted QR code image, and the information in this image is consistent with the preset verification rules (for example, contains a specific data format, signature or verification code, etc.), then the system determines that the verification based on the enhanced verification code has passed. This means that the user has not only successfully restored the QR code image, but also that the image contains valid verification information.
[0082] The above is an embodiment of the method proposed in this application. Based on the same inventive concept, the embodiment of this application also provides a device for implementing a strengthened verification code based on 3D space particle rotation, and its structure is as follows: Figure 2 shown.
[0083] Figure 2 This is a schematic diagram of the internal structure of the device for implementing the enhanced verification code based on 3D spatial particle rotation provided in the embodiment of the present application. Figure 2 As shown, the device includes:
[0084] at least one processor;
[0085] and, a memory communicatively coupled to the at least one processor;
[0086] The memory stores instructions that can be executed by at least one processor, and the instructions are executed by at least one processor to enable the at least one processor to:
[0087] Determine the random verification code text content, convert the random verification code text content into a corresponding two-dimensional code image, and perform grayscale processing on the two-dimensional code image;
[0088] Through the particle manager, each pixel in the grayscale QR code image is converted into a 3D space particle, and according to the pixel position of each pixel in the QR code image, the plane coordinates of the corresponding 3D space particle are adjusted to obtain the target QR code image corresponding to the 3D space particle;
[0089] The vertical coordinate of each 3D space particle in the target two-dimensional code image is adjusted to obtain a scrambled 3D space particle, and based on the verification trigger of the verification code, the scrambled 3D space particle is displayed on the operation panel;
[0090] Based on the operation instructions received by the operation panel, the disrupted 3D space particles are adjusted, and the adjusted two-dimensional code image is recognized. According to the recognition result, it is determined whether the verification based on the enhanced verification code is passed.
[0091] The present application also provides a non-volatile computer storage medium storing computer executable instructions. When the computer executable instructions are executed, they can:
[0092] Determine the random verification code text content, convert the random verification code text content into a corresponding two-dimensional code image, and perform grayscale processing on the two-dimensional code image;
[0093] Through the particle manager, each pixel in the grayscale QR code image is converted into a 3D space particle, and according to the pixel position of each pixel in the QR code image, the plane coordinates of the corresponding 3D space particle are adjusted to obtain the target QR code image corresponding to the 3D space particle;
[0094] The vertical coordinate of each 3D space particle in the target two-dimensional code image is adjusted to obtain a scrambled 3D space particle, and based on the verification trigger of the verification code, the scrambled 3D space particle is displayed on the operation panel;
[0095] Based on the operation instructions received by the operation panel, the disrupted 3D space particles are adjusted, and the adjusted two-dimensional code image is recognized. According to the recognition result, it is determined whether the verification based on the enhanced verification code is passed.
[0096] Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0097] The above describes specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0098] The devices and media provided in the embodiments of the present application correspond one-to-one to the methods. Therefore, the devices and media also have similar beneficial technical effects as the corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media will not be repeated here.
[0099] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0100] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0101] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0102] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0103] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0104] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0105] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0106] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0107] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A method for implementing a strengthened verification code based on 3D space particle rotation, characterized in that: The method comprises: Determine the random verification code text content, convert the random verification code text content into a corresponding two-dimensional code image, and perform grayscale processing on the two-dimensional code image; Through the particle manager, each pixel in the grayscale two-dimensional code image is converted into a 3D space particle, and according to the pixel position of each pixel in the two-dimensional code image, the plane coordinates of the corresponding 3D space particle are adjusted to obtain the target two-dimensional code image corresponding to the 3D space particle; Adjusting the vertical coordinate of each 3D space particle in the target two-dimensional code image to obtain disrupted 3D space particles, and displaying the disrupted 3D space particles on the operation panel based on the verification trigger of the verification code; Based on the operation instruction received by the operation panel, the disrupted 3D space particles are adjusted, and the adjusted two-dimensional code image is recognized, and according to the recognition result, it is determined whether the verification based on the enhanced verification code is passed; The particle manager converts each pixel in the grayscale two-dimensional code image into a 3D space particle, specifically including: Create a grid object through the particle manager, and create 3D space particles with the number of canvas pixels by indexing; Create materials of the same number as the pixels of the canvas, and bind the materials to the particle manager in the order in which the materials are created; the materials are used to represent the display colors of the particles in the 3D space; According to the material creation order and based on the index information of the 3D space particle, the material corresponding to the 3D space particle is determined, so as to bind the 3D space particle with the corresponding material and complete the transformation of the 3D space particle; The adjusting the plane coordinates of the corresponding 3D space particles according to the pixel position of each pixel in the two-dimensional code image to obtain the plane image corresponding to the 3D space particles specifically includes: Based on the two-dimensional code image, determine the pixel position corresponding to each pixel, and determine the 3D space particle corresponding to each pixel; Determine the plane coordinates of each transformed 3D spatial particle in the plane coordinate system, and determine the abscissa deviation and ordinate deviation corresponding to the 3D spatial particle according to the pixel position of the pixel corresponding to the 3D spatial particle; Based on the abscissa deviation and the ordinate deviation, the plane coordinates of the 3D space particle are adjusted to obtain a target two-dimensional code image corresponding to the 3D space particle; The adjusting the disrupted 3D space particles based on the operation instruction received by the operation panel specifically includes: Based on the operation panel, receiving an operation instruction of the user to be verified for the disrupted 3D space particles, and adjusting the disrupted 3D space particles according to the operation instruction; Generating an adjusted two-dimensional code image corresponding to the disrupted 3D spatial particles, and comparing the adjusted two-dimensional code image with the target two-dimensional code image; According to the comparison result, determining whether there is a deviation between the adjusted two-dimensional code image and the target two-dimensional code image, and if so, determining the corresponding degree of deviation; The step of identifying the adjusted two-dimensional code image and determining whether the verification based on the enhanced verification code is passed according to the identification result specifically includes: Determine whether the deviation between the adjusted two-dimensional code image and the target two-dimensional code image is less than a preset deviation threshold, and if not, determine that the verification based on the enhanced verification code fails; If so, the adjusted QR code image is identified based on a pre-deployed QR code automatic recognition program. If the adjusted QR code image can be identified and the adjusted QR code image is consistent with the preset verification rules, it is determined that the verification based on the enhanced verification code has passed.
2. The method for implementing a strengthened verification code based on 3D space particle rotation according to claim 1 is characterized in that: The grayscale processing of the two-dimensional code image specifically includes: Create a canvas, and determine the number of canvas pixels corresponding to the canvas based on the canvas width and canvas height of the canvas; Obtaining a canvas context object corresponding to the canvas, so as to draw the two-dimensional code image onto the canvas based on the canvas context object; Pixel data of each pixel in the two-dimensional code image on the canvas is obtained, and for each pixel, the three-color channel values in the pixel data of the pixel are averaged to perform grayscale processing on the two-dimensional code image.
3. The method for implementing a strengthened verification code based on 3D space particle rotation according to claim 1 is characterized in that: The adjusting the vertical coordinate of each 3D space particle in the target two-dimensional code image to obtain the disrupted 3D space particles specifically includes: In the three-dimensional space coordinate system, determine the vertical coordinate corresponding to each 3D space particle in the target two-dimensional code image; When the horizontal coordinate and the vertical coordinate of each 3D space particle are fixed, the vertical coordinate of each 3D space particle is randomly adjusted to disrupt the target two-dimensional code image and obtain the disrupted 3D space particles corresponding to the target two-dimensional code image.
4. The method for implementing a strengthened verification code based on 3D space particle rotation according to claim 1, characterized in that: The verification trigger based on the verification code displays the disrupted 3D space particles on the operation panel, specifically including: Determine a user to be verified who has a verification request, and return an operation panel to the user to be verified based on a verification trigger of a verification code by the user to be verified; Based on the operation panel, the disrupted 3D space particles are displayed to the user to be verified, so that the user to be verified uploads operation instructions for the disrupted 3D space particles through the operation panel.
5. A device for implementing a strengthened verification code based on 3D space particle rotation, characterized in that: The device comprises: at least one processor; and, a memory communicatively coupled to the at least one processor; The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method for implementing an enhanced verification code based on 3D space particle rotation as described in any one of claims 1-4.
6. A non-volatile computer storage medium storing computer executable instructions, characterized in that: When the computer executable instructions are executed, the method for implementing a strengthened verification code based on 3D space particle rotation as described in any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Interactive verification method based on verification code, medium and computing equipment
CN110378095A
Verification code generation and verification method and device, electronic equipment and storage medium
CN117313067A