Information encryption transmission method, device and related equipment
By converting the payment password into a matrix and generating an encrypted string, the problem of low payment password security during mobile payment is solved, and high security of the payment password during transmission is achieved to prevent tampering and interception.
Patent Information
- Application Number
- CN202111020436.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-01
- Publication Date
- 2024-10-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
When making mobile payments, the directly uploaded 6-digit payment password is less secure and can easily be intercepted or tampered with.
By converting the payment password into a matrix and randomly generating an invertible matrix, a third matrix is generated. An encrypted string is generated based on the third matrix and the preset code value mapping table. The terminal device sends the encrypted string and matrix to the server, and the server decrypts it. Obtain the payment password and achieve double encryption.
It improves the security of payment passwords during transmission, prevents unauthorized devices from obtaining payment passwords, and enhances the randomness and security of the encryption results of each payment.
Smart Images

Figure CN113779554B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing, and in particular to an information encryption transmission method, device and related equipment. Background Art
[0002] With the development of mobile Internet, mobile payment has gradually become the mainstream. When making mobile payment, a mobile terminal (such as a mobile phone) can obtain the payment password entered by the user and upload the payment password to a server. The server can complete the payment after verifying that the payment password is correct.
[0003] At present, the payment password generally consists of six digits between 0 and 9. The mobile terminal can directly upload the 6-digit payment password to the server. However, the method of directly uploading the 6-digit payment password to the server has low security, and the payment password can be easily intercepted or tampered with. Summary of the invention
[0004] The present application provides an information encryption transmission method, device and related equipment, which can improve the security of payment passwords during transmission.
[0005] In a first aspect, the present application provides an information encryption transmission method, which is applied to a payment system, wherein the payment system includes a terminal device and a server, wherein the terminal device and the server are connected; the terminal device and the server are respectively preset with the same code value mapping table; the method includes:
[0006] The terminal device obtains a payment password; the terminal device generates a first matrix according to the payment password; the terminal device randomly generates a second matrix, the second matrix is a reversible matrix, and the second matrix is related to the first matrix; the terminal device generates a third matrix according to the first matrix and the second matrix; the terminal device generates a first character string according to the third matrix and a preset code value mapping table; the terminal device sends the first character string and the second matrix to the server; the server obtains the third matrix according to the first character string and the preset code value mapping table; the server obtains the first matrix according to the third matrix and the second matrix; the server obtains the payment password according to the first matrix.
[0007] In one possible implementation, the number of columns of the first matrix is the same as the number of digits included in the payment password, and the number of rows of the first matrix is 1; the number of rows and columns of the second matrix are the same, and the number of rows and columns of the second matrix are the same as the number of columns of the first matrix.
[0008] In another possible implementation, the payment password is a digital combination of numbers between 0 and 9; each element in the second matrix is an integer, and the sum of the elements in each column of the second matrix is less than or equal to 8; the code value mapping table includes a digital part and a code value part, the digital part includes 73 numbers between 0 and 72, and the code value part includes 73 code values corresponding one-to-one to the numbers in the digital part.
[0009] In another possible implementation, the terminal device generates a first character string based on a third matrix and a preset code value mapping table, including: the terminal device determines, based on the third matrix and the preset code value mapping table, the code values corresponding to the numbers in each column of the third matrix in the code value mapping table; the terminal device generates the first character string based on the code values corresponding to the numbers in each column of the third matrix in the code value mapping table.
[0010] In another possible implementation, the server obtains the first matrix based on the third matrix and the second matrix, including: the server inverts the second matrix to obtain the inverse matrix of the second matrix; the server obtains the first matrix based on the third matrix and the inverse matrix of the second matrix.
[0011] In another possible implementation, the terminal device obtains the payment password, including: in response to a payment operation related to a first user account, the terminal device obtains the payment password corresponding to the first user account; the code value mapping table is the code value mapping table corresponding to the first user account; different user accounts have different code value mapping tables.
[0012] In another possible implementation, the terminal device sends a first string and a second matrix to a server, including: the terminal device encrypts the first string and the second matrix according to a preset encryption key to obtain a first message; the terminal device sends the first message to the server; before the server obtains a third matrix according to the first string and a preset code value mapping table, the method also includes: the server decrypts the first message according to the encryption key to obtain the first string and the second matrix.
[0013] The information encryption transmission method provided by the present application can convert the acquired payment password into a first matrix, and randomly generate a second matrix, obtain a third matrix according to the first matrix and the randomly generated second matrix, and map the third matrix to a first character string according to a preset code value mapping table, so that the terminal device can encrypt the payment password based on the randomly generated second matrix and the preset code value mapping table when sending the payment password to the server, and the payment password is not easily intercepted or tampered with during the transmission process, thereby improving the security of the payment password during transmission. After receiving the first character string and the second matrix sent by the terminal device, the server can also parse the third matrix according to the preset code value mapping table, parse the first matrix according to the inverse matrix of the third matrix and the second matrix, and obtain the payment password according to the first matrix. If the information sent by the terminal device to the server is intercepted, the first encrypted character string is also parsed out instead of the payment password, which can prevent other devices without the code value mapping table from obtaining the payment password, thereby improving the security of the payment password during transmission. For the same user account, since the second matrix is randomly generated in each payment request or payment process, the encryption result of the payment password is different each time, and the security can be higher.
[0014] In addition, the terminal device can also encrypt the first string and the second matrix together according to the encryption key to obtain the first message, that is, the terminal device sends the encrypted first string and the second matrix to the server. Because the first string is also obtained by the terminal device encrypting the third matrix according to the code value mapping table, the information encryption transmission method provided in the embodiment of the present application can achieve double encryption. After the server receives the first message, it can decrypt the first message according to the encryption key to obtain the first string and the second matrix, which can prevent other devices without the encryption key from obtaining the first string and the second matrix, further improving the security of the payment password transmission.
[0015] In a second aspect, the present application provides an information encryption transmission method, which is applied to a terminal device, the terminal device is connected to a server, and the method includes:
[0016] Obtain a payment password; generate a first matrix based on the payment password; randomly generate a second matrix, which is a reversible matrix and is related to the first matrix; generate a third matrix based on the first matrix and the second matrix; generate a first character string based on the third matrix and a preset code value mapping table; and send the first character string and the second matrix to the server.
[0017] In one possible implementation, the number of columns of the first matrix is the same as the number of digits included in the payment password, and the number of rows of the first matrix is 1; the number of rows and columns of the second matrix are the same, and the number of rows and columns of the second matrix are the same as the number of columns of the first matrix.
[0018] In another possible implementation, the payment password is a digital combination of numbers between 0 and 9; each element in the second matrix is an integer, and the sum of the elements in each column of the second matrix is less than or equal to 8; the code value mapping table includes a digital part and a code value part, the digital part includes 73 numbers between 0 and 72, and the code value part includes 73 code values corresponding one-to-one to the numbers in the digital part.
[0019] In another possible implementation, a first character string is generated according to a third matrix and a preset code value mapping table, including: determining, according to the third matrix and the preset code value mapping table, the code values corresponding to the numbers in each column of the third matrix in the code value mapping table; generating the first character string according to the code values corresponding to the numbers in each column of the third matrix in the code value mapping table.
[0020] In another possible implementation, obtaining the payment password includes: in response to a payment operation related to the first user account, obtaining the payment password corresponding to the first user account; the code value mapping table is the code value mapping table corresponding to the first user account; different user accounts correspond to different code value mapping tables.
[0021] In another possible implementation, sending the first character string and the second matrix to the server includes: encrypting the first character string and the second matrix according to a preset encryption key to obtain a first message; and sending the first message to the server.
[0022] In a third aspect, the present application provides an information encryption transmission method, which is applied to a server, the server is connected to a terminal device, and the method includes:
[0023] A first character string and a second matrix are received and sent by a terminal device, wherein the first character string is generated by the terminal device according to a third matrix and a preset code value mapping table, and the third matrix is generated by the terminal device according to the second matrix and the first matrix; the second matrix is randomly generated by the terminal device, and the second matrix is a reversible matrix, and the second matrix is related to the first matrix, and the first matrix is generated by the terminal device according to the payment password; the third matrix is obtained according to the first character string and the preset code value mapping table; the first matrix is obtained according to the third matrix and the second matrix; the payment password is obtained according to the first matrix.
[0024] In a possible implementation, obtaining the first matrix according to the third matrix and the second matrix includes: inverting the second matrix to obtain the inverse matrix of the second matrix; and obtaining the first matrix according to the third matrix and the inverse matrix of the second matrix.
[0025] In another possible implementation, before obtaining the third matrix according to the first character string and the preset code value mapping table, the method also includes: receiving a first message sent by a terminal device, the first message being obtained by the above-mentioned terminal device encrypting the first character string and the second matrix according to a preset encryption key; decrypting the first message according to the encryption key to obtain the first character string and the second matrix.
[0026] In a fourth aspect, the present application provides an information encryption transmission device, which is applied to a terminal device, and includes: an acquisition module, a processing module, and a sending module;
[0027] An acquisition module is used to obtain a payment password; a processing module is used to generate a first matrix based on the payment password; a second matrix is randomly generated, the second matrix is a reversible matrix, and the second matrix is related to the first matrix; a third matrix is generated based on the first matrix and the second matrix; a first character string is generated based on the third matrix and a preset code value mapping table; a sending module is used to send the first character string and the second matrix to a server.
[0028] In one possible implementation, the number of columns of the first matrix is the same as the number of digits included in the payment password, and the number of rows of the first matrix is 1; the number of rows and columns of the second matrix are the same, and the number of rows and columns of the second matrix are the same as the number of columns of the first matrix.
[0029] In another possible implementation, the payment password is a digital combination of numbers between 0 and 9; each element in the second matrix is an integer, and the sum of the elements in each column of the second matrix is less than or equal to 8; the code value mapping table includes a digital part and a code value part, the digital part includes 73 numbers between 0 and 72, and the code value part includes 73 code values corresponding one-to-one to the numbers in the digital part.
[0030] In another possible implementation, the processing module is specifically used to determine, based on the third matrix and a preset code value mapping table, the code values corresponding to the numbers in each column of the third matrix in the code value mapping table; and generate a first character string based on the code values corresponding to the numbers in each column of the third matrix in the code value mapping table.
[0031] In another possible implementation, the acquisition module is specifically used to obtain the payment password corresponding to the first user account in response to the payment operation related to the first user account; the code value mapping table is the code value mapping table corresponding to the first user account; different user accounts correspond to different code value mapping tables.
[0032] In another possible implementation, the processing module is specifically used to encrypt the first character string and the second matrix according to a preset encryption key to obtain a first message; and the sending module is specifically used to send the first message to the server.
[0033] In a fifth aspect, the present application provides an information encryption transmission device, which is applied to a server, and includes: an acquisition module and a processing module;
[0034] An acquisition module is used to receive a first character string and a second matrix sent by a terminal device, wherein the first character string is generated by the terminal device according to a third matrix and a preset code value mapping table, and the third matrix is generated by the terminal device according to the second matrix and the first matrix; the second matrix is randomly generated by the terminal device, the second matrix is a reversible matrix, and the second matrix is related to the first matrix, and the first matrix is generated by the terminal device according to the payment password; a processing module is used to obtain the third matrix according to the first character string and the preset code value mapping table; obtain the first matrix according to the third matrix and the second matrix; and obtain the payment password according to the first matrix.
[0035] In a possible implementation, the processing module is specifically configured to invert the second matrix to obtain an inverse matrix of the second matrix; and obtain the first matrix according to the third matrix and the inverse matrix of the second matrix.
[0036] In another possible implementation, the acquisition module is further used to receive a first message sent by the terminal device, where the first message is obtained by the terminal device encrypting the first string and the second matrix according to a preset encryption key; the processing module is specifically used to decrypt the first message according to the encryption key to obtain the first string and the second matrix.
[0037] In a sixth aspect, the present application provides an electronic device, comprising: a processor and a memory; the memory stores instructions executable by the processor; when the processor is configured to execute the instructions, the electronic device implements the method described in the second or third aspect above.
[0038] In a seventh aspect, the present application provides a computer-readable storage medium, which includes: computer software instructions; when the computer software instructions are executed in an electronic device, the electronic device implements the method described in the second or third aspect above.
[0039] The beneficial effects of the second to seventh aspects mentioned above can be referred to the first aspect and will not be elaborated on again. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0041] Figure 1A schematic diagram of the composition of a payment system provided in an embodiment of the present application;
[0042] Figure 2 A schematic diagram of a flow chart of an information encryption transmission method provided in an embodiment of the present application;
[0043] Figure 3 Another schematic diagram of a flow chart of an information encryption transmission method provided in an embodiment of the present application;
[0044] Figure 4 Schematic diagram of the composition of the information encryption transmission device provided in the embodiment of the present application
[0045] Figure 5 A schematic diagram of a composition of an information encryption transmission device provided in an embodiment of the present application;
[0046] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0047] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0048] It should be noted that, in the embodiments of the present application, words such as "exemplarily" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplarily" or "for example" is intended to present related concepts in a specific way.
[0049] In order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first", "second", etc. are used to distinguish the same items or similar items with basically the same functions and effects. Those skilled in the art can understand that the words "first", "second", etc. are not limiting the quantity and execution order.
[0050] With the development of mobile Internet, mobile payment has gradually become the mainstream. When making mobile payment, a mobile terminal (such as a mobile phone) can obtain the payment password entered by the user and upload the payment password to a server. The server can complete the payment after verifying that the payment password is correct.
[0051] At present, the payment password generally consists of six digits between 0 and 9. The mobile terminal can directly upload the 6-digit payment password to the server. However, the method of directly uploading the 6-digit payment password to the server has low security, and the payment password can be easily intercepted or tampered with.
[0052] Against this background, an embodiment of the present application provides an information encryption transmission method, in which a terminal device (or mobile terminal) can encrypt a payment password and upload the encrypted payment password to a server. The server can receive the encrypted payment password uploaded by the terminal device and verify it to determine whether the payment is completed. This method can improve the security of the payment password during transmission.
[0053] The terminal device has a mobile payment function, and the terminal device can be connected to the server via a wired network or a wireless network. The server can be a background server that provides the mobile payment function for the terminal device.
[0054] For example, Figure 1 A schematic diagram of the composition of a payment system provided in an embodiment of the present application. Figure 1 As shown, the payment system may include: a terminal device 101 and a server 102, and the terminal device 101 and the server 102 are connected via a wired network or a wireless network.
[0055] Optionally, the terminal device 101 may be a mobile phone, a tablet computer, a wearable device, an in-vehicle device, an augmented reality (AR) / virtual reality (VR) device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), or other device with a mobile payment function. The embodiment of the present application does not limit the specific device form of the terminal device 101.
[0056] Optionally, the server 102 may be a single server, or may be a server cluster consisting of multiple servers. In some implementations, the server cluster may also be a distributed cluster. The present application does not limit the specific device form of the server 102.
[0057] In some possible embodiments, a payment application may be installed on the terminal device 101, and the payment application may provide a mobile payment function for the terminal device 101. For example, the payment application may be an application with a mobile payment function developed by a bank or a third-party financial institution. That is, the mobile payment function of the terminal device 101 may be implemented by the payment application installed on the terminal device 101.
[0058] The server 102 may be a backend server corresponding to the above-mentioned payment application, and the server 102 may provide a payment function.
[0059] For example, a user can open / start a payment application on the terminal device 101, log in to his / her user account (or first user account) on the payment application, and perform a payment operation. The terminal device 101 can send a payment request to the server 102 in response to the user's payment operation on the payment application, and the payment request may include a payment password. The server 102 may be preset with a payment password corresponding to the user account. The server 102 may verify whether the payment password included in the payment request is consistent with the payment password corresponding to the preset first user account. When the payment password corresponding to the preset first user account is consistent with the payment password included in the payment request, the server 102 may complete the payment in response to the payment request and notify the terminal device 101 of the payment result. That is, the first user account and the payment password have a corresponding relationship.
[0060] The information encryption transmission method provided in the embodiment of the present application can be applied to the above Figure 1 Payment system shown. Figure 2 The following is a flow chart of the information encryption transmission method provided in the embodiment of the present application. Figure 2 As shown, the method may include S201 to S209.
[0061] S201. The terminal device obtains the payment password.
[0062] In some possible embodiments, the terminal device obtains the payment password, including: the terminal device displays a payment password input interface in response to a user's payment operation; and the terminal device receives the payment password entered by the user on the payment password input interface.
[0063] In some other possible embodiments, the terminal device obtains the payment password, including: the terminal device obtains the preset payment password in response to the user's payment operation. (For example, in the existing password-free payment method, the terminal device automatically obtains the preset payment password in response to the user's payment operation without the user entering the payment password).
[0064] In some other possible embodiments, the terminal device obtains the payment password, including: the terminal device displays a fingerprint verification interface in response to the user's payment operation; the terminal device receives fingerprint information input by the user in the fingerprint verification interface; the terminal device determines the payment password corresponding to the fingerprint information based on the fingerprint information and the preset correspondence between the fingerprint information and the payment password.
[0065] In some other possible embodiments, the terminal device obtains the payment password, including: the terminal device displays a face recognition interface in response to the user's payment operation; the terminal device receives facial image information input by the user in the face recognition interface; the terminal device determines the payment password corresponding to the facial image information based on the facial image information and a preset correspondence between the facial image information and the payment password.
[0066] For example, the payment operation may be a transfer operation of a user in a payment application, or an operation of a user scanning a payment QR code to make a payment, etc. The embodiment of the present application does not limit the specific type of the payment operation.
[0067] S202. The terminal device generates a first matrix according to the payment password.
[0068] In a possible implementation, the payment password may be a digital combination of 10 numbers between 0 and 9. The number of rows of the first matrix may be 1, and the number of columns of the first matrix may be the same as the number of numbers included in the payment password.
[0069] Exemplarily, the payment password may be a six-digit combination consisting of 10 numbers between 0 and 9. The first matrix may be a matrix of one row and six columns generated according to the six digits in the aforementioned digital combination.
[0070] In a possible implementation, the terminal device generates a first matrix according to the payment password, including: the terminal device uses the numbers in the payment password as elements constituting the matrix in sequence according to the arrangement order of the numbers in the payment password to obtain the first matrix.
[0071] For example, assuming that the payment password obtained by the terminal device in S201 is "112066", the terminal device in S202 can use the numbers in "112066" as elements of the matrix in sequence according to the arrangement order of the numbers in "112066", and obtain the following matrix 1 as the first matrix:
[0072] Matrix 1 = [1 1 2 0 6 6].
[0073] S203: The terminal device randomly generates a second matrix.
[0074] The second matrix is related to the first matrix, and the second matrix is a reversible matrix (that is, the determinant of the first matrix is not 0).
[0075] In a possible implementation, the second matrix is related to the first matrix, including: the number of rows and columns of the second matrix is the same, and the number of rows and columns of the second matrix is the same as the number of columns of the first matrix. For example, taking the first matrix as a matrix with one row and six columns, the second matrix can be a matrix with six rows and six columns.
[0076] It is understandable that S203 may be executed before S201; or, S203 may be executed after S201 and before S202; or, S203 may be executed after S202 and before S204. The present embodiment does not limit the execution sequence of S203.
[0077] S204. The terminal device generates a third matrix according to the first matrix and the second matrix.
[0078] In a possible implementation manner, generating the third matrix according to the first matrix and the second matrix includes: multiplying the first matrix and the second matrix to obtain the third matrix.
[0079] Exemplarily, it is assumed that the randomly generated second matrix is the following matrix 2:
[0080]
[0081] Similarly, taking the payment password "112066" as an example, the first matrix generated according to the payment password "112066" is matrix 1 = [1 1 2 0 6 6], then the first matrix and the second matrix are multiplied to obtain the following matrix 3 as the third matrix:
[0082] matrix
[0083] S205. The terminal device generates a first character string according to the third matrix and a preset code value mapping table.
[0084] In a possible implementation, when the payment password is a digital combination of numbers between 0 and 9, each element in the second matrix is an integer, and the sum of the elements in each column of the second matrix is less than or equal to 8. The code value mapping table may include a digital part and a code value part. The digital part includes 73 numbers from 0 to 72. The code value part includes digital code values, lowercase letter code values, uppercase letter code values, and special symbol code values. The digital code value includes 10 code values, which are ten numbers from 0 to 9 in sequence. The lowercase letter code value includes 26 code values, which are 26 lowercase letters from a to z in sequence. The uppercase letter code value includes 26 code values, which are 26 uppercase letters from A to Z in sequence. The special symbol code value includes 11 code values, which are 11 special symbols, namely, "!", "@", "#", "¥", "%", "^", "&", "*", "_", "+", and "=" in sequence. The 73 numbers in the digital part correspond to the 73 code values in the code value part.
[0085] Exemplarily, the code value mapping table may be as shown in Table 1.
[0086] Table 1
[0087] number 0 1 2 3 … 12 … 15 … 60 … 71 72 Code value 0 1 2 3 … c … f … Y … + =
[0088] As shown in Table 1, the code value mapping table may include a digital part and a code value part, wherein the digital part includes 73 numbers from 0 to 72. The code value part includes digital code values, lowercase letter code values, uppercase letter code values, and special symbol code values. The code value part is arranged in the order of digital code values, lowercase letter code values, uppercase letter code values, and special symbol code values. The digital code value includes 10 code values, which are ten numbers from 0 to 9. The lowercase letter code value includes 26 code values, which are 26 lowercase letters from a to z. The uppercase letter code value includes 26 code values, which are 26 uppercase letters from A to Z. The special symbol code value includes 11 code values, which are 11 special symbols, namely, "!", "@", "#", "¥", "%", "^", "&", "*", "_", "+", and "=". Among them, the number "0" corresponds to the code value "0", the number "1" corresponds to the code value "1", the number "2" corresponds to the code value "2", the number "3" corresponds to the code value "3", ..., the number "12" corresponds to the code value "c", ..., the number "15" corresponds to the code value "f", ..., the number "60" corresponds to the code value "Y", ..., the number "71" corresponds to the code value "+", and the number "72" corresponds to the code value "=".
[0089] In some possible embodiments, based on the understanding that the above-mentioned user can first open the payment application, log in to his own user account (or called the first user account) on the payment application, and perform payment operations, the step of the terminal device obtaining the payment password in the above-mentioned S201 may include: in response to the payment operation related to the first user account, the terminal device obtains the payment password corresponding to the first user account; the above-mentioned code value mapping table may be the code value mapping table corresponding to the first user account; the code value mapping tables corresponding to different user accounts may be different.
[0090] Optionally, different user accounts correspond to different code value mapping tables, which may include: different one-to-one correspondences between the digital part and the code value part in the code value mapping tables corresponding to different user accounts are different.
[0091] Exemplarily, taking the code value mapping table corresponding to user account 1 as the above Table 1 as an example, the code value mapping table corresponding to user account 2 can be as shown in the following Table 2.
[0092] Table 2
[0093] number 0 1 2 3 … 12 … 15 … 60 … 71 72 Code value 9 8 7 6 … c … f … Y … + =
[0094] As shown in Table 2, the code value mapping table corresponding to user account 2 may include a digital part and a code value part, and the digital part includes 73 numbers from 0 to 72. The code value part includes digital code values, lowercase letter code values, uppercase letter code values, and special symbol code values. The code value part is arranged in the order of digital code values, lowercase letter code values, uppercase letter code values, and special symbol code values. The digital code value includes 10 code values, which are ten numbers between 9 and 0. The lowercase letter code value includes 26 code values, which are 26 lowercase letters from a to z. The uppercase letter code value includes 26 code values, which are 26 uppercase letters from A to Z. The special symbol code value includes 11 code values, which are "!", "@", "#", "¥", "%", "^", "&", "*", "_", "+", and "=", a total of 11 special symbols. Among them, the number "0" corresponds to the code value "9", the number "1" corresponds to the code value "8", the number "2" corresponds to the code value "7", the number "3" corresponds to the code value "6", ..., the number "12" corresponds to the code value "c", ..., the number "15" corresponds to the code value "f", ..., the number "60" corresponds to the code value "Y", ..., the number "71" corresponds to the code value "+", and the number "72" corresponds to the code value "=".
[0095] In a possible implementation, the terminal device generates a first string based on a third matrix and a preset code value mapping table, which may include: the terminal device determines, based on the third matrix and the preset code value mapping table, the code values corresponding to the numbers in each column of the third matrix in the code value mapping table; the terminal device generates the first string based on the code values corresponding to the numbers in each column of the third matrix in the code value mapping table.
[0096] For example, taking the payment password of the above-mentioned user account 1 as "112066", the first matrix generated according to the payment password "112066" is matrix 1, the randomly generated second matrix is matrix 2, and the third matrix obtained by multiplying the first matrix and the second matrix is matrix 3 as an example, assuming that the code value mapping table corresponding to the user account 1 is the above-mentioned Table 1, then according to matrix 3 = [1213 15 28 22 48] and Table 1, it can be obtained that the code value corresponding to the number "12" in the first column of matrix 3 in Table 1 is "c", the code value corresponding to the number "13" in the second column of matrix 3 in Table 1 is "d", the code value corresponding to the number "15" in the third column of matrix 3 in Table 1 is "f", the code value corresponding to the number "28" in the fourth column of matrix 3 in Table 1 is "t", the code value corresponding to the number "22" in the fifth column of matrix 3 in Table 1 is "m", and the code value corresponding to the number "48" in the sixth column of matrix 3 in Table 1 is "M". After obtaining the code value corresponding to each number in matrix 3, the first character string can be generated according to the code values "c", "d", "f", "t", "m", and "M" corresponding to each column of numbers in matrix 3 in the code value mapping table corresponding to user account 1.
[0097] Optionally, the terminal device generates a first string according to the code values corresponding to the numbers in each column of the third matrix in the code value mapping table, which may include: the terminal device concatenates the code values corresponding to the numbers in each column of the third matrix in the code value mapping table to generate the first string.
[0098] For example, taking the code values corresponding to each column of numbers in the above-mentioned matrix 3 in the code value mapping table corresponding to user account 1 as "c", "d", "f", "t", "m", and "M" as an example, the terminal device concatenates the code values corresponding to each column of numbers in the code value mapping table in the third matrix, and obtains "cdftmM" as the first character string.
[0099] For another example, taking the above-mentioned matrix 1 as the first matrix as an example, assuming that the code value mapping table corresponding to user account 1 is the above-mentioned table 1, and the third matrix obtained by multiplying the first matrix and the randomly generated second matrix is matrix 4 = [3 12 15 060 71], then according to matrix 4 and table 1, it can be obtained that the code value corresponding to the first column number "3" in matrix 4 in table 1 is "3", the code value corresponding to the second column number "12" in matrix 4 in table 1 is "c", the code value corresponding to the third column number "15" in matrix 4 in table 1 is "f", the code value corresponding to the fourth column number "0" in matrix 4 in table 1 is "0", the code value corresponding to the fifth column number "60" in matrix 4 in table 1 is "+", and the code value corresponding to the sixth column number "71" in matrix 4 in table 1 is "3". The code values "3", "c", "f", "0", "Y", and "+" corresponding to each column number in matrix 4 in table 1 corresponding to user account 1 are concatenated to obtain "3cf0Y+" as the first character string.
[0100] It should be noted that, although the above process of generating the first character string is described by serially connecting the code values corresponding to each column of numbers in the third matrix in the code value mapping table, the embodiment of the present application does not limit the specific manner in which the terminal device generates the first character string according to the code values corresponding to each column of numbers in the third matrix in the code value mapping table. For example, the terminal device generates the first character string according to the code values corresponding to each column of numbers in the third matrix in the code value mapping table, or first serializes the code values corresponding to each column of numbers in the third matrix in the code value mapping table, and then arranges them in reverse order to obtain the first character string; or, arranges the code values corresponding to each column of numbers in the third matrix in the code value mapping table according to other arrangement rules to obtain the first character string.
[0101] It is understandable that when the terminal device arranges the code values corresponding to the numbers in each column of the third matrix in the code value mapping table according to different arrangement rules, obtains the first string, and sends the first string to the server, the server can reversely parse the first string according to the same arrangement rule.
[0102] S206: The terminal device sends the first character string and the second matrix to the server.
[0103] Correspondingly, the server receives the first character string and the second matrix sent by the terminal device.
[0104] S207: The server obtains a third matrix according to the first character string and a preset code value mapping table.
[0105] Exemplarily, taking the code value mapping table corresponding to the above-mentioned user account 1 as Table 1 as an example, assuming that the first character string sent by the receiving terminal device is "3cf0Y+", and the terminal device generates the first character string in accordance with the code value corresponding to the number in each column of the third matrix in the code value mapping table, by concatenating the above-mentioned code values, then according to "3cf0Y+" and Table 1, it can be obtained that the number corresponding to the first character (code value) "3" in the character string in Table 1 is "3", the number corresponding to the second character (code value) "c" in the character string in Table 1 is "12", the number corresponding to the third character (code value) "f" in Table 1 is "15", the number corresponding to the fourth character (code value) "0" in Table 1 is "0", the number corresponding to the fifth character (code value) "Y" in Table 1 is "60", and the number corresponding to the sixth character (code value) "+" in Table 1 is "71". The numbers "3", "12", "15", "0", "60", and "71" corresponding to each character (code value) in "3cf0Y+" in Table 1 are arranged in sequence as elements of the matrix, and the third matrix is [3, 12, 15, 0, 60, 71].
[0106] It should be noted that for the same user account, the code value mapping tables preset in the server and the terminal device should be the same.
[0107] S208. The server obtains the first matrix according to the third matrix and the second matrix.
[0108] For example, the server may first invert the second matrix to obtain the inverse matrix of the second matrix; then, the server may multiply the third matrix and the inverse matrix of the second matrix to obtain the first matrix.
[0109] For example, taking the above second matrix as matrix 2 and the third matrix as matrix 3 as an example, the inverse matrix of the second matrix can be as follows: -1 As shown:
[0110] matrix
[0111] Substitute matrix 3 and matrix 2 -1 Multiply to get matrix 1 (the first matrix):
[0112] matrix
[0113] S209: The server obtains a payment password according to the first matrix.
[0114] In a possible implementation, the server obtains the payment password according to the first matrix, including: the server arranges the elements (numbers) in the first matrix in order, and uses the elements (numbers) in the first matrix as the numbers constituting the payment password in sequence to obtain the payment password. -1 Taking the matrix 1 (first matrix) obtained by multiplication as [1,1,2,0,6,6] as an example, the server arranges the elements (numbers) in matrix 1 in order, and uses the elements (numbers) in the first matrix as the numbers that make up the payment password to obtain the payment password "112066".
[0115] The information encryption transmission method provided in the embodiment of the present application can convert the acquired payment password into a first matrix, and randomly generate a second matrix, obtain a third matrix according to the first matrix and the randomly generated second matrix, and map the third matrix to a first character string according to a preset code value mapping table, so that when the terminal device sends the payment password to the server, the payment password is encrypted based on the randomly generated second matrix and the preset code value mapping table, and the payment password is not easily intercepted or tampered with during the transmission process, thereby improving the security of the payment password during transmission. After receiving the first character string and the second matrix sent by the terminal device, the server can also parse the third matrix according to the preset code value mapping table, parse the first matrix according to the inverse matrix of the third matrix and the second matrix, and obtain the payment password according to the first matrix. If the information sent by the terminal device to the server is intercepted, the first encrypted character string is also parsed out instead of the payment password, which can prevent other devices without a code value mapping table from obtaining the payment password, thereby improving the security of the payment password during transmission.
[0116] In addition, for the same user account, since the second matrix is randomly generated in each payment request or payment process, the encryption result of the payment password is different each time, and the security can be higher.
[0117] The present application also provides an information encryption transmission method. Figure 3 Another flow chart of the information encryption transmission method provided in the embodiment of the present application. Figure 3 As shown, the information encryption transmission method may include: S301 to S311.
[0118] S301. The terminal device obtains the payment password.
[0119] S302: The terminal device generates a first matrix according to the payment password.
[0120] S302: The terminal device randomly generates a second matrix.
[0121] S304: The terminal device generates a third matrix according to the first matrix and the second matrix.
[0122] S305. The terminal device generates a first character string according to the third matrix and a preset code value mapping table.
[0123] Among them, please refer to S201 to S205 described in the above embodiment for S301 to S305, and will not be repeated here.
[0124] S306: The terminal device encrypts the first character string and the second matrix according to a preset encryption key to obtain a first message.
[0125] That is, the step of the terminal device sending the first string and the second matrix to the server may include: the terminal device first encrypts the first string and the second matrix according to the encryption key to obtain a first message, and then sends the first message to the server.
[0126] In some possible embodiments, also based on the understanding that the above-mentioned user can first open the payment application, log in to his own user account (or called the first user account) on the payment application, and perform a payment operation, the above-mentioned terminal device encrypts the first string and the second matrix according to a preset encryption key to obtain the encryption key in the first message step, which can be the encryption key corresponding to the first user account; the encryption keys corresponding to different user accounts may be different.
[0127] Optionally, the encryption key corresponding to the first user account may also be different. That is, each time the first user account performs a payment operation, the terminal device may randomly generate an encryption key and send the randomly generated encryption key to the server.
[0128] For example, user account 1 performed a payment operation in the morning, and the terminal device randomly generated encryption key 1, and used encryption key 1 to encrypt the first string and the second matrix to obtain the first message 1; user account 1 performed another payment operation in the afternoon, and the terminal device randomly generated encryption key 2, and used encryption key 2 to encrypt the first string and the second matrix to obtain the first message.
[0129] S307: The terminal device sends a first message to the server.
[0130] S308. The server decrypts the first message according to a preset encryption key to obtain a first character string and a second matrix.
[0131] That is, the step of the server receiving the first character string and the second matrix sent by the terminal device may include: the server first receives the first message sent by the terminal device, and then decrypts the first message according to the encryption key to obtain the first character string and the second matrix.
[0132] Among them, the encryption key preset in the server can be the same as the encryption key preset in the terminal device.
[0133] S309: The server obtains a third matrix according to the first character string and a preset code value mapping table.
[0134] S310. The server obtains a first matrix according to a third matrix and an inverse matrix of the second matrix.
[0135] S311. The server obtains a payment password according to the first matrix.
[0136] In the embodiment of the present application, the terminal device can also encrypt the first string and the second matrix together according to the encryption key to obtain the first message, that is, the terminal device sends the encrypted first string and the second matrix to the server. Because the first string is also obtained by the terminal device encrypting the third matrix according to the code value mapping table, the information encryption transmission method provided in the embodiment of the present application can achieve double encryption. After the server receives the first message, it can decrypt the first message according to the encryption key to obtain the first string and the second matrix, which can prevent other devices without the encryption key from obtaining the first string and the second matrix, further improving the security of the payment password transmission.
[0137] In addition, in the embodiment of the present application, different user accounts may correspond to different encryption keys. Even if the encryption key corresponding to one user account is intercepted and cracked, it will not threaten the property security of other user accounts, thereby improving the security of payment password transmission.
[0138] An embodiment of the present application also provides a payment system, including a terminal device and a server, the terminal device and the server are connected, and the terminal device and the server cooperate to implement the information encryption transmission method described in the above embodiment.
[0139] An embodiment of the present application also provides an information encryption transmission device, which is applied to a terminal device. Figure 4 This is a schematic diagram of the composition of the information encryption transmission device provided in the embodiment of the present application. Figure 4 As shown, the device may include: an acquisition module 401, a processing module 402, and a sending module 403;
[0140] An acquisition module 401 is used to acquire a payment password; a processing module 402 is used to generate a first matrix based on the payment password; a second matrix is randomly generated, the second matrix is a reversible matrix, and the second matrix is related to the first matrix; a third matrix is generated based on the first matrix and the second matrix; a first character string is generated based on the third matrix and a preset code value mapping table; a sending module 403 is used to send the first character string and the second matrix to a server.
[0141] In some possible embodiments, the number of columns of the first matrix is the same as the number of digits included in the payment password, and the number of rows of the first matrix is 1; the number of rows and columns of the second matrix are the same, and the number of rows and columns of the second matrix are the same as the number of columns of the first matrix.
[0142] In other possible embodiments, the payment password is a digital combination of numbers between 0 and 9; each element in the second matrix is an integer, and the sum of the elements in each column of the second matrix is less than or equal to 8; the code value mapping table includes a digital part and a code value part, the digital part includes 73 numbers between 0 and 72, and the code value part includes 73 code values corresponding one-to-one to the numbers in the digital part.
[0143] In some other possible embodiments, the processing module 402 is specifically used to determine, based on the third matrix and a preset code value mapping table, the code values corresponding to the numbers in each column of the third matrix in the code value mapping table; and generate a first character string based on the code values corresponding to the numbers in each column of the third matrix in the code value mapping table.
[0144] In some other possible embodiments, the acquisition module 401 is specifically used to obtain the payment password corresponding to the first user account in response to the payment operation related to the first user account; the code value mapping table is the code value mapping table corresponding to the first user account; different user accounts correspond to different code value mapping tables.
[0145] In some other possible embodiments, the processing module 402 is specifically used to encrypt the first string and the second matrix according to a preset encryption key to obtain a first message; the sending module 403 is specifically used to send the first message to the server.
[0146] An embodiment of the present application also provides an information encryption transmission device, which is applied to a server. Figure 5 A schematic diagram of a composition of an information encryption transmission device provided in an embodiment of the present application. Figure 5 As shown, the device may include: an acquisition module 501, a processing module 502;
[0147] The acquisition module 501 is used to receive a first character string and a second matrix sent by the terminal device, wherein the first character string is generated by the terminal device according to a third matrix and a preset code value mapping table, and the third matrix is generated by the terminal device according to the second matrix and the first matrix; the second matrix is randomly generated by the terminal device, the second matrix is a reversible matrix, and the second matrix is related to the first matrix, and the first matrix is generated by the terminal device according to the payment password; the processing module 502 is used to obtain the third matrix according to the first character string and the preset code value mapping table; obtain the first matrix according to the third matrix and the second matrix; and obtain the payment password according to the first matrix.
[0148] In some possible embodiments, the processing module 502 is specifically configured to invert the second matrix to obtain an inverse matrix of the second matrix; and obtain the first matrix according to the third matrix and the inverse matrix of the second matrix.
[0149] In some other possible embodiments, the acquisition module 501 is further used to receive a first message sent by a terminal device, where the first message is obtained by the terminal device encrypting the first string and the second matrix according to a preset encryption key; the processing module 502 is specifically used to decrypt the first message according to the encryption key to obtain the first string and the second matrix.
[0150] An embodiment of the present application also provides an electronic device, which can be applied to a terminal device or a server. Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 6 As shown, the electronic device may include: a processor 601 and a memory 602; the memory 602 stores instructions executable by the processor 601; when the processor 601 is configured to execute instructions, the electronic device implements the steps performed by the terminal device or the steps performed by the server in the aforementioned embodiments.
[0151] In an exemplary embodiment, the embodiment of the present application also provides a computer-readable storage medium on which computer program instructions are stored; when the computer program instructions are executed by an electronic device, the electronic device implements the steps executed by the terminal device or the steps executed by the server in the aforementioned embodiments.
[0152] The computer-readable storage medium may be a non-transitory computer-readable storage medium, for example, the non-transitory computer-readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
[0153] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for encrypting and transmitting information, characterized in that: The method is applied to a payment system, the payment system comprising a terminal device and a server, the terminal device and the server are connected; the terminal device and the server are respectively preset with the same code value mapping table; the method comprises: In response to a payment operation related to a first user account, the terminal device obtains a payment password corresponding to the first user account; the payment password is a digital combination consisting of numbers between 0 and 9; the terminal device uses the numbers in the payment password as elements of a matrix in sequence according to the arrangement order of the numbers in the payment password to obtain a first matrix; the number of rows in the first matrix is 1; the terminal device randomly generates a second matrix, the second matrix is a reversible matrix, the number of rows and columns of the second matrix is the same, and the number of rows and columns of the second matrix is the same as the number of columns of the first matrix; each element in the second matrix is an integer, and the sum of the elements in each column of the second matrix is less than or equal to 8; The terminal device multiplies the first matrix and the second matrix to obtain a third matrix; the terminal device generates a first character string according to the third matrix and the preset code value mapping table; the code value mapping table includes a digital part and a code value part, the digital part includes 73 numbers between 0 and 72, and the code value part includes 73 code values corresponding to the numbers in the digital part one by one; the code value mapping table is a code value mapping table corresponding to the first user account; different user accounts correspond to different code value mapping tables; The terminal device sends the first character string and the second matrix to the server; The server obtains the third matrix according to the first character string and the preset code value mapping table; The server obtains the first matrix according to the third matrix and the second matrix; The server obtains the payment password according to the first matrix.
2. The method according to claim 1, characterized in that The terminal device generates a first character string according to the third matrix and a preset code value mapping table, including: The terminal device determines, according to the third matrix and a preset code value mapping table, the code value corresponding to the number in each column of the third matrix in the code value mapping table; The terminal device generates a first character string according to the code value corresponding to the number in each column of the third matrix in the code value mapping table.
3. The method according to claim 1, characterized in that The server obtains the first matrix according to the third matrix and the second matrix, including: The server inverts the second matrix to obtain an inverse matrix of the second matrix; The server obtains the first matrix according to the third matrix and the inverse matrix of the second matrix.
4. The method according to any one of claims 1 to 3, characterized in that: The terminal device sends the first character string and the second matrix to the server, including: The terminal device encrypts the first character string and the second matrix according to a preset encryption key to obtain a first message; The terminal device sends a first message to the server; Before the server obtains the third matrix according to the first character string and the preset code value mapping table, the method further includes: The server decrypts the first message according to the encryption key to obtain the first character string and the second matrix.
5. A method for encrypting and transmitting information, characterized in that: The method is applied to a terminal device, the terminal device is connected to a server, and the method comprises: In response to a payment operation related to a first user account, the terminal device obtains a payment password corresponding to the first user account; the payment password is a digital combination consisting of numbers between 0 and 9; according to the arrangement order of the numbers in the payment password, the numbers in the payment password are sequentially used as elements of a matrix to obtain a first matrix; the number of rows in the first matrix is 1; Randomly generate a second matrix, where the second matrix is a reversible matrix, the number of rows and the number of columns of the second matrix are the same, and the number of rows and the number of columns of the second matrix are the same as the number of columns of the first matrix; each element in the second matrix is an integer, and the sum of the elements in each column of the second matrix is less than or equal to 8; Multiplying the first matrix and the second matrix to obtain a third matrix; A first character string is generated according to the third matrix and a preset code value mapping table; the code value mapping table includes a numeric part and a code value part, the numeric part includes 73 numbers between 0 and 72, and the code value part includes 73 code values corresponding to the numbers in the numeric part one by one; the code value mapping table is a code value mapping table corresponding to the first user account; different user accounts have different code value mapping tables; The first character string and the second matrix are sent to the server.
6. The method according to claim 5, characterized in that The generating a first character string according to the third matrix and a preset code value mapping table includes: According to the third matrix and a preset code value mapping table, respectively determine the code value corresponding to the number in each column of the third matrix in the code value mapping table; A first character string is generated according to the code value corresponding to the number in each column of the third matrix in the code value mapping table.
7. The method according to claim 5 or 6, characterized in that: The sending the first character string and the second matrix to the server includes: Encrypting the first character string and the second matrix according to a preset encryption key to obtain a first message; Send a first message to the server.
8. A method for encrypting and transmitting information, characterized in that: The method is applied to a server, the server is connected to a terminal device, and the method comprises: Receive a first character string and a second matrix sent by the terminal device, wherein the first character string is generated by the terminal device according to a third matrix and a preset code value mapping table, and the third matrix is generated by the terminal device according to the second matrix and the first matrix; the second matrix is randomly generated by the terminal device, the second matrix is a reversible matrix, the number of rows and the number of columns of the second matrix are the same, and the number of rows and the number of columns of the second matrix are the same as the number of columns of the first matrix; each element in the second matrix is an integer, and the sum of the elements in each column of the second matrix is less than or equal to 8; the first matrix is generated by the terminal device in response to the first user account For a related payment operation, after obtaining the payment password corresponding to the first user account, the numbers in the payment password are sequentially used as elements of a matrix according to the arrangement order of the numbers in the payment password; the payment password is a digital combination consisting of numbers between 0 and 9; the number of rows of the first matrix is 1; the code value mapping table includes a digital part and a code value part, the digital part includes 73 numbers between 0 and 72, and the code value part includes 73 code values corresponding to the numbers in the digital part one by one; the code value mapping table is the code value mapping table corresponding to the first user account; different user accounts have different code value mapping tables; Obtaining the third matrix according to the first character string and the preset code value mapping table; Obtain the first matrix according to the third matrix and the second matrix; The payment password is obtained according to the first matrix.
9. The method according to claim 8, characterized in that The obtaining the first matrix according to the third matrix and the second matrix comprises: Inverting the second matrix to obtain an inverse matrix of the second matrix; The first matrix is obtained according to the third matrix and the inverse matrix of the second matrix.
10. The method according to claim 8 or 9, characterized in that: Before obtaining the third matrix according to the first character string and the preset code value mapping table, the method further includes: Receiving a first message sent by the terminal device, where the first message is obtained by the terminal device encrypting the first character string and the second matrix according to a preset encryption key; The first message is decrypted according to the encryption key to obtain the first character string and the second matrix.
11. An information encryption transmission device, characterized in that: The device is applied to a terminal device, the terminal device is connected to a server, and the device comprises: an acquisition module, a processing module, and a sending module; The acquisition module is used to obtain a payment password corresponding to the first user account in response to a payment operation related to the first user account; the payment password is a digital combination consisting of numbers between 0 and 9; The processing module is used to use the numbers in the payment password as elements of a matrix in sequence according to the arrangement order of the numbers in the payment password to obtain a first matrix; the number of rows in the first matrix is 1; randomly generate a second matrix, the second matrix is a reversible matrix, the number of rows and the number of columns in the second matrix are the same, and the number of rows and the number of columns in the second matrix are the same as the number of columns in the first matrix; each element in the second matrix is an integer, and the sum of the elements in each column of the second matrix is less than or equal to 8; multiply the first matrix and the second matrix to obtain a third matrix; generate a first character string according to the third matrix and a preset code value mapping table; the code value mapping table includes a digital part and a code value part, the digital part includes 73 numbers between 0 and 72, and the code value part includes 73 code values corresponding to the numbers in the digital part one by one; the code value mapping table is the code value mapping table corresponding to the first user account; different user accounts have different code value mapping tables; The sending module is used to send the first character string and the second matrix to the server.
12. An information encryption transmission device, characterized in that: The device is applied to a server, the server is connected to a terminal device, and the device comprises: an acquisition module and a processing module; The acquisition module is used to receive a first character string and a second matrix sent by the terminal device, the first character string is generated by the terminal device according to a third matrix and a preset code value mapping table, and the third matrix is generated by the terminal device according to the second matrix and the first matrix; the second matrix is randomly generated by the terminal device, the second matrix is a reversible matrix, the number of rows and columns of the second matrix is the same, and the number of rows and columns of the second matrix is the same as the number of columns of the first matrix; each element in the second matrix is an integer, and the sum of the elements in each column of the second matrix is less than or equal to 8; the first matrix is generated by the terminal device in response to the first a payment operation related to a user account, after obtaining the payment password corresponding to the first user account, the numbers in the payment password are sequentially used as elements of a matrix according to the arrangement order of the numbers in the payment password; the payment password is a digital combination consisting of numbers between 0 and 9; the number of rows of the first matrix is 1; the code value mapping table includes a digital part and a code value part, the digital part includes 73 numbers between 0 and 72, and the code value part includes 73 code values corresponding to the numbers in the digital part one by one; the code value mapping table is the code value mapping table corresponding to the first user account; different user accounts correspond to different code value mapping tables; The processing module is used to obtain the third matrix according to the first character string and the preset code value mapping table; obtain the first matrix according to the third matrix and the second matrix; and obtain the payment password according to the first matrix.
13. A payment system, characterized in that: The payment system comprises: a server and a terminal device, wherein the server and the terminal device are connected; The server and the terminal device are used to cooperate to implement the method according to any one of claims 1-4.
14. An electronic device, characterized in that: The electronic device comprises: a processor and a memory; The memory stores instructions executable by the processor; When the processor is configured to execute the instructions, the electronic device implements the method according to any one of claims 5 to 7, or the method according to any one of claims 8 to 10.
15. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes: computer software instructions; When the computer software instructions are executed in an electronic device, the electronic device implements the method according to any one of claims 5 to 7, or the method according to any one of claims 8 to 10.
