Verification method, device, electronic device and storage medium
By calculating the position of the verification mark based on the unique information of the electronic device and performing input verification, the problem of cumbersome traditional verification code verification operation is solved, and a safe and fast verification process is achieved.
Patent Information
- Application Number
- CN202211587556.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-09
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2042-12-09
AI Technical Summary
The traditional verification code verification method is cumbersome to operate. Users need to wait to receive SMS and manually enter the verification code, which makes the verification process inconvenient.
By obtaining the unique information of the electronic device, such as mobile phone number and device identifier, the location information of the verification mark is calculated, and the verification mark is displayed on the screen. The user enters the verification mark for verification.
It improves the security and speed of verification, reduces verification costs, eliminates the need to pay SMS fees and reduces waiting time.
Smart Images

Figure CN116015768B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of security verification technology, and specifically relates to a verification method, device, electronic device and storage medium. Background Art
[0002] When logging into an application, electronic devices may require users to enter a verification code for security reasons. Traditionally, verification involves sending a text message to the mobile phone number associated with the user's login account. The user then enters the verification code contained in the text message to complete the security verification process. This process is cumbersome, as users must wait for the text message to arrive and then enter the verification code into the corresponding input box. Summary of the Invention
[0003] The purpose of the embodiments of the present application is to provide a verification method, device, electronic device and storage medium that can solve the problem of cumbersome operations during login verification.
[0004] In a first aspect, an embodiment of the present application provides a verification method, the method comprising:
[0005] Acquire first information of a first electronic device, wherein the first information of different electronic devices is different;
[0006] Calculating location information of at least one verification identifier based on the first information;
[0007] displaying at least one verification mark according to the location information;
[0008] receiving a first input of at least one verification identifier from a user;
[0009] If the first input satisfies a verification condition, it is determined that the verification is passed, and the verification condition is determined based on the first information.
[0010] In a second aspect, an embodiment of the present application provides a verification device, the device comprising:
[0011] A first acquisition module is configured to acquire first information of a first electronic device, wherein the first information of different electronic devices is different;
[0012] a calculation module, configured to calculate location information of at least one verification identifier based on the first information;
[0013] A display module, configured to display at least one verification mark according to the location information;
[0014] A first receiving module is configured to receive a first input of at least one verification identifier by a user;
[0015] The verification module is used to determine that the verification is passed when the first input meets the verification condition, and the verification condition is determined based on the first information.
[0016] In a third aspect, an embodiment of the present application provides an electronic device comprising a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.
[0017] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0018] In a fifth aspect, an embodiment of the present application provides a chip, which includes a processor and a communication interface, the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the method described in the first aspect.
[0019] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and executed by at least one processor to implement the method described in the first aspect.
[0020] In the embodiment of the present application, the location information of the verification identifier is calculated based on the first information of the electronic device. Different electronic devices have different first information, and the location information of the verification identifier of different electronic devices is also different, thus ensuring the security of verification. Compared with SMS verification, there is no need to pay SMS fees, which reduces verification costs. At the same time, there is no need for users to wait for SMS messages to be received, which reduces user waiting time and improves verification speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 It is a flowchart of the verification method in an embodiment of the present application.
[0022] Figure 2 It is a schematic diagram showing the verification mark in the embodiment of the present application.
[0023] Figure 3 It is a schematic diagram of the verification device in an embodiment of the present application.
[0024] Figure 4 Schematic diagram of an electronic device in an embodiment of the present application.
[0025] Figure 5 It is a schematic diagram of the hardware structure of the electronic device in the embodiment of the present application. DETAILED DESCRIPTION
[0026] The following will be combined with the accompanying drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the embodiments described are 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 are within the scope of protection of this application.
[0027] The terms "first," "second," and the like in the specification and claims of this application are used to distinguish similar objects, and are not used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of this application can be implemented in an order other than that illustrated or described herein, and that the objects distinguished by "first," "second," and the like are generally of the same type, and do not limit the number of objects; for example, the first object can be one or more. In addition, the term "and / or" in the specification and claims refers to at least one of the connected objects, and the character " / " generally indicates that the objects connected are in an "or" relationship.
[0028] The verification method provided in the embodiment of the present application is described in detail below through specific embodiments and their application scenarios in conjunction with the accompanying drawings.
[0029] like Figure 1 As shown, this embodiment introduces a verification method, including steps S1100-S1500.
[0030] S1100: Acquire first information of a first electronic device, where the first information of different electronic devices is different.
[0031] The first information may include a mobile phone number and a Vender Anonymous Identifier (VAID). The mobile phone number of the first electronic device refers to the mobile phone number corresponding to the Subscriber Identity Module (SIM) installed in the first electronic device. The first information is unique to the electronic device and may vary from one electronic device to another. The first information may also include other information.
[0032] S1200: Calculate location information of at least one verification identifier based on the first information.
[0033] Verification marks can be numbers, text, pictures, etc. The more verification marks there are, the higher the security of the verification is, but also the higher the complexity of the verification is. The number of verification marks can be determined by considering both security and complexity. For example, the number of verification marks can be set to 4. Figure 2 As shown, the verification mark is a number, and numbers 1, 2, 3, and 4 are displayed on the screen.
[0034] Because the first information of different electronic devices is different, the location information of the verification mark calculated based on the first information of different electronic devices is also different. For example, for the first electronic device and the second electronic device, the location information of the verification mark calculated based on the first information of the first electronic device is on the left side of the screen, and the location information of the verification mark calculated based on the first information of the second electronic device is on the right side of the screen.
[0035] The position information of the verification mark indicates the display position of the verification mark on the screen. In the case of multiple verification marks, the position information of each verification mark needs to be calculated. The position information of different verification marks is different. For example, the verification marks include a first verification mark and a second verification mark. Then, the first position information of the first verification mark is calculated, and the second position information of the second verification mark is calculated. The first position information and the second position information are different. The position information of the verification mark can be represented by the coordinates of the verification mark on the screen.
[0036] S1300: Display at least one verification mark according to the location information.
[0037] After calculating the position information corresponding to each verification mark, the verification mark is displayed on the screen according to the position information of each verification mark. For example, when the number of verification marks is set to 4, 4 position information is calculated based on the first information, and 4 verification marks are displayed on the screen according to the calculated 4 position information.
[0038] S1400: Receive a first input of at least one verification identifier from a user.
[0039] The first input can be a click input or a long press input. The user can click the verification mark displayed on the screen, or the user can long press the verification mark displayed on the screen. The verification marks can be set in an order, and the order in which the verification marks are displayed on the screen is set, allowing the user to click the verification marks in the order in which they are displayed.
[0040] like Figure 2 As shown, four verification marks are displayed on the screen, including verification mark "①", verification mark "②", verification mark "③", and verification mark "④". At the same time, a prompt message "Please click 1234 in sequence on the screen" is displayed, prompting the user to click each verification mark in the order of the verification marks according to the prompt message.
[0041] S1500: If the first input satisfies a verification condition, determine that the verification is passed, where the verification condition is determined based on the first information.
[0042] Specifically, verification can be determined based on the user clicking or long pressing the screen. For example, it can be determined whether the location of the user's click on the screen is the location of the verification mark. If not, then the verification can be determined to have failed. If the location of the user's click on the screen is the location of the verification mark, then the verification can be determined to have passed. It can also be combined with the order of the verification marks. If the order in which the user clicked the verification marks is different from the order in which the verification marks were clicked, then the verification can be determined to have failed.
[0043] This embodiment calculates the location information of the verification identifier based on the first information of the electronic device. Different electronic devices have different first information, and the location information of the verification identifier for each electronic device is also different, thus ensuring the security of verification. Compared with SMS verification, this method does not require SMS fees, reducing verification costs. It also does not require users to wait for SMS messages, reducing user waiting time and increasing verification speed.
[0044] In one embodiment, the first information includes a mobile phone number and device identification information, and step S1200 includes steps S2100-S2300.
[0045] S2100: Obtain the name information of the application, the timestamp corresponding to the current time, and the pixel value of the screen of the first electronic device.
[0046] The timestamp corresponding to the current time is the total number of seconds from 00:00:00 on January 1, 1970, to the current time. A timestamp is a string of numbers and is a long integer. For example, the timestamp corresponding to 00:00:00 on January 1, 2000, is 946656000. An application is the application that the user needs to log in to. The application name is a string.
[0047] The pixel value of the electronic device screen includes a horizontal pixel value and a vertical pixel value, and the horizontal pixel value and the vertical pixel value are positive integers. For example, the horizontal pixel value can be 1080 and the vertical pixel value can be 1920.
[0048] S2200: Generate a random number within a preset range.
[0049] Generates a random number roundp within the preset range. The preset range can be set according to actual needs. For example, the preset range can be 10000-1000000, and the random number can be 200000.
[0050] S2300: Calculate the location information corresponding to the verification identifier based on the mobile phone number, device identification information, application name information, a timestamp corresponding to the current time, a random number, and a pixel value of the screen of the first electronic device.
[0051] In this embodiment, the mobile phone number of the electronic device and the identification information of the electronic device are used when calculating the location information of the verification mark. Since different electronic devices have different mobile phone numbers and different device identification information of different electronic devices, the location information of the verification mark calculated for different electronic devices is also different, thereby improving the security of the verification. When calculating the location information of the verification mark, a random number and a timestamp corresponding to the current time are also used. For multiple verifications performed on the same electronic device, the random number and the timestamp corresponding to the current time are different for each verification, ensuring that the location information of the verification mark is different when multiple verifications are performed on the same electronic device, thereby improving the security of the verification. When calculating the location information of the verification mark, the pixel value of the screen of the first electronic device is also used to avoid the situation where the coordinates of the verification mark are greater than the pixel value of the screen of the first electronic device, thereby ensuring that the verification mark can be displayed on the screen of the first electronic device. When calculating the location information of the verification mark, the name information of the application is also used. Since the name information of different applications is different, the location information of the verification mark is also different for different applications, thereby improving the security of the verification.
[0052] In one embodiment, step S2300 includes steps S2310 - S2360 .
[0053] Step S2310: Calculate a first hash value corresponding to the mobile phone number and a second hash value corresponding to the device identification information through a first function.
[0054] The first function may be an MD5 function, or other function, which is not limited in this embodiment. The mobile phone number is encrypted using the MD5 (Message-Digest Algorithm) function to obtain a hash value mp corresponding to the mobile phone number. The hash value mp is a string type of data. The hash value mp is the first hash value. The device identification information represents the VAID device number of the electronic device. The VAID device number of the electronic device is processed using the MD5 function to obtain a hash value vp corresponding to the VAID device number of the electronic device. The hash value vp is also a string type of data. The hash value vp is the second hash value.
[0055] Step S2320: Calculate a first hash code value corresponding to the first hash value, a second hash code value corresponding to the second hash value, and a third hash code value corresponding to the application name through a hash coding function.
[0056] The hash code function (hashCode) can output a corresponding hash code value based on the input string type data. The hash code value is an integer. The hash code function is used to calculate a first hash code value hashCode(mp) corresponding to the first hash value mp, a second hash code value hashCode(vp) corresponding to the second hash value vp, and a third hash code value hashCode(package) corresponding to the application name information package.
[0057] Step S2330: Calculate the sum of the first hash code value, the second hash code value, the third hash code value, the timestamp, and the random number.
[0058] The first hash code value hashCode(mp), the second hash code value hashCode(vp), the third hash code value hashCode(package), the timestamp systp, and the random number roundp are accumulated and summed to obtain a sum value sum. The sum value calculation formula is as follows:
[0059] sum=hashCode(mp)+hashCode(vp)+hashCode(package)+systp+roundp Step S2340: Calculate the product of the sum value and the serial number of the verification identifier.
[0060] The serial number of the verification mark is determined according to the order of the verification marks. For example, for 4 verification marks, the serial number of the first verification mark is 1, the serial number of the second verification mark is 2, the serial number of the third verification mark is 3, and the serial number of the fourth verification mark is 4.
[0061] In the case of N verification identifiers, the serial number of the i-th verification identifier is i, i is greater than or equal to 1, and i is less than or equal to N, N is a positive integer. The product of the serial number i of the i-th verification identifier and the sum sum is sum*i.
[0062] Step S2350: Determine a first remainder obtained by dividing the product by the horizontal pixel value of the screen of the first electronic device as the horizontal coordinate of the verification mark.
[0063] For the i-th verification mark, the product sum*i may be greater than the horizontal pixel value of the first electronic device screen. To ensure that the horizontal coordinate of the verification mark is less than the horizontal pixel value of the first electronic device screen, the product sum*i is divided by the horizontal pixel value of the first electronic device screen to obtain a first remainder. The first remainder is less than the horizontal pixel value of the first electronic device, and the first remainder is determined as the horizontal coordinate of the verification mark. The calculation formula for the horizontal coordinate X(i) of the i-th verification mark is as follows:
[0064] X(i)=(sum*i)%x
[0065] The symbol % represents the remainder, and x represents the horizontal pixel value of the first electronic device.
[0066] Step S2360: Determine a second remainder obtained by dividing the product by the vertical pixel value of the screen of the first electronic device as the vertical coordinate of the verification mark.
[0067] Similarly, for the i-th verification mark, the product sum*i may be greater than the vertical pixel value of the first electronic device screen. In order to ensure that the vertical coordinate of the verification mark is less than the vertical pixel value of the first electronic device screen, the product sum*i is divided by the vertical pixel value of the first electronic device screen to obtain a second remainder. The second remainder is less than the vertical pixel value of the first electronic device, and the second remainder is determined as the vertical coordinate of the verification mark. The calculation formula for the vertical coordinate Y(i) of the i-th verification mark is as follows:
[0068] Y(i)=(sum*i)%y
[0069] Wherein, y represents the vertical pixel value of the first electronic device.
[0070] In one example, the mobile phone number is 123456. The first hash value calculated by the MD5 function is 49BA59ABBE56E057. The device identification information is 4d39641b. The second hash value calculated by the MD5 function is AC40BA3CBB8D9742. The first hash code value corresponding to the first hash value is 574400126. The second hash code value corresponding to the second hash value is -1855012867. The application name is dengluchengxu. The second hash code value calculated by the hash function is 1043042433. The random number is 263487. The timestamp corresponding to the current time is 1667464277. The sum of the first hash code value, the second hash code value, the third hash code value, the timestamp, and the random number is 1430157456. The horizontal pixel value of the electronic device screen is 1080, and the vertical pixel value of the electronic device screen is 1920. The horizontal coordinate of the first verification mark is calculated to be 936, and the vertical coordinate of the first verification mark is 1296. The horizontal coordinate of the second verification mark is calculated to be 792, and the vertical coordinate of the second verification mark is 672. The horizontal coordinate of the third verification mark is calculated to be 648, and the vertical coordinate of the third verification mark is 48. The horizontal coordinate of the fourth verification mark is calculated to be 504, and the vertical coordinate of the fourth verification mark is 1344.
[0071] In this embodiment, the serial number of the verification identifier is used when calculating its location information. Different verification identifiers have different serial numbers, ensuring that no two verification identifiers with the same location information appear in a single verification. Furthermore, by calculating the remainder, the horizontal coordinate of each verification identifier is ensured to be less than the horizontal pixel value of the first electronic device screen, and the vertical coordinate of each verification identifier is ensured to be less than the vertical pixel value of the first electronic device screen. This ensures that the coordinates of each verification identifier do not exceed the range of the first electronic device screen, allowing each verification identifier to be displayed on the first electronic device screen.
[0072] In one embodiment, before step S1100, the method further includes: receiving a second input from the user on the login interface; determining the mobile phone number corresponding to the second input in response to the second input; and obtaining the mobile phone number corresponding to the first electronic device. Step S1300 includes: if the mobile phone number corresponding to the first electronic device is different from the mobile phone number corresponding to the second input, sending first verification information to the second electronic device corresponding to the mobile phone number corresponding to the second input, so that at least one verification identifier is displayed on the second electronic device based on the location information. Step S1500 includes: receiving second verification information sent by the second electronic device, and determining that verification is successful if the second verification information meets the verification conditions.
[0073] The login interface is displayed on the first electronic device. The second input is the user's input to the input box in the login interface. The user enters the mobile phone number into the input box through the second input. The user can enter the mobile phone number through the keyboard, or the user can paste the copied mobile phone number into the input box. Figure 2 As shown, a mobile phone number input box and a password input box are displayed in the login interface, and the user enters the mobile phone number in the mobile phone number input box. The second input is the input for the mobile phone number input box.
[0074] After the user finishes entering their mobile phone number, the mobile phone number in the input box is read. After obtaining the mobile phone number of the first electronic device, a determination is made as to whether the mobile phone number of the first electronic device matches the mobile phone number entered by the user. If they match, a verification indicator may be displayed on the first electronic device, prompting the user to verify the number. If they differ, the first electronic device sends first verification information to the second electronic device corresponding to the mobile phone number entered by the user. After receiving the first verification information from the first electronic device, the second electronic device displays a verification indicator on the second electronic device and performs security verification on the second electronic device corresponding to the mobile phone number entered by the user. The verification indicator is determined based on the first information from the first electronic device. For example, a user enters the mobile phone number 123456 on the login interface displayed on the first electronic device. The mobile phone number corresponding to the first electronic device is 654321, and the mobile phone number entered by the user differs from the mobile phone number corresponding to the first electronic device. The mobile phone number entered by the user matches the mobile phone number corresponding to the second electronic device, and a verification indicator is displayed on the second electronic device. The user clicks the verification indicator displayed on the second electronic device to perform security verification. If security verification is successful, the second electronic device sends second verification information to the first electronic device. After receiving the second verification information, the first electronic device determines that verification is successful and allows the user to log in on the first electronic device.
[0075] When the mobile phone number corresponding to the first electronic device is different from the mobile phone number corresponding to the second input, step S1200 includes: obtaining the name information of the application, the timestamp corresponding to the current time, and the pixel value of the screen of the second electronic device, wherein the pixel value of the screen of the second electronic device includes the horizontal pixel value of the screen of the second electronic device and the vertical pixel value of the screen of the second electronic device; generating a random number within a preset range; calculating a first hash value corresponding to the mobile phone number of the first electronic device and a second hash value corresponding to the device identification information through a first function; calculating a first hash code value corresponding to the first hash value, a second hash code value corresponding to the second hash value, and a third hash code value corresponding to the application name through a hash coding function; calculating the sum of the first hash code value, the second hash code value, the third hash code value, the timestamp, and the random number; calculating the product of the sum and the serial number of the verification identifier; determining the third remainder obtained by dividing the product by the horizontal pixel value of the screen of the second electronic device as the horizontal coordinate of the verification identifier; and determining the fourth remainder obtained by dividing the product by the vertical pixel value of the screen of the second electronic device as the vertical coordinate of the verification identifier.
[0076] After sending the first verification information to the second electronic device corresponding to the mobile phone number corresponding to the second input, the method also includes: displaying at least one verification identifier on the second electronic device; receiving a third input from the user corresponding to the second electronic device for the at least one verification identifier displayed on the second electronic device; and in response to the third input, determining that the verification is passed if the third input meets the verification conditions.
[0077] Optionally, after the second electronic device receives the third input, the second electronic device may send relevant information of the third input to the first electronic device, and the first electronic device determines that the verification is passed if the third input meets the verification condition based on the relevant information of the third input.
[0078] In this embodiment, when the mobile phone number input by the user is different from the mobile phone number of the first electronic device, a verification mark is displayed on the second electronic device corresponding to the mobile phone number input by the user, and verification can be completed across electronic devices, thereby improving verification security.
[0079] In one embodiment, step S1500 includes steps S1510 - S1520 .
[0080] S1510: In response to a first input, acquire touch information corresponding to the first input, where the touch information includes touch position information and touch sequence information corresponding to each verification identifier.
[0081] Touch information includes touch position information and touch sequence information. Touch position information indicates the location where the user clicks on the screen.
[0082] S1520: When the difference between the touch position information and the position information of the corresponding verification mark is smaller than the threshold, and the touch sequence information is consistent with the sequence information of the corresponding verification mark, it is determined that the verification is passed.
[0083] If the difference between the touch position information and the corresponding verification mark information is greater than the threshold, it indicates that the user's touch position deviated from the verification mark and the user did not click on the verification mark, and the security verification can be judged to have failed. If the difference between the touch position information and the corresponding verification mark information is less than the threshold, the security verification is determined based on the touch sequence and the sequence of the verification marks.
[0084] like Figure 2 As shown, four verification marks are displayed on the screen in the order of 1, 2, 3, and 4. The user clicks the four verification marks. If the order of the clicks is 1, 2, 3, and 4, and the order of the clicks is the same as the order of the verification marks, then the verification is considered passed. If the order of the clicks is 1, 3, 2, and 4, and the order of the clicks is different, then the verification is considered failed.
[0085] In this embodiment, whether verification is passed is determined by combining the touch position and the touch sequence at the same time, which can more accurately determine whether verification is passed.
[0086] The verification method provided in the embodiment of the present application can be executed by a verification device. In the embodiment of the present application, the verification device provided in the embodiment of the present application is described by taking the verification method executed by the verification device as an example.
[0087] like Figure 3 As shown, this embodiment introduces a verification device 300, including:
[0088] The first acquisition module 301 is configured to acquire first information of a first electronic device, where the first information of different electronic devices is different.
[0089] The calculation module 302 is configured to calculate location information of at least one verification identifier based on the first information.
[0090] The display module 303 is configured to display at least one verification mark according to the location information.
[0091] The first receiving module 304 is configured to receive a first input of at least one verification identifier from a user.
[0092] The verification module 305 is configured to determine that the verification is passed if the first input satisfies a verification condition, where the verification condition is determined based on the first information.
[0093] This embodiment calculates the location information of the verification identifier based on the first information of the electronic device. Different electronic devices have different first information, and the location information of the verification identifier for each electronic device is also different, thus ensuring the security of verification. Compared with SMS verification, there is no need to pay SMS fees, which reduces verification costs. Furthermore, users do not need to wait for SMS messages to be received, which reduces user waiting time and increases verification speed.
[0094] Optionally, the first information includes a mobile phone number and device identification information, and the calculation module includes:
[0095] The acquisition submodule is used to obtain the name information of the application, the timestamp corresponding to the current time, and the pixel value of the screen of the first electronic device.
[0096] The generation submodule is used to generate random numbers within a preset range.
[0097] The calculation submodule is used to calculate the location information corresponding to the verification identifier based on the mobile phone number, device identification information, application name information, the timestamp corresponding to the current time, the random number and the pixel value of the first electronic device screen.
[0098] Optionally, the pixel values of the screen of the first electronic device include horizontal pixel values of the screen of the first electronic device and vertical pixel values of the screen of the first electronic device, and the calculation submodule is specifically configured to:
[0099] Calculating a first hash value corresponding to the mobile phone number and a second hash value corresponding to the device identification information by using a first function;
[0100] Calculate, by a hash encoding function, a first hash code value corresponding to the first hash value, a second hash code value corresponding to the second hash value, and a third hash code value corresponding to the application name;
[0101] Calculate the sum of the first hash code value, the second hash code value, the third hash code value, the timestamp, and the random number;
[0102] Calculate the product of the sum value and the serial number of the verification identifier;
[0103] Determine a first remainder obtained by dividing the product by the horizontal pixel value of the screen of the first electronic device as the horizontal coordinate of the verification mark;
[0104] A second remainder obtained by dividing the product by the vertical pixel value of the screen of the first electronic device is determined as the vertical coordinate of the verification mark.
[0105] Optionally, the device further comprises:
[0106] The second receiving module is used to receive a second input from the user on the login interface.
[0107] The determination module is configured to determine, in response to the second input, a mobile phone number corresponding to the second input.
[0108] The second acquisition module is used to acquire the mobile phone number corresponding to the first electronic device.
[0109] The display module is specifically used to send first verification information to the second electronic device corresponding to the mobile phone number corresponding to the second input when the mobile phone number corresponding to the first electronic device is different from the mobile phone number corresponding to the second input, so that at least one verification mark is displayed on the second electronic device according to the location information.
[0110] The verification module is specifically configured to receive second verification information sent by the second electronic device, and determine that the verification is passed if the second verification information meets the verification condition.
[0111] Optionally, the verification module is specifically used to:
[0112] In response to the first input, acquiring touch information corresponding to the first input, the touch information including touch position information and touch sequence information corresponding to each verification mark;
[0113] If the difference between the touch position information and the position information of the corresponding verification mark is smaller than the threshold, and the touch sequence information is consistent with the sequence information of the corresponding verification mark, it is determined that the verification is passed.
[0114] The verification device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., and the embodiment of the present application is not specifically limited.
[0115] The verification device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0116] The verification device provided in the embodiment of the present application can achieve Figures 1 to 2 To avoid repetition, the various processes implemented in the method embodiment are not described here.
[0117] Alternatively, as Figure 4 As shown, an embodiment of the present application also provides an electronic device 400, including a processor 401 and a memory 402, wherein the memory 402 stores a program or instruction that can be run on the processor 401, and when the program or instruction is executed by the processor 401, the various steps of the above-mentioned verification method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0118] It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
[0119] Figure 5 A schematic diagram of the hardware structure of an electronic device implementing an embodiment of the present application.
[0120] The electronic device 1000 includes but is not limited to components such as a radio frequency unit 1001 , a network module 1002 , an audio output unit 1003 , an input unit 1004 , a sensor 1005 , a display unit 1006 , a user input unit 1007 , an interface unit 1008 , a memory 1009 , and a processor 1010 .
[0121] Those skilled in the art will understand that the electronic device 1000 may also include a power source (such as a battery) to power each component, and the power source may be logically connected to the processor 1010 through a power management system, thereby implementing functions such as charging, discharging, and power consumption management through the power management system. Figure 5 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be repeated here.
[0122] The processor 1010 is configured to obtain first information of a first electronic device, where the first information of different electronic devices is different.
[0123] The processor 1010 is further configured to calculate the location information of at least one verification identifier based on the first information.
[0124] The display unit 1006 is configured to display at least one verification mark according to the location information.
[0125] The user input unit 1007 is configured to receive a first input of at least one verification identifier from a user.
[0126] The processor 1010 is further configured to determine that the verification is passed if the first input satisfies a verification condition, where the verification condition is determined based on the first information.
[0127] This embodiment calculates the location information of the verification identifier based on the first information of the electronic device. Different electronic devices have different first information, and the location information of the verification identifier for each electronic device is also different, thus ensuring the security of verification. Compared with SMS verification, there is no need to pay SMS fees, which reduces verification costs. Furthermore, users do not need to wait for SMS messages to be received, which reduces user waiting time and increases verification speed.
[0128] Optionally, the first information includes a mobile phone number and device identification information. The processor 1010 is further configured to obtain the name information of the application, a timestamp corresponding to the current time, and a pixel value of the screen of the first electronic device.
[0129] The processor 1010 is further configured to generate a random number within a preset range.
[0130] Processor 1010 is further configured to calculate location information corresponding to the verification identifier based on the mobile phone number, device identification information, application name information, a timestamp corresponding to the current time, a random number, and a pixel value of the screen of the first electronic device.
[0131] Optionally, the pixel values of the first electronic device screen include horizontal pixel values of the first electronic device screen and vertical pixel values of the first electronic device screen.
[0132] The processor 1010 is further configured to calculate, by using a first function, a first hash value corresponding to the mobile phone number and a second hash value corresponding to the device identification information.
[0133] The processor 1010 is further configured to calculate, through a hash coding function, a first hash code value corresponding to the first hash value, a second hash code value corresponding to the second hash value, and a third hash code value corresponding to the application name.
[0134] The processor 1010 is further configured to calculate a sum of the first hash code value, the second hash code value, the third hash code value, the timestamp, and the random number.
[0135] The processor 1010 is further configured to calculate the product of the sum value and the serial number of the verification identifier.
[0136] The processor 1010 is further configured to determine a first remainder obtained by dividing the product by the horizontal pixel value of the screen of the first electronic device as the horizontal coordinate of the verification mark.
[0137] The processor 1010 is further configured to determine a second remainder obtained by dividing the product by the vertical pixel value of the screen of the first electronic device as the vertical coordinate of the verification mark.
[0138] Optionally, the user input unit 1007 is further configured to receive a second input from the user on the login interface.
[0139] The processor 1010 is further configured to, in response to the second input, determine a mobile phone number corresponding to the second input.
[0140] The processor 1010 is further configured to obtain a mobile phone number corresponding to the first electronic device.
[0141] The display unit 1006 is used to send first verification information to the second electronic device corresponding to the mobile phone number corresponding to the second input when the mobile phone number corresponding to the first electronic device is different from the mobile phone number corresponding to the second input, so that at least one verification mark is displayed on the second electronic device according to the location information.
[0142] The processor 1010 is further configured to receive second verification information sent by the second electronic device, and determine that the verification is successful if the second verification information meets the verification condition.
[0143] Optionally, the processor 1010 is further configured to obtain touch information corresponding to the first input in response to the first input, where the touch information includes touch position information and touch sequence information corresponding to each verification mark.
[0144] The processor 1010 is further configured to determine that the verification is successful when the difference between the touch position information and the position information of the corresponding verification mark is smaller than a threshold and the touch sequence information is consistent with the sequence information of the corresponding verification mark.
[0145] It should be understood that in an embodiment of the present application, the input unit 1004 may include a graphics processing unit (GPU) 10041 and a microphone 10042, and the graphics processor 10041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 1006 may include a display panel 10061, and the display panel 10061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 1007 includes a touch panel 10071 and at least one of other input devices 10072. The touch panel 10071 is also called a touch screen. The touch panel 10071 may include two parts: a touch detection device and a touch controller. Other input devices 10072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and an operating stick, which will not be repeated here.
[0146] The memory 1009 can be used to store software programs and various data. The memory 1009 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, applications or instructions required for at least one function (such as a sound playback function, an image playback function, etc.). In addition, the memory 1009 may include a volatile memory or a non-volatile memory, or the memory 1009 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM), and a direct memory bus random access memory (DRRAM). The memory 1009 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0147] Processor 1010 may include one or more processing units. Optionally, processor 1010 integrates an application processor and a modem processor. The application processor primarily handles operations related to the operating system, user interface, and application programs, while the modem processor primarily processes wireless communication signals, such as a baseband processor. It is understood that the modem processor may not be integrated into processor 1010.
[0148] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned verification method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0149] The processor is the processor in the electronic device in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0150] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned verification method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0151] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0152] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned verification method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0153] It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising 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, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element. In addition, it should be noted that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in the opposite order according to the functions involved. For example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0154] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), including a number of instructions for enabling a terminal (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0155] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of this application, ordinary technicians in this field can also make many forms without departing from the purpose of this application and the scope of protection of the claims, all of which are within the protection of this application.
Claims
1. A verification method, characterized in that: The method comprises: Receive a second input from the user on the login interface; In response to the second input, determining a mobile phone number corresponding to the second input; Obtaining a mobile phone number corresponding to the first electronic device; Acquire first information of a first electronic device, wherein the first information of different electronic devices is different; Calculating location information of at least one verification identifier based on the first information; If the mobile phone number corresponding to the first electronic device is different from the mobile phone number corresponding to the second input, sending the first verification information to the second electronic device corresponding to the mobile phone number corresponding to the second input, so that the second electronic device displays the at least one verification identifier based on the location information; Receive second verification information sent by the second electronic device, and determine that the verification is passed if the second verification information meets a verification condition, where the verification condition is determined based on the first information.
2. The method according to claim 1, characterized in that The first information includes a mobile phone number and device identification information, and the calculating the location information of at least one verification identifier based on the first information includes: Obtaining application name information, a timestamp corresponding to the current time, and pixel values of the screen of the first electronic device; Generate random numbers within a preset range; The location information corresponding to the verification identifier is calculated based on the mobile phone number, the device identification information, the name information of the application, the timestamp corresponding to the current time, the random number, and the pixel value of the screen of the first electronic device.
3. The method according to claim 2, characterized in that The pixel values of the first electronic device screen include horizontal pixel values of the first electronic device screen and vertical pixel values of the first electronic device screen; The calculating, based on the mobile phone number, the device identification information, the name information of the application, the timestamp corresponding to the current time, the random number, and the pixel value of the screen of the first electronic device, the location information corresponding to the verification identifier includes: Calculating a first hash value corresponding to the mobile phone number and a second hash value corresponding to the device identification information by a first function; Calculate, by a hash encoding function, a first hash code value corresponding to the first hash value, a second hash code value corresponding to the second hash value, and a third hash code value corresponding to the application name; Calculating a sum of the first hash code value, the second hash code value, the third hash code value, the timestamp, and the random number; Calculating the product of the sum value and the serial number of the verification identifier; Determine a first remainder obtained by dividing the product by the horizontal pixel value of the screen of the first electronic device as the horizontal coordinate of the verification mark; A second remainder obtained by dividing the product by the vertical pixel value of the first electronic device screen is determined as the vertical coordinate of the verification mark.
4. The method according to claim 1, wherein In a case where the mobile phone number corresponding to the first electronic device is the same as the mobile phone number corresponding to the second input, the method further includes: Receiving a first input of the at least one verification identifier from a user: In response to the first input, acquiring touch information corresponding to the first input, the touch information including touch position information and touch sequence information corresponding to each verification mark; If the difference between the touch position information and the position information of the corresponding verification mark is smaller than a threshold, and the touch sequence information is consistent with the sequence information of the corresponding verification mark, it is determined that the verification is passed.
5. A verification device, characterized in that: The device comprises: A second receiving module is used to receive a second input from the user on the login interface; a determination module, configured to determine, in response to the second input, a mobile phone number corresponding to the second input; A second acquisition module is used to obtain a mobile phone number corresponding to the first electronic device; A first acquisition module is configured to acquire first information of a first electronic device, wherein the first information of different electronic devices is different; a calculation module, configured to calculate location information of at least one verification identifier based on the first information; a display module configured to, when the mobile phone number corresponding to the first electronic device is different from the mobile phone number corresponding to the second input, send the first verification information to the second electronic device corresponding to the mobile phone number corresponding to the second input, so that at least one verification mark is displayed on the second electronic device according to the location information; The verification module is configured to receive second verification information sent by a second electronic device, and determine that the verification is passed if the second verification information meets a verification condition.
6. The device according to claim 5, characterized in that The first information includes a mobile phone number and device identification information, and the calculation module includes: An acquisition submodule, configured to acquire the name information of the application, a timestamp corresponding to the current time, and a pixel value of the screen of the first electronic device; The generation submodule is used to generate random numbers within a preset range; A calculation submodule is used to calculate the location information corresponding to the verification identifier based on the mobile phone number, the device identification information, the name information of the application, the timestamp corresponding to the current time, the random number and the pixel value of the first electronic device screen.
7. The device according to claim 6, characterized in that The pixel values of the first electronic device screen include horizontal pixel values of the first electronic device screen and vertical pixel values of the first electronic device screen, and the calculation submodule is specifically configured to: Calculating a first hash value corresponding to the mobile phone number and a second hash value corresponding to the device identification information by a first function; Calculate, by a hash encoding function, a first hash code value corresponding to the first hash value, a second hash code value corresponding to the second hash value, and a third hash code value corresponding to the application name; Calculating a sum of the first hash code value, the second hash code value, the third hash code value, the timestamp, and the random number; Calculating the product of the sum value and the serial number of the verification identifier; Determine a first remainder obtained by dividing the product by the horizontal pixel value of the screen of the first electronic device as the horizontal coordinate of the verification mark; A second remainder obtained by dividing the product by the vertical pixel value of the first electronic device screen is determined as the vertical coordinate of the verification mark.
8. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the verification method according to any one of claims 1 to 4 are implemented.
9. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of the verification method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Verification method and apparatus
CN108460268A
Verification method and system of verification code, client device and server device
CN112199658A