Order processing method and device and related equipment

By generating target strings for order requests in the e-commerce platform and locking them, the increase in order system load and inventory conflicts caused by repeated orders by users, and the efficiency of order processing is improved.

CN119741085APending Publication Date: 2025-04-01BEIJING QIYI CENTURY SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411806988.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-10
Publication Date
2025-04-01

AI Technical Summary

Technical Problem

In e-commerce platforms, users may place repeated orders on the same product due to network delay, page refresh or continuous clicks, resulting in increased load on the order system, product inventory conflicts and inaccurate order data, thereby reducing order processing efficiency.

Method used

When receiving the first order request sent by the target terminal, a target character string is generated and locked the string is generated to prevent the target terminal from repeatedly generating an order request to purchase the same product before the first order request is completed.

Benefits of technology

It effectively reduces the pressure on the server to process orders, avoids product inventory conflicts and inaccurate order data, and improves order processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119741085A_ABST
    Figure CN119741085A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an order processing method and device and related equipment. The method comprises the following steps: receiving a first order request sent by a target terminal; generating a target character string based on the first order request; the target character string is locked, locking information corresponding to the first commodity is obtained, and the locking information is used for preventing the target terminal from generating a second order request before the first order request is completed; and when it is detected that the first order request of the target terminal is completed, deleting the locking information. According to the application, when the first order request sent by the target terminal is received, the target character string is generated according to the first order request, so that the first order request is locked after the target character string is locked, and before the first order request is processed, the target character string is locked; the target terminal is prevented from repeatedly generating the same commodity in the first order request, so that the order processing pressure of the server is relieved, and the order processing efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network communication technology, and in particular to an order processing method, device and related equipment. Background Art

[0002] In e-commerce platforms, especially during promotional activities, users may place duplicate orders for the same product due to network delays, page refreshes, or their own continuous clicks. Such duplicate ordering problems will increase the load on the order system, cause product inventory conflicts and inaccurate order data, and thus lead to low order processing efficiency. Summary of the invention

[0003] The purpose of the embodiments of the present application is to provide an order processing method, device and related equipment to improve the order processing efficiency. The specific technical solution is as follows:

[0004] In a first aspect of the implementation of the present application, a method for processing an order is first provided, which is applied to a server, and the method comprises:

[0005] receiving a first order request sent by a target terminal, where the first order request is a request sent by the target terminal to purchase the first commodity, and the first order request includes item information of the first commodity requested to be purchased by the target terminal, where the item information is used to indicate item attribute information of the first commodity;

[0006] Based on the first order request, generate a target string, where the target string is a string representation of the first order request;

[0007] The target character string is locked to obtain locking information corresponding to the first commodity, wherein the locking information is used to prevent the target terminal from generating a second order request before the first order request is completed, and the second order request is used to purchase the first commodity again;

[0008] When it is detected that the first order request of the target terminal is completed, the locking information is deleted.

[0009] Optionally, generating a target character string based on the first order request includes:

[0010] Based on the first order request, acquiring account information and current time information for logging into the target terminal, the account information being a login account of a target application, the target application being an application software in the target terminal requesting to purchase the first commodity, and the current time information being a current timestamp for receiving the first order request;

[0011] Convert the item information, the account information and the current time information into character strings respectively to obtain a second character string, a third character string and a fourth character string;

[0012] The second character string, the third character string and the fourth character string are concatenated to obtain the target character string.

[0013] Optionally, the concatenating the second character string, the third character string and the fourth character string to obtain the target character string includes:

[0014] Using a preset encrypted hash function to expand and encrypt the second character string, the third character string, and the fourth character string to obtain a target second character string, a target third character string, and a target fourth character string, respectively, wherein the target second character string, the third character string, and the target fourth character string have the same length;

[0015] The target second character string, the target third character string and the target fourth character string are concatenated to obtain the target character string.

