Processing method and device for pre-occupying coupons, computer equipment and storage medium

By acquiring and processing the target tenant's pre-occupation coupon cache queue, the problems of inefficient and waste of resources in traditional methods are solved, and more efficient coupon processing and resource utilization are achieved.

CN120069869APending Publication Date: 2025-05-30XING LIN JU (BEI JING) KE JI YOU XIAN GONG SI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411990205.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

Traditional pre-occupy coupon processing methods have problems of inefficiency and waste of resources.

Method used

By obtaining the target tenant statistics table and the pre-occupation coupon cache queue, the query time is determined based on the difference between the latest queue time and the pre-set timeout time, the pending set is filtered and extracted, and the order record information is queried in the target tenant's database, and the coupon operation type is determined to handle the pre-occupation coupon.

Benefits of technology

By processing timeout coupons by sub-target tenants’ pre-occupy coupon cache queue, it reduces server processing pressure, reduces system resource loss, reduces database overhead, and improves the efficiency of pre-occupy coupon processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120069869A_ABST
    Figure CN120069869A_ABST
Patent Text Reader

Abstract

The invention relates to a processing method and device for pre-occupying coupons, computer equipment and a storage medium. The method comprises the steps of performing screening extraction processing from a corresponding pre-occupied coupon cache queue according to each pre-occupied coupon query time interval to obtain a corresponding to-be-processed set, performing query processing in a database of the corresponding target tenant according to each to-be-processed set to obtain order record information of all to-be-processed pre-occupied coupon identity identification numbers in the corresponding to-be-processed set; determining a coupon operation type of the corresponding order record information according to the order record information corresponding to each to-be-processed set in sequence, and according to the coupon operation type of each piece of to-be-processed pre-occupied coupon use record information, processing the pre-occupied coupon of the to-be-processed pre-occupied coupon identity identification number corresponding to the corresponding to-be-processed pre-occupied coupon use record information. By adopting the method, the efficiency can be improved and resource waste can be avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of coupon processing, and particularly to a method, apparatus, computer device, and storage medium for processing preoccupied coupons. Background Art

[0002] With the continuous development of the Internet and e-commerce, e-commerce platforms often issue various coupons to attract and motivate users. However, the current methods for e-commerce platforms to issue coupons can include random methods and issuing according to membership levels. Among them, a preoccupied coupon means that when a user places an order, the system will mark the coupon selected by the user as in a preoccupied state, indicating that the coupon has been occupied by the current order. If the order is successfully placed, the usage status of the coupon will change to the used state; otherwise, if the order fails, the coupon will be released.

[0003] However, traditional methods for processing preoccupied coupons have problems such as low efficiency or waste of resources. Summary of the Invention

[0004] Based on this, in view of the above technical problems, it is necessary to provide a method, apparatus, computer device, and storage medium for processing preoccupied coupons that can improve efficiency and avoid waste of resources.

[0005] In a first aspect, a method for processing preoccupied coupons is provided, and the method includes:

[0006] Obtain a target tenant statistical table, and sequentially obtain the preoccupied coupon cache queues of each target tenant according to the target user statistical table; the target tenant statistical table is used to count all target tenants; a target tenant is the tenant to which a user with a preoccupied coupon operation belongs; the preoccupied coupon cache queue is used to store the identification numbers of the preoccupied coupons corresponding to the target tenant and the queue entry times of the corresponding identification numbers of the preoccupied coupons;

[0007] Determine the latest query time of the corresponding preoccupied coupon cache queue according to the difference between the latest queue entry time of each preoccupied coupon cache queue and the preset timeout time, and determine the preoccupied coupon query time interval of the corresponding preoccupied coupon cache queue according to the earliest queue entry time of each preoccupied coupon cache queue and the corresponding latest query time; the latest queue entry time is the latest queue entry time in the corresponding preoccupied coupon cache queue; the earliest queue entry time is the earliest queue entry time in the corresponding preoccupied coupon cache queue;

[0008] According to the query time intervals of each pre-occupied coupon, after screening and extraction processing from the corresponding pre-occupied coupon cache queue, a to-be-processed set of the corresponding pre-occupied coupon cache queue is obtained. According to each to-be-processed set, query processing is performed in the database of the corresponding target tenant to obtain the order record information of all to-be-processed pre-occupied coupon identification numbers in the corresponding to-be-processed set; the to-be-processed set includes each to-be-processed pre-occupied coupon identification number; the to-be-processed pre-occupied coupon identification number is the pre-occupied coupon identification number to be processed.

[0009] Successively determine the coupon operation types of the corresponding order record information according to the order record information corresponding to each to-be-processed set, and process the pre-occupied coupons corresponding to the to-be-processed pre-occupied coupon identification numbers of the corresponding to-be-processed pre-occupied coupon usage record information according to the coupon operation types of each to-be-processed pre-occupied coupon usage record information; the coupon operation types include the operation of transferring the coupon to the used state or the operation of restoring the coupon to the unused state.

[0010] In one embodiment, obtaining the target tenant statistical table includes: establishing the target tenant statistical table; in response to receiving the order information sent by the user terminal, performing the pre-occupied coupon operation according to the order information, and determining the target tenant according to the user information of the pre-occupied coupon operation; determining whether the target tenant exists in the target tenant statistical table; in response to the target tenant not existing in the target tenant statistical table, recording the target tenant in the target tenant statistical table.

[0011] In one embodiment, obtaining the target tenant statistical table includes: in response to the target tenant existing in the target tenant statistical table, outputting a tenant already statistically recorded prompt message to the user terminal; wherein, the tenant already statistically recorded prompt message indicates that the target tenant has been recorded in the target tenant statistical table.

