Method, apparatus, electronic device and computer-readable medium for sending verification codes
By using different keys at different verification points to generate verification codes and performing multi-layer encryption on the pickup code and user order information, the problem of low security of verification codes is solved, and the security of verification codes and the reliability of user identity verification is improved.
Patent Information
- Application Number
- CN202111335621.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-11
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2041-11-11
AI Technical Summary
In the prior art, different verification points use the same key to generate verification codes, resulting in the key and decryption algorithm being cracked, and illegal users can forge and decrypt the verification code. The verification code is low security, increasing the probability of the item being misapproved; the pickup code of a specific digit is easily leaked, which also reduces the security of the verification code.
By obtaining user order information, generating a pickup code and encrypting it, first encrypting the user's mobile phone number and pickup address with the login password, second encrypting the target information code and verification code using the verification code generator, and generating and sending the verification code.
It improves the overall security of the verification code, reduces the probability of items being misapproved, ensures the security of the pickup code and user order information, and ensures the legality of the user identity of receiving the verification code.
Smart Images

Figure CN113919922B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of computer technologies, and particularly to a method, an apparatus, an electronic device, and a computer-readable medium for sending verification codes. Background Art
[0002] A verification code is an electronic voucher code generated to verify the authenticity of a user's identity when picking up an item. Currently, when generating verification codes, the commonly used methods are: different verification points use the same key to generate verification codes or use a pick-up code with a specific number of digits as the verification code.
[0003] However, when generating verification codes in the above ways, the following technical problems often exist:
[0004] First, different verification points use the same key to generate verification codes. After the key and decryption algorithm are cracked, illegal users can forge and decrypt the verification codes generated by all verification points, resulting in relatively low overall security of the verification codes and increasing the probability of items being misappropriated.
[0005] Second, a pick-up code with a specific number of digits is a clear code, which is prone to leakage of the pick-up code, and thus the security of the verification code is relatively low, increasing the probability of items being misappropriated. Summary of the Invention
[0006] This section of the present disclosure is used to briefly introduce concepts, which will be described in detail in the following Detailed Description section. This section of the present disclosure is not intended to identify the key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.
[0007] Some embodiments of the present disclosure propose a method, an apparatus, an electronic device, and a computer-readable medium for sending verification codes to solve one or more of the technical problems mentioned in the above Background Art section.
[0008] In a first aspect, some embodiments of the present disclosure provide a method for sending a verification code, the method including: in response to detecting an inbound information code, obtaining user order information corresponding to the inbound information code, where the user order information includes: a user mobile phone number, a status code, and a pick-up address; changing the status of the status code to a status indicating that the item has been warehoused and generating a pick-up code; generating a verification code according to the pick-up code and the status code included in the user order information; performing a first encryption process on the user mobile phone number and the pick-up address included in the user order information by using a login password to obtain a target information code, where the login password is a password used when the target terminal logs in and is pre-stored; performing a second encryption process on the target information code and the verification code by using a verification code generator to obtain a verification code; and sending the verification code to a terminal device corresponding to the user mobile phone number included in the user order information.
[0009] In a second aspect, some embodiments of the present disclosure provide a verification code sending device, the device including: an obtaining unit configured to, in response to detecting an inbound information code, obtain user order information corresponding to the inbound information code, where the user order information includes: a user mobile phone number, a status code, and a pick-up address; a first generating unit configured to change the status of the status code to a status indicating that the item has been warehoused and generate a pick-up code; a second generating unit configured to generate a verification code according to the pick-up code and the status code included in the user order information; a first encryption unit configured to perform a first encryption process on the user mobile phone number and the pick-up address included in the user order information by using a login password to obtain a target information code, where the login password is a password used when the target terminal logs in and is pre-stored; a second encryption unit configured to perform a second encryption process on the target information code and the verification code by using a verification code generator to obtain a verification code; and a sending unit configured to send the verification code to a terminal device corresponding to the user mobile phone number included in the user order information.
[0010] In a third aspect, some embodiments of the present disclosure provide an electronic device, including: one or more processors; a storage device storing one or more programs thereon, when the one or more programs are executed by the one or more processors, enabling the one or more processors to implement the method described in any implementation manner of the first aspect.
[0011] In a fourth aspect, some embodiments of the present disclosure provide a computer-readable medium storing a computer program thereon, where the program, when executed by a processor, implements the method described in any implementation manner of the first aspect.
[0012] The above-mentioned various embodiments of the present disclosure have the following beneficial effects: Through the verification code sending method of some embodiments of the present disclosure, different verification points can use different keys to generate verification codes. When the key of one verification point is cracked, it will not affect the security of the verification codes generated by other verification points, improving the overall security of the verification codes and reducing the probability of items being misappropriated. Specifically, the reason for the relatively low overall security of the verification codes is that different verification points use the same key to generate verification codes. After the key and decryption algorithm are cracked, illegal users can forge and decrypt the verification codes generated by all verification points. Based on this, the verification code sending method of some embodiments of the present disclosure first, in response to detecting the warehousing information code, obtains the user order information corresponding to the above-mentioned warehousing information code, where the above-mentioned user order information includes: user mobile phone number, status code, and pickup address. Then, change the status of the above-mentioned status code to a status indicating that the item has been warehoused and generate a pickup code. Thus, by generating a pickup code for the warehoused item, the storage location of the warehoused item can be determined according to the pickup code. Then, according to the above-mentioned pickup code and the status code included in the above-mentioned user order information, a verification code is generated. Thus, by generating a verification code, the encryption of the pickup code can be realized, ensuring the security of the pickup code. After that, the user mobile phone number and pickup address included in the above-mentioned user order information are subjected to a first encryption process using the login password to obtain a target information code, where the above-mentioned login password is the password used when the target terminal logs in and is stored in advance. Thus, by using the login password of the verification point to encrypt the user's order information, the security of the user order information can be ensured. When the login password of one verification point is cracked, it will not affect the security of the verification codes generated by other verification points. Then, a verification code generator is used to perform a second encryption process on the above-mentioned target information code and the above-mentioned verification code to obtain a verification code. Thus, by using the verification code generator to encrypt the encrypted order information again, the verification code is displayed in ciphertext form, improving the security of the verification code and reducing the probability of items being misappropriated. Finally, the above-mentioned verification code is sent to the terminal device corresponding to the user mobile phone number included in the above-mentioned user order information. Thus, by sending the verification code to the corresponding user terminal, the legitimacy of the user receiving the verification code can be ensured. Also, because different keys are used to generate verification codes at different verification points, when the key of one verification point is cracked, it will not affect the security of the verification codes generated by other verification points, thereby improving the overall security of the verification codes. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] In combination with the accompanying drawings and with reference to the following specific embodiments, the above and other features, advantages, and aspects of the various embodiments of the present disclosure will become more apparent. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic and the elements and elements are not necessarily drawn to scale.
[0014] Figure 1 It is a schematic diagram of an application scenario of the write-off code sending method according to some embodiments of the present disclosure;
[0015] Figure 2 It is a flowchart according to some embodiments of the write-off code sending method of the present disclosure;
[0016] Figure 3 It is a flowchart according to other embodiments of the write-off code sending method of the present disclosure;
[0017] Figure 4 It is a schematic structural diagram according to some embodiments of the write-off code sending device of the present disclosure;
[0018] Figure 5 It is a schematic structural diagram of an electronic device suitable for implementing some embodiments of the present disclosure. Detailed Embodiments
[0019] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although some embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. On the contrary, these embodiments are provided to more thoroughly and completely understand the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not used to limit the protection scope of the present disclosure.
[0020] In addition, it should be noted that for the sake of convenience of description, only parts related to the relevant invention are shown in the drawings. Without conflict, the embodiments in the present disclosure and the features in the embodiments can be combined with each other.
[0021] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order of the functions executed by these devices, modules or units or their interdependent relationships.
[0022] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive. Those skilled in the art should understand that unless otherwise clearly specified in the context, it should be understood as "one or more".
[0023] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only for illustrative purposes and are not used to limit the scope of these messages or information.
[0024] The present disclosure will be described in detail below with reference to the drawings and in conjunction with the embodiments.
[0025] Figure 1It is a schematic diagram of an application scenario of the write-off code sending method according to some embodiments of the present disclosure.
[0026] In Figure 1 In the application scenario, first, the computing device 101 can, in response to detecting the warehousing information code 102, obtain the user order information 103 corresponding to the above-mentioned warehousing information code 102. Among them, the above-mentioned user order information 103 includes: the user mobile phone number 1031, the status code 1032, and the pick-up address 1033. Then, the computing device 101 can change the status of the above-mentioned status code 1032 to a status indicating that the item has been warehoused and generate a pick-up code 104. Then, the computing device 101 can generate a verification code 105 according to the above-mentioned pick-up code 104 and the status code 1032 included in the above-mentioned user order information 103. After that, the computing device 101 can perform a first encryption process on the user mobile phone number 1031 and the pick-up address 1033 included in the above-mentioned user order information 103 by using the login password to obtain the target information code 106. Among them, the above-mentioned login password is the password used when the target terminal logs in and is stored in advance. Then, the computing device 101 can perform a second encryption process on the above-mentioned target information code 106 and the above-mentioned verification code 105 by using a write-off code generator to obtain a write-off code 107. Finally, the computing device 101 can send the above-mentioned write-off code 107 to the terminal device 108 corresponding to the user mobile phone number 1031 included in the above-mentioned user order information 103.
[0027] It should be noted that the above-mentioned computing device 101 can be hardware or software. When the computing device is hardware, it can be implemented as a distributed cluster composed of multiple servers or terminal devices, or can be implemented as a single server or a single terminal device. When the computing device is embodied as software, it can be installed in the above-mentioned listed hardware devices. It can be implemented as, for example, multiple software or software modules for providing distributed services, or can be implemented as a single software or software module. No specific limitation is made here.
[0028] It should be understood that Figure 1 The number of computing devices in
[0029] Continuing to refer to Figure 2 , a flow 200 according to some embodiments of the write-off code sending method of the present disclosure is shown. The write-off code sending method includes the following steps:
[0030] Step 201, in response to detecting the warehousing information code, obtain the user order information corresponding to the warehousing information code.
[0031] In some embodiments, the execution subject of the write-off code sending method (such as Figure 1The computing device 101 shown can, in response to detecting the warehousing information code, decrypt the above-mentioned warehousing information code using the pre-stored key of the warehousing information code to obtain the user order information contained in the above-mentioned warehousing information code. Among them, the above-mentioned warehousing information code is an information code generated after encrypting the user order information. The above-mentioned user order information may include: user mobile phone number, status code, and pick-up address. The above-mentioned status code is used to indicate whether the item has been warehoused.
[0032] Step 202, change the status of the status code to the status indicating that the item has been warehoused and generate a pick-up code.
[0033] In some embodiments, the above-mentioned execution entity may change the status of the above-mentioned status code to the status indicating that the item has been warehoused and randomly generate a pick-up number, and connect the shelf number, layer number where the item is placed after warehousing, and the above-mentioned pick-up number using a preset hyphen to obtain a pick-up code. The above-mentioned pick-up code represents the unique storage location of the item.
[0034] Thus, by generating a pick-up code for the warehoused item, the storage location of the warehoused item can be determined according to the pick-up code.
[0035] In some optional implementation manners of some embodiments, the above-mentioned execution entity changing the status of the above-mentioned status code to the status indicating that the item has been warehoused and generating a pick-up code may include the following steps:
[0036] The first step is to obtain the warehousing shelf number input by the above-mentioned target terminal and use the above-mentioned warehousing shelf number as the first serial number.
[0037] Among them, the above-mentioned warehousing shelf number represents the shelf where the item corresponding to the above-mentioned warehousing information code is placed. The above-mentioned warehousing shelf number may be composed of 2 decimal digits. For example, the above-mentioned warehousing shelf number may be 05.
[0038] Thus, by obtaining the warehousing shelf number input by the target terminal, the shelf number where the item is stored after warehousing can be determined.
[0039] The second step is to obtain the warehousing layer number input by the above-mentioned target terminal and use the above-mentioned warehousing layer number as the second serial number.
[0040] Among them, the above-mentioned warehousing layer number represents the number of shelves where the item corresponding to the above-mentioned warehousing information code is placed. The above-mentioned warehousing layer number may be composed of 1 decimal digit. For example, the above-mentioned warehousing layer number may be 2.
[0041] Thus, by obtaining the warehousing layer number input by the target terminal, the number of shelves where the warehoused item is stored after warehousing can be determined.
[0042] Step 3: Determine the warehousing sequence number of the item corresponding to the above warehousing information code according to the warehousing sequence of the item within the preset time period, and use the above warehousing sequence number as the third serial number.
[0043] Among them, the above warehousing sequence number can be composed of 4 decimal digits. The sequence number of the first warehoused item within the above preset time period can be 0001.
[0044] Thus, the unique number of the warehoused item within the preset time period can be determined.
[0045] Step 4: Concatenate the above first serial number, the above second serial number and the above third serial number to obtain a pick-up code.
[0046] The above first serial number, the above second serial number and the above third serial number can be concatenated in sequence to obtain a pick-up code. For example, the above pick-up code can be 0520001.
[0047] Thus, the storage location of the warehoused item can be uniquely determined according to the pick-up code.
[0048] Step 203: Generate a verification code according to the pick-up code and the status code included in the user order information.
[0049] In some embodiments, the above execution entity can first determine the number of digits of the status code included in the above user order information as the number of shifting digits, then convert the above pick-up code from decimal to binary to obtain a binary pick-up code, and then shift each binary digit of the above binary pick-up code to the right by the above number of shifting digits. Among them, when the last digit is shifted to the right by 1 digit, it becomes the first digit on the left of the above binary pick-up code. Finally, convert the shifted binary pick-up code into a decimal number to obtain a verification code.
[0050] Thus, by generating a verification code, the encryption of the pick-up code can be realized, ensuring the security of the pick-up code.
[0051] Step 204: Perform a first encryption process on the user mobile phone number and pick-up address included in the user order information using the login password to obtain a target information code.
[0052] In some embodiments, the above execution entity can use the login password as the key and encrypt the user mobile phone number and pick-up address included in the above user order information using the Advanced Encryption Standard algorithm to obtain a target information code. Among them, the above login password is the password used when the target terminal logs in and is stored in advance.
[0053] Thus, by using the login password of the verification point to encrypt the user's order information, the security of the user order information can be ensured. When the login password of a verification point is cracked, it will not affect the security of the verification codes generated by other verification points.
[0054] In some alternative implementation manners of some embodiments, the above-mentioned execution subject performs first encryption processing on the user mobile phone number and the pick-up address included in the above-mentioned user order information by using the login password to obtain a target information code, which may include the following steps:
[0055] First step, determine the number of digits of the above-mentioned login password as the target number of digits. Wherein, the above-mentioned login password is a decimal number password.
[0056] Second step, round down the quotient of the above-mentioned target number of digits and 2 to obtain the first password number of digits.
[0057] Third step, round up the quotient of the above-mentioned target number of digits and 2 to obtain the second password number of digits;
[0058] Fourth step, determine the login password of the first above-mentioned number of digits of the above-mentioned login password as the front password.
[0059] Fifth step, determine the login password of the last above-mentioned number of digits of the above-mentioned login password as the back password.
[0060] Sixth step, perform binary conversion processing on the above-mentioned front password and the above-mentioned back password respectively to obtain a front binary password and a back binary password.
[0061] The decimal front password and the decimal back password can be respectively converted into a binary front password and a binary back password to obtain a front binary password and a back binary password.
[0062] Thus, two encryption keys can be determined according to the login password.
[0063] In some alternative implementation manners of some embodiments, the above-mentioned execution subject performs first encryption processing on the user mobile phone number and the pick-up address included in the above-mentioned user order information by using the login password to obtain a target information code, and may also include the following steps:
[0064] First step, perform mapping processing on the pick-up address included in the above-mentioned order information by using an address mapping relationship to obtain an address information code.
[0065] Wherein, the above-mentioned address mapping relationship may be the correspondence between the pick-up address included in the above-mentioned order information and the verification point code. The above-mentioned verification point code is a decimal number representing the verification point address that is preset and stored. According to the address mapping relationship, the pick-up address included in the above-mentioned order information can be converted into the verification point code of the verification point where the pick-up address included in the above-mentioned order information is located, and the above-mentioned verification point code is determined as the address information code.
[0066] Second step, determine the number of digits of the user mobile phone number included in the above-mentioned user order information as the first number of digits.
[0067] Step 3: Using the above address information code as a random number seed, generate a first random number.
[0068] The above address information code can be used as a random number seed, and a first random number can be generated using a random number function. Among them, the number of digits of the above first random number is the same as the above first number of digits. The above random number function can be the rand() function.
[0069] Thus, encryption of the address information code can be achieved.
[0070] Step 4: Perform binary conversion processing on the above first random number to obtain a second random number.
[0071] Step 5: Perform binary conversion processing on the user mobile phone number included in the above user order information to obtain a binary user mobile phone number.
[0072] Step 6: Perform exclusive OR processing on the above second random number and the above binary user mobile phone number to obtain a first information code.
[0073] Thus, encryption of the user mobile phone number included in the user order information can be achieved.
[0074] Step 7: Using the above pre - password as a random number seed, generate a third random number.
[0075] The above pre - password can be used as a random number seed, and a third random number can be generated using a random number function. Among them, the number of digits of the above third random number is the same as the above first number of digits. The above random number function can be the rand() function.
[0076] Thus, encryption of the pre - password can be achieved.
[0077] Step 8: Perform binary conversion processing on the above third random number to obtain a fourth random number.
[0078] Step 9: Perform exclusive OR processing on the above fourth random number and the above first information code to obtain a target information code.
[0079] Thus, by using the encrypted login password to encrypt the user order information, the security of the user order information can be improved.
[0080] Step 205: Use a verification code generator to perform second - level encryption processing on the target information code and the verification code to obtain a verification code.
[0081] In some embodiments, the above-mentioned execution entity may first perform a decimal conversion process on the above-mentioned target information code to obtain a decimal target information code, then add the above-mentioned decimal target information code to the above-mentioned verification code to obtain an intermediate number, and finally, use a one-dimensional code generator to convert the above-mentioned intermediate number into a one-dimensional code, and use the above-mentioned one-dimensional code as the verification code for cancellation.
[0082] Thus, by using a verification code generator to encrypt the encrypted order information again, the verification code is displayed in ciphertext form, improving the security of the verification code and reducing the probability of the item being misappropriated.
[0083] In some optional implementation manners of some embodiments, when the above-mentioned execution entity uses a verification code generator to perform a second encryption process on the above-mentioned target information code and the above-mentioned verification code to obtain a verification code for cancellation, the following steps may be included:
[0084] First step, determine the number of digits of the above-mentioned verification code as the second number of digits.
[0085] Second step, use the above-mentioned post-password as a random number seed to generate a fifth random number.
[0086] The above-mentioned post-password may be used as a random number seed, and a fifth random number is generated by using a random number function. Among them, the number of digits of the above-mentioned fifth random number is the same as the above-mentioned second number of digits. The above-mentioned random number function may be the rand() function.
[0087] Thus, the encryption of the post-password can be realized.
[0088] Third step, perform a binary conversion process on the above-mentioned fifth random number to obtain a sixth random number.
[0089] Fourth step, perform an exclusive OR operation on the above-mentioned sixth random number and the above-mentioned bit-transformed order code to obtain a second information code.
[0090] Thus, by encrypting the verification code using the login password, the security of the user's order information is further enhanced.
[0091] In some optional implementation manners of some embodiments, when the above-mentioned execution entity uses a verification code generator to perform a second encryption process on the above-mentioned target information code and the above-mentioned verification code to obtain a verification code for cancellation, the following steps may also be included:
[0092] First step, perform a decimal conversion process on the above-mentioned target information code to obtain a first verification information code for cancellation.
[0093] Second step, perform a decimal conversion process on the above-mentioned second information code to obtain a second verification information code for cancellation.
[0094] Third step, perform a splicing process on the above-mentioned first verification information code for cancellation and the second verification information code for cancellation to obtain a verification information code for cancellation.
[0095] Thus, by using different encryption algorithms for different user order information, the security of user order information is further improved.
[0096] Step 4: Use a verification code generator to perform conversion processing on the above verification information code to obtain a verification code.
[0097] A QR code generator can be used to perform conversion processing on the above verification information code to obtain a verification code.
[0098] Thus, by performing conversion processing on the plaintext verification information code, the verification information code is displayed in ciphertext form, which can reduce the probability of leakage of the verification information code.
[0099] Step 206: Send the verification code to the terminal device corresponding to the user mobile phone number included in the user order information.
[0100] In some embodiments, the above execution subject may send the above verification code to the terminal device corresponding to the user mobile phone number included in the above user order information.
[0101] Thus, by sending the verification code to the corresponding user terminal, the legitimacy of the user identity receiving the verification code can be ensured.
[0102] The above embodiments of the present disclosure have the following beneficial effects: Through the verification code sending method of some embodiments of the present disclosure, different verification points can use different keys to generate verification codes. When the key of one verification point is cracked, it will not affect the security of the verification codes generated by other verification points, improving the overall security of the verification codes and reducing the probability of the item being misappropriated. Specifically, the reason for the relatively low overall security of the verification codes is that different verification points use the same key to generate verification codes. After the key and decryption algorithm are cracked, illegal users can forge and decrypt the verification codes generated by all verification points. Based on this, the verification code sending method of some embodiments of the present disclosure first, in response to detecting the warehousing information code, obtains the user order information corresponding to the warehousing information code, where the user order information includes: user mobile phone number, status code, and pick-up address. Then, change the status of the status code to indicate that the item has been warehoused and generate a pick-up code. Thus, by generating a pick-up code for the warehoused item, the storage location of the warehoused item can be determined according to the pick-up code. Then, according to the pick-up code and the status code included in the user order information, generate a verification code. Thus, by generating a verification code, the encryption of the pick-up code can be realized, ensuring the security of the pick-up code. After that, perform a first encryption process on the user mobile phone number and pick-up address included in the user order information using the login password to obtain a target information code, where the login password is the password used when the target terminal logs in and is pre-stored. Thus, by using the login password of the verification point to encrypt the user's order information, the security of the user order information can be ensured. When the login password of one verification point is cracked, it will not affect the security of the verification codes generated by other verification points. Then, use a verification code generator to perform a second encryption process on the target information code and the verification code to obtain a verification code. Thus, by using the verification code generator to encrypt the encrypted order information again, the verification code is displayed in ciphertext form, improving the security of the verification code and reducing the probability of the item being misappropriated. Finally, send the verification code to the terminal device corresponding to the user mobile phone number included in the user order information. Thus, by sending the verification code to the corresponding user terminal, the legitimacy of the user receiving the verification code can be ensured. Also, because different keys are used to generate verification codes at different verification points, when the key of one verification point is cracked, it will not affect the security of the verification codes generated by other verification points, thereby improving the overall security of the verification codes.
[0103] Further referring to Figure 3 , which shows the flow 300 of some other embodiments of the verification code sending method. The flow 300 of this web page generation method includes the following steps:
[0104] Step 301, in response to detecting the warehousing information code, obtain the user order information corresponding to the warehousing information code.
[0105] Step 302: Change the status code to a status indicating that the item has been warehoused and generate a pick-up code.
[0106] In some embodiments, the specific implementation manners of steps 301-302 and the resulting technical effects can refer to Figure 2 steps 201-202 in the corresponding embodiments, which will not be elaborated here.
[0107] Step 303: Concatenate the pick-up code and the status code included in the user order information to obtain an order code.
[0108] In some embodiments, the above execution entity may sequentially concatenate the above pick-up code and the status code included in the above user order information to obtain an order code. Among them, the above pick-up code may be composed of 7 decimal digits. The above status code may be composed of 1 decimal digit.
[0109] Step 304: Perform binary conversion processing on the order code to obtain a binary order code.
[0110] In some embodiments, the above execution entity may convert the decimal order code into a binary order code to obtain a binary order code.
[0111] Step 305: Perform bit transformation processing on the binary order code to obtain a bit-transformed order code.
[0112] In some embodiments, the above execution entity may perform bit transformation on the numbers in the above binary order code according to a preset position transformation information set to obtain a bit-transformed order code. Among them, the position transformation information in the above position transformation information set includes a front position and a back position. The position transformation information in the above position transformation information set indicates that the number in the front position bit of the above binary order code is placed in the back position bit of the above bit-transformed order code. The above position transformation information set may be {(18, 1), (10, 2), (2, 3), (20, 4), (12, 5), (4, 6), (22, 7), (14, 8), (6, 9), (24, 10), (16, 11), (8, 12), (17, 13), (9, 14), (1, 15), (19, 16), (11, 17), (3, 18), (21, 19), (13, 20), (5, 21), (23, 22), (15, 23), (7, 24)}. The above (18, 1) means that the number in the 18th bit of the above binary order code is placed in the 1st bit of the above bit-transformed order code.
[0113] Thus, encryption of the pick-up code and the status code included in the user order information can be achieved.
[0114] Step 306: Perform decimal conversion processing on the bit-transformed order code to obtain a verification code.
[0115] In some embodiments, the above execution entity can perform decimal conversion processing on the above bit-transformed order code to obtain a verification code.
[0116] Thus, by encrypting the pickup code, the pickup code exists in the form of ciphertext, which is not likely to cause leakage and forgery of the pickup code, thereby improving the security of the verification code and reducing the probability of the item being misappropriated.
[0117] Steps 303-306 and their related content are an inventive point of the embodiments of the present disclosure, which solve the second technical problem mentioned in the background art, that is, "the pickup code with a specific number of digits belongs to a plain code, which is likely to cause leakage of the pickup code, thereby resulting in relatively low security of the verification code and increasing the probability of the item being misappropriated". The factors that lead to relatively low security of the verification code and the item being easily misappropriated are as follows: the pickup code with a specific number of digits belongs to a plain code, which is likely to cause leakage of the pickup code. If the above factors are solved, the security of the verification code can be improved. To achieve this effect, the present disclosure encrypts the pickup code with a specific number of digits so that the pickup code exists in the form of ciphertext. Therefore, the security of the verification code is improved and the probability of the item being misappropriated is reduced.
[0118] Step 307: Perform first encryption processing on the user mobile phone number and pickup address included in the user order information using the login password to obtain a target information code.
[0119] Step 308: Use a verification code generator to perform second encryption processing on the target information code and the verification code to obtain a verification code.
[0120] Step 309: Send the verification code to the terminal device corresponding to the user mobile phone number included in the user order information.
[0121] In some embodiments, the specific implementation manners and the technical effects brought by steps 307-309 can refer to Figure 2 Steps 204-206 in the corresponding embodiments, which will not be elaborated here.
[0122] From Figure 3 it can be seen that compared with the description of Figure 2 the corresponding embodiments, Figure 3 the process 300 of the verification code sending method in the corresponding embodiments reflects the steps of expanding the generation of the verification code. Thus, the solutions described in these embodiments encrypt the pickup code so that the pickup code exists in the form of ciphertext, which is not likely to cause leakage of the pickup code, thereby improving the security of the verification code and reducing the probability of the item being misappropriated.
[0123] Further referring to Figure 4, as an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a verification code sending device, and these device embodiments correspond to Figure 2 the method embodiments shown. The device can be specifically applied to various electronic devices.
[0124] As Figure 4 shown, the verification code sending device 400 of some embodiments includes: an acquisition unit 401, a first generation unit 402, a second generation unit 403, a first encryption unit 404, a second encryption unit 405, and a sending unit 406. Among them, the acquisition unit 401 is configured to, in response to detecting the warehousing information code, acquire the user order information corresponding to the above warehousing information code, where the above user order information includes: the user mobile phone number, the status code, and the pickup address; the first generation unit 402 is configured to change the status of the above status code to a status indicating that the item has been warehoused and generate a pickup code; the second generation unit 403 is configured to generate a verification code according to the above pickup code and the status code included in the above user order information; the first encryption unit 404 is configured to perform a first encryption process on the user mobile phone number and the pickup address included in the above user order information by using the login password to obtain a target information code, where the above login password is the password used when the target terminal logs in and is pre-stored; the second encryption unit 405 is configured to perform a second encryption process on the above target information code and the above verification code by using a verification code generator to obtain a verification code; and the sending unit 406 is configured to send the above verification code to the terminal device corresponding to the user mobile phone number included in the above user order information.
[0125] It can be understood that the various units described in the device 400 correspond to the respective steps in the method described with reference to Figure 2 Therefore, the operations, features, and beneficial effects described above for the method also apply to the device 400 and the units included therein, and will not be elaborated here.
[0126] Next, refer to Figure 5 , which shows a schematic structural diagram of an electronic device (such as Figure 1 the computing device 101 shown) 500 suitable for implementing some embodiments of the present disclosure. Figure 5 The electronic device shown is only an example and should not impose any limitations on the functions and usage ranges of the embodiments of the present disclosure.
[0127] As Figure 5As shown, the electronic device 500 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 501, which may perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0128] Generally, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the electronic device 500 to communicate with other devices wirelessly or wiredly to exchange data. Although Figure 5 the electronic device 500 with various devices is shown, it should be understood that it is not required to implement or have all the shown devices. Instead, more or fewer devices may be implemented or had. Figure 5 Each block shown in the figure may represent one device or, as needed, multiple devices.
[0129] Specifically, according to some embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, some embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program codes for performing the methods shown in the flowcharts. In such some embodiments, the computer program may be downloaded and installed from a network via the communication device 509, or installed from the storage device 508, or installed from the ROM 502. When the computer program is executed by the processing device 501, the above functions defined in the methods of some embodiments of the present disclosure are performed.
[0130] It should be noted that the computer-readable media described in some embodiments of the present disclosure may be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present disclosure, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In some embodiments of the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium may also be any computer-readable medium other than the computer-readable storage medium, which can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0131] In some embodiments, the client and the server may communicate using any currently known or future-developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include local area networks ("LANs"), wide area networks ("WANs"), the Internet (e.g., the Internet), and end-to-end networks (e.g., ad hoc end-to-end networks), as well as any currently known or future-developed networks.
[0132] The above computer-readable medium may be included in the above electronic device; or it may exist separately without being assembled into the electronic device. The above computer-readable medium carries one or more programs. When the above one or more programs are executed by the electronic device, the electronic device is caused to: in response to detecting the warehousing information code, obtain the user order information corresponding to the above warehousing information code, wherein the above user order information includes: the user's mobile phone number, the status code, and the pick-up address. Change the status of the above status code to a status indicating that the item has been warehoused and generate a pick-up code. Generate a verification code according to the above pick-up code and the status code included in the above user order information. Perform a first encryption process on the user's mobile phone number and the pick-up address included in the above user order information using the login password to obtain a target information code, wherein the above login password is the password used when the target terminal logs in and is pre-stored. Use a verification code generator to perform a second encryption process on the above target information code and the above verification code to obtain a verification code. Send the above verification code to the terminal device corresponding to the user's mobile phone number included in the above user order information.
[0133] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages or combinations thereof. The above programming languages include object-oriented programming languages - such as Java, Smalltalk, C++; and also include conventional procedural programming languages - such as the "C" language or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, executed as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network - including a local area network (LAN) or a wide area network (WAN) - or may be connected to an external computer (for example, by using an Internet service provider to connect through the Internet).
[0134] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a segment of a program, or a part of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, as well as combinations of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0135] The units described in some embodiments of the present disclosure can be implemented in software or in hardware. The described units can also be provided in a processor. For example, it can be described as: a processor includes an acquisition unit, a first generation unit, a second generation unit, a first encryption unit, a second encryption unit, and a sending unit. Among them, the names of these units do not constitute a limitation on the unit itself in some cases. For example, the sending unit can also be described as "the unit that sends the verification code to the terminal device corresponding to the user mobile phone number included in the user order information".
[0136] The functions described above can be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that can be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on a chip (SOCs), complex programmable logic devices (CPLDs), and so on.
[0137] The above description is only some preferred embodiments of the present disclosure and an explanation of the applied technical principles. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by the specific combination of the above technical features, and should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above inventive concept. For example, the technical solutions formed by mutually replacing the above features with the (but not limited to) technical features having similar functions disclosed in the embodiments of the present disclosure.
Claims
1. A method for sending a verification code, comprising: In response to detecting an inbound information code, obtaining user order information corresponding to the inbound information code, wherein the user order information includes: a user mobile phone number, a status code, and a pick-up address; Changing the status of the status code to a status indicating that the item has been warehoused and generating a pick-up code; Generating a verification code according to the pick-up code and the status code included in the user order information; Performing a first encryption process on the user mobile phone number and the pick-up address included in the user order information by using a login password to obtain a target information code, wherein the login password is a password used when a target terminal logs in and is pre-stored; Performing a second encryption process on the target information code and the verification code by using a verification code generator to obtain a verification code; Sending the verification code to a terminal device corresponding to the user mobile phone number included in the user order information.
2. The method according to claim 1, wherein, The changing the status of the status code to a status indicating that the item has been warehoused and generating a pick-up code includes: Obtaining an inbound shelf number input by the target terminal, and using the inbound shelf number as a first serial number, wherein the inbound shelf number represents a shelf on which an item corresponding to the inbound information code is placed; Obtaining an inbound layer number input by the target terminal, and using the inbound layer number as a second serial number, wherein the inbound layer number represents the number of layers of a shelf on which an item corresponding to the inbound information code is placed; Determining an inbound sequence number of an item corresponding to the inbound information code according to the inbound sequence of items within a preset time period, and using the inbound sequence number as a third serial number; Performing a splicing process on the first serial number, the second serial number, and the third serial number to obtain a pick-up code.
3. The method according to claim 2, wherein, The generating a verification code according to the pick-up code and the status code included in the user order information includes: Performing a splicing process on the pick-up code and the status code included in the user order information to obtain an order code; Performing a binary conversion process on the order code to obtain a binary order code; Performing a bit transformation process on the binary order code to obtain a bit-transformed order code; Performing a decimal conversion process on the bit-transformed order code to obtain a verification code.
4. The method according to claim 3, wherein The performing a first encryption process on the user mobile phone number and the pick-up address included in the user order information by using a login password to obtain a target information code includes: Determining the number of digits of the login password as a target number of digits; Rounding down the quotient of the target number of digits and 2 to obtain a first password number of digits; Rounding up the quotient of the target number of digits and 2 to obtain a second password number of digits; Determining the first password number of digits of the login password at the front as a front password; Determining the second password number of digits of the login password at the back as a back password; Performing a binary conversion process on the front password and the back password respectively to obtain a front binary password and a back binary password.
5. The method according to claim 4, wherein, The performing a first encryption process on the user mobile phone number and the pick-up address included in the user order information by using a login password to obtain a target information code further includes: Performing a mapping process on the pick-up address included in the order information by using an address mapping relationship to obtain an address information code; Determine the number of digits of the user mobile phone number included in the user order information as the first number; Using the address information code as a random number seed, generate a first random number, where the number of digits of the first random number is the same as the first number; Perform binary conversion processing on the first random number to obtain a second random number; Perform binary conversion processing on the user mobile phone number included in the user order information to obtain a binary user mobile phone number; Perform exclusive OR processing on the second random number and the binary user mobile phone number to obtain a first information code; Using the previous password as a random number seed, generate a third random number, where the number of digits of the third random number is the same as the first number; Perform binary conversion processing on the third random number to obtain a fourth random number; Perform exclusive OR processing on the fourth random number and the first information code to obtain a target information code.
6. The method according to claim 5, wherein, The step of using a verification code generator to perform second encryption processing on the target information code and the verification code to obtain a verification code includes: Determine the number of digits of the verification code as the second number; Using the subsequent password as a random number seed, generate a fifth random number, where the number of digits of the fifth random number is the same as the second number; Perform binary conversion processing on the fifth random number to obtain a sixth random number; Perform exclusive OR processing on the sixth random number and the bit-transformed order code to obtain a second information code.
7. The method according to claim 6, wherein The step of using a verification code generator to perform second encryption processing on the target information code and the verification code to obtain a verification code further includes: Perform decimal conversion processing on the target information code to obtain a first verification information code; Perform decimal conversion processing on the second information code to obtain a second verification information code; Perform splicing processing on the first verification information code and the second verification information code to obtain a verification information code; Use a verification code generator to perform conversion processing on the verification information code to obtain a verification code.
8. A verification code sending device, comprising: An acquisition unit, configured to acquire user order information corresponding to the warehousing information code in response to detecting the warehousing information code, where the user order information includes: a user mobile phone number, a status code, and a pickup address; A first generation unit, configured to change the status of the status code to indicate that the item has been warehoused and generate a pickup code; A second generation unit, configured to generate a verification code according to the pickup code and the status code included in the user order information; A first encryption unit, configured to perform first encryption processing on the user mobile phone number and the pickup address included in the user order information using a login password to obtain a target information code, where the login password is the password used when the target terminal logs in and is pre-stored; A second encryption unit, configured to use a verification code generator to perform second encryption processing on the target information code and the verification code to obtain a verification code; A sending unit, configured to send the verification code to the terminal device corresponding to the user mobile phone number included in the user order information.
9. An electronic device, comprising: One or more processors; A storage device, on which one or more programs are stored; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
10. A computer-readable medium having a computer program stored thereon, wherein, When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Closed-loop write-off system and method utilizing sorted composite verification codes
CN109034782A
Pickup code generation method and electronic equipment
CN109961258A
Use method of security account, equipment and storage medium
CN112615827A