[0016] Optionally, the step of locking the target character string to obtain locking information corresponding to the first commodity includes:

[0017] Sending a lock request to a distributed server, wherein the lock request includes the target string;

[0018] receiving feedback information generated by the distributed server in response to the lock request;

[0019] When the feedback information indicates that the locking request is successful, the locking information corresponding to the first commodity is obtained.

[0020] Optionally, after receiving the feedback information generated by the distributed server in response to the lock request, the method further includes:

[0021] If the feedback information indicates that the locking request fails, generating locking failure information of the first commodity, wherein the locking failure information is used to prevent the target terminal from sending the second order request for purchasing the first commodity again within a preset time period;

[0022] After the preset time period, re-order information is sent to the target terminal, where the re-order information is used to prompt the user to cancel the first order request and regenerate the second order request.

[0023] Optionally, after locking the target character string to obtain a lock signal corresponding to the first commodity, the method further includes:

[0024] receiving a third order request sent by the target terminal, wherein the third order request includes item information of a second commodity requested to be purchased by the target terminal;

[0025] In a case where the first commodity and the second commodity belong to the same category of goods, the third order request is invalidated based on the locking information.

[0026] In a second aspect of the implementation of the present application, there is also provided an order processing device, which is applied to a server, and the device includes:

[0027] a receiving module, configured to receive a first order request sent by a target terminal, wherein the first order request is a request sent by the target terminal to purchase the first commodity, and the first order request includes item information of the first commodity requested to be purchased by the target terminal, wherein the item information is used to indicate item attribute information of the first commodity;

[0028] A generating module, configured to generate a target string based on the first order request, wherein the target string is a string representation of the first order request;

[0029] a locking module, used to lock the target string to obtain locking information corresponding to the first commodity, wherein the locking information is used to prevent the target terminal from generating a second order request before the first order request is completed, wherein the second order request is used to purchase the first commodity again;

[0030] A deleting module is used to delete the locking information when it is detected that the first order request of the target terminal is completed.

[0031] In a third aspect of an embodiment of the present application, an electronic device is also provided, comprising a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein when the program or instruction is executed by the processor, the steps of the order processing method described in any one of the first aspects are implemented.

[0032] In a fourth aspect of an embodiment of the present application, a computer-readable storage medium is further provided, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the order processing method as described in any one of the first aspects are implemented.

[0033] In a fifth aspect of the embodiments of the present application, the embodiments of the present application also provide a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the steps of the order processing method as described in any one of the first aspects.

[0034] The embodiment of the present application provides an order processing method, device and related equipment, which are applied to a server, and the method includes: receiving a first order request sent by a target terminal, the first order request is a request sent by the target terminal to purchase the first commodity, the first order request includes the item information of the target terminal requesting to purchase the first commodity, and the item information is used to indicate the item attribute information of the first commodity; based on the first order request, generating a target string, the target string is a string representation of the first order request; locking the target string to obtain locking information corresponding to the first commodity, the locking information is used to prevent the target terminal from generating a second order request before the first order request is completed, the second order request is used to purchase the first commodity again; when it is detected that the first order request of the target terminal is completed, the locking information is deleted. The present application generates a target string according to the first order request when receiving the first order request sent by the target terminal, thereby locking the first order request after locking the target string, and preventing the target terminal from repeatedly generating the same commodity in the first order request before the first order request is processed, thereby reducing the pressure on the server to process orders and improving the order processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] 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 are briefly introduced below.

[0036] Figure 1 A flowchart of a method for processing an order in an embodiment of the present application;

[0037] Figure 2 This is a schematic diagram of the structure of an order processing device in an embodiment of the present application;

[0038] Figure 3 Schematic diagram of the structure of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION

[0039] 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 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.

[0040] It should be mentioned before discussing the exemplary embodiments in more detail that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe the steps as sequential processes, many of the steps therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of the steps can be rearranged. The process can be terminated when its operation is completed, but can also have additional steps not included in the accompanying drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.