[0012] In one embodiment, the method further includes: establishing a pre-occupied coupon cache queue for each target tenant; when determining the target tenant according to the user information of the pre-occupied coupon operation, determining the pre-occupied coupon identification number of the corresponding target tenant according to the operation result of the pre-occupied coupon operation; storing the pre-occupied coupon identification number of the corresponding target tenant and the enqueue time of the corresponding pre-occupied coupon identification number into the pre-occupied coupon cache queue of each corresponding target tenant.

[0013] In one embodiment, the coupon operation type of the corresponding order record information is determined in sequence according to the order record information corresponding to each set to be processed, including: verifying the authenticity of the order according to the order record information corresponding to the set to be processed to obtain the order authenticity verification result of the corresponding order record information; the order authenticity result includes actually existing or not actually existing; in response to the order authenticity verification result of the corresponding order record information being actually existing, determining the coupon operation type of the corresponding order record information as the operation of transferring the coupon to the used state.

[0014] In one embodiment, the coupon operation type of the corresponding order record information is determined in sequence according to the order record information corresponding to each set to be processed, including: in response to the order authenticity verification result of the corresponding order record information not actually existing, determining the coupon operation type of the corresponding order record information as the operation of restoring the coupon to the unused state.

[0015] In one embodiment, the pre - occupied coupon corresponding to the pre - occupied coupon identification number of the corresponding set of pre - occupied coupon usage records to be processed is processed according to the coupon operation type of each set of pre - occupied coupon usage records to be processed, including:

[0016] In response to the coupon operation type of the pre - occupied coupon usage record information to be processed being the operation of transferring the coupon to the used state, restoring the pre - occupied coupon corresponding to the pre - occupied coupon identification number of the corresponding pre - occupied coupon usage record information to be processed from the pre - occupied state to the used state, and removing the pre - occupied coupon identification number of the corresponding pre - occupied coupon usage record information to be processed from the corresponding pre - occupied coupon cache queue;

[0017] In response to the coupon operation type of the pre - occupied coupon usage record information to be processed being the operation of restoring the coupon to the unused state, restoring the pre - occupied coupon corresponding to the pre - occupied coupon identification number of the corresponding pre - occupied coupon usage record information to be processed from the pre - occupied state to the unused state, and removing the pre - occupied coupon identification number of the corresponding pre - occupied coupon usage record information to be processed from the corresponding pre - occupied coupon cache queue.

[0018] In a second aspect, a device for processing pre - occupied coupons is provided. The device includes:

[0019] Among them, the statistical table acquisition module is used to obtain the target tenant statistical table, and sequentially obtain the pre-occupied coupon cache queues of each target tenant according to the target user statistical table; the target tenant statistical table is used to count all target tenants; the target tenant is the tenant to which the user with the pre-occupied coupon operation belongs; the pre-occupied coupon cache queue is used to store the pre-occupied coupon identification number corresponding to the target tenant and the enqueue time of the corresponding pre-occupied coupon identification number; the data query module is used to determine the latest query time of the corresponding pre-occupied coupon cache queue according to the difference between the latest enqueue time of each pre-occupied coupon cache queue and the preset timeout time, and determine the pre-occupied coupon query time interval of the corresponding pre-occupied coupon cache queue according to the earliest enqueue time and the corresponding latest query time of each pre-occupied coupon cache queue; the latest enqueue time is the latest enqueue time in the corresponding pre-occupied coupon cache queue; the earliest enqueue time is the earliest enqueue time in the corresponding pre-occupied coupon cache queue; the set generation module is used to perform screening and extraction processing on the corresponding pre-occupied coupon cache queue according to each pre-occupied coupon query time interval to obtain the to-be-processed set of the corresponding pre-occupied coupon cache queue, and query and process in the database of the corresponding target tenant according to each to-be-processed set to obtain the order record information of all to-be-processed pre-occupied coupon identification numbers in the corresponding to-be-processed set; the to-be-processed set includes each to-be-processed pre-occupied coupon identification number; the to-be-processed pre-occupied coupon identification number is the pre-occupied coupon identification number to be processed; the coupon processing module is used to sequentially determine the coupon operation type of the corresponding order record information according to each to-be-processed set corresponding order record information, and process the pre-occupied coupon corresponding to the to-be-processed pre-occupied coupon identification number corresponding to each to-be-processed pre-occupied coupon usage record information according to the coupon operation type of each to-be-processed pre-occupied coupon usage record information; the coupon operation type includes a coupon release operation or a coupon restoration to the unused state operation.

[0020] In a third aspect, a computer device is provided. The computer device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the steps of any one of the methods in the above method embodiments are implemented.

[0021] In a fourth aspect, a computer-readable storage medium is provided. A computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of any one of the methods in the above method embodiments are implemented.

