Random verification code processing method, device, computer equipment and storage medium
By generating 62-digit random verification codes with combinations of numbers and letters according to business scenario requirements, the problem of errors in verification code input in logistics order recognition is solved, and order processing efficiency and accuracy are improved.
Patent Information
- Application Number
- CN202011181507.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-29
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2040-10-29
AI Technical Summary
In the logistics field, conventional binary random codes are prone to input errors when identifying business orders, resulting in low efficiency in business order processing.
By obtaining the business scenario requirements value, the lengths of the timestamp bits, data center sequence number bits, machine sequence number bits and sequence number bits in the random verification code are determined, and the random verification code associated with the business order is generated. The snowflake algorithm is used to generate a 62-digit string of combinations of numbers and letters, and the verification code is displayed at the order collection and dispatch terminal to simplify the verification process.
It improves the efficiency and accuracy of business order processing, reduces the character length of random verification codes, simplifies verification operations, and ensures the uniqueness of verification codes and orders.
Smart Images

Figure CN114429319B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of logistics data information technology, and in particular to a random verification code processing method, device, computer equipment and storage medium. Background Art
[0002] With the rapid development of computer and internet technologies, conventional systems require identity verification through login. In the non-physical express delivery scenario of the logistics sector, identifying logistics express orders requires obtaining additional order-related information to conduct business operations. In scenarios where the operator is uncertain, using an associated order random code for identification and business operations becomes a feasible solution. The random code is associated with the order, ensuring that each random code corresponds to unique order information. During business operations, the random code is entered for identity verification to complete the order operation.
[0003] However, when business orders are identified by conventional binary random codes, it is easy to have the problem of inputting errors of the conventional binary random codes, thereby resulting in low efficiency in business order processing. Summary of the Invention
[0004] Based on this, it is necessary to provide a random verification code processing method, device, computer equipment and storage medium that can improve the efficiency of random verification code processing in order to address the above technical problems.
[0005] A random verification code processing method, the method comprising:
[0006] Obtain the business scenario's demand value for random verification codes;
[0007] Determine the length of the timestamp bit, the length of the data center serial number bit, the length of the machine serial number bit, and the length of the sequence number bit in the random verification code according to the required value;
[0008] When a request for generating a business order is received, a random verification code associated with the business order is generated; the random verification code includes a timestamp bit, the data center serial number bit, a machine serial number bit, and a sequence number.
[0009] In one embodiment, determining the length of the timestamp bit, the length of the data center serial number bit, the length of the machine serial number bit, and the length of the sequence number bit in the random verification code according to the demand value includes:
[0010] Determine the input initial values of the timestamp bit, data center serial number bit, machine serial number bit, and sequence number bit in the random verification code according to the required value;
[0011] Each of the initial input values is occupied in a preset combination to determine the length of the timestamp bit, the length of the data center serial number bit, the length of the machine serial number bit and the length of the sequence number bit in the random verification code.
[0012] In one embodiment, when receiving a request to generate a business order, generating a random verification code associated with the business order includes:
[0013] When receiving a request to generate a business order, a decimal random verification code is generated that carries the timestamp, data center serial number, machine serial number, and sequence number.
[0014] The decimal random verification code is converted into a 62-hexadecimal character string composed of 10 Arabic numerals, 26 lowercase letters, and 26 uppercase letters to obtain a random verification code.
[0015] In one embodiment, the method further comprises:
[0016] Detecting similarities between characters in the random verification code;
[0017] When there are two character strings with a similarity of a preset value, the two characters are deleted from the random code character string to obtain a random verification code with similar characters deleted.
[0018] In one embodiment, detecting the similarity between characters in the random code string includes:
[0019] Parsing the random verification code to obtain all characters in the random verification code;
[0020] A similarity test is performed on each of the characters according to the detection strategy data to obtain the similarity between the characters in the random verification code.
[0021] In one embodiment, the method further comprises:
[0022] Obtaining order information of the business order, sending the business order to an order receiving and dispatching terminal corresponding to the address information in the order information, and displaying a random verification code of the business order on the order receiving and dispatching terminal;
[0023] Receive a verification request sent by the order receiving and dispatching terminal, and verify the random verification code according to the verification request.
[0024] In one embodiment, receiving a verification request sent by the order receiving and dispatching terminal, and verifying the random verification code according to the verification request, includes:
[0025] Obtaining the character length of the random verification code;
[0026] When the character length is within a preset length range, detecting whether the random verification code exists in the database;
[0027] When the random verification code exists in the database, a processing instruction for the business order is sent to the order receiving and dispatching terminal; the processing instruction is used to instruct the order receiving and dispatching terminal to process the business order.
[0028] A random verification code processing device, the device comprising:
[0029] The acquisition module is used to obtain the required value of the random verification code for the business scenario;
[0030] A determination module, configured to determine the length of a timestamp bit, a data center serial number bit, a machine serial number bit, and a sequence number bit in the random verification code according to the required value;
[0031] The generation module is used to generate a random verification code associated with the business order when receiving a business order generation request; the random verification code includes a timestamp bit, the data center serial number bit, the machine serial number bit and a sequence number.
[0032] A computer device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0033] Obtain the business scenario's demand value for random verification codes;
[0034] Determine the length of the timestamp bit, the length of the data center serial number bit, the length of the machine serial number bit, and the length of the sequence number bit in the random verification code according to the required value;
[0035] When a request for generating a business order is received, a random verification code associated with the business order is generated; the random verification code includes a timestamp bit, the data center serial number bit, a machine serial number bit, and a sequence number.
[0036] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:
[0037] Obtain the business scenario's demand value for random verification codes;
[0038] Determine the length of the timestamp bit, the length of the data center serial number bit, the length of the machine serial number bit, and the length of the sequence number bit in the random verification code according to the required value;
[0039] When a request for generating a business order is received, a random verification code associated with the business order is generated; the random verification code includes a timestamp bit, the data center serial number bit, a machine serial number bit, and a sequence number.
[0040] The above-mentioned random verification code processing method, device, computer equipment and storage medium obtain the demand value of the random verification code for the business scenario; determine the length of the timestamp bit, the length of the data center serial number bit, the length of the machine serial number bit and the length of the sequence number bit in the random verification code according to the demand value; when a request to generate a business order is received, a random verification code associated with the business order is generated; the random verification code includes the timestamp bit, the data center serial number bit, the machine serial number bit and the sequence number; that is, the length of the random verification code is determined according to the needs of the actual business scenario to avoid the generated random verification code being too long; the generated random verification code is associated with the business order to ensure the uniqueness of the random verification code associated with the business order, thereby improving the low efficiency of business order processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 A diagram illustrating an application environment of a random verification code processing method in one embodiment;
[0042] Figure 2 1 is a flow chart of a random verification code processing method according to an embodiment;
[0043] Figure 3 A schematic diagram of the structure of a snowflake algorithm in one embodiment;
[0044] Figure 4 A binary structure diagram of a random verification code in one embodiment;
[0045] Figure 5 Schematic diagram of a flow chart of random verification code processing steps in one embodiment;
[0046] Figure 6 2 is a flow chart of a random verification code processing method according to another embodiment;
[0047] Figure 7 is a structural block diagram of a random verification code processing device in one embodiment;
[0048] Figure 8 is a structural block diagram of a random verification code processing device in another embodiment;
[0049] Figure 9 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0051] The random verification code processing method provided in this application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. When the terminal 102 obtains the demand value of the business scenario for the random verification code through the network; the length of the timestamp bit, the length of the data center sequence number bit, the length of the machine sequence number bit and the length of the sequence number bit in the random verification code are determined according to the demand value; when a request to generate a business order is received, a random verification code associated with the business order is generated; the random verification code includes a timestamp bit, a data center sequence number bit, a machine sequence number bit and a sequence number. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers and portable wearable devices. The server 104 can be implemented as an independent server or a server cluster consisting of multiple servers.
[0052] In one embodiment, Figure 2 As shown, a random verification code processing method is provided, which is applied to Figure 1 The following steps are used as an example to illustrate the terminal in the business system terminal:
[0053] Step 202: Obtain the demand value of the random verification code for the business scenario.
[0054] Among them, the business volume in different business scenarios is different, and the demand value for random verification codes is also different.
[0055] Step 204 : Determine the length of the timestamp bit, the length of the data center serial number bit, the length of the machine serial number bit, and the length of the sequence number bit in the random verification code according to the required value.
[0056] The random verification code is a credential used to verify the validity of a business order. The random verification code is unique and has a one-to-one correspondence with the business order. The random verification code is a unique string of numbers and letters generated using a binary placeholder method based on the snowflake algorithm; that is, a string of numbers and letters is obtained through binary shift calculation. Figure 3The figure shows a schematic diagram of the principle structure of the snowflake algorithm. The snowflake algorithm principle includes a 1-bit sign bit, a 41-bit timestamp, a 10-bit work machine ID and a 12-bit serial number. The 1-bit sign bit, 1 represents a negative number, 0 represents a positive number, and the generated ID is generally an integer, so the highest bit is fixed to 0; the 41-bit timestamp is used to record the timestamp in milliseconds, and the value range that can be represented is: 0 to 2^41–1, which is converted into years; the 10-bit work machine ID is used to record the work machine ID, which can be deployed on each node, with 5 bits for the computer room ID and 5 bits for the machine ID; the 12-bit serial number is used to record different IDs generated by the same machine in the same millisecond; the snowflake algorithm principle is an existing algorithm and will not be described in detail here.
[0057] like Figure 4 The figure shows a binary structure diagram of a random verification code generated based on the snowflake algorithm in one embodiment. The code includes a timestamp, a data center sequence number, a machine node sequence number, and a sequence number. The corresponding binary placeholders are combined, consisting of "timestamp binary placeholder + data center binary placeholder + machine node binary placeholder + sequence number binary placeholder." The timestamp is used to record time, in milliseconds, and is the difference between the current timestamp and a fixed timestamp. The data center bit is used to store the number of the application server's computer room. Conventional data centers store servers in different locations, and the data center bits are numbered using the computer room number, but are not limited to starting from 1. The machine node bit is used to record the number of the deployed application server, and the application server can be numbered starting from 1, but are not limited to starting from 1. The sequence number bit is used to record the digital sequence number that can be generated by the same machine in the same millisecond, and can be numbered starting from 1, for example, 1, 2, 3, etc. The business scenario's demand for random verification codes can determine the requirements for the computer room and deployed application servers. Based on these requirements, the maximum value of the data center bit, the maximum number of nodes in the machine bit, the maximum sequence number, and the fixed initial timestamp are determined.
[0058] Specifically, the business system terminal obtains the business volume of the business scenario, determines the demand value of the corresponding random verification code based on the business volume, and determines the length of the timestamp bit, the length of the data center serial number bit, the length of the machine serial number bit, and the length of the sequence number bit in the random verification code through the demand value; determines the length of the random verification code based on the demand value to avoid the random verification code being missing due to being too long, thereby ensuring the integrity of the data.
[0059] Step 206: When a request to generate a business order is received, a random verification code associated with the business order is generated.
[0060] The generated random verification code includes a timestamp bit, a data center serial number bit, a machine serial number bit, and a sequence number.
[0061] Specifically, when the business order terminal receives a request to generate a business order, based on the principle of the snowflake algorithm and the determined length of the timestamp bit, the length of the data center serial number bit, the length of the machine serial number bit and the length of the sequence number bit in the random verification code, the values of the input data center bit and the machine serial number bit and the current time are assembled in the order of timestamp, data center, machine node and sequence number to generate a random verification code associated with the business order, and the random verification code and the association between the random verification code and the associated business order are saved in the database in the form of a table.
[0062] In the above-mentioned random verification code processing method, the demand value of the business scenario for the random verification code is obtained; the length of the timestamp bit, the length of the data center serial number bit, the length of the machine serial number bit and the length of the sequence number bit in the random verification code are determined according to the demand value; when a request to generate a business order is received, a random verification code associated with the business order is generated; the random verification code includes the timestamp bit, the data center serial number bit, the machine serial number bit and the sequence number; that is, the length of the random verification code is determined according to the needs of the actual business scenario to avoid the generated random verification code being too long; the generated random verification code is associated with the business order to ensure the uniqueness of the random verification code associated with the business order, thereby improving the low efficiency of business order processing.
[0063] In one embodiment, Figure 5 As shown, a random verification code processing step is provided, and the method is applied to Figure 1 The following steps are used as an example to illustrate the terminal:
[0064] Step 502: Obtain the demand value of the random verification code for the business scenario.
[0065] Step 504 : Determine the length of the timestamp bit, the length of the data center serial number bit, the length of the machine serial number bit, and the length of the sequence number bit in the random verification code according to the required value.
[0066] Specifically, according to the characteristics of the business scenario, the incoming initial values of the timestamp bit, data center serial number bit, machine serial number bit and sequence number bit in the random verification code are determined; the length of the timestamp bit, the length of the data center serial number bit, the length of the machine serial number bit and the length of the sequence number bit in the random verification code are determined by each initial incoming value.
[0067] Step 506: When a request to generate a business order is received, a random verification code associated with the business order is generated.
[0068] Specifically, when a request to generate a business order is received, a binary random verification code is generated that carries the timestamp bit, data center serial number bit, machine serial number bit and sequence number. The binary random verification code is converted into a decimal random verification code through bit shift calculation, and the decimal random verification code is converted into a 62-hexadecimal character string composed of 10 Arabic numerals, 26 lowercase letters, and 26 uppercase letters to obtain a random verification code, thereby reducing the character length of the random verification code.
[0069] Step 508: Obtain order information of the business order, send the business order to the order receiving and dispatching terminal corresponding to the address information in the order information, and display a random verification code of the business order on the order receiving and dispatching terminal.
[0070] Optionally, in one embodiment, a random verification code is parsed to obtain all characters in the random verification code; similarity detection is performed on each character according to detection strategy data to obtain similarity between characters in the random verification code; when two character strings exist whose similarity is a preset value, the two characters are deleted from the random code character string to obtain a random verification code with similar characters deleted. The detection strategy data is predefined similar characters, such as "i" and "1", "0" and "O". By detecting similar characters in the random verification code, similar characters are eliminated from the generated random verification code, thereby avoiding random verification code input errors, which would result in long random verification code processing time and reduced business order processing efficiency.
[0071] Step 510: Receive a verification request sent by the order receiving and dispatching terminal, and verify the random verification code according to the verification request.
[0072] Specifically, upon receiving a verification request from an order receiving and dispatching terminal, the character length of the random verification code is obtained and tested. If the character length is within a preset length range, the verification request is checked to see if the random verification code exists in a database. If the random verification code exists in the database, a processing instruction for the business order is sent to the order receiving and dispatching terminal. The processing instruction is used to instruct the order receiving and dispatching terminal to process the business order. The preset length range may be, but is not limited to, 7-9 characters. If the business order is a shipping order, a staff member enters the random verification code for the shipping order through the order receiving and dispatching terminal interface. If the random verification code for the shipping order exists in the database, the staff member at the order receiving and dispatching terminal will receive the shipping order.
[0073] In the above-mentioned random verification code processing steps, the length of the timestamp bit, the length of the data center serial number bit, the length of the machine serial number bit and the length of the sequence number bit in the random verification code are determined according to the demand value of the random verification code in the business scenario. When a request to generate a business order is received, a random verification code is generated in a digital and alphabetic combination system carrying the timestamp bit, the data center serial number bit, the machine serial number bit and the sequence number; the order information of the business order is obtained, the business order is sent to the order receiving and delivery terminal corresponding to the address information in the order information, and the random verification code of the business order is displayed on the order receiving and delivery terminal; the verification request sent by the order receiving and delivery terminal is received, and the random verification code is tested based on the character length of the random verification code and whether the random verification code exists in the detection database. When the character length of the random verification code and the presence of the random verification code in the data are met, the order data of the business order is sent to the order receiving and delivery terminal so that the order receiving and delivery terminal can perform business processing on the business order. The length of the random verification code is determined according to the characteristics of the business scenario to reduce character space, and a random verification code is generated as a combination of alphanumeric characters, thereby reducing the character length of the random verification code; business orders are verified based on the random verification code, and there is no need to verify the verification authority of the order collection and delivery terminal, which simplifies the verification processing operation of the random verification code of the business order and improves the efficiency and accuracy of business order processing.
[0074] In another embodiment, Figure 6 As shown, a random verification code processing method is provided, in which the step is applied to Figure 1 The following are explained as an example:
[0075] Step 602: Obtain the demand value of the random verification code for the business scenario.
[0076] Step 604: Determine the input initial values of the timestamp bit, data center serial number bit, machine serial number bit, and sequence number bit in the random verification code according to the required value.
[0077] In step 606, each of the initial input values is occupied by a preset combination to determine the length of the timestamp bit, the length of the data center serial number bit, the length of the machine serial number bit, and the length of the sequence number bit in the random verification code.
[0078] Among them, the preset combination is "timestamp binary placeholder + data center binary placeholder + machine node binary placeholder + sequence number binary placeholder".
[0079] Step 608: When a request to generate a business order is received, a decimal random verification code carrying a timestamp, a data center serial number, a machine serial number, and a sequence number is generated.
[0080] Step 610: Convert the decimal random verification code into a 62-decimal string consisting of 10 Arabic numerals, 26 lowercase letters, and 26 uppercase letters to obtain a random verification code.
[0081] Specifically, the initial values of the timestamp bit, data center serial number bit, machine serial number bit and sequence number bit in the random verification code are determined according to the demand value of the random verification code in the business scenario, and the length of the timestamp bit, the length of the data center serial number bit, the length of the machine serial number bit and the length of the sequence number bit in the random verification code are determined by each initial input value; binary placeholders are performed according to the determined length of the timestamp bit, the length of the data center serial number bit, the length of the machine serial number bit and the length of the sequence number bit, and the computer room number of the data center bit and the server number of the machine serial number bit are input. When a request to generate a business order is received, the current timestamp is determined; a binary random verification code is assembled and generated in the order of timestamp, data center, machine node and sequence number, and a character string of a combination of numbers and letters is obtained by binary shift calculation. For example, the binary random verification code is obtained by shift calculation to obtain a 62-hexadecimal character string composed of 10 Arabic numerals, 26 lowercase letters and 26 uppercase letters to obtain a random verification code.
[0082] Optionally, in one embodiment, the similarity between characters in the random verification code is detected; when two character strings exist with a similarity equal to a preset value, the two characters are deleted from the random code string to obtain a random verification code with the similar characters deleted. Detecting the similarity between characters in the random verification code includes: parsing the random verification code to obtain all characters in the random verification code; and performing a similarity test on each character according to the detection strategy data to obtain the similarity between the characters in the random verification code.
[0083] Step 612: Obtain order information of the business order, send the business order to the order receiving and dispatching terminal corresponding to the address information in the order information, and display a random verification code of the business order on the order receiving and dispatching terminal.
[0084] Among them, order information includes item attributes, transportation methods, logistics outlets, recipient contact information, and delivery address.
[0085] Specifically, the business system terminal obtains the order information of the business order, and obtains the address information in the order information by parsing the order information; the order distribution management unit in the business system terminal distributes the business order according to the address information, and sends the business order to the order receiving and delivery terminal corresponding to the address information in the order information, and displays the random verification code of the business order on the order receiving and delivery terminal.
[0086] Step 614: Receive a verification request sent by the order receiving and dispatching terminal, and verify the random verification code according to the verification request.
[0087] Specifically, a random verification code for the business order is displayed on the order receiving and dispatching terminal. The displayed random verification code is entered on the order receiving and dispatching terminal interface. By triggering the verification button on the order receiving and dispatching terminal interface, a verification request is sent to the business system terminal, where the authenticity of the corresponding business order is verified. If the random verification code is true, the business order is determined to be valid.
[0088] Optionally, in one embodiment, by obtaining the character length of the random verification code; when the character length is within a preset length range, detecting whether the random verification code exists in the database; when the random verification code exists in the database, sending a processing instruction for the business order to the order receiving and dispatching terminal; the processing instruction is used to instruct the order receiving and dispatching terminal to process the business order.
[0089] Specifically, when the character length is within a preset range, the random verification code is considered valid. If the random verification code exists in the business system terminal's database, it indicates the existence of a business order associated with the random verification code. The order data for the business order is then sent to the order collection and delivery terminal, where the delivery clerk processes the business order. Based on the random verification code, the associated business order can be verified and processed without requiring verification permission from the order collection and delivery terminal, thereby improving the efficiency of business order processing.
[0090] The following is an application scenario of the random verification code processing method in an embodiment.
[0091] When the business order system terminal receives the request to generate a business order, it generates a random verification code carrying a timestamp bit, a data center serial number bit, a machine serial number bit and a sequence number, and saves the random verification code and the association between the random verification code and the associated business order in the form of a table in the database. The business system terminal obtains the order information of the business order, and obtains the address information in the order information by parsing the order information; the order distribution management unit in the business system terminal distributes the business order according to the address information, and sends the business order to the order receiving and dispatching terminal corresponding to the address information in the order information, and displays the random verification code of the business order on the order receiving and dispatching terminal; the random verification code of the business order is displayed on the order receiving and dispatching terminal, and the business order is received from the order receiving and dispatching terminal. The random verification code displayed on the order collection and delivery terminal interface is input, and a verification request is sent to the business system terminal by triggering the verification button on the order collection and delivery terminal interface to obtain the character length of the random verification code and detect the character length of the random verification code. When the character length is within the preset length range, the database is checked for the existence of the random verification code according to the verification request. When the random verification code exists in the database, the order data of the business order is sent to the order collection and delivery terminal so that the order collection and delivery terminal can process the business order. By verifying the business order through the random verification code, there is no need to verify the verification authority of the order collection and delivery terminal, which simplifies the verification processing operation of the random verification code of the business order and improves the efficiency and accuracy of business order processing.
[0092] In the above-mentioned random verification code processing method, the length of the timestamp bit, the length of the data center serial number bit, the length of the machine serial number bit and the length of the sequence number bit in the random verification code are determined according to the demand value of the random verification code in the business scenario. When a request to generate a business order is received, a decimal digital random verification code carrying the timestamp bit, the data center serial number bit, the machine serial number bit and the sequence number is generated, wherein the length of the random verification code is determined according to the characteristics of the business scenario; the decimal digital random verification code is converted into a 62-hexadecimal string composed of 10 Arabic numerals, 26 lowercase letters and 26 uppercase letters to obtain a random verification code; and the random verification code is parsed to obtain all characters in the random verification code; the similarity of each character is detected according to the detection strategy data to obtain the similarity between the characters in the random verification code; when there are two character strings with a similarity of a preset value, the two characters are deleted from the random code string to obtain a random verification code with similar characters deleted.
[0093] Obtain the order information of the business order, send the business order to the order receiving and dispatching terminal corresponding to the address information in the order information, and display the random verification code of the business order on the order receiving and dispatching terminal; receive the verification request sent by the order receiving and dispatching terminal, and verify the random verification code according to the verification request; when the random verification code exists in the database, send the order data of the business order to the order receiving and dispatching terminal so that the order receiving and dispatching terminal can process the business order. Determine the length of the random verification code based on the characteristics of the business scenario to reduce the character placeholder, and convert the generated decimal random verification code into a random verification code of a 62-hexadecimal string of alphanumeric characters, thereby reducing the character length of the random verification code; verify the business order through the 62-hexadecimal random verification code, without the need to verify the verification authority of the order receiving and dispatching terminal, simplifying the verification processing operation of the random verification code of the business order and improving the efficiency and accuracy of business order processing.
[0094] It should be understood that although Figure 2 、 Figure 5-Figure 6 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. In addition, Figure 2 、 Figure 5-Figure 6 At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The order of execution of these steps or stages is not necessarily one by one, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.
[0095] In one embodiment, Figure 7 As shown, a random verification code processing device is provided, including: an acquisition module 702, a determination module 704 and a generation module 706, wherein:
[0096] The acquisition module 702 is used to obtain the requirement value of the random verification code in the business scenario.
[0097] The determination module 704 is used to determine the length of the timestamp bit, the length of the data center serial number bit, the length of the machine serial number bit and the length of the sequence number bit in the random verification code according to the required value.
[0098] The generating module 706 is configured to generate a random verification code associated with the business order when receiving a request to generate a business order; the random verification code includes a timestamp bit, a data center serial number bit, a machine serial number bit, and a sequence number.
[0099] In the above-mentioned random verification code processing device, the demand value of the business scenario for the random verification code is obtained; the length of the timestamp bit, the length of the data center serial number bit, the length of the machine serial number bit and the length of the sequence number bit in the random verification code are determined according to the demand value; when a request to generate a business order is received, a random verification code associated with the business order is generated; the random verification code includes the timestamp bit, the data center serial number bit, the machine serial number bit and the sequence number; that is, the length of the random verification code is determined according to the needs of the actual business scenario to avoid the generated random verification code being too long; the generated random verification code is associated with the business order to ensure the uniqueness of the random verification code associated with the business order, thereby improving the low efficiency of business order processing.
[0100] In another embodiment, Figure 8 As shown, a random verification code processing device is provided, which includes, in addition to an acquisition module 702, a determination module 704, and a generation module 706, a placeholder module 708, a conversion module 710, a detection module 712, a deletion module 714, a parsing module 716, a display module 718, and a verification module 720, wherein:
[0101] The determination module 704 is further configured to determine the input initial values of the timestamp bit, the data center serial number bit, the machine serial number bit, and the sequence number bit in the random verification code according to the required value.
[0102] The placeholder module 708 is used to place the initial input values in a preset combination to determine the length of the timestamp bit, the length of the data center serial number bit, the length of the machine serial number bit and the length of the sequence number bit in the random verification code.
[0103] The generation module 706 is further configured to generate a decimal random verification code carrying a timestamp bit, a data center serial number bit, a machine serial number bit and a sequence number when receiving a request to generate a business order.
[0104] The conversion module 710 is used to convert the decimal random verification code into a 62-hexadecimal string composed of 10 Arabic numerals, 26 lowercase letters, and 26 uppercase letters to obtain a random verification code.
[0105] The detection module 712 is used to detect the similarity between characters in the random verification code.
[0106] The deletion module 714 is configured to delete two characters from the random code string when there are two character strings with a preset similarity, so as to obtain a random verification code with the similar characters deleted.
[0107] The parsing module 716 is configured to parse the random verification code to obtain all characters in the random verification code.
[0108] The detection module 712 is further configured to perform similarity detection on each character according to the detection strategy data to obtain the similarity between the characters in the random verification code.
[0109] The sending module 718 is used to obtain the order information of the business order, send the business order to the order receiving and dispatching terminal corresponding to the address information in the order information, and display the random verification code of the business order on the order receiving and dispatching terminal.
[0110] The verification module 720 is used to receive a verification request sent by the order receiving and dispatching terminal, and verify the random verification code according to the verification request.
[0111] The acquisition module 702 is further configured to acquire the character length of the random verification code.
[0112] The detection module 716 is further configured to detect whether there is a random verification code in the database when the character length is within a preset length range.
[0113] The sending module 718 is further configured to send a processing instruction for the business order to the order receiving and dispatching terminal when the random verification code exists in the database; the processing instruction is configured to instruct the order receiving and dispatching terminal to process the business order.
[0114] In one embodiment, the business scenario has a demand value for the random verification code, determines the incoming initial values of the timestamp bit, data center serial number bit, machine serial number bit and sequence number bit in the random verification code, determines the length of the random verification code through binary placeholders, and when a request to generate a business order is received, generates a decimal digital random verification code carrying the timestamp bit, data center serial number bit, machine serial number bit and sequence number, wherein the length of the random verification code is determined according to the business scenario characteristics; converts the decimal digital random verification code into a 62-bit character string composed of 10 Arabic numerals, 26 lowercase letters, and 26 uppercase letters to obtain a random verification code; and parses the random verification code to obtain all characters in the random verification code; performs similarity detection on each character according to the detection strategy data to obtain the similarity between the characters in the random verification code; when there are two character strings with a similarity of a preset value, deletes the two characters from the random code character string to obtain a random verification code with similar characters deleted.
[0115] Obtain the order information of the business order, send the business order to the order receiving and dispatching terminal corresponding to the address information in the order information, and display the random verification code of the business order on the order receiving and dispatching terminal; receive the verification request sent by the order receiving and dispatching terminal, and verify the random verification code according to the verification request; when the random verification code exists in the database, send the order data of the business order to the order receiving and dispatching terminal so that the order receiving and dispatching terminal can process the business order. Determine the length of the random verification code based on the characteristics of the business scenario to reduce the character placeholder, and convert the generated decimal random verification code into a random verification code of a 62-hexadecimal string of alphanumeric characters, thereby reducing the character length of the random verification code; verify the business order through the 62-hexadecimal random verification code, without the need to verify the verification authority of the order receiving and dispatching terminal, simplifying the verification processing operation of the random verification code of the business order and improving the efficiency and accuracy of business order processing.
[0116] For the specific definition of the random verification code processing device, please refer to the definition of the random verification code processing method above, which will not be repeated here. The various modules in the above-mentioned random verification code processing device can be implemented in whole or in part by software, hardware, or a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0117] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 9 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a random verification code processing method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad provided on the computer device housing, or an external keyboard, touchpad or mouse.
[0118] Those skilled in the art will understand that Figure 9The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0119] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0120] Obtain the business scenario's demand value for random verification codes;
[0121] Determine the length of the timestamp bit, the length of the data center serial number bit, the length of the machine serial number bit, and the length of the sequence number bit in the random verification code according to the required value;
[0122] When a request for generating a business order is received, a random verification code associated with the business order is generated; the random verification code includes a timestamp bit, the data center serial number bit, a machine serial number bit, and a sequence number.
[0123] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0124] Determine the input initial values of the timestamp bit, data center serial number bit, machine serial number bit, and sequence number bit in the random verification code according to the required value;
[0125] Each of the initial input values is occupied in a preset combination to determine the length of the timestamp bit, the length of the data center serial number bit, the length of the machine serial number bit and the length of the sequence number bit in the random verification code.
[0126] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0127] When receiving a request to generate a business order, a random decimal verification code is generated that carries the timestamp, data center serial number, machine serial number, and sequence number.
[0128] The decimal random verification code is converted into a 62-hexadecimal character string composed of 10 Arabic numerals, 26 lowercase letters, and 26 uppercase letters to obtain a random verification code.
[0129] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0130] Detecting similarities between characters in the random verification code;
[0131] When there are two character strings with a similarity of a preset value, the two characters are deleted from the random code character string to obtain a random verification code with similar characters deleted.
[0132] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0133] Parsing the random verification code to obtain all characters in the random verification code;
[0134] A similarity test is performed on each of the characters according to the detection strategy data to obtain the similarity between the characters in the random verification code.
[0135] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0136] Obtaining order information of the business order, sending the business order to an order receiving and dispatching terminal corresponding to the address information in the order information, and displaying a random verification code of the business order on the order receiving and dispatching terminal;
[0137] Receive a verification request sent by the order receiving and dispatching terminal, and verify the random verification code according to the verification request.
[0138] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0139] Obtaining the character length of the random verification code;
[0140] When the character length is within a preset length range, detecting whether the random verification code exists in the database;
[0141] When the random verification code exists in the database, a processing instruction for the business order is sent to the order receiving and dispatching terminal; the processing instruction is used to instruct the order receiving and dispatching terminal to process the business order.
[0142] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:
[0143] Obtain the business scenario's demand value for random verification codes;
[0144] Determine the length of the timestamp bit, the length of the data center serial number bit, the length of the machine serial number bit, and the length of the sequence number bit in the random verification code according to the required value;
[0145] When a request for generating a business order is received, a random verification code associated with the business order is generated; the random verification code includes a timestamp bit, the data center serial number bit, a machine serial number bit, and a sequence number.
[0146] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0147] Determine the input initial values of the timestamp bit, data center serial number bit, machine serial number bit, and sequence number bit in the random verification code according to the required value;
[0148] Each of the initial input values is occupied in a preset combination to determine the length of the timestamp bit, the length of the data center serial number bit, the length of the machine serial number bit and the length of the sequence number bit in the random verification code.
[0149] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0150] When receiving a request to generate a business order, a random decimal verification code is generated that carries the timestamp, data center serial number, machine serial number, and sequence number.
[0151] The decimal random verification code is converted into a 62-hexadecimal character string composed of 10 Arabic numerals, 26 lowercase letters, and 26 uppercase letters to obtain a random verification code.
[0152] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0153] Detecting similarities between characters in the random verification code;
[0154] When there are two character strings with a similarity of a preset value, the two characters are deleted from the random code character string to obtain a random verification code with similar characters deleted.
[0155] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0156] Parsing the random verification code to obtain all characters in the random verification code;
[0157] A similarity test is performed on each of the characters according to the detection strategy data to obtain the similarity between the characters in the random verification code.
[0158] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0159] Obtaining order information of the business order, sending the business order to an order receiving and dispatching terminal corresponding to the address information in the order information, and displaying a random verification code of the business order on the order receiving and dispatching terminal;
[0160] Receive a verification request sent by the order receiving and dispatching terminal, and verify the random verification code according to the verification request.
[0161] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0162] Obtaining the character length of the random verification code;
[0163] When the character length is within a preset length range, detecting whether the random verification code exists in the database;
[0164] When the random verification code exists in the database, a processing instruction for the business order is sent to the order receiving and dispatching terminal; the processing instruction is used to instruct the order receiving and dispatching terminal to process the business order.
[0165] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0166] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0167] The above embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art could make various modifications and improvements without departing from the spirit of the present application, all of which fall within the scope of protection of the present application. Therefore, the scope of protection of the present patent application shall be determined by the appended claims.
Claims
1. A random verification code processing method, characterized in that: The method comprises: Obtaining a demand value for a random verification code in a business scenario, wherein the demand value corresponds to a business volume of the business scenario, and the demand value is used to determine the demand for a computer room and a deployed application server; Determine the length of the timestamp bit, the length of the data center serial number bit, the length of the machine serial number bit, and the length of the sequence number bit in the random verification code according to the required value; When a request to generate a business order is received, a random verification code associated with the business order is generated; the random verification code includes a timestamp bit, the data center serial number bit, the machine serial number bit, and a sequence number bit, wherein the data center serial number bit is used to record the number of the computer room where the application server is stored, the machine serial number bit is used to record the number of the deployed application server, and the sequence number bit is used to record the digital serial number generated by the same machine in the same millisecond.
2. The method according to claim 1, characterized in that The determining, according to the requirement value, the length of the timestamp bit, the length of the data center serial number bit, the length of the machine serial number bit, and the length of the sequence number bit in the random verification code includes: Determine the input initial values of the timestamp bit, data center serial number bit, machine serial number bit, and sequence number bit in the random verification code according to the required value; Each of the input initial values is occupied in a preset combination to determine the length of the timestamp bit, the length of the data center serial number bit, the length of the machine serial number bit and the length of the sequence number bit in the random verification code.
3. The method according to claim 1, characterized in that When receiving a request to generate a business order, generating a random verification code associated with the business order includes: When receiving a request to generate a business order, a random decimal verification code is generated that carries the timestamp, data center serial number, machine serial number, and sequence number. The decimal random verification code is converted into a 62-hexadecimal character string composed of 10 Arabic numerals, 26 lowercase letters, and 26 uppercase letters to obtain a random verification code.
4. The method according to claim 3, characterized in that The method further comprises: Detecting similarities between characters in the random verification code; When there are two characters whose similarity is a preset value, the two characters are deleted from the random verification code to obtain a random verification code with similar characters deleted.
5. The method according to claim 4, characterized in that Detecting the similarity between characters in the random verification code includes: Parsing the random verification code to obtain all characters in the random verification code; A similarity test is performed on each of the characters according to the detection strategy data to obtain the similarity between the characters in the random verification code.
6. The method according to claim 1, characterized in that The method further comprises: Obtaining order information of the business order, sending the business order to an order receiving and dispatching terminal corresponding to the address information in the order information, and displaying a random verification code of the business order on the order receiving and dispatching terminal; Receive a verification request sent by the order receiving and dispatching terminal, and verify the random verification code according to the verification request.
7. The method according to claim 6, characterized in that The receiving a verification request sent by the order receiving and dispatching terminal, and verifying the random verification code according to the verification request, includes: Obtaining the character length of the random verification code; When the character length is within a preset length range, detecting whether the random verification code exists in the database; When the random verification code exists in the database, a processing instruction for the business order is sent to the order receiving and dispatching terminal; the processing instruction is used to instruct the order receiving and dispatching terminal to process the business order.
8. A random verification code processing device, characterized in that: The device comprises: An acquisition module, configured to acquire a demand value for a random verification code in a business scenario, wherein the demand value corresponds to a business volume of the business scenario, and the demand value is used to determine the demand for a computer room and a deployed application server; A determination module, configured to determine the length of a timestamp bit, a data center serial number bit, a machine serial number bit, and a sequence number bit in the random verification code according to the required value; The generation module is used to generate a random verification code associated with the business order when receiving a request to generate a business order; the random verification code includes a timestamp bit, the data center sequence number bit, the machine sequence number bit and a sequence number bit, wherein the data center sequence number bit is used to record the number of the computer room where the application server is stored, the machine sequence number bit is used to record the number of the deployed application server, and the sequence number bit is used to record the digital sequence number generated by the same machine in the same millisecond.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Logistics newly-increased order management method and system
CN107341527A
Business acceptance and common method and device
CN107395659A
Method and device for generating order number by distributed architecture
CN110634052A