[0041] In addition, the terms "first", "second", etc. may be used in this article to describe various directions, actions, steps or elements, etc., but these directions, actions, steps or elements are not limited by these terms. These terms are only used to distinguish a first direction, action, step or element from another direction, action, step or element. For example, without departing from the scope of the present application, a first order request may be referred to as a second order request, and similarly, a second order request may be referred to as a first order request. Both the first order request and the second order request are order requests, but they are not the same order request. The terms "first", "second", etc. cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present application, the meaning of "multiple" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0042] The present application embodiment provides a method for processing an order, and the method of the present embodiment can be executed by a server, such as Figure 1 As shown, the method includes:

[0043] Step 101: Receive a first order request sent by a target terminal, where the first order request is a request sent by the target terminal to purchase the first commodity, and the first order request includes item information of the first commodity requested to be purchased by the target terminal, where the item information is used to indicate item attribute information of the first commodity.

[0044] In this embodiment, the target terminal may be a mobile phone, a PAD or a computer, which is provided with an application program, which generally needs to be logged in through an account so as to realize the relevant functions of the account, such as a purchase function, a subscription function, etc. When a user wants to purchase a first commodity on the target terminal, a first order request is generated on the terminal and sent to the server.

[0045] Among them, the first order request includes the item information of the first commodity, and the item attribute information may include model, price, etc. For example, the model, price, size, etc. of the first commodity. For example, the user needs to purchase a certain brand of mobile phone on the application. After the user selects the model, size, memory and other parameters, a first order request is generated and sent to the server. After the server receives the first order request, it will verify the mobile phone included in the first order request to see whether there is enough stock, etc. After confirmation by the server, the user can pay on the target terminal.

[0046] Step 102: Generate a target string based on the first order request, where the target string is a string representation of the first order request.

[0047] In this embodiment, the server generates a target string according to the received first order request. In this embodiment, the target string is a token. It should be noted that the token corresponding to each order is unique. In identity authentication and authorization, a token is a security information used to verify the identity of a user, usually a string containing the user's identity information or authority. In this embodiment, the target string is generated according to the item attribute information in the first order request, for example, the item type generates the first string of characters, the item price generates the second string of characters, and so on, which are combined into the target string.

[0048] In this embodiment, the product model, user account and other related data can be determined based on the item information included in the first order request, so as to generate a token that is solely used to represent the item information.

[0049] Step 103: Lock the target character string to obtain locking information corresponding to the first commodity, wherein the locking information is used to prevent the target terminal from generating a second order request before the first order request is completed, and the second order request is used to purchase the first commodity again.

[0050] In this embodiment, the target character string is locked. It should be noted that in this embodiment, the target character string can be locked by other software or servers to generate locking information. The locking information prevents the target terminal from generating a second order request. The second order request is used to purchase the first product again, thereby avoiding the situation where the user misses the order or generates repeated order requests for the same product due to other reasons when the first order request is not completed.

[0051] In this embodiment, the content of locking is to lock the target character string. Because there are many types and models of goods, and the generated character string is unique, the uniqueness of the lock can be guaranteed by locking the character string.

[0052] It should be noted that the first commodity purchased in the second order request is the same as the first commodity purchased in the first order request, but the model and size may be different. For example, the user's first order request is for a C mobile phone of size A, and the second order request is for a C mobile phone of size B. At this time, the second order request and the first order request are both orders to purchase the first commodity. After the lock information is generated, the target terminal will be prevented from generating the second order request. Specifically, after the lock information is generated, a blocking message or a prompt message will be generated on the target terminal, and the user will not be able to continue to place an order for the first commodity until the blocking message or the prompt message ends.

[0053] Step 104: When it is detected that the first order request of the target terminal is completed, the locking information is deleted.