[0022] The above-mentioned method, device, computer device, and storage medium for processing pre-occupied coupons obtain a target tenant statistical table, and sequentially obtain the pre-occupied coupon cache queues of each target tenant according to the target user statistical table; the target tenant statistical table is used to count all target tenants; the target tenant is the tenant to which the user with the pre-occupied coupon operation belongs; the pre-occupied coupon cache queue is used to store the pre-occupied coupon identification number corresponding to the target tenant and the enqueue time of the corresponding pre-occupied coupon identification number; then, determine the latest query time of the corresponding pre-occupied coupon cache queue according to the difference between the latest enqueue time of each pre-occupied coupon cache queue and the preset timeout time, and determine the pre-occupied coupon query time interval of the corresponding pre-occupied coupon cache queue according to the earliest enqueue time and the corresponding latest query time of each pre-occupied coupon cache queue; the latest enqueue time is the latest enqueue time in the corresponding pre-occupied coupon cache queue; the earliest enqueue time is the earliest enqueue time in the corresponding pre-occupied coupon cache queue; then, perform screening and extraction processing on each pre-occupied coupon cache queue according to each pre-occupied coupon query time interval to obtain the set of to-be-processed of the corresponding pre-occupied coupon cache queue, and query and process in the database of the corresponding target tenant according to each set of to-be-processed to obtain the order record information of all to-be-processed pre-occupied coupon identification numbers in the corresponding set of to-be-processed; the set of to-be-processed includes each to-be-processed pre-occupied coupon identification number; the to-be-processed pre-occupied coupon identification number is the pre-occupied coupon identification number to be processed; then, sequentially determine the coupon operation type of the corresponding order record information according to the order record information corresponding to each set of to-be-processed, and process the pre-occupied coupon corresponding to the to-be-processed pre-occupied coupon identification number corresponding to each to-be-processed pre-occupied coupon usage record information according to the coupon operation type of each to-be-processed pre-occupied coupon usage record information; the coupon operation type includes the operation of transferring the coupon to the used state or the operation of restoring the coupon to the unused state. Through the above method, the processing of the timeout coupon corresponding to the pre-occupied coupon cache queue of the sub-target tenant is realized, so as to reduce the processing pressure of the server, reduce the system resource consumption, reduce the database overhead, and improve the processing efficiency of the pre-occupied coupon. Description of the Drawings

[0023] Figure 1 It is an application environment diagram of the method for processing pre-occupied coupons in an embodiment;

[0024] Figure 2 It is a flowchart of the method for processing pre-occupied coupons in an embodiment;

[0025] Figure 3 It is a flowchart of obtaining the target tenant statistical table in an embodiment;

[0026] Figure 4Schematic flowchart of determining the coupon operation type corresponding to the order record information according to the order record information corresponding to each set to be processed in an embodiment;

[0027] Figure 5 Schematic flowchart of processing the preoccupied coupon corresponding to the preoccupied coupon identification number of the preoccupied coupon to be processed according to the coupon operation type of the preoccupied coupon usage record information to be processed in an embodiment;

[0028] Figure 6 Block diagram of the structure of the preoccupied coupon processing device in an embodiment;

[0029] Figure 7 Internal structure diagram of a computer device in an embodiment. Detailed implementation manners

[0030] In order to make the objectives, technical solutions and advantages of the present application clearer and more understandable, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0031] To facilitate the understanding of the present application, the present application will be described more comprehensively below with reference to the relevant accompanying drawings. Embodiments of the present application are shown in the drawings. However, the present application can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, these embodiments are provided to make the disclosure of the present application more thorough and comprehensive.

[0032] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which the present application belongs. The terms used in the specification of the present application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application.

[0033] It can be understood that the terms "first", "second", etc. used in the present application can be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish one element from another. For example, without departing from the scope of the present application, the first resistor can be called the second resistor, and similarly, the second resistor can be called the first resistor. Both the first resistor and the second resistor are resistors, but they are not the same resistor.

[0034] It can be understood that "connection" in the following embodiments should be understood as "electrical connection", "communication connection", etc. if there is an electrical signal or data transfer between the connected circuits, modules, units, etc.

[0035] As used herein, the singular forms "a", "an" and "the" may also include the plural forms unless the context clearly dictates otherwise. It should also be understood that the terms "comprising", "including" or "having", etc., specify the presence of the stated features, integers, steps, operations, components, parts or combinations thereof, but do not preclude the presence or addition of one or more other features, integers, steps, operations, components, parts or combinations thereof.

[0036] The method for processing pre-occupied coupons provided by this application can be applied to, for example, Figure 1 the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptop computers, smart phones, tablet computers and portable wearable devices, and the server 104 can be implemented by an independent server or a server cluster composed of multiple servers.

[0037] In one embodiment, as Figure 2 shown, a method for processing pre-occupied coupons is provided. Taking the server 104 in Figure 1 as an example, the following steps 201 to step 204 are included.

[0038] Step 201, obtain a target tenant statistical table, and sequentially obtain the pre-occupied coupon cache queues of each target tenant according to the target user statistical table.

[0039] Among them, the target tenant statistical table is used to count all target tenants; the target tenant is the tenant to which the user who has performed the pre-occupied coupon operation belongs; the pre-occupied coupon cache queue is used to store the pre-occupied coupon identification number corresponding to the target tenant and the enqueue time of the corresponding pre-occupied coupon identification number. Specifically, the server 104 obtains the target tenant statistical table and sequentially obtains the pre-occupied coupon cache queues of each target tenant according to the target user statistical table.

[0040] In one of the embodiments, as Figure 3 shown, obtaining the target tenant statistical table includes steps 301 to step 304.

[0041] Step 301, establish a target tenant statistical table;

[0042] Step 302, in response to receiving the order information sent by the user terminal, perform the pre-occupied coupon operation according to the order information, and determine the target tenant according to the user information of the pre-occupied coupon operation;

[0043] Step 303, determine whether the target tenant exists in the target tenant statistical table;

[0044] Step 304, in response to the target tenant not existing in the target tenant statistics table, record the target tenant in the target tenant statistics table.

[0045] Specifically, server 104 creates a target tenant statistics table; then, in response to receiving the order information sent by the user terminal, perform a pre-occupation coupon operation according to the order information, and determine the target tenant based on the user information of the pre-occupation coupon operation; then, determine whether the target tenant exists in the target tenant statistics table, and then, in response to the target tenant not existing in the target tenant statistics table, record the target tenant in the target tenant statistics table, improving the efficiency and convenience of obtaining the target tenant statistics table.

