Methods, devices, systems, and media for a flash sale request method and a flash sale verification method
By adopting a framework of front-end encryption and back-end decryption, and using key generation algorithms and symmetric encryption algorithms to verify the validity of parameters in flash sale requests, the system solves the problem of black market attacks in existing flash sale systems, and improves defense capabilities and user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- INDUSTRIAL AND COMMERCIAL BANK OF CHINA
- Filing Date
- 2022-09-27
- Publication Date
- 2026-04-21
AI Technical Summary
Existing flash sale systems are not very effective at defending against cyberattacks due to their inadequate page behavior verification. Cyberattacks can use scripts to simulate normal customer operations to complete flash sales, resulting in a degraded user experience.
During the flash sale request process, a framework of front-end encryption and back-end decryption is used. Key generation algorithms and symmetric encryption algorithms are used to encrypt and decrypt the flash sale request, generate keys, and verify the validity of parameters to ensure the legitimacy of the request.
It significantly improves the ability to defend against cyberattacks, reduces the frequency of attacks by cybercriminals at the start of flash sales, enhances the user experience, and ensures smooth participation for legitimate users.
Smart Images

Figure CN115694902B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of information security, and more specifically to a method for requesting and verifying a flash sale, an apparatus, a flash sale system, a computer system, a medium, and a program product. Background Technology
[0002] To prevent attacks from cybercriminals (such as malicious purchases or fraudulent acquisition of flash sale inventory), the flash sale system primarily employs page behavior verification measures, including image CAPTCHA verification, behavioral CAPTCHA verification, and SMS CAPTCHA verification. During the flash sale, verification is required before the purchase can proceed.
[0003] In the process of realizing this solution concept, the inventors discovered the following defects in the existing technology: the anti-black market measures of page behavior verification are not very effective, because black market operators can capture the flash sale request message and use scripts to simulate the operation process of normal customers to complete the flash sale; moreover, setting up multiple layers of behavior security verification will increase the difficulty of operation for normal customers and reduce the user experience. Summary of the Invention
[0004] In view of the above problems, this disclosure provides a flash sale request method and flash sale verification method, device, flash sale system, computer system, medium and program products that can significantly improve the ability to defend against cybercrime during the flash sale process.
[0005] A first aspect of this disclosure provides a method for requesting a flash sale on a front-end. The method includes: obtaining an unencrypted string; obtaining parameter information related to the flash sale request, the parameter information including N data points, where N is an integer greater than or equal to 2; generating a key based on the parameter information according to a key generation algorithm; encrypting the unencrypted string using the key through a symmetric encryption algorithm to obtain an encrypted string; and sending the flash sale request to a back-end using the parameter information, the encrypted string, and the unencrypted string as components of the flash sale request. The key generation algorithm includes: extracting at least a portion of characters from the N data points to construct a first string; converting the first string into a second string using an irreversible encryption algorithm; and generating the key based on the second string.
[0006] According to an embodiment of this disclosure, obtaining the unencrypted string includes: concatenating the unencrypted string based on information of the user who sent the flash sale request.
[0007] According to an embodiment of this disclosure, extracting at least some characters from the N data and concatenating them into a first string includes: the characters extracted from the same data in the first string are not completely grouped together.
[0008] According to embodiments of this disclosure, extracting at least some characters from the N data and concatenating them into a first string includes: extracting characters from the N data in different ways.
[0009] According to embodiments of this disclosure, the irreversible encryption algorithm includes the MD5 message digest algorithm.
[0010] According to embodiments of this disclosure, the N data include a session identifier of the session to which the flash sale request belongs and a random number generated for the flash sale request.
[0011] A second aspect of this disclosure provides a method for verifying a flash sale in a backend. The flash sale verification method includes: receiving a flash sale request; extracting parameter information, an encrypted string, and an unencrypted string from the flash sale request, wherein the parameter information includes N data items; generating a key based on the parameter information according to a key generation algorithm; using the key to decrypt the encrypted string using a symmetric encryption algorithm to obtain a decrypted string; and rejecting the flash sale request when the decrypted string does not match the unencrypted string. The key generation algorithm includes: extracting at least a portion of characters from the N data items to form a first string; converting the first string using an irreversible encryption algorithm to obtain a second string; and generating the key based on the second string.
[0012] A third aspect of this disclosure provides a flash sale request device disposed at a front end. The flash sale request device includes a first acquisition module, a first key generation module, a first encryption module, and a first sending module. The first acquisition module is used to acquire an unencrypted string and parameter information related to the flash sale request, the parameter information including N data points, where N is an integer greater than or equal to 2. The first key generation module is used to generate a key based on the parameter information according to a key generation algorithm; wherein the key generation algorithm includes: extracting at least a portion of characters from the N data points to form a first string, converting the first string into a second string using an irreversible encryption algorithm, and generating the key based on the second string. The first encryption module is used to encrypt the unencrypted string using the key through a symmetric encryption algorithm to obtain an encrypted string. The first sending module is used to send the flash sale request to a back end, using the parameter information, the encrypted string, and the unencrypted string as components of the flash sale request.
[0013] A fourth aspect of this disclosure provides a backend-mounted flash sale verification device. The flash sale verification device includes a second receiving module, a second extraction module, a second key generation module, a second decryption module, and a second verification module. The second receiving module receives flash sale requests. The second extraction module extracts parameter information, an encrypted string, and an unencrypted string from the flash sale request, wherein the parameter information includes N data items. The second key generation module generates a key based on the parameter information according to a key generation algorithm; wherein the key generation algorithm includes: extracting at least a portion of characters from the N data items to form a first string, converting the first string into a second string using an irreversible encryption algorithm, and generating the key based on the second string. The second decryption module uses the key to decrypt the encrypted string using a symmetric encryption algorithm to obtain a decrypted string. The second verification module rejects the flash sale request when the decrypted string does not match the unencrypted string.
[0014] A fifth aspect of this disclosure provides a flash sale system. The flash sale system includes a front-end and a back-end. The front-end is used to execute the flash sale request method provided in the first aspect. The back-end is used to execute the flash sale verification method provided in the second aspect. The front-end and the back-end use the key generation algorithm and symmetric encryption algorithm agreed upon by both.
[0015] A sixth aspect of this disclosure provides a computer system. The computer system includes one or more processors and a memory. The memory stores one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to execute the flash sale request method provided in the first aspect, or the flash sale verification method provided in the second aspect.
[0016] A seventh aspect of this disclosure also provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, cause the processor to execute the flash sale request method provided in the first aspect or the flash sale verification method provided in the second aspect.
[0017] An eighth aspect of this disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements the flash sale request method provided in the first aspect or the flash sale verification method provided in the second aspect.
[0018] The above one or more embodiments have the following advantages or beneficial effects: information during the flash sale process is encrypted and the validity of parameters is verified by the backend, and the validity of information is verified without the user's awareness. This reduces the frequency of black market tools directly calling the interface to complete the flash sale to a certain extent. By using the backend to verify the validity of parameters, the stability of the flash sale system is improved. While defending against black market activities, the user experience can be improved, and normal users can participate in the flash sale smoothly. Attached Figure Description
[0019] The foregoing contents, as well as other objects, features, and advantages of this disclosure, will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:
[0020] Figure 1 This illustration schematically depicts an application scenario of the flash sale request method and flash sale verification method according to embodiments of the present disclosure;
[0021] Figure 2 A flowchart illustrating a flash sale request method applied to a front end according to an embodiment of the present disclosure is shown schematically;
[0022] Figure 3 A flowchart illustrating a flash sale verification method applied to the backend according to an embodiment of the present disclosure is shown schematically.
[0023] Figure 4 A flowchart illustrating a flash sale request and verification process according to an embodiment of the present disclosure is shown schematically.
[0024] Figure 5 This schematically illustrates a structural block diagram of a flash sale request device disposed at the front end according to an embodiment of the present disclosure;
[0025] Figure 6 This schematically illustrates a structural block diagram of a flash sale verification device disposed at the back end according to an embodiment of the present disclosure; and
[0026] Figure 7 The diagram illustrates a structural block diagram of a computer system suitable for implementing the flash sale request method or flash sale verification method of the embodiments of the present disclosure. Detailed Implementation
[0027] The embodiments of the present disclosure will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the disclosure. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the present disclosure for ease of explanation. However, it will be apparent that one or more embodiments may be practiced without these specific details. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concepts of the present disclosure.
[0028] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0029] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.
[0030] When using expressions such as "at least one of A, B, and C," the expression should generally be interpreted in accordance with the meaning commonly understood by a person skilled in the art (e.g., "a system having at least one of A, B, and C" should include, but is not limited to, a system having A alone, having B alone, having C alone, having A and B, having A and C, having B and C, and / or having A, B, and C, etc.). The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, features defined with "first" or "second" may explicitly or implicitly include one or more features.
[0031] Flash sales have unique characteristics, specifically: traffic typically surges within the first few minutes, and the available product inventory (referred to as "flash sale inventory") is often wiped out in a short time. Malicious actors use tools to simulate normal user behavior, sending a large number of request packets to maliciously seize the flash sale inventory almost instantly after the sale begins. Based on the characteristics of flash sales and the attack patterns of malicious actors, it can be found that effectively reducing the frequency of successful flash sales by malicious actors during the initial period of the sale can significantly reduce their malicious occupation of the flash sale inventory.
[0032] Based on the above ideas, this disclosure proposes a flash sale request method, flash sale verification method, device, flash sale system, computer system, medium, and program product to improve the defense capability of a flash sale system against malicious attacks by verifying the validity of parameters through a backend flash sale interface. This can effectively reduce the frequency of successful malicious attacks in the short period after the flash sale begins.
[0033] Specifically, the embodiments of this disclosure are based on a framework of front-end encryption and back-end decryption and verification. The front-end and back-end use symmetric encryption algorithms for encryption and decryption, and the key generation during the encryption and decryption process depends on parameters generated during the flash sale process. These parameters are updated as the flash sale requests change. Through the design of the key generation algorithm and back-end parameter verification in these embodiments, it is difficult for malicious actors to quickly launch a large number of effective flash sale requests in a short period, effectively reducing the attack rate of cybercriminals.
[0034] Figure 1 The illustration schematically depicts an application scenario of the flash sale request method and flash sale verification method according to embodiments of the present disclosure. It should be noted that... Figure 1 The examples shown are merely examples of system architectures that can be applied to the embodiments of this disclosure, in order to help those skilled in the art understand the technical content of this disclosure, but do not mean that the embodiments of this disclosure cannot be used in other devices, systems, environments or scenarios.
[0035] like Figure 1 As shown, application scenario 100 according to this embodiment may include terminal devices 101, 102, and 103, a network 104, and a server 105. Network 104 serves as a medium for providing a communication link between terminal devices 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.
[0036] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social media platform software, etc. (for example only).
[0037] Terminal devices 101, 102, and 103 can be various electronic devices with displays and web browsing capabilities, including but not limited to smartphones, tablets, laptops, and desktop computers.
[0038] Server 105 can be a server that provides various services, such as a backend management server that supports websites browsed by users using terminal devices 101, 102, and 103 (for example only). The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.
[0039] Once the flash sale begins, users can send a flash sale request to server 105 via network 104 through operations on terminal devices 101, 102, and 103. Server 105 can then provide feedback to the user regarding the success or failure of the flash sale based on the request.
[0040] It should be noted that the flash sale request method applied to the front end provided in this embodiment can be executed by terminal devices 101, 102, and 103. Correspondingly, the flash sale request device set on the front end provided in this embodiment can be set in terminal devices 101, 102, and 103. The flash sale verification method applied to the back end provided in this embodiment can also be executed by server 105. Correspondingly, the flash sale verification device set on the back end provided in this embodiment can also be set in a location different from server 105.
[0041] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0042] Figure 2 A flowchart illustrating a flash sale request method applied to a front end according to an embodiment of the present disclosure is shown.
[0043] like Figure 2 As shown, the flash sale request method applied to the front end can include operations S210 to S250.
[0044] First, in operation S210, an unencrypted string is obtained. In some embodiments, this unencrypted string may be a string concatenated based on user information, etc. In other embodiments, this unencrypted string may be a randomly generated set of strings.
[0045] Then, in operation S220, parameter information related to the flash sale request is obtained. The parameter information includes N data points, where N is an integer greater than or equal to 2. These N data points can be a session identifier, a random number generated for this session, a random number based on the flash sale time recorded in milliseconds or even nanoseconds, the user account, the user's ID number in the flash sale system, the user's ID card number, the identification information of the device used by the user, and / or the user's current login address information, etc.
[0046] Next, in operations S231 to S233, a key is generated based on the parameter information and according to the key generation algorithm.
[0047] Specifically, in operation S231, at least some characters are extracted from N data and concatenated to form a first string.
[0048] In operation S232, the first string is transformed into the second string using an irreversible encryption algorithm. This irreversible encryption algorithm can be the MD5 message digest algorithm, the SHA secure hash algorithm, or the HMAC key-based hash message authentication code.
[0049] In operation S233, a key is generated based on the second string.
[0050] Subsequently, in operation S240, the unencrypted string is encrypted using the key and a symmetric encryption algorithm to obtain the encrypted string. According to embodiments of this disclosure, this symmetric encryption algorithm can be used to encrypt strings, for example, the XXTEA algorithm. XXTEA is an encryption algorithm evolved from the TEA (Tiny Encryption Algorithm), a small symmetric encryption and decryption algorithm. The XXTEA encryption and decryption algorithm is fast, efficient, and simple to implement. Of course, besides the XXTEA algorithm, this symmetric encryption algorithm can also be other existing encryption algorithms, or those that will evolve with future technological advancements, capable of encrypting strings based on an input key.
[0051] When operating the S250, the flash sale request is sent to the backend using parameter information, an encrypted string, and an unencrypted string. Upon receiving the request, the backend uses the aforementioned key generation algorithm to generate a key from the parameter information in the request. It then decrypts the encrypted string and compares it to the unencrypted string. If they match, the request is approved; otherwise, it is rejected. This process ensures that legitimate users are unaware of the risks, while malicious requests are effectively blocked.
[0052] According to embodiments of this disclosure, multiple data points are selected to generate a single key during key generation. Furthermore, the multiple data points are not used directly and completely during key generation; instead, characters are extracted from the multiple data points and combined into a new string. This string is then combined with a series of operations, including irreversible encryption algorithm transformation, to generate the key. This approach enhances the irreversibility and randomness of the key generation algorithm by manipulating the selection of multiple data points, character extraction methods, character concatenation methods, and / or the selection, combination, or transformation of irreversible encryption algorithms in the parameters of the flash sale request. This increases the difficulty of cracking the key generation algorithm in a short period, making it difficult for cybercriminals to submit a large number of valid flash sale requests in a short time, effectively reducing the attack frequency of cybercriminals at the start of a flash sale.
[0053] Therefore, it can be seen that in the process of generating the flash sale request, the key generation algorithm of this embodiment is irreversible and difficult to crack through limited observation in a short period of time. It can effectively reduce the frequency of black market operators submitting valid flash sale requests in the early stage of the flash sale request, and significantly improve the defense capability against network black market operators.
[0054] In some embodiments, when concatenating the first string in operation S231, characters can be extracted from the N data in different ways. For example, when the N data are a session identifier and a random number generated for the current flash sale, characters such as the 2nd-3rd and 5th-7th digits can be extracted from the session identifier, and characters such as the 2nd-3rd and 3rd-4th digits can be extracted from the random number. Since the way characters are extracted from the N numbers is different and random, this reduces the regularity and increases the randomness and difficulty of cracking the key generation algorithm.
[0055] In some embodiments, during operation S231, after characters are extracted from N data points and concatenated to obtain the first string, the concatenation order can be shuffled, so that characters extracted from the same data points in the first string are not completely clustered together. For example, after extracting characters from the session identifier and random number according to the example above, the first string can be concatenated in the following order: "2-3 characters of random number + 3-5 characters of string + 3-4 characters of string + 5-7 characters of string". By shuffling the order of the extracted characters to concatenate the first string, the randomness of the first string is increased, further increasing the difficulty for black market key generation algorithms to crack.
[0056] As can be seen, the embodiments of this disclosure increase the difficulty of cracking the key generation algorithm by using the randomness and arbitrary combination of character extraction and character concatenation methods.
[0057] In some embodiments, the N data points in the parameter information obtained in operation S220 may include a session identifier of the session to which the flash sale request belongs and a random number generated for the flash sale request. The session identifier is not only unique but also serves as a verification procedure before backend decryption and verification. The random number can increase the uniqueness and randomness of the generated key, thereby increasing the difficulty of cracking the key generation algorithm.
[0058] In some embodiments, the unencrypted string obtained in operation S210 can be constructed by concatenating information from the user sending the flash sale request (such as user account, name, ID number, phone number, email address, bank account, etc.). This has the advantage that when the flash sale request is sent to the backend, the user information in the unencrypted string can serve as a verification step before decryption. The backend can check the user information in the unencrypted string before decrypting the encrypted string; if it is incorrect, the flash sale request can be directly determined to be invalid. Only if the user information in the unencrypted string is correct is further decryption of the encrypted string necessary. This further improves the verification efficiency of the flash sale request. Of course, the backend can also simultaneously verify the user information in the unencrypted string and decrypt the encrypted string after receiving the flash sale request; this is not limited in this respect.
[0059] As can be seen, this embodiment encrypts information during the flash sale process and verifies parameter validity through a backend interface. This verifies information validity without the user's awareness, thus preventing malicious tools from directly calling the interface to complete the flash sale. By using backend parameter validity verification, the stability of the flash sale system is improved, enhancing user experience while defending against malicious actors and ensuring that legitimate users can participate smoothly in the flash sale.
[0060] Figure 3 A flowchart illustrating a flash sale verification method applied to the backend according to an embodiment of the present disclosure is shown schematically.
[0061] like Figure 3 As shown, the flash sale verification method applied to the backend according to this embodiment may include operations S310 to S350.
[0062] First, operate the S310 to receive the flash sale request.
[0063] Then, operate the S320 to extract the parameter information, encrypted string, and unencrypted string from the flash sale request. The parameter information includes N data items.
[0064] Next, in operations S331 to S333, a key is generated based on the parameter information and according to the key generation algorithm.
[0065] Specifically, in operation S331, at least some characters are extracted from N data and concatenated to form a first string.
[0066] In operation S332, the first string is converted into the second string through an irreversible encryption algorithm.
[0067] In operation S333, a key is generated based on the second string.
[0068] Operations S331 to S333 correspond to the aforementioned operations S231 to S233, and can be referred to the previous description.
[0069] Subsequently, when operating the S340, the key is used to decrypt the encrypted string using a symmetric encryption algorithm to obtain the decrypted string.
[0070] When operating the S350, if the decrypted string does not match the unencrypted string, the instant kill request is rejected, thus blocking malicious attacks.
[0071] Accordingly, when the decrypted string matches the unencrypted string, a quick kill can be achieved.
[0072] Of course, in other embodiments, such as when the N data in the parameter information include a session identifier, or when the unencrypted string is generated from user information, when the decrypted string is consistent with the unencrypted string, it is also necessary to confirm that other information (e.g., session identifier, various user information) is also correct before the instant kill can be completed.
[0073] In some embodiments, when the parameter information includes a session identifier or user information, and / or the unencrypted string includes user information, the correctness of the session identifier or user information can be checked after operation S320. If there are errors in the verification of this information, it can be directly determined that the flash sale request is invalid, thereby rejecting the flash sale. Only if this information is verified correctly will the subsequent decryption verification be performed.
[0074] The flash sale request method disclosed in this embodiment can be used alone as a means to prevent attacks on flash sale requests by malicious actors. In some embodiments, it can also be used as a supplementary means after page behavior verification, that is, after the page behavior verification passes, the backend verifies the parameters in the flash sale request to further verify the request eligibility.
[0075] Figure 4 The flowchart illustrating a flash sale request and verification process according to an embodiment of this disclosure is shown schematically. It should be noted that... Figure 4 The specific calculation processes in the illustrated method flow are merely illustrative and do not constitute any limitation on this disclosure.
[0076] like Figure 4 As shown, the method includes steps 1 to 5 executed by the front end and steps 6 to 7 executed by the back end.
[0077] First, the front-end executes steps 1 through 5.
[0078] Step 1: Obtain the unencrypted string from the parameter information entered by the user in the input boxes of the front-end page of the flash sale system. Specifically, the unencrypted string `reqParams` can be constructed by concatenating at least one field provided by the user in the input box on the front-end page. This at least one field may include, for example, username, phone number, ID card number, account number, user email address, date of birth, etc. The information entered by the user on the front-end page can be information entered when establishing this flash sale session or information entered by the user during the registration phase prior to this session.
[0079] Step 2: During the generation of the flash sale request, the frontend obtains the customer's session identifier (sessionId) through the flash sale request link and generates a corresponding random number (randomId) for the flash sale request. The length of this random number (randomId) can be freely set, for example, a random number of more than 20 digits. In some embodiments, the random number (randomId) can be a time-based random number generated based on the time the flash sale request was generated, for example, using millisecond or nanosecond-level data from the time the flash sale request was generated.
[0080] Step 3: Concatenate the strings "randomId (2-3 characters) + sessionId (3-5 characters) + randomId (3-4 characters) + sessionId (5-7 characters)" to form the first string (i.e., the request count ranNum). Then, take the MD5 hash of the request count ranNum to obtain the second substring, thus irreversibly transforming the request count ranNum. Next, generate the key used by the XXTEA encryption method from characters 4-9 of the MD5 hash of the request count ranNum. Use the key and the unencrypted string reqParams as input parameters to call the XXTEA encryption method to generate the encrypted string encrytParams.
[0081] Step 5: Send a flash sale request to the backend with the customer's sessionId, random number randomId, encrypted string encrytParams, and unencrypted string reqParams as part of the input parameters of the flash sale request.
[0082] In this embodiment, during the key generation process, the strings of randomId and sessionId are extracted using different methods, and their order is shuffled during concatenation. This reduces the probability of being cracked by malicious actors and increases the difficulty of their attacks. For example, even if malicious actors can capture the sessionId and random used in the encryption process using packet sniffing tools on the front end, and discover the key used in XXTEA encryption, they might find that the sessionId and random were obtained before the key was generated. However, according to this embodiment, the relationship between ranNum, sessionId, and key is random and irreversible. Therefore, it is difficult for malicious actors to crack the key generation algorithm through a limited number of attempts, thus preventing them from launching a large number of flash sale requests in a short period of time.
[0083] Next, the backend will execute steps 6 and 7 to verify the flash sale request.
[0084] Step 6: The backend calls the flash sale API based on the received flash sale request.
[0085] Step 7: The flash sale interface generates a key based on the client's sessionId and randomId from the flash sale request, using a key generation algorithm agreed upon with the front end. The key and the encrypted string `encrytParams` are then used as input parameters to call the XXTEA decryption method to generate the decrypted string `oriParams`. The decrypted string `oriParams` is then compared with the unencrypted string `reqParams`. If they match completely, the parameter information verification is considered successful, and the flash sale request can be completed. If they do not match, the flash sale request is rejected.
[0086] In this manner, the unencrypted string generated based on the transaction information elements in the flash sale system is used as the encrypted information block of the XXTEA algorithm. The characters of "customer sessionId + random number randomId" are concatenated and their MD5 values are obtained. Then, the characters are extracted as the key. The final input parameters submitted to the flash sale interface include four parts: customer sessionId, random number randomId, encrypted string encrytParam, and unencrypted string reqParams. The backend flash sale interface will generate a key based on the first two parts of the request parameters, encrypt and decrypt the string, and verify the decrypted string oriParams with the unencrypted string reqParams. If they are completely consistent, the parameter information verification is considered successful, and the flash sale request is completed. If they are inconsistent, the flash sale request is rejected.
[0087] Additionally, refer to Figure 4It can also be seen that steps 1 to 7 above can serve as a supplementary means of page behavior verification. The flash sale interface can only be called after the page behavior verification passes. Therefore, this embodiment can verify parameter validity without the customer's awareness, and effectively control the frequency of parameter information submitted by malicious tools through the customer's unique sessionId and randomId. As a supplement to the page behavior verification method, it solves to some extent the problem of malicious tools maliciously occupying inventory resources.
[0088] This disclosure also provides a front-end device for requesting flash sales. See details for further information. Figure 5 A detailed description.
[0089] Figure 5 The diagram illustrates a structural block diagram of a flash sale request device 500 disposed at the front end according to an embodiment of the present disclosure.
[0090] like Figure 5 As shown, the front-end flash sale request device 500 may include a first acquisition module 510, a first key generation module 520, a first encryption module 530, and a first sending module 540. This flash sale request device 500 can be used to implement a reference... Figure 2 The described method for requesting a flash sale.
[0091] The first acquisition module 510 is used to acquire an unencrypted string and parameter information related to the flash sale request. The parameter information includes N data points, where N is an integer greater than or equal to 2. In one embodiment, the first acquisition module 510 can perform the operations S210 and S220 described above.
[0092] The first key generation module 520 is used to generate a key based on parameter information and according to a key generation algorithm. The key generation algorithm includes: extracting at least a portion of characters from N data points and concatenating them into a first string; converting the first string into a second string using an irreversible encryption algorithm; and generating a key based on the second string. In one embodiment, the first key generation module 520 can perform operations S231 to S233 as described above.
[0093] The first encryption module 530 is used to encrypt an unencrypted string using a symmetric encryption algorithm with a key to obtain an encrypted string. In one embodiment, the first encryption module 530 can perform the operation S240 described above.
[0094] The first sending module 540 is used to send a flash sale request to the backend, using parameter information, an encrypted string, and an unencrypted string as components of the flash sale request. In one embodiment, the first sending module 540 can perform the operation S250 described above.
[0095] According to embodiments of this disclosure, any plurality of modules among the first acquisition module 510, the first key generation module 520, the first encryption module 530, and the first transmission module 540 may be combined into one module, or any one of these modules may be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of other modules and implemented in one module. According to embodiments of this disclosure, at least one of the first acquisition module 510, the first key generation module 520, the first encryption module 530, and the first transmission module 540 may be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or implemented in hardware or firmware by any other reasonable means of integrating or packaging the circuitry, or implemented in any one of the three implementation methods of software, hardware, and firmware, or in a suitable combination of any of these. Alternatively, at least one of the first acquisition module 510, the first key generation module 520, the first encryption module 530, and the first sending module 540 may be implemented at least partially as a computer program module, which can perform corresponding functions when the computer program module is run.
[0096] The embodiments of this disclosure also provide a backend-based flash sale verification device, which can be found in the following references. Figure 6 A detailed introduction.
[0097] Figure 6 The diagram schematically illustrates a structural block diagram of a backend-mounted flash sale verification device 600 according to an embodiment of the present disclosure.
[0098] like Figure 6 As shown, the backend-mounted flash sale verification device 600 may include a second receiving module 610, a second extraction module 620, a second key generation module 630, a second decryption module 640, and a second verification module 650. This flash sale verification device 600 can be used to implement a reference... Figure 3 The described method for verifying the instant sale.
[0099] The second receiving module 610 is used to receive requests for flash sales. In one embodiment, the second receiving module 610 can perform the operation S310 described above.
[0100] The second extraction module 620 is used to extract parameter information, encrypted strings, and unencrypted strings from the flash sale request, wherein the parameter information includes N data items. In one embodiment, the second extraction module 620 can perform the operation S320 described above.
[0101] The second key generation module 630 is used to generate a key based on parameter information and according to a key generation algorithm. The key generation algorithm includes: extracting at least a portion of characters from N data points and concatenating them into a first string; converting the first string into a second string using an irreversible encryption algorithm; and generating a key based on the second string. In one embodiment, the second key generation module 630 can perform operations S331 to S333 described above.
[0102] The second decryption module 640 is used to decrypt the encrypted string using a symmetric encryption algorithm with the key to obtain the decrypted string. In one embodiment, the second decryption module 640 can perform the operation S340 described above.
[0103] The second verification module 650 is used to reject the instant purchase request when the decrypted string does not match the unencrypted string. In one embodiment, the second verification module 650 can perform the operation S350 described above.
[0104] According to embodiments of this disclosure, any plurality of modules among the second receiving module 610, the second extraction module 620, the second key generation module 630, the second decryption module 640, and the second verification module 650 may be combined into one module, or any one of these modules may be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of other modules and implemented in one module. According to embodiments of this disclosure, at least one of the second receiving module 610, the second extraction module 620, the second key generation module 630, the second decryption module 640, and the second verification module 650 may be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or implemented in hardware or firmware by any other reasonable means of integrating or packaging the circuitry, or implemented in any one of the three implementation methods of software, hardware, and firmware, or in a suitable combination of any of these. Alternatively, at least one of the second receiving module 610, the second extraction module 620, the second key generation module 630, the second decryption module 640, and the second verification module 650 may be implemented at least partially as a computer program module, which can perform corresponding functions when the computer program module is run.
[0105] This disclosure also provides a flash sale system, which includes a front-end and a back-end. The front-end is configured with, for example... Figure 5 The flash sale request device 500 shown has the following backend settings: Figure 6The flash sale verification device 600 is shown. In this flash sale system, the front end and back end use the key generation algorithm and symmetric encryption algorithm agreed upon by both. This flash sale system can perform operations as described above. Figure 4 The method described. The structure of this flash sale system can be referenced in the previous section. Figure 5 and Figure 6 For details on how this flash sale system works, please refer to the previous text. Figure 4 The relevant information will not be repeated here.
[0106] Figure 7 The diagram illustrates a structural block diagram of a computer system suitable for implementing the flash sale request method or flash sale verification method of the embodiments of the present disclosure.
[0107] like Figure 7 As shown, a computer system 700 according to an embodiment of this disclosure includes a processor 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage portion 708 into a random access memory (RAM) 703. The processor 701 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 701 may also include onboard memory for caching purposes. The processor 701 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of this disclosure.
[0108] RAM 703 stores various programs and data required for the operation of computer system 700. Processor 701, ROM 702, and RAM 703 are interconnected via bus 704. Processor 701 performs various operations of the method flow according to embodiments of the present disclosure by executing programs in ROM 702 and / or RAM 703. It should be noted that the programs may also be stored in one or more memories other than ROM 702 and RAM 703. Processor 701 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in said one or more memories.
[0109] According to embodiments of this disclosure, the computer system 700 may further include an input / output (I / O) interface 705, which is also connected to a bus 704. The computer system 700 may also include one or more of the following components connected to the I / O interface 705: an input section 706 including a keyboard, mouse, etc.; an output section 707 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 710 as needed so that computer programs read from it can be installed into the storage section 708 as needed.
[0110] This disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs, which, when executed, implement the flash sale request method or flash sale verification method according to the embodiments of this disclosure.
[0111] According to embodiments of this disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, such as, but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this disclosure, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of this disclosure, the computer-readable storage medium may include ROM 702 and / or RAM 703 and / or one or more memories other than ROM 702 and RAM 703 described above.
[0112] Embodiments of this disclosure also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowchart. When the computer program product is run on a computer system, the program code is used to enable the computer system to implement the flash sale request method or flash sale verification method provided in the embodiments of this disclosure.
[0113] When the computer program is executed by the processor 701, it performs the functions defined in the system / apparatus of this disclosure embodiments. According to embodiments of this disclosure, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0114] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and may be downloaded and installed via the communication section 709, and / or installed from a removable medium 711. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.
[0115] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 709, and / or installed from the removable medium 711. When the computer program is executed by the processor 701, it performs the functions defined in the system of this disclosure embodiment. According to embodiments of this disclosure, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0116] According to embodiments of this disclosure, program code for executing the computer programs provided in embodiments of this disclosure can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C", or similar programming languages. The program code can execute entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0117] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0118] Those skilled in the art will understand that the features described in the various embodiments and / or claims of this disclosure can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in this disclosure. In particular, the features described in the various embodiments and / or claims of this disclosure can be combined and / or combined in various ways without departing from the spirit and teachings of this disclosure. All such combinations and / or combinations fall within the scope of this disclosure.
[0119] The embodiments of this disclosure have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of this disclosure. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. The scope of this disclosure is defined by the appended claims and their equivalents. Various substitutions and modifications can be made by those skilled in the art without departing from the scope of this disclosure, and all such substitutions and modifications should fall within the scope of this disclosure.
Claims
1. A method for requesting a flash sale, applied to the front end, including: Obtain an unencrypted string, the unencrypted string including a string concatenated based on user information, including: concatenating information from at least one field provided by the user through the front-end page when establishing this flash sale session into the unencrypted string; During the process of generating a flash sale request, parameter information related to the flash sale request is obtained through the flash sale request link. The parameter information includes N data points, where N is an integer greater than or equal to 2. Based on the parameter information, a key is generated according to a key generation algorithm; wherein, the key generation algorithm includes: Extracting at least some characters from the N data and concatenating them into a first string includes: extracting characters from the N data in different ways, and the characters extracted from the same data in the first string are not completely grouped together; The first string is converted into the second string using an irreversible encryption algorithm; The key is generated based on the second string; Using the key, the unencrypted string is encrypted using a symmetric encryption algorithm to obtain an encrypted string; and The flash sale request is sent to the backend using the parameter information, the encrypted string, and the unencrypted string as part of the input parameters.
2. The method according to claim 1, wherein, The irreversible encryption algorithm includes the MD5 message digest algorithm.
3. The method according to claim 1, wherein, The N data items include the session identifier of the session to which the flash sale request belongs and a random number generated for the flash sale request.
4. A method for verifying a flash sale, applied to the backend, including: Receive a flash sale request, wherein the flash sale request corresponds to a flash sale request link; Extract the parameter information, encrypted string, and unencrypted string from the flash sale request; wherein, the parameter information includes N data, and the parameter information, encrypted string, and unencrypted string are part of the input parameters of the flash sale request; the unencrypted string includes a string concatenated based on user information, and the user information in the unencrypted string comes from at least one field provided by the user through the front-end page when establishing this flash sale session; Verify the user information in the unencrypted string; If the user information in the unencrypted string is correct, a key is generated based on the parameter information according to a key generation algorithm; wherein, the key generation algorithm includes: Extracting at least some characters from the N data and concatenating them into a first string includes: extracting characters from the N data in different ways, and the characters extracted from the same data in the first string are not completely grouped together; The first string is converted into the second string using an irreversible encryption algorithm; The key is generated based on the second string; Using the key, the encrypted string is decrypted using a symmetric encryption algorithm to obtain the decrypted string; and The request to purchase the item is rejected if the decrypted string does not match the unencrypted string.
5. A flash sale request device, configured on a front end, comprising: The first acquisition module is used to acquire an unencrypted string and obtain parameter information related to the flash sale request through the flash sale request link during the process of generating the flash sale request. The unencrypted string includes a string concatenated based on user information, wherein the unencrypted string is formed by concatenating at least one field of information provided by the user through the front-end page when establishing this flash sale session; the parameter information includes N data items, where N is an integer greater than or equal to 2; The first key generation module is used to generate a key based on the parameter information and according to a key generation algorithm; wherein the key generation algorithm includes: Extracting at least some characters from the N data and concatenating them into a first string includes: extracting characters from the N data in different ways, and the characters extracted from the same data in the first string are not completely grouped together; The first string is converted into the second string using an irreversible encryption algorithm; The key is generated based on the second string; The first encryption module is used to encrypt the unencrypted string using the key and a symmetric encryption algorithm to obtain an encrypted string; and The first sending module is used to send the flash sale request to the backend, using the parameter information, the encrypted string, and the unencrypted string as part of the input parameters of the flash sale request.
6. A flash sale verification device, installed at the backend, comprising: The second receiving module is used to receive flash sale requests, wherein the flash sale requests correspond to flash sale request links; The second extraction module is used to extract parameter information, encrypted strings, and unencrypted strings from the flash sale request; wherein, the parameter information includes N data, and the parameter information, encrypted strings, and unencrypted strings are part of the input parameters of the flash sale request; the unencrypted strings include strings concatenated based on user information, and the user information in the unencrypted strings comes from at least one field provided by the user through the front-end page when establishing this flash sale session; The second key generation module is used to verify the user information in the unencrypted string, and if the user information in the unencrypted string is correct, to generate a key based on the parameter information and according to the key generation algorithm; wherein, the key generation algorithm includes: Extracting at least some characters from the N data and concatenating them into a first string includes: extracting characters from the N data in different ways, and the characters extracted from the same data in the first string are not completely grouped together; The first string is converted into the second string using an irreversible encryption algorithm; The key is generated based on the second string; The second decryption module is used to decrypt the encrypted string using the key and a symmetric encryption algorithm to obtain the decrypted string; and The second verification module is used to reject the flash sale request when the decrypted string does not match the unencrypted string.
7. A flash sale system, comprising: The front-end is used to execute the flash sale request method according to any one of claims 1 to 3; as well as The backend is used to execute the flash sale verification method as described in claim 4; in, The front-end and the back-end use the key generation algorithm and symmetric encryption algorithm agreed upon by both.
8. A computer system, comprising: One or more processors; Memory, used to store one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors execute the flash sale request method according to any one of claims 1 to 3, or the flash sale verification method according to claim 4.
9. A computer-readable storage medium having stored thereon computer program instructions, which, when executed by a processor, implement the flash sale request method of any one of claims 1 to 3, or the flash sale verification method of claim 4.
10. A computer program product, comprising computer program instructions, wherein when executed by a processor, the computer program instructions implement the instant-kill request method of any one of claims 1 to 3, or the instant-kill verification method of claim 4.
Citation Information
Patent Citations
HTTP communication system and method
CN105072125A