[0054] In this embodiment, when it is detected that the target terminal completes the first order request, the locking information of the first commodity is deleted. Specifically, when the completion of the first order request can complete the payment for the target terminal or when the target terminal cancels the first order request, the locking information is deleted. Thus, by locking the target character string and then locking the first order request, the pressure on the server due to duplicate orders can be reduced.

[0055] The present application generates a target character string according to the first order request when receiving the first order request sent by the target terminal, thereby locking the first order request by locking the target character string. Before the first order request is processed, the target terminal is prevented from repeatedly generating and purchasing the same product in the first order request, thereby reducing the pressure on the server to process orders and improving order processing efficiency.

[0056] In some feasible implementations, optionally, generating a target character string based on the first order request includes:

[0057] Based on the first order request, acquiring account information and current time information for logging into the target terminal, the account information being a login account of a target application, the target application being an application software in the target terminal requesting to purchase the first commodity, and the current time information being a current timestamp for receiving the first order request;

[0058] Convert the item information, the account information and the current time information into character strings respectively to obtain a second character string, a third character string and a fourth character string;

[0059] The second character string, the third character string and the fourth character string are concatenated to obtain the target character string.

[0060] In this embodiment, after obtaining the first order request, in addition to obtaining the item information, it is also necessary to obtain the account information and the current time information. Specifically, the account information is the account of the user logging into the target application, i.e., the APP. The target application is the application software in the target terminal that requests to purchase the first commodity, such as the APP for purchasing the commodity. The account information is such as the user ID or user UID, and the current time information is the current timestamp. Each order operation will generate a unique Token based on parameters such as the user ID, the commodity ID, and the timestamp, wherein the item information, the account information, and the current time information are converted into strings, corresponding to the second string, the third string, and the fourth string.

[0061] The second character string, the third character string and the fourth character string are concatenated to finally obtain the target character string, wherein the storage structure of the target character string token may be the following structure: [user ID]: [product ID]: [timestamp].

[0062] In this embodiment, the item information may not be unique, but the string generated by combining the item information with the user's account information and the current time information is definitely unique, because the user cannot purchase multiple items at the same time with the same account, thus ensuring the uniqueness of the target string.

[0063] It should be further explained that in other embodiments, other parameters may be added to generate the target string, which is connected to the second string, the third string and the fourth string when the strings are concatenated, and is not specifically limited in this embodiment. The target string thus obtained realizes that the string is fully associated with the order request, and ensures the uniqueness of the string.

[0064] Optionally, the concatenating the second character string, the third character string and the fourth character string to obtain the target character string includes:

[0065] Using a preset encrypted hash function to expand and encrypt the second character string, the third character string, and the fourth character string to obtain a target second character string, a target third character string, and a target fourth character string, respectively, wherein the target second character string, the third character string, and the target fourth character string have the same length;

[0066] The target second character string, the target third character string and the target fourth character string are concatenated to obtain the target character string.

[0067] In this embodiment, the preset cryptographic hash function can be a SHA-256 secure hash function, wherein the SHA-256 secure hash function is a widely used cryptographic hash function, mainly used in fields such as data integrity verification, digital signatures, password storage, and blockchain technology. Specifically, regardless of the size of the input data, SHA-256 always generates a 256-bit (32-byte) hash value, thereby ensuring the uniqueness of the hash value. Specifically, the second string, the third string, and the fourth string are respectively expanded and encrypted by the SHA-256 secure hash function to obtain a target second string, a target third string, and a target fourth string, wherein the hash values ​​of the target second string, the target third string, and the target fourth string are the same, and are all 256-bit hash values.

[0068] Finally, the target second string, the target third string and the target fourth string are concatenated to obtain the target string. In this embodiment, the uniqueness of the string is ensured by encrypting the target string using a preset cryptographic hash function, thereby ensuring the uniqueness of the locking information.

[0069] Optionally, the step of locking the target character string to obtain locking information corresponding to the first commodity includes:

[0070] Sending a lock request to a distributed server, wherein the lock request includes the target string;

[0071] receiving feedback information generated by the distributed server in response to the lock request;

[0072] When the feedback information indicates that the locking request is successful, the locking information corresponding to the first commodity is obtained.

[0073] In this embodiment, the distributed server may be a Redis server, and the target string is locked through the Redis server. Specifically, a lock request is sent to the distributed server, and the Redis server locks the target string according to the lock request and generates feedback information. In this embodiment, the lock requests are all Redis locks, so the Redis server is required to lock, and the lock processing is all performed in the Redis server, which can avoid excessive operations in the local terminal, simplify the terminal process, and reduce the burden on the terminal.

[0074] Specifically, the locking process is as follows: Use the `SET lock_key lock_value NX PX expire_time` command:

[0075] Where: - `lock_key` is the name of the lock. - `lock_value` is the unique identifier of the lock. - `NX` means that the lock can only be set successfully if it does not exist. - `PX expire_time` sets the expiration time of the lock in milliseconds. - If the command returns `OK`, it means that the lock was successfully acquired; if it returns `nil`, it means that the lock is already held by another client.

[0076] When feedback information is received and the feedback information indicates that the locking request is successful, the unlocking process is as follows:

[0077] -Use Lua script to ensure the atomicity of releasing the lock:

[0078] ```lua

[0079] if redis.call("get",KEYS[1])==ARGV[1]then

[0080] return redis.call("del",KEYS[1])

[0081] end

[0082] return 0

[0083] ```

[0084] Among them: `KEYS[1]` is the name of the lock, and `ARGV[1]` is the unique identifier of the lock. Only the client holding the lock can release the lock. In this embodiment, the SHA-256 secure hash function is used to generate a unique token based on the user, product, and timestamp, effectively solving the problem of duplicate orders.

[0085] Optionally, after receiving the feedback information generated by the distributed server in response to the lock request, the method further includes:

[0086] If the feedback information indicates that the locking request fails, generating locking failure information of the first commodity, wherein the locking failure information is used to prevent the target terminal from sending the second order request for purchasing the first commodity again within a preset time period;

[0087] After the preset time period, re-order information is sent to the target terminal, where the re-order information is used to prompt the user to cancel the first order request and regenerate the second order request.

[0088] In this embodiment, when the feedback information indicates that the lock request fails, lock failure information is generated. Within a preset time period, the lock failure information is used to prevent the target terminal from sending the second order request for purchasing the first commodity again within the preset time period, thereby ensuring that the user cannot repeatedly submit the same order information within the preset time period.

[0089] It should be further explained that the preset time period can be 1 minute, 2 minutes or 10 minutes, which is not specifically limited in this embodiment. After the preset time period, a re-order information is sent to the target terminal, and the target terminal can re-order or cancel the first order request. Redis is used to implement distributed locks, and order consistency in high-concurrency scenarios is ensured in a simple and effective way.

[0090] Optionally, after locking the target character string to obtain a lock signal corresponding to the first commodity, the method further includes:

[0091] receiving a third order request sent by the target terminal, wherein the third order request includes item information of a second commodity requested to be purchased by the target terminal;

[0092] In a case where the first commodity and the second commodity belong to the same category of goods, the third order request is invalidated based on the locking information.

[0093] In this embodiment, after locking the target string, the same category of items can be locked. For example, if the first item and the second item belong to the same category, the third order request including the second item will be invalidated based on the locking information. For example, if the first item is a first-generation mobile phone of a certain brand and the second item is a second-generation mobile phone of a certain brand, in this case, the first-generation mobile phone and the second-generation mobile phone belong to the same category, so the third order request including the second item will be invalidated. This effectively avoids the problem of duplicate orders, reduces the burden on the order system, and improves the accuracy of inventory management and the stability of order data.