[0046] In this embodiment, create a target tenant statistics table; then, in response to receiving the order information sent by the user terminal, perform a pre-occupation coupon operation according to the order information, and determine the target tenant based on the user information of the pre-occupation coupon operation; then, determine whether the target tenant exists in the target tenant statistics table, and then, in response to the target tenant not existing in the target tenant statistics table, record the target tenant in the target tenant statistics table, improving the efficiency and convenience of obtaining the target tenant statistics table.

[0047] In one of the embodiments, as Figure 3 shown, obtaining the target tenant statistics table includes step 305.

[0048] Step 305, in response to the target tenant existing in the target tenant statistics table, output a tenant already counted prompt message to the user terminal; wherein, the tenant already counted prompt message indicates that the target tenant has been recorded in the target tenant statistics table.

[0049] Specifically, server 104 outputs a tenant already counted prompt message to the user terminal in response to the target tenant existing in the target tenant statistics table; wherein, the tenant already counted prompt message indicates that the target tenant has been recorded in the target tenant statistics table, improving the efficiency and convenience of obtaining the target tenant statistics table.

[0050] In this embodiment, output a tenant already counted prompt message to the user terminal in response to the target tenant existing in the target tenant statistics table; wherein, the tenant already counted prompt message indicates that the target tenant has been recorded in the target tenant statistics table, improving the efficiency and convenience of obtaining the target tenant statistics table.

[0051] In one of the embodiments, the method further includes:

[0052] Create a pre-occupation coupon cache queue for each target tenant;

[0053] When determining the target tenant based on the user information of the pre-occupation coupon operation, determine the pre-occupation coupon identification number corresponding to the target tenant according to the operation result of the pre-occupation coupon operation.

[0054] Store the pre-occupied coupon identification number corresponding to the target tenant and the enqueue time of the corresponding pre-occupied coupon identification number into the pre-occupied coupon cache queue of each corresponding target tenant.

[0055] Specifically, the server 104 establishes the pre-occupied coupon cache queue for each target tenant; then, when determining the target tenant based on the user information of the pre-occupied coupon operation, determine the pre-occupied coupon identification number corresponding to the target tenant according to the operation result of the pre-occupied coupon operation; next, store the pre-occupied coupon identification number corresponding to the target tenant and the enqueue time of the corresponding pre-occupied coupon identification number into the pre-occupied coupon cache queue of each corresponding target tenant, improving the efficiency and convenience of obtaining the pre-occupied coupon cache queue of each target tenant.

[0056] In this embodiment, establish the pre-occupied coupon cache queue for each target tenant; then, when determining the target tenant based on the user information of the pre-occupied coupon operation, determine the pre-occupied coupon identification number corresponding to the target tenant according to the operation result of the pre-occupied coupon operation; next, store the pre-occupied coupon identification number corresponding to the target tenant and the enqueue time of the corresponding pre-occupied coupon identification number into the pre-occupied coupon cache queue of each corresponding target tenant, improving the efficiency and convenience of obtaining the pre-occupied coupon cache queue of each target tenant.

[0057] Step 202, determine the latest query time of the corresponding pre-occupied coupon cache queue according to the difference between the latest enqueue time of each pre-occupied coupon cache queue and the preset timeout time, and determine the pre-occupied coupon query time interval of the corresponding pre-occupied coupon cache queue according to the earliest enqueue time of each pre-occupied coupon cache queue and the corresponding latest query time.

[0058] Wherein, the latest enqueue time is the latest enqueue time in the corresponding pre-occupied coupon cache queue; the earliest enqueue time is the earliest enqueue time in the corresponding pre-occupied coupon cache queue.

[0059] Specifically, the server 104 determines the latest query time of the corresponding pre-occupied coupon cache queue according to the difference between the latest enqueue time of each pre-occupied coupon cache queue and the preset timeout time, and determines the pre-occupied coupon query time interval of the corresponding pre-occupied coupon cache queue according to the earliest enqueue time of each pre-occupied coupon cache queue and the corresponding latest query time.

[0060] Step 203: After screening and extracting from the corresponding pre-occupied coupon cache queue according to each pre-occupied coupon query time interval, obtain the to-be-processed set of the corresponding pre-occupied coupon cache queue, and query and process in the database of the corresponding target tenant according to each to-be-processed set to obtain the order record information of all to-be-processed pre-occupied coupon identification numbers in the corresponding to-be-processed set.

[0061] Among them, the to-be-processed set includes each to-be-processed pre-occupied coupon identification number; the to-be-processed pre-occupied coupon identification number is the identification number of the to-be-processed pre-occupied coupon. Specifically, the server 104 screens and extracts from the corresponding pre-occupied coupon cache queue according to each pre-occupied coupon query time interval to obtain the to-be-processed set of the corresponding pre-occupied coupon cache queue, and queries and processes in the database of the corresponding target tenant according to each to-be-processed set to obtain the order record information of all to-be-processed pre-occupied coupon identification numbers in the corresponding to-be-processed set.

[0062] Step 204: Determine the coupon operation type of the corresponding order record information according to the order record information corresponding to each to-be-processed set in turn, and process the pre-occupied coupon corresponding to the to-be-processed pre-occupied coupon identification number corresponding to the coupon operation type of each to-be-processed pre-occupied coupon usage record information.

[0063] Among them, the coupon operation type includes the operation of transferring the coupon to the used state or the operation of restoring the coupon to the unused state. Specifically, the server 104 determines the coupon operation type of the corresponding order record information according to the order record information corresponding to each to-be-processed set in turn, and processes the pre-occupied coupon corresponding to the to-be-processed pre-occupied coupon identification number corresponding to the coupon operation type of each to-be-processed pre-occupied coupon usage record information, so as to reduce the server processing pressure by processing the corresponding expired coupons through the pre-occupied coupon cache queue of sub-target tenants, reduce the system resource consumption, reduce the database overhead, and improve the processing efficiency of the pre-occupied coupons.

