A method for encrypting user privacy data on an Internet e-commerce platform
Through the simplified user privacy data encryption method, encoding and encryption algorithms are used to process user data on the Internet e-commerce platform, solving the complex and cumbersome problems of existing methods, improving efficiency and ensuring data security.
Patent Information
- Application Number
- CN202310670118.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-07
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2043-06-07
AI Technical Summary
The existing Internet e-commerce platform user privacy data encryption methods are complex, which increases the cumbersome processing and affects efficiency.
The acquisition module obtains user plaintext data, encodes the data using the first encoding module, and then encrypts the encoded data using the encryption module. The conversion module converts the encrypted data into a byte array and flips it in sequence. The second encoding module base58Check encoding of the encrypted string or uses the MD5 encryption algorithm to generate the final encrypted string and store it in the database.
The user's privacy data encryption process is simplified, processing efficiency is improved, and data security is ensured through multiple encoding and encryption.
Smart Images

Figure CN116702171B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of user privacy data encryption, and in particular relates to a method for encrypting user privacy data of an Internet e-commerce platform. Background Art
[0002] E-commerce is becoming more and more developed, bringing convenience to people while also bringing some issues about consumers' own privacy. Since the Internet is an open and shared platform, it lacks protection for some information. When shopping on an e-commerce platform, you need to fill in enough personal information before you can log in and shop, such as mobile phone number, e-mail address, user name, delivery address, etc. A large amount of valuable information can be easily obtained from the e-commerce platform, causing users to suffer losses to varying degrees. The phenomenon of providing various information services and selling personal information on e-commerce platforms has seriously affected the healthy development of the e-commerce economy. Online shopping requires filling in personal information and binding relevant bank card numbers for payment, and all of these services involve consumers' privacy.
[0003] Some derivative service providers in the e-commerce industry chain, such as decoration, operation and search and price comparison of online stores, generally target consumers who shop online and collect data with customers as the center. With the popularity of the Internet, online shopping has become a habit, and most consumers do not pay attention to protecting their privacy in the process of consuming goods. The Internet efficiency of netizens has also been continuously improved with the development of search engines, and at the same time, the possibility of obtaining personal information on the Internet has also increased. These search engines will record the browsing history of netizens while being used by netizens, and these netizens or consumers who use search engines are not familiar with this issue. According to reports, search engines are currently an important way for online merchants and e-commerce personnel to conduct telephone sales, QQ mailbox sales and other information to netizens, so that consumers are often harassed by some information for no reason. Therefore, the abuse of search engines in the process of consumers' privacy being violated in e-commerce is also a reason that cannot be ignored.
[0004] The patent application number is 201811388158.5, which discloses a method for encrypting and decrypting user privacy data of an Internet e-commerce platform. The method includes the following steps: generating a vector iv based on the original user data passed in; obtaining the encrypted and stored ciphertext key; decrypting the ciphertext key into a plaintext ciphertext key; encrypting the original user data byte stream using the AES256 / CFB8 / NOPADDING algorithm using the plaintext ciphertext key and the vector iv to obtain a first encrypted string; performing base64 encoding on the first encrypted string to obtain a second encrypted string; concatenating E-, iv, and the second encrypted string in sequence to obtain a third encrypted string, and storing the third encrypted string as encrypted data in a database.
[0005] The patent application number is CN202111264479.6, which is a method for protecting online shopping privacy based on distributed digital identity. The patent discloses that a user logs in to a distributed digital identity to make online shopping payments on an e-commerce platform, wherein the ordered goods are paid by the user through a smart contract address, and the order information is uploaded to the e-commerce platform through encryption; the e-commerce platform obtains the order information, decrypts the order information, and sends the order information to the seller. The order information includes the order number, the DID of the ordering user, the city area and the product information; the seller packs the goods according to the product information in the order information, and sends the goods and order information to the express company. The express company dispatches couriers through the city area in the order information to deliver the express according to the order information.
[0006] Existing Internet e-commerce platforms use multiple encryption strings to encrypt user privacy data, which increases the complexity of processing. Summary of the invention
[0007] The purpose of the present invention is to provide a method for encrypting user privacy data of an Internet e-commerce platform to improve processing efficiency.
[0008] To achieve the above-mentioned purpose, the present invention provides the following technical solution: a method for encrypting user privacy data of an Internet e-commerce platform, comprising an acquisition module, a first encoding module, an encryption module, a conversion module, a second encoding module, and a database, wherein:
[0009] The acquisition module is used to acquire user plaintext data;
[0010] The first encoding module is in communication with the acquisition module, and the acquired plaintext data is encoded by the first encoding module to obtain a first encoding vector;
[0011] The encryption module is in communication with the first encoding module, and uses an encryption algorithm to encrypt the first encoding vector to obtain encrypted data;
[0012] The conversion module is in communication with the encryption module, and the encrypted data is converted into a byte array through the conversion module, and the byte array is reversed to form a byte set; the byte set is appended to the string buffer, and the byte set is encrypted to obtain an encrypted string;
[0013] The second encoding module performs Base58Check encoding on the encrypted string or encrypts it using the MD5 encryption algorithm to obtain a final encrypted string, and stores the final encrypted string as encrypted data in the database;
[0014] The encryption method is as follows:
[0015] Step 1: Obtain user plaintext data through the acquisition module;
[0016] Step 2: Encode the obtained plaintext data through a first encoding module to obtain a first encoding vector;
[0017] Step 3: Encrypt the first coding vector using an encryption algorithm to obtain encrypted data;
[0018] Step 4: Convert the encrypted data into a byte array through the conversion module, reverse the order of the byte array to form a byte set; append the byte set to the string buffer, encrypt the byte set, and obtain an encrypted string;
[0019] Step 5: Step 5: Use the second encoding module to perform Base58Check encoding on the encrypted string or encrypt it using the MD5 encryption algorithm to obtain the final encrypted string, encrypt the final encrypted string to generate ciphertext; During the transmission of binary data, in order to prevent data transmission errors and protect data security, a check code is usually added. The check code can be used to detect whether the data is damaged or whether it is entered incorrectly when sending; Base58Check is Base58 plus a check code; If the overall encoded data is damaged or tampered with during the transmission process, the recipient will perform the same check code calculation on the original data after receiving the data, and compare it with the check code in the received result.
[0020] As a preferred technical solution of the present invention, the encryption algorithm includes a symmetric encryption algorithm, an asymmetric encryption algorithm and a hash algorithm; the symmetric encryption algorithm can play the following roles: confidentiality and authentication, confidentiality means that the message is encrypted and other people cannot see the content of the message; authentication means that only people with the key can send the message; the symmetric encryption algorithm can be divided into stream encryption and block encryption, stream encryption means encrypting one bit at a time, and block encryption means dividing the encrypted data into several blocks of fixed length and encrypting one block at a time; the asymmetric encryption algorithm uses different keys for encryption and decryption, one is called the public key and the other is called the private key; the asymmetric encryption can play the following roles: confidentiality, authentication, and data integrity, confidentiality means encrypting through the recipient's public key, so that only the recipient has the private key and can decrypt; authentication is achieved through signatures.
[0021] As a preferred technical solution of the present invention, the Base58Check encoding method is as follows: before encoding, a self-agreed byte version information is added to the content string to be encoded, and then the hash value of the content string to be encoded is added. After adding them together, the whole is Base58 encoded.
[0022] As a preferred technical solution of the present invention, it also includes a rights management module, through which the limited data provided by the user is obtained.
[0023] As a preferred technical solution of the present invention, it also includes an identity authentication module, through which the user identity is authenticated.
[0024] As a preferred technical solution of the present invention, the identity authentication method is a combination of face recognition and account number and password.
[0025] As a preferred technical solution of the present invention, it also includes an abnormal alarm module for giving an alarm when the data is abnormal.
[0026] As a preferred technical solution of the present invention, it also includes a log module, through which the data is recorded.
[0027] As a preferred technical solution of the present invention, the method for encrypting the final encrypted string is as follows:
[0028] Get the encryption identifier of the string to be encrypted;
[0029] Encrypt the encrypted string using a randomly selected encryption method according to the encryption identifier;
[0030] When the end mark is detected, the encryption of the current encrypted string is completed.
[0031] As a preferred technical solution of the present invention, it also includes a decryption method: extracting encrypted data; taking the first 16 characters of the decrypted string to obtain a vector; removing the first 16 characters of the decrypted string, performing Base58 decoding, and obtaining a final decrypted string; obtaining an encrypted and stored ciphertext key; decrypting the ciphertext key into a plaintext ciphertext key; using the plaintext ciphertext key and the vector, decrypting the final decrypted string using the AES256 algorithm to obtain decrypted data.
[0032] Compared with the prior art, the present invention has the following beneficial effects:
[0033] 1. The first coding vector is encrypted using an encryption algorithm to obtain encrypted data; the encrypted data is converted into a byte array through a conversion module, and the byte array is reversed to form a byte set; the byte set is appended to the string buffer, and the byte set is encrypted to obtain an encrypted string; the second encoding module performs Base58Check encoding on the encrypted string or uses the MD5 encryption algorithm to encrypt the encrypted string to obtain the final encrypted string, thereby ensuring the security of user privacy data and improving processing efficiency;
[0034] 2. Through the authority management module, the limited data provided by the user can be obtained, and the authorized data can be selected, which limits the use of data to the greatest extent, thereby improving the security of the data. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 The figure is a flow chart of the encryption method of the present invention. DETAILED DESCRIPTION
[0036] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0037] Example 1
[0038] See also Figure 1 , is the first embodiment of the present invention, which provides an Internet e-commerce platform user privacy data encryption method, including an acquisition module, a first encoding module, an encryption module, a conversion module, a second encoding module, and a database, wherein:
[0039] The acquisition module is used to obtain user plaintext data;
[0040] The first encoding module is in communication with the acquisition module, and the first encoding module encodes the acquired plaintext data to obtain a first encoding vector;
[0041] The encryption module is in communication with the first encoding module, and uses an encryption algorithm to encrypt the first encoding vector to obtain encrypted data;
[0042] The conversion module is connected to the encryption module for communication. The conversion module converts the encrypted data into a byte array, and the byte array is reversed to form a byte set. The byte set is appended to the string buffer, and the byte set is encrypted to obtain an encrypted string.
[0043] The second encoding module performs Base58Check encoding on the encrypted string or encrypts it using the MD5 encryption algorithm to obtain a final encrypted string, and stores the final encrypted string as encrypted data in the database;
[0044] The encryption method is as follows:
[0045] Step 1: Obtain user plaintext data through the acquisition module;
[0046] Step 2: Encode the obtained plaintext data through a first encoding module to obtain a first encoding vector;
[0047] Step 3: Encrypt the first coding vector using an encryption algorithm to obtain encrypted data;
[0048] Step 4: Convert the encrypted data into a byte array through the conversion module, reverse the order of the byte array to form a byte set; append the byte set to the string buffer, encrypt the byte set, and obtain an encrypted string;
[0049] Step 5: Step 5: Use the second encoding module to perform Base58Check encoding on the encrypted string or use the MD5 encryption algorithm to encrypt it to obtain the final encrypted string, encrypt the final encrypted string to generate ciphertext; in the transmission of binary data, in order to prevent data transmission errors and protect data security, a check code is usually added. The combination of the check code can be used to find out whether the data is damaged or whether it is entered incorrectly when sending; Base58Check is Base58 plus a check code; if the overall encoded data is damaged or tampered with during transmission, the receiver will perform the same check code calculation on the original data after receiving the data, and compare it with the check code in the received result; MD5 encryption algorithm function: input information of any length, and after processing, the output is 128-bit information value. Different input The corresponding output of the input must be different to ensure uniqueness; Advantages of MD5 encryption: prevent tampering. Once it is tampered with during transmission, the calculated MD5 value must be different; fast calculation speed, fast encryption speed, no secret key required; check the integrity of the file. Once the file is changed, the MD5 value is also different; prevent seeing the plaintext; prevent denial of responsibility, used for digital signatures; MD5 implementation principle: Padding: group the input information by 512 modulo, if it is not equal to 448, then fill it with 1 and 0, a 1N 0, and the final data is N*512+448; record information length: store the obtained information with 64 bits before filling the information length, so 448+64=512, the total information is N+1 512. Perform function operations with four constants ABCD and each group of 512 bits. The final output result is 4 groups of 32-bit constants, which are concatenated to obtain the MD5 code.
[0050] This application performs Base58Check encoding on the encrypted string or uses the MD5 encryption algorithm to encrypt it to obtain the final encrypted string, which helps to improve the performance of encrypting user privacy data on the Internet e-commerce platform, increase usage security, and prevent information leakage.
[0051] In this embodiment, preferably, the encryption algorithm is a symmetric encryption algorithm; the symmetric encryption algorithm can play the role of confidentiality and authentication, confidentiality is that the message is encrypted and other people cannot see the content of the message; authentication is that only people with the key can send the message; the symmetric encryption algorithm can be divided into stream encryption and block encryption, stream encryption is to encrypt one bit at a time, block encryption is to divide the encrypted data into several blocks of fixed length, and encrypt one block at a time.
[0052] In this embodiment, preferably, the Base58Check encoding method is as follows: before encoding, a self-agreed byte version information is added to the content string to be encoded, and then the hash value of the content string to be encoded is added, and after adding them together, the whole is Base58 encoded.
[0053] In this embodiment, preferably, a rights management module is also included, through which limited data provided by the user is obtained, and authorized data can be selected, thereby limiting the use of data to the greatest extent, thereby improving data security.
[0054] In this embodiment, preferably, an identity authentication module is also included, and the user identity is authenticated by the identity authentication module.
[0055] In this embodiment, preferably, the identity authentication method is a combination of face recognition and account number and password, which improves the accuracy of identity authentication.
[0056] In this embodiment, preferably, an abnormal alarm module is also included, which is used to issue an alarm when the data is abnormal, so as to facilitate timely maintenance.
[0057] In this embodiment, preferably, a log module is also included to record data.
[0058] In this embodiment, preferably, the method for encrypting the final encrypted string is as follows:
[0059] Get the encryption identifier of the string to be encrypted;
[0060] Encrypt the encrypted string using a randomly selected encryption method according to the encryption identifier;
[0061] When the end mark is detected, the encryption of the current encrypted string is completed.
[0062] In this embodiment, preferably, a decryption method is also included: extracting encrypted data; taking the first 16 characters of the decrypted string to obtain a vector; removing the first 16 characters of the decrypted string, performing Base58 decoding, and obtaining a final decrypted string; obtaining an encrypted and stored ciphertext key; decrypting the ciphertext key into a plaintext ciphertext key; using the plaintext ciphertext key and the vector, decrypting the final decrypted string using the AES256 algorithm to obtain decrypted data.
[0063] Example 2
[0064] See also Figure 1 , which is the second embodiment of the present invention, is based on the previous embodiment, except that:
[0065] The encryption algorithm is an asymmetric encryption algorithm. An asymmetric encryption algorithm uses different keys for encryption and decryption, one is called a public key and the other is called a private key. The functions of asymmetric encryption are: confidentiality, authentication, and data integrity. Confidentiality is encrypted using the receiver's public key, so that only the receiver has the private key and can decrypt. Authentication is achieved through signatures. The hash algorithm calculates a byte string of any length into a fixed-length byte string according to a certain algorithm. The receiver needs to use the same algorithm and the same input to calculate the hash value and compare it with the transmitted hash value.
[0066] Example 3
[0067] See also Figure 1 , which is the third embodiment of the present invention, is based on the previous embodiment, except that:
[0068] The encryption algorithm is a hash algorithm. The hash algorithm calculates a byte string of any length into a byte string of fixed length according to a certain algorithm. The receiver needs to use the same algorithm and the same input to calculate the hash value and compare it with the transmitted hash value.
[0069] Although the embodiments of the present invention have been shown and described, as detailed above, it will be understood by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for encrypting user privacy data on an Internet e-commerce platform, characterized by: It includes an acquisition module, a first encoding module, an encryption module, a conversion module, a second encoding module, and a database, wherein: The acquisition module is used to acquire user plaintext data; The first encoding module is in communication with the acquisition module, and the acquired plaintext data is encoded by the first encoding module to obtain a first encoding vector; The encryption module is in communication with the first encoding module, and uses an encryption algorithm to encrypt the first encoding vector to obtain encrypted data; The conversion module is in communication with the encryption module, and the encrypted data is converted into a byte array through the conversion module, and the byte array is reversed to form a byte set; the byte set is appended to the string buffer, and the byte set is encrypted to obtain an encrypted string; The second encoding module performs Base58Check encoding on the encrypted string or uses the MD5 encryption algorithm to encrypt the encrypted string to obtain a final encrypted string, and stores the final encrypted string as encrypted data in the database; the Base58Check encoding method is as follows: before encoding, a self-agreed byte version information is added to the content string to be encoded, and then the hash value of the content string to be encoded is added, and after adding them together, the whole is Base58 encoded; The encryption method is as follows: Step 1: Obtain user plaintext data through the acquisition module; Step 2: Encode the obtained plaintext data through a first encoding module to obtain a first encoding vector; Step 3: Encrypt the first coding vector using an encryption algorithm to obtain encrypted data; Step 4: Convert the encrypted data into a byte array through the conversion module, reverse the order of the byte array to form a byte set; append the byte set to the string buffer, encrypt the byte set, and obtain an encrypted string; Step 5: Use the second encoding module to perform Base58Check encoding on the encrypted string or use the MD5 encryption algorithm to encrypt it to obtain the final encrypted string, encrypt the final encrypted string to generate ciphertext; The final encrypted string is encrypted as follows: Get the encryption identifier of the string to be encrypted; Encrypt the encrypted string using a randomly selected encryption method according to the encryption identifier; When the end mark is detected, the encryption of the current encrypted string is completed.
2. According to claim 1, a method for encrypting user privacy data of an Internet e-commerce platform is characterized by: The encryption algorithm includes a symmetric encryption algorithm, an asymmetric encryption algorithm and a hash algorithm.
3. According to claim 1, a method for encrypting user privacy data of an Internet e-commerce platform is characterized in that: It also includes a rights management module, through which limited data provided by the user is obtained.
4. The method for encrypting user privacy data of an Internet e-commerce platform according to claim 1, characterized in that: It also includes an identity authentication module, through which the user's identity is authenticated.
5. A method for encrypting user privacy data of an Internet e-commerce platform according to claim 4, characterized in that: The identity authentication method is a combination of face recognition and account number and password.
6. The method for encrypting user privacy data of an Internet e-commerce platform according to claim 1, characterized in that: It also includes an abnormal alarm module for issuing an alarm when the data is abnormal.
7. The method for encrypting user privacy data of an Internet e-commerce platform according to claim 1, characterized in that: It also includes a log module, through which data is recorded.
8. The method for encrypting user privacy data of an Internet e-commerce platform according to claim 1, characterized in that: It also includes a decryption method: taking out the encrypted data; Get the first 16 characters of the decrypted string to get a vector; Remove the first 16 characters of the decrypted string, perform Base58 decoding, and obtain the final decrypted string; obtain the encrypted and stored ciphertext key; Decrypt the ciphertext key into a plaintext ciphertext key; The final decrypted string is decrypted using the AES256 algorithm using the plaintext ciphertext key and vector to obtain the decrypted data.
Citation Information
Patent Citations
A method for encrypting and decrypting user privacy data on an internet e-commerce platform
CN109583217B
Online shopping privacy protection method based on distributed digital identity
CN113901504A
Internet e-commerce platform user privacy data encryption and decryption method
CN109583217A
Data encryption method and system for physical management platform, terminal and storage medium
CN111859424A