[0094] The present application generates a target character string according to the first order request when receiving the first order request sent by the target terminal, thereby locking the first order request by locking the target character string. Before the first order request is processed, the target terminal is prevented from repeatedly generating and purchasing the same product in the first order request, thereby reducing the pressure on the server to process orders and improving order processing efficiency.

[0095] like Figure 2 As shown, the embodiment of the present application also provides an order processing device, such as Figure 2 As shown, the order processing device 200 includes:

[0096] The receiving module 210 is configured to receive a first order request sent by a target terminal, wherein the first order request is a request sent by the target terminal to purchase the first commodity, and the first order request includes item information of the first commodity requested to be purchased by the target terminal, and the item information is used to indicate item attribute information of the first commodity;

[0097] A generating module 220, configured to generate a target string based on the first order request, wherein the target string is a string representation of the first order request;

[0098] A locking module 230, configured to lock the target string to obtain locking information corresponding to the first commodity, wherein the locking information is used to prevent the target terminal from generating a second order request before the first order request is completed, wherein the second order request is used to purchase the first commodity again;

[0099] The deleting module 240 is configured to delete the locking information when it is detected that the first order request of the target terminal is completed.

[0100] Optionally, the generating module 220 includes:

[0101] an acquisition submodule, configured to acquire, based on the first order request, account information and current time information for logging into the target terminal, the account information being a login account for a target application, the target application being an application software in the target terminal requesting to purchase the first commodity, and the current time information being a current timestamp for receiving the first order request;

[0102] a conversion submodule, configured to convert the item information, the account information and the current time information into character strings respectively, to obtain a second character string, a third character string and a fourth character string;

[0103] The concatenation submodule is used to concatenate the second character string, the third character string and the fourth character string to obtain the target character string.

[0104] Optionally, the splicing submodule includes:

[0105] an encryption unit, configured to use a preset encryption hash function to respectively expand and encrypt the second character string, the third character string, and the fourth character string to obtain a target second character string, a target third character string, and a target fourth character string, wherein the target second character string, the third character string, and the target fourth character string have the same length;

[0106] The concatenation unit is used to concatenate the target second character string, the target third character string and the target fourth character string to obtain the target character string.

[0107] Optionally, the locking module 230 includes:

[0108] A first sending submodule, configured to send a lock request to a distributed server, wherein the lock request includes the target string;

[0109] A receiving submodule, configured to receive feedback information generated by the distributed server in response to the locking request;

[0110] The obtaining submodule is configured to obtain the locking information corresponding to the first commodity when the feedback information indicates that the locking request is successful.

[0111] Optionally, also include:

[0112] a generating submodule, configured to generate locking failure information of the first commodity when the feedback information indicates that the locking request fails, wherein the locking failure information is used to prevent the target terminal from sending the second order request for purchasing the first commodity again within a preset time period;

[0113] The second sending submodule is used to send re-order information to the target terminal after the preset time period, and the re-order information is used to prompt the user to cancel the first order request and regenerate the second order request.

[0114] Optionally, also include:

[0115] An information receiving module, configured to receive a third order request sent by the target terminal, wherein the third order request includes item information of a second commodity requested to be purchased by the target terminal;

[0116] An information cancellation module is used to cancel the third order request based on the locking information when the first commodity and the second commodity belong to the same category of goods.

[0117] The present application generates a target character string according to the first order request when receiving the first order request sent by the target terminal, thereby locking the first order request by locking the target character string. Before the first order request is processed, the target terminal is prevented from repeatedly generating and purchasing the same product in the first order request, thereby reducing the pressure on the server to process orders and improving order processing efficiency.

[0118] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown in FIG. Figure 3 As shown, the electronic device 300 includes a memory 310 and a processor 320. The number of the processor 320 in the electronic device 300 may be one or more. Figure 3A processor 320 is taken as an example; the memory 310 and the processor 320 in the server can be connected via a bus or other means. Figure 3 The example of connecting through bus is taken in the following.