[0064] In the above method for processing pre-occupied coupons, a target tenant statistics table is obtained, and the pre-occupied coupon cache queues of each target tenant are sequentially obtained according to the target user statistics table; the target tenant statistics table is used to count all target tenants; the target tenant is the tenant to which the user with the pre-occupied coupon operation belongs; the pre-occupied coupon cache queue is used to store the pre-occupied coupon identification number corresponding to the target tenant and the enqueue time of the corresponding pre-occupied coupon identification number; then, the latest query time of the corresponding pre-occupied coupon cache queue is determined according to the difference between the latest enqueue time of each pre-occupied coupon cache queue and the preset timeout time, and the pre-occupied coupon query time interval of the corresponding pre-occupied coupon cache queue is determined according to the earliest enqueue time of each pre-occupied coupon cache queue and the corresponding latest query time; the latest enqueue time is the latest enqueue time in the corresponding pre-occupied coupon cache queue; the earliest enqueue time is the earliest enqueue time in the corresponding pre-occupied coupon cache queue; then, after screening and extracting according to each pre-occupied coupon query time interval from the corresponding pre-occupied coupon cache queue, a set of to-be-processed data of the corresponding pre-occupied coupon cache queue is obtained, and order record information of all to-be-processed pre-occupied coupon identification numbers in the corresponding set of to-be-processed data is obtained by querying in the database of the corresponding target tenant; the set of to-be-processed data includes each to-be-processed pre-occupied coupon identification number; the to-be-processed pre-occupied coupon identification number is the pre-occupied coupon identification number to be processed; then, the coupon operation type of the corresponding order record information is determined according to the order record information corresponding to each set of to-be-processed data in sequence, and the pre-occupied coupon corresponding to the to-be-processed pre-occupied coupon identification number corresponding to the to-be-processed pre-occupied coupon usage record information is processed according to the coupon operation type of the to-be-processed pre-occupied coupon usage record information; the coupon operation type includes an operation of transferring the coupon to the used state or an operation of restoring the coupon to the unused state. Through the above method, the processing of the corresponding timeout coupons by the pre-occupied coupon cache queues of different target tenants is realized, so as to reduce the server processing pressure, reduce the system resource consumption, reduce the database overhead, and improve the processing efficiency of the pre-occupied coupons.

[0065] In one embodiment, as Figure 4 shown, determining the coupon operation type of the corresponding order record information according to the order record information corresponding to each set of to-be-processed data in sequence includes steps 401 to 402.

[0066] Step 401, perform order authenticity verification according to the order record information corresponding to the set of to-be-processed data, and obtain the order authenticity verification result of the corresponding order record information.

[0067] Step 402, in response to the order authenticity verification result of the corresponding order record information being actually existent, determine the coupon operation type of the corresponding order record information as an operation of transferring the coupon to the used state.

[0068] Among them, the order authenticity result includes real existence or non-real existence. Specifically, the server 104 performs order authenticity verification based on the order record information corresponding to the to-be-processed set, and obtains the order authenticity verification result of the corresponding order record information; then, in response to the order authenticity verification result of the corresponding order record information being real existence, the coupon operation type of the corresponding order record information is determined as the operation of transferring the coupon to the used state operation, thereby improving the efficiency and convenience of determining the coupon operation type.

[0069] In this embodiment, order authenticity verification is performed based on the order record information corresponding to the to-be-processed set, and the order authenticity verification result of the corresponding order record information is obtained; then, in response to the order authenticity verification result of the corresponding order record information being real existence, the coupon operation type of the corresponding order record information is determined as the operation of transferring the coupon to the used state operation, thereby improving the efficiency and convenience of determining the coupon operation type.

[0070] In one embodiment, as Figure 4 shown, the coupon operation type of the corresponding order record information is determined in sequence according to the order record information corresponding to each to-be-processed set, including step 403.

[0071] Step 403, in response to the order authenticity verification result of the corresponding order record information being non-real existence, determine the coupon operation type of the corresponding order record information as the operation of restoring the coupon to the unused state.

[0072] Specifically, the server 104, in response to the order authenticity verification result of the corresponding order record information being non-real existence, determines the coupon operation type of the corresponding order record information as the operation of restoring the coupon to the unused state, thereby improving the efficiency and convenience of determining the coupon operation type.

[0073] In this embodiment, in response to the order authenticity verification result of the corresponding order record information being non-real existence, determine the coupon operation type of the corresponding order record information as the operation of restoring the coupon to the unused state, thereby improving the efficiency and convenience of determining the coupon operation type.

[0074] In one embodiment, as Figure 5 shown, the preoccupied coupon corresponding to the to-be-processed preoccupied coupon identification number of the corresponding to-be-processed preoccupied coupon usage record information is processed according to the coupon operation type of the to-be-processed preoccupied coupon usage record information, including step 501 to step 502.

[0075] Step 501: In response to the coupon operation type of the to-be-processed pre-occupied coupon usage record information being the operation of transferring the coupon to the used state, restore the pre-occupied coupon corresponding to the to-be-processed pre-occupied coupon identification number of the corresponding to-be-processed pre-occupied coupon usage record information from the pre-occupied state to the used state, and remove the to-be-processed pre-occupied coupon identification number corresponding to the corresponding to-be-processed pre-occupied coupon usage record information from the corresponding pre-occupied coupon cache queue.

[0076] Step 502: In response to the coupon operation type of the to-be-processed pre-occupied coupon usage record information being the operation of restoring the coupon to the unused state, restore the pre-occupied coupon corresponding to the to-be-processed pre-occupied coupon identification number of the corresponding to-be-processed pre-occupied coupon usage record information from the pre-occupied state to the unused state, and remove the to-be-processed pre-occupied coupon identification number corresponding to the corresponding to-be-processed pre-occupied coupon usage record information from the corresponding pre-occupied coupon cache queue.

[0077] Specifically, the server 104, in response to the coupon operation type of the to-be-processed pre-occupied coupon usage record information being the operation of transferring the coupon to the used state, restores the pre-occupied coupon corresponding to the to-be-processed pre-occupied coupon identification number of the corresponding to-be-processed pre-occupied coupon usage record information from the pre-occupied state to the used state, and removes the to-be-processed pre-occupied coupon identification number corresponding to the corresponding to-be-processed pre-occupied coupon usage record information from the corresponding pre-occupied coupon cache queue; then, in response to the coupon operation type of the to-be-processed pre-occupied coupon usage record information being the operation of restoring the coupon to the unused state, restores the pre-occupied coupon corresponding to the to-be-processed pre-occupied coupon identification number of the corresponding to-be-processed pre-occupied coupon usage record information from the pre-occupied state to the unused state, and removes the to-be-processed pre-occupied coupon identification number corresponding to the corresponding to-be-processed pre-occupied coupon usage record information from the corresponding pre-occupied coupon cache queue, improving the efficiency and convenience of processing the pre-occupied coupons.

[0078] In this embodiment, in response to the coupon operation type of the to-be-processed pre-occupied coupon usage record information being the operation of transferring the coupon to the used state, the pre-occupied coupon corresponding to the to-be-processed pre-occupied coupon identification number of the corresponding to-be-processed pre-occupied coupon usage record information is restored from the pre-occupied state to the used state, and the to-be-processed pre-occupied coupon identification number corresponding to the corresponding to-be-processed pre-occupied coupon usage record information is removed from the corresponding pre-occupied coupon cache queue; then, in response to the coupon operation type of the to-be-processed pre-occupied coupon usage record information being the operation of restoring the coupon to the unused state, the pre-occupied coupon corresponding to the to-be-processed pre-occupied coupon identification number of the corresponding to-be-processed pre-occupied coupon usage record information is restored from the pre-occupied state to the unused state, and the to-be-processed pre-occupied coupon identification number corresponding to the corresponding to-be-processed pre-occupied coupon usage record information is removed from the corresponding pre-occupied coupon cache queue, improving the efficiency and convenience of processing pre-occupied coupons.

[0079] It should be understood that although Figures 2 - 5 the steps in the flowchart of Figures 2 - 5 are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise clearly stated in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover,

[0080] In a second aspect, as Figure 6 shown, a processing device for pre-occupied coupons is provided, and the device includes a statistical table acquisition module 610, a data query module 620, a set generation module 630, and a coupon processing module 640.

[0081] Among them, the statistical table acquisition module 610 is used to acquire the target tenant statistical table, and sequentially acquire the pre-occupied coupon cache queues of each target tenant according to the target user statistical table; the target tenant statistical table is used to count all target tenants; the target tenant is the tenant to which the user who has performed the pre-occupied coupon operation belongs; the pre-occupied coupon cache queue is used to store the pre-occupied coupon identification number corresponding to the target tenant and the enqueue time of the corresponding pre-occupied coupon identification number; the data query module 620 is used to determine the latest query time of the corresponding pre-occupied coupon cache queue according to the difference between the latest enqueue time of each pre-occupied coupon cache queue and the preset timeout time, and determine the pre-occupied coupon query time interval of the corresponding pre-occupied coupon cache queue according to the earliest enqueue time of each pre-occupied coupon cache queue and the corresponding latest query time; the latest enqueue time is the latest enqueue time in the corresponding pre-occupied coupon cache queue; the earliest enqueue time is the earliest enqueue time in the corresponding pre-occupied coupon cache queue; the set generation module 630 is used to perform screening and extraction processing on the corresponding pre-occupied coupon cache queue according to each pre-occupied coupon query time interval to obtain the to-be-processed set of the corresponding pre-occupied coupon cache queue, and perform query processing on each to-be-processed set in the database of the corresponding target tenant to obtain the order record information of all to-be-processed pre-occupied coupon identification numbers in the corresponding to-be-processed set; the to-be-processed set includes each to-be-processed pre-occupied coupon identification number; the to-be-processed pre-occupied coupon identification number is the pre-occupied coupon identification number to be processed; the coupon processing module 640 is used to sequentially determine the coupon operation type of the corresponding order record information according to each to-be-processed set of order record information, and process the pre-occupied coupon corresponding to the to-be-processed pre-occupied coupon identification number corresponding to each to-be-processed pre-occupied coupon usage record information according to the coupon operation type of each to-be-processed pre-occupied coupon usage record information; the coupon operation type includes a coupon release operation or a coupon restoration to the unused state operation.

[0082] In one embodiment, the statistical table acquisition module 610 includes a statistical table acquisition unit.

[0083] Among them, the statistical table acquisition unit is used to establish a target tenant statistical table; the statistical table acquisition unit is used to respond to the order information sent by the user terminal, perform a pre-occupied coupon operation according to the order information, and determine the target tenant according to the user information of the pre-occupied coupon operation; the statistical table acquisition unit is used to judge whether the target tenant exists in the target tenant statistical table; the statistical table acquisition unit is used to respond that the target tenant does not exist in the target tenant statistical table, and record the target tenant in the target tenant statistical table.