[0119] The memory 310, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as the program instructions / modules corresponding to the member push method in the embodiment of the present application. The processor 320 executes various functional applications and data processing of the server / terminal / server by running the software programs, instructions and modules stored in the memory 310, thereby realizing the above-mentioned order processing method.

[0120] The processor 320 is used to run the computer program stored in the memory 310 to implement the following steps:

[0121] receiving a first order request sent by a target terminal, where the first order request is a request sent by the target terminal to purchase the first commodity, and the first order request includes item information of the first commodity requested to be purchased by the target terminal, where the item information is used to indicate item attribute information of the first commodity;

[0122] Based on the first order request, generate a target string, where the target string is a string representation of the first order request;

[0123] The target character string is locked to obtain locking information corresponding to the first commodity, wherein the locking information is used to prevent the target terminal from generating a second order request before the first order request is completed, and the second order request is used to purchase the first commodity again;

[0124] When it is detected that the first order request of the target terminal is completed, the locking information is deleted.

[0125] Optionally, generating a target character string based on the first order request includes:

[0126] Based on the first order request, acquiring account information and current time information for logging into the target terminal, the account information being a login account of a target application, the target application being an application software in the target terminal requesting to purchase the first commodity, and the current time information being a current timestamp for receiving the first order request;

[0127] Convert the item information, the account information and the current time information into character strings respectively to obtain a second character string, a third character string and a fourth character string;

[0128] The second character string, the third character string and the fourth character string are concatenated to obtain the target character string.

[0129] Optionally, the concatenating the second character string, the third character string and the fourth character string to obtain the target character string includes:

[0130] Using a preset encrypted hash function to expand and encrypt the second character string, the third character string, and the fourth character string to obtain a target second character string, a target third character string, and a target fourth character string, respectively, wherein the target second character string, the third character string, and the target fourth character string have the same length;

[0131] The target second character string, the target third character string and the target fourth character string are concatenated to obtain the target character string.

[0132] Optionally, the step of locking the target character string to obtain locking information corresponding to the first commodity includes:

[0133] Sending a lock request to a distributed server, wherein the lock request includes the target string;

[0134] receiving feedback information generated by the distributed server in response to the lock request;

[0135] When the feedback information indicates that the locking request is successful, the locking information corresponding to the first commodity is obtained.

[0136] Optionally, after receiving the feedback information generated by the distributed server in response to the lock request, the method further includes:

[0137] If the feedback information indicates that the locking request fails, generating locking failure information of the first commodity, wherein the locking failure information is used to prevent the target terminal from sending the second order request for purchasing the first commodity again within a preset time period;

[0138] After the preset time period, re-order information is sent to the target terminal, where the re-order information is used to prompt the user to cancel the first order request and regenerate the second order request.

[0139] Optionally, after locking the target character string to obtain a lock signal corresponding to the first commodity, the method further includes:

[0140] receiving a third order request sent by the target terminal, wherein the third order request includes item information of a second commodity requested to be purchased by the target terminal;

[0141] In a case where the first commodity and the second commodity belong to the same category of goods, the third order request is invalidated based on the locking information.

[0142] The present application generates a target character string according to the first order request when receiving the first order request sent by the target terminal, thereby locking the first order request by locking the target character string. Before the first order request is processed, the target terminal is prevented from repeatedly generating and purchasing the same product in the first order request, thereby reducing the pressure on the server to process orders and improving order processing efficiency.

[0143] The computer-readable storage medium of the embodiment of the present application can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, - but not limited to - a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive lists) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, a device or a device or used in combination with it.

[0144] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0145] The program code contained on the storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0146] Computer program code for performing the operation of the present application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or terminal. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., using an Internet service provider to connect through the Internet).

[0147] The embodiment of the present application further provides a computer program product, which is stored in a storage medium. The computer program product is executed by at least one processor to implement the various processes of the above-mentioned order processing method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0148] Note that the above are only preferred embodiments of the present application and the technical principles used. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the appended claims.