[0084] In one embodiment, the statistical table acquisition module 610 is further configured to output a tenant statistical prompt message to the user terminal in response to the existence of a target tenant in the target tenant statistical table; wherein, the tenant statistical prompt message indicates that the target tenant statistical table has recorded the target tenant.

[0085] In one embodiment, the statistical table acquisition module 610 further includes a pre-occupied coupon cache queue acquisition unit.

[0086] Wherein, the pre-occupied coupon cache queue acquisition unit is configured to establish a pre-occupied coupon cache queue for each target tenant; the pre-occupied coupon cache queue acquisition unit is configured to determine the pre-occupied coupon identification number of the corresponding target tenant according to the operation result of the pre-occupied coupon operation when determining the target tenant based on the user information of the pre-occupied coupon operation; the pre-occupied coupon cache queue acquisition unit is configured to store the pre-occupied coupon identification number of the corresponding target tenant and the enqueue time of the corresponding pre-occupied coupon identification number into the pre-occupied coupon cache queue of each corresponding target tenant.

[0087] In one embodiment, the coupon processing module 640 includes a coupon operation type determination unit.

[0088] Wherein, the coupon operation type determination unit is configured to perform order authenticity verification on the order record information corresponding to the to-be-processed set to obtain the order authenticity verification result of the corresponding order record information; the order authenticity result includes actually existing or not actually existing; the coupon operation type determination unit is configured to, in response to the order authenticity verification result of the corresponding order record information being actually existing, determine the coupon operation type of the corresponding order record information as the operation of transferring the coupon to the used state.

[0089] In one embodiment, the coupon operation type determination unit is configured to, in response to the order authenticity verification result of the corresponding order record information being not actually existing, determine the coupon operation type of the corresponding order record information as the operation of restoring the coupon to the unused state.

[0090] In one embodiment, the coupon processing module 640 includes a coupon processing unit.

[0091] Among them, the coupon processing unit is configured to, in response to the coupon operation type of the to-be-processed pre-occupied coupon usage record information being the operation of transferring the coupon to the used state, restore the pre-occupied coupon corresponding to the to-be-processed pre-occupied coupon identification number in the corresponding to-be-processed pre-occupied coupon usage record information from the pre-occupied state to the used state, and remove the to-be-processed pre-occupied coupon identification number corresponding to the corresponding to-be-processed pre-occupied coupon usage record information from the corresponding pre-occupied coupon cache queue; the coupon processing unit is configured to, in response to the coupon operation type of the to-be-processed pre-occupied coupon usage record information being the operation of restoring the coupon to the unused state, restore the pre-occupied coupon corresponding to the to-be-processed pre-occupied coupon identification number in the corresponding to-be-processed pre-occupied coupon usage record information from the pre-occupied state to the unused state, and remove the to-be-processed pre-occupied coupon identification number corresponding to the corresponding to-be-processed pre-occupied coupon usage record information from the corresponding pre-occupied coupon cache queue.

[0092] For the specific limitations of the processing device for pre-occupied coupons, reference can be made to the limitations of the processing method for pre-occupied coupons in the foregoing text, which will not be elaborated herein. Each module in the above-mentioned processing device for pre-occupied coupons can be implemented in whole or in part by software, hardware, and their combination. The above-mentioned modules can be embedded in the processor of the computer device in hardware form or be independent of it, or be stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to the above-mentioned modules.

[0093] In one embodiment, a computer device is provided. The computer device can be a server, and its internal structure diagram can be as Figure 7 shown. The computer device includes a processor, a memory, a network interface, and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store the pre-occupied coupon cache queues of each target tenant. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it implements a method for processing pre-occupied coupons.

[0094] Those skilled in the art can understand that Figure 7 the structure shown in

[0095] In a third aspect, a computer device is provided, which includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the steps of any of the methods in the above method embodiments are implemented.

[0096] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the methods in the above method embodiments are implemented.

[0097] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the various embodiments provided in the present application can include non-volatile and / or volatile memories. Non-volatile memories can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memories can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.

[0098] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.

[0099] The above-described embodiments only represent several implementation manners of the present application. Their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the invention patent. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application should be subject to the appended claims.

Claims

1. A method for processing a pre-ordered coupon, the method comprising: Obtain a target tenant statistics table, and obtain the pre-occupied coupon cache queue of each target tenant in turn according to the target user statistics table; The target tenant statistics table is used to count all target tenants; The target tenant is the tenant to which the user who has performed the pre-emption coupon operation belongs; The pre-occupied coupon cache queue is used to store the pre-occupied coupon identification number corresponding to the target tenant and the corresponding queue entry time of the pre-occupied coupon identification number; The latest query time of the corresponding pre-occupied coupon cache queue is determined according to the difference between the latest queue entry time of each pre-occupied coupon cache queue and the preset timeout time, and the pre-occupied coupon query time interval of the corresponding pre-occupied coupon cache queue is determined according to the earliest queue entry time of each pre-occupied coupon cache queue and the corresponding latest query time; the latest queue entry time is the latest queue entry time in the corresponding pre-occupied coupon cache queue; the earliest queue entry time is the earliest queue entry time in the corresponding pre-occupied coupon cache queue; After screening and extracting the corresponding pre-occupied coupon cache queue according to each pre-occupied coupon query time interval, a to-be-processed set of the corresponding pre-occupied coupon cache queue is obtained; and according to each to-be-processed set, a query is performed in the corresponding database of the target tenant to obtain order record information of all to-be-processed pre-occupied coupon identity identification numbers in the corresponding to-be-processed set; the to-be-processed set includes each to-be-processed pre-occupied coupon identity identification number; the to-be-processed pre-occupied coupon identity identification number is the to-be-processed pre-occupied coupon identity identification number; Determine the coupon operation type of the corresponding order record information in turn according to the order record information corresponding to each of the pending sets, and process the pre-occupied coupon of the pre-occupied coupon identity identification number corresponding to the corresponding pre-occupied coupon usage record information according to the coupon operation type of each of the pending sets; the coupon operation type includes the operation of transferring the coupon to the used state or the operation of restoring the coupon to the unused state.

2. The method according to claim 1, characterized in that The obtaining of the target tenant statistics table includes: Establishing the target tenant statistics table; In response to receiving the order information sent by the user terminal, performing the pre-occupied coupon operation according to the order information, and determining the target tenant according to the user information of the pre-occupied coupon operation; Determine whether the target tenant exists in the target tenant statistics table; In response to the target tenant not existing in the target tenant statistics table, recording the target tenant in the target tenant statistics table.

3. The method according to claim 2, characterized in that The obtaining of the target tenant statistics table includes: In response to the target tenant existing in the target tenant statistics table, outputting tenant statistics prompt information to the user terminal; wherein the tenant statistics prompt information indicates that the target tenant has been recorded in the target tenant statistics table.

4. The method according to claim 2, characterized in that: The method further comprises: Establishing the pre-empted coupon cache queue of each of the target tenants; When determining the target tenant according to the user information of the pre-occupied coupon operation, determining the pre-occupied coupon identity number corresponding to the target tenant according to the operation result of the pre-occupied coupon operation; The pre-occupied coupon identification number corresponding to the target tenant and the queue entry time of the corresponding pre-occupied coupon identification number are stored in the pre-occupied coupon cache queue of each corresponding target tenant.

5. The method according to claim 1, characterized in that The step of determining the coupon operation type of the corresponding order record information according to the order record information corresponding to each of the to-be-processed sets in sequence includes: Performing order authenticity verification according to the order record information corresponding to the to-be-processed set, and obtaining an order authenticity verification result of the corresponding order record information; the order authenticity result includes real existence or non-real existence; In response to the order authenticity verification result of the corresponding order record information being the real existence, the coupon operation type of the corresponding order record information is determined as the operation of transferring the coupon to a used state.

6. The method according to claim 5, characterized in that The step of determining the coupon operation type of the corresponding order record information according to the order record information corresponding to each of the to-be-processed sets in sequence includes: In response to the order authenticity verification result of the corresponding order record information being the non-existence, the coupon operation type of the corresponding order record information is determined to be the coupon restoring unused state operation.

7. The method according to claim 1, characterized in that Processing the pre-occupied coupon of the pre-occupied coupon identification number to be processed corresponding to the pre-occupied coupon usage record information to be processed according to the coupon operation type of each pre-occupied coupon usage record information to be processed, including: In response to the coupon operation type of the pending pre-occupied coupon usage record information being the coupon transfer to the used state operation, the pre-occupied coupon of the pending pre-occupied coupon identity number corresponding to the corresponding pending pre-occupied coupon usage record information is restored from the pre-occupied state to the used state, and the pending pre-occupied coupon identity number corresponding to the corresponding pending pre-occupied coupon usage record information is removed from the corresponding pre-occupied coupon cache queue; In response to the coupon operation type of the pending pre-occupied coupon usage record information being the coupon restoration unused state operation, the pre-occupied coupon of the pending pre-occupied coupon identity identification number corresponding to the corresponding pending pre-occupied coupon usage record information is restored from the pre-occupied state to the unused state, and the pending pre-occupied coupon identity identification number corresponding to the corresponding pending pre-occupied coupon usage record information is removed from the corresponding pre-occupied coupon cache queue.

8. A device for processing pre-ordered coupons, characterized in that: The device comprises: The statistical table acquisition module is used to obtain the target tenant statistical table, and sequentially obtain the pre-occupied coupon cache queue of each target tenant according to the target user statistical table; the target tenant statistical table is used to count all target tenants; the target tenant is the tenant to which the user who has pre-occupied coupon operation belongs; the pre-occupied coupon cache queue is used to store the pre-occupied coupon identity identification number corresponding to the target tenant and the corresponding queue entry time of the pre-occupied coupon identity identification number; A data query module is used to determine the latest query time of the corresponding pre-occupied coupon cache queue according to the difference between the latest queue entry time of each pre-occupied coupon cache queue and the preset timeout time, and determine the pre-occupied coupon query time interval of the corresponding pre-occupied coupon cache queue according to the earliest queue entry time of each pre-occupied coupon cache queue and the corresponding latest query time; the latest queue entry time is the latest queue entry time in the corresponding pre-occupied coupon cache queue; the earliest queue entry time is the earliest queue entry time in the corresponding pre-occupied coupon cache queue; A set generation module is used to obtain a corresponding to-be-processed set of the pre-occupied coupon cache queue after screening and extracting the pre-occupied coupon cache queue according to each pre-occupied coupon query time interval, and to obtain order record information of all to-be-processed pre-occupied coupon identity identification numbers in the corresponding to-be-processed set by querying in the database of the corresponding target tenant according to each to-be-processed set; the to-be-processed set includes each to-be-processed pre-occupied coupon identity identification number; the to-be-processed pre-occupied coupon identity identification number is the to-be-processed pre-occupied coupon identity identification number; A coupon processing module is used to determine the coupon operation type of the corresponding order record information according to the order record information corresponding to each of the pending sets in turn, and process the pre-occupied coupon of the pending pre-occupied coupon identity identification number corresponding to the corresponding pre-occupied coupon usage record information according to the coupon operation type of each of the pending pre-occupied coupon usage record information; the coupon operation type includes a coupon release operation or a coupon restoration unused state operation.

9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.