Claims

1. A method for processing an order, characterized in that: Applied to a server, the method comprises: receiving a first order request sent by a target terminal, where the first order request is a request sent by the target terminal to purchase the first commodity, and the first order request includes item information of the first commodity requested to be purchased by the target terminal, where the item information is used to indicate item attribute information of the first commodity; Based on the first order request, generate a target string, where the target string is a string representation of the first order request; The target character string is locked to obtain locking information corresponding to the first commodity, wherein the locking information is used to prevent the target terminal from generating a second order request before the first order request is completed, and the second order request is used to purchase the first commodity again; When it is detected that the first order request of the target terminal is completed, the locking information is deleted.

2. The method according to claim 1, characterized in that The step of generating a target character string based on the first order request includes: Based on the first order request, acquiring account information and current time information for logging into the target terminal, the account information being a login account of a target application, the target application being an application software in the target terminal requesting to purchase the first commodity, and the current time information being a current timestamp for receiving the first order request; Convert the item information, the account information and the current time information into character strings respectively to obtain a second character string, a third character string and a fourth character string; The second character string, the third character string and the fourth character string are concatenated to obtain the target character string.

3. The method according to claim 2, characterized in that The step of concatenating the second character string, the third character string, and the fourth character string to obtain the target character string includes: Using a preset encrypted hash function to expand and encrypt the second character string, the third character string, and the fourth character string to obtain a target second character string, a target third character string, and a target fourth character string, respectively, wherein the target second character string, the third character string, and the target fourth character string have the same length; The target second character string, the target third character string and the target fourth character string are concatenated to obtain the target character string.

4. The method according to claim 1, characterized in that The step of locking the target character string to obtain locking information corresponding to the first commodity includes: Sending a lock request to a distributed server, wherein the lock request includes the target string; receiving feedback information generated by the distributed server in response to the lock request; When the feedback information indicates that the locking request is successful, the locking information corresponding to the first commodity is obtained.

5. The method according to claim 4, characterized in that After receiving the feedback information generated by the distributed server in response to the lock request, the method further includes: If the feedback information indicates that the locking request fails, generating locking failure information of the first commodity, wherein the locking failure information is used to prevent the target terminal from sending the second order request for purchasing the first commodity again within a preset time period; After the preset time period, re-order information is sent to the target terminal, where the re-order information is used to prompt the user to cancel the first order request and regenerate the second order request.

6. The method according to claim 1, characterized in that After locking the target character string and obtaining a lock signal corresponding to the first commodity, the method further includes: receiving a third order request sent by the target terminal, wherein the third order request includes item information of a second commodity requested to be purchased by the target terminal; In a case where the first commodity and the second commodity belong to the same category of goods, the third order request is invalidated based on the locking information.

7. An order processing device, characterized in that: Applied to a server, the device comprises: a receiving module, configured to receive a first order request sent by a target terminal, wherein the first order request is a request sent by the target terminal to purchase the first commodity, and the first order request includes item information of the first commodity requested to be purchased by the target terminal, wherein the item information is used to indicate item attribute information of the first commodity; A generating module, configured to generate a target string based on the first order request, wherein the target string is a string representation of the first order request; a locking module, used to lock the target string to obtain locking information corresponding to the first commodity, wherein the locking information is used to prevent the target terminal from generating a second order request before the first order request is completed, wherein the second order request is used to purchase the first commodity again; A deleting module is used to delete the locking information when it is detected that the first order request of the target terminal is completed.

8. An electronic device, characterized in that: The method comprises a processor, a memory and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the order processing method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of the order processing method according to any one of claims 1 to 6 are implemented.

10. A computer program product, characterized in that The computer program product is stored in a storage medium, and the computer program product is executed by at least one processor to implement the steps in the order processing method according to any one of claims 1 to 6.