Coupon inventory processing method and device, electronic equipment and computer readable medium

By receiving coupon inventory processing requests, obtaining activity marks, performing daily batch tasks to count the number of expired coupons, and determining the inventory adjustment time based on preset thresholds, it solves the problem of low efficiency and low accuracy of manual recovery of expired coupons in the existing technology, and realizes efficient and accurate inventory processing, reducing the impact on merchants issuing effective coupons.

CN119539874APending Publication Date: 2025-02-28CHINA CONSTRUCTION BANK +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411625678.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-14
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

The existing artificial recovery of expired coupons has low efficiency and low accuracy, which affects the number of effective coupons issued by merchants.

Method used

By receiving coupon inventory processing requests, obtaining activity identifiers that support reverting inventory, performing daily batch tasks to count the number of expired coupons, generating record update statistics and counting the number of active clusters, determining the inventory adjustment time based on the number of active clusters and preset thresholds, and sending inventory adjustment information to the inventory management service node for adjustment.

Benefits of technology

It improves the efficiency and accuracy of handling expired coupon inventory, and reduces the impact on the number of effective coupons issued by merchants.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119539874A_ABST
    Figure CN119539874A_ABST
Patent Text Reader

Abstract

The invention discloses a coupon inventory processing method and device, electronic equipment and a computer readable medium, and relates to the technical field of big data processing, and the method comprises the steps: receiving a coupon inventory processing request, and obtaining an activity identifier supporting inventory rollback; executing the day-end batch task to count the number of expired coupons of each corresponding activity cluster in the previous day according to the activity identifier, and obtaining task execution result data; generating a record, and updating the number of activity clusters completing statistics based on a record identifier, an activity identifier and task execution result data corresponding to the record; determining inventory adjustment time according to the number of the activity clusters and a preset threshold value; and in response to the inventory adjustment time being the current time, generating inventory adjustment information and sending the inventory adjustment information to the inventory management service node, so that the inventory management service node adjusts the coupon inventory corresponding to the activity identifier based on the inventory adjustment information. And the expired coupon inventory processing efficiency and accuracy are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of big data processing technology, and in particular to a coupon inventory processing method, device, electronic device and computer-readable medium. Background Art

[0002] Currently, the method of manually restoring the inventory of expired coupons is to obtain the number of expired coupons through manual statistics or system download reports every day, and then adjust the inventory of active coupons through the activity coupon inventory management personnel. Manually restoring the inventory of expired coupons is inefficient and inaccurate, which affects the number of valid coupons issued by merchants. Summary of the invention

[0003] In view of this, the embodiments of the present application provide a coupon inventory processing method, device, electronic device and computer-readable medium, which can solve the problem that the existing manual recovery of expired coupon inventory is inefficient and accurate, affecting the number of valid coupons issued by merchants.

[0004] To achieve the above objective, according to one aspect of an embodiment of the present application, a coupon inventory processing method is provided, comprising:

[0005] Receive the coupon inventory processing request and obtain the activity ID that supports the return of inventory;

[0006] Execute the end-of-day batch task to count the number of expired coupons of each corresponding activity cluster on the previous day according to the activity ID, and obtain the task execution result data;

[0007] Generate a record, and update the number of completed activity clusters based on the record ID, activity ID, and task execution result data corresponding to the record;

[0008] Determine inventory adjustment time based on the number of active clusters and preset thresholds;

[0009] In response to the inventory adjustment time being the current time, inventory adjustment information is generated and sent to the inventory management service node, so that the inventory management service node adjusts the coupon inventory corresponding to the activity identifier based on the inventory adjustment information.

[0010] Optionally, generate records including:

[0011] Generate a record for recording the number of activity clusters that have completed the statistics of the number of expired coupons; the record uses the record identifier plus the activity identifier as the key and the number of activity clusters that have completed the statistics as the value.

[0012] Optionally, the coupon inventory processing method further includes:

[0013] Store records into a key-value database cache.

[0014] Optionally, updating the number of completed activity clusters based on the record identifier, activity identifier, and task execution result data corresponding to the record includes:

[0015] If the task execution result data corresponds to completing the statistics of the number of expired coupons corresponding to an activity cluster, the value of the record corresponding to the record identifier and the activity identifier is increased by one.

[0016] Optionally, determine when to adjust inventory, including:

[0017] When the number of active clusters is greater than or equal to a preset threshold, the inventory adjustment time is determined to be the current time.

[0018] Optionally, obtain the activity ID that supports the return of inventory, including:

[0019] The activity identifiers including the rollback identifier are filtered out from the various activity identifiers, and the activity identifiers including the rollback identifier are obtained from the various activity identifiers.

[0020] In addition, the present application also provides a coupon inventory processing device, including:

[0021] A receiving unit is configured to receive a coupon inventory processing request and obtain an activity identifier supporting the return of inventory;

[0022] The task execution unit is configured to execute the end-of-day batch task to count the number of expired coupons of each corresponding activity cluster on the previous day according to the activity identifier, and obtain task execution result data;

[0023] A record generation unit is configured to generate a record, and update the number of statistically completed activity clusters based on a record identifier, an activity identifier, and task execution result data corresponding to the record;

[0024] an inventory adjustment time determination unit, configured to determine an inventory adjustment time according to the number of active clusters and a preset threshold;

[0025] The inventory adjustment unit is configured to generate inventory adjustment information in response to the inventory adjustment time being the current time and send the information to the inventory management service node, so that the inventory management service node adjusts the coupon inventory corresponding to the activity identifier based on the inventory adjustment information.

[0026] Optionally, the record generation unit is further configured to:

[0027] Generate a record for recording the number of activity clusters that have completed the statistics of the number of expired coupons; the record uses the record identifier plus the activity identifier as the key and the number of activity clusters that have completed the statistics as the value.

[0028] Optionally, the coupon stock processing device further includes a storage unit configured to:

[0029] Store records into a key-value database cache.

[0030] Optionally, the record generation unit is further configured to:

[0031] If the task execution result data corresponds to completing the statistics of the number of expired coupons corresponding to an activity cluster, the value of the record corresponding to the record identifier and the activity identifier is increased by one.

[0032] Optionally, the inventory adjustment time determination unit is further configured to:

[0033] When the number of active clusters is greater than or equal to a preset threshold, the inventory adjustment time is determined to be the current time.

[0034] Optionally, the receiving unit is further configured to:

[0035] The activity identifiers including the rollback identifier are filtered out from the various activity identifiers, and the activity identifiers including the rollback identifier are obtained from the various activity identifiers.

[0036] In addition, the present application also provides a coupon inventory processing electronic device, including: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by one or more processors, the one or more processors implement the coupon inventory processing method as described above.

[0037] In addition, the present application also provides a computer-readable medium on which a computer program is stored. When the program is executed by a processor, the coupon inventory processing method as described above is implemented.

[0038] To achieve the above objective, according to another aspect of the embodiments of the present application, a computer program product is provided.

[0039] A computer program product according to an embodiment of the present application includes a computer program, and when the program is executed by a processor, the coupon inventory processing method provided by the embodiment of the present application is implemented.

[0040] One embodiment of the above invention has the following advantages or beneficial effects: the application receives a coupon inventory processing request to obtain an activity identifier that supports inventory rollback; executes a day-end batch task to count the number of expired coupons of the corresponding activity clusters on the previous day according to the activity identifier, and obtains task execution result data; generates a record, and updates the number of activity clusters that have been counted based on the record identifier, activity identifier, and task execution result data corresponding to the record; determines the inventory adjustment time according to the number of activity clusters and a preset threshold; in response to the inventory adjustment time being the current time, generates inventory adjustment information and sends it to the inventory management service node, so that the inventory management service node adjusts the coupon inventory corresponding to the activity identifier based on the inventory adjustment information. Improve the efficiency and accuracy of expired coupon inventory processing and reduce the impact on the number of valid coupons issued by merchants.

[0041] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The accompanying drawings are used to better understand the present application and do not constitute an improper limitation on the present application.

[0043] Figure 1 is a schematic diagram of the main process of a coupon inventory processing method according to an embodiment of the present application;

[0044] Figure 2 is a schematic diagram of the main process of a coupon inventory processing method according to an embodiment of the present application;

[0045] Figure 3 It is a schematic diagram of the main process of a coupon inventory processing method according to an embodiment of the present application;

[0046] Figure 4 is a schematic diagram of the main units of the coupon inventory processing device according to an embodiment of the present application;

[0047] Figure 5 is an exemplary system architecture diagram to which the embodiments of the present application can be applied;

[0048] Figure 6 It is a structural diagram of a computer system of a terminal device or server suitable for implementing an embodiment of the present application. DETAILED DESCRIPTION

[0049] The following is an explanation of the exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, which should be considered as merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for the sake of clarity and conciseness, the description of known functions and structures is omitted in the following description. It should be noted that the acquisition, transmission, storage, use, and processing of data in the technical solution of the present application are in compliance with the relevant provisions of national laws and regulations. It should be noted that in the embodiments of the present application, certain software, components, models, and other existing solutions in the industry may be mentioned, which should be considered as exemplary, and their purpose is only to illustrate the feasibility of the implementation of the technical solution of the present application, but it does not mean that the applicant has or must have used the solution. In the technical solution of the present application, the collection, analysis, use, transmission, storage, and other aspects of the user's personal information involved are in compliance with the provisions of relevant laws and regulations, and are used for legal and reasonable purposes, and are not shared, leaked, or sold outside of these legal uses, and are subject to supervision and management by regulatory authorities. Take necessary measures to prevent illegal access to such personal information, ensure that persons with access to personal information comply with relevant laws and regulations, and ensure the security of personal information. Once such personal information is no longer needed, risks should be minimized by limiting or even prohibiting data collection and / or deleting data.

[0050] When used, including in certain related applications, user privacy is protected by de-identifying data, such as by removing specific identifiers when used, controlling the amount or specificity of data stored, controlling how data is stored, and / or other methods of de-identification.

[0051] Figure 1 FIG. 1 is a schematic diagram of the main process of the coupon inventory processing method according to an embodiment of the present application. Figure 1 As shown, the coupon inventory processing method mainly includes the following steps S101 to S105.

[0052] Step S101, receiving a coupon inventory processing request, and obtaining an activity identifier that supports returning inventory.

[0053] In this embodiment, the execution subject (for example, a server) of the coupon inventory processing method may receive the coupon inventory processing request through a wired connection or a wireless connection. After receiving the coupon inventory processing request, the execution subject may obtain an activity identifier that supports the return of inventory.

[0054] In some embodiments, the execution entity may determine whether there is an inventory return support identifier in the activity identifier, and if so, it is an activity identifier that supports inventory return.

[0055] In the embodiment of the present application, supporting inventory return refers to supporting coupon inventory return. Inventory return means releasing the inventory occupied by expired coupons so that merchants can issue coupons to supplement the inventory of valid coupons.

[0056] Step S102, executing the end-of-day batch task to count the number of expired coupons of each corresponding activity cluster on the previous day according to the activity identifier, and obtaining task execution result data.

[0057] The end-of-day batch task corresponds to the task of counting the number of expired coupons in an activity cluster in an activity the day before. Through the activity ID, the end-of-day batch task is executed to count the number of expired coupons in each activity cluster corresponding to the activity ID the day before, and obtain the task execution result data. The task execution result data can be a successful completion statistics or an unsuccessful completion statistics.

[0058] Step S103: Generate a record, and update the number of completed activity clusters based on the record identifier, activity identifier, and task execution result data corresponding to the record.

[0059] Specifically, the method further includes: storing the records in a key-value database cache, namely, a redis cache, so as to perform centralized management and improve the efficiency of coupon inventory processing.

[0060] Specifically, based on the record identifier, activity identifier and task execution result data corresponding to the record, the number of completed activity clusters is updated and counted, including:

[0061] If the task execution result data corresponds to completing the statistics of the number of expired coupons corresponding to an activity cluster, the value of the record corresponding to the record identifier and the activity identifier is increased by one.

[0062] For example, a record is generated to record the number of active clusters that have completed statistics. The record is stored in the form of a key-value pair in a key-value pair database cache, that is, a redis cache. The number of active clusters that have completed statistics is updated based on the record identifier (for example, JL), activity identifier (for example, activity ID) and task execution result data (for example, successful completion statistics or unsuccessful completion statistics) corresponding to the record. For example, JL (record) plus activity ID is used as the key (that is, the key in the key-value pair stored in the redis cache). When the statistics are successfully completed, the number of active clusters that have completed statistics (that is, the value in the key-value pair stored in the redis cache) is increased by one.

[0063] Step S104: determining the inventory adjustment time according to the number of active clusters and a preset threshold.

[0064] Specifically, determining the inventory adjustment time includes: when the number of active clusters is greater than or equal to a preset threshold, determining the inventory adjustment time to be the current time.

[0065] For example, when the value of JL+activity ID (i.e., the number of activity clusters that have been statistically completed) reaches a preset number, the inventory management service can be notified to make inventory adjustments at the current time to improve the timeliness and efficiency of coupon inventory processing response.

[0066] Step S105: in response to the inventory adjustment time being the current time, generate inventory adjustment information and send it to the inventory management service node, so that the inventory management service node adjusts the coupon inventory corresponding to the activity identifier based on the inventory adjustment information.

[0067] When the node corresponding to the inventory management service receives the information of adjusting the inventory, it reads the coupon adjustment inventory quantity of the activity from the redis cache, adjusts the activity coupon inventory, and records the statistical data in the redis cache to the database, and clears the cache information in the redis cache. The inventory management staff can view the adjustment status of each activity inventory through the management page every day.

[0068] This embodiment receives a coupon inventory processing request to obtain an activity identifier that supports inventory rollback; executes a day-end batch task to count the number of expired coupons of each corresponding activity cluster on the previous day based on the activity identifier, and obtains task execution result data; generates a record, and updates the number of activity clusters that have completed statistics based on the record identifier, activity identifier, and task execution result data corresponding to the record; determines the inventory adjustment time based on the number of activity clusters and a preset threshold; and in response to the inventory adjustment time being the current time, generates inventory adjustment information and sends it to the inventory management service node, so that the inventory management service node adjusts the coupon inventory corresponding to the activity identifier based on the inventory adjustment information. Improve the efficiency and accuracy of expired coupon inventory processing and reduce the impact on the number of valid coupons issued by merchants.

[0069] Figure 2 FIG. 1 is a schematic diagram of the main flow of a coupon inventory processing method according to an embodiment of the present application. Figure 2 As shown, the coupon inventory processing method mainly includes the following steps S201 to S206.

[0070] Step S201, receiving a coupon inventory processing request, and obtaining an activity identifier that supports returning inventory.

[0071] Specifically, obtaining the activity identifier that supports inventory rollback includes: filtering the activity identifier that includes the rollback identifier from various activity identifiers, and obtaining the activity identifier that includes the rollback identifier from various activity identifiers.

[0072] For example, the fallback flag may be HT or ht. The embodiments of the present application do not specifically limit the fallback flag.

[0073] Step S202, executing the end-of-day batch task to count the number of expired coupons of each corresponding activity cluster on the previous day according to the activity identifier, and obtaining task execution result data.

[0074] Each end-of-day batch task can count the number of expired coupons of an activity cluster the day before. The number of corresponding activity clusters can be determined according to the activity identifier, and then the number of end-of-day batch tasks to be executed can be determined. The required number of end-of-day batch tasks are executed to complete the statistics of the number of expired coupons of each activity cluster corresponding to the activity identifier the day before, and the execution result data of each end-of-day batch task is obtained. The end-of-day batch tasks can be executed in parallel to improve the efficiency of coupon inventory processing.

[0075] Step S203, generating a record for recording the number of activity clusters that have completed the statistics of the number of expired coupons; the record uses the record identifier plus the activity identifier as a key and the number of activity clusters that have completed the statistics as a value.

[0076] For example, a record is generated to record the number of activity clusters that have completed the statistics of the number of expired coupons. JL (record) plus the activity ID is used as the key (i.e. the key in the key-value pair), and the number of activity clusters that have completed the statistics is recorded as the value (i.e. the value in the key-value pair) in the redis cache (i.e. the key-value database cache).

[0077] Step S204: updating the number of completed activity clusters based on the record identifier, activity identifier and task execution result data corresponding to the record.

[0078] The record ID + activity ID is used as the key in the key-value pair, and the number of activity clusters corresponding to the record ID + activity ID is used as the value in the key-value pair. The corresponding key-value pair is recorded in the redis cache. When the task execution result data is a successful completion statistics, the value in the recorded key-value pair is increased by one to accurately and timely update the number of activity clusters that have been statistically completed.

[0079] Step S205: Determine the inventory adjustment time according to the number of active clusters and a preset threshold.

[0080] The preset threshold may be set by a user, or may be determined based on historical coupon inventory adjustments. The embodiment of the present application does not specifically limit the preset threshold.

[0081] When the number of active clusters completed by statistics is greater than or equal to the preset threshold, it indicates that the coupon inventory needs to be adjusted immediately, that is, the inventory adjustment time is determined to be the current time, so as to improve the timeliness and efficiency of the coupon inventory processing response.

[0082] Step S206: In response to the inventory adjustment time being the current time, generate inventory adjustment information and send it to the inventory management service node, so that the inventory management service node adjusts the coupon inventory corresponding to the activity identifier based on the inventory adjustment information.

[0083] Generating inventory adjustment information includes: obtaining the total number of expired coupons corresponding to the previous day of the corresponding activity identifier based on the number of expired coupons of each activity cluster obtained by statistics, and generating inventory adjustment information in combination with the activity identifier, and sending it to the inventory management service node, so that the inventory management service node adjusts the coupon inventory corresponding to the activity identifier based on the inventory adjustment information. This ensures the accuracy of coupon inventory adjustment, improves the efficiency and accuracy of expired coupon inventory processing, and reduces the impact on the number of valid coupons issued by merchants.

[0084] Figure 3 It is a main flow chart of the coupon inventory processing method according to an embodiment of the present application. Redis: is an open source (BSD license) memory data structure storage used as a database, cache and message agent. Redis provides data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperlogs, geospatial indexes and streams. Redis has built-in replication, Lua scripts, LRU evictions, transactions and different levels of disk persistence, and provides high availability through Redis Sentinel and Redis Cluster automatic partitioning. The end-of-day batch task counts the number of expired coupons on the previous day and stores them in the database according to the activity identifier that supports the fallback inventory. The end-of-day batch task obtains the number of active expired coupons, records the number of expired coupon activity clusters in the Redis cache, checks whether there are other active clusters that have been counted in the Redis cache, and if not, adds them. If so, the result is increased by one, that is, the value of the corresponding key-value pair in the Redis cache is increased by one. When the number of expired coupons in each cluster of the activity is counted, the inventory management service is notified to adjust the inventory. Through the inventory management service, according to the notification information of the batch task, the inventory information that needs to be adjusted is read, the inventory is adjusted, and the adjusted information is recorded in the database to facilitate inventory management personnel to query and monitor. After the inventory adjustment is completed, the information in the redis cache is cleared.

[0085] For example, the end-of-day batch task counts the number of coupons that expired the day before for each activity based on the activity ID that supports inventory return. For example, each activity can include multiple clusters, and the batch task divides the overall cluster in the activity into small clusters and executes them in batches. The end-of-day batch task uses "HTKC" (rollback inventory), plus the activity ID (i.e., activity identifier) ​​and the processing date as the key (i.e., key), and caches the number of expired coupons obtained by statistics as the value (i.e., value) in the redis cache. At the same time, a record is generated to record the number of activity clusters that have completed statistics, and JL (record) plus the activity ID is used as the key, and the number of activity clusters that have completed statistics is recorded as the value in the redis cache (i.e., key-value database cache); the end-of-day batch task adds 1 to the value of JL+activity ID after each statistics of the activity information of an activity cluster; when the value of JL+activity ID reaches the preset number, the inventory management service is notified to adjust the inventory; when the inventory management service receives the inventory adjustment information, it reads the coupon adjustment inventory quantity of the activity from the redis cache, adjusts the activity coupon inventory, and records the statistical data in the redis cache to the database, and clears the cached information in the redis cache; inventory management personnel can view the adjustment status of each activity coupon inventory through the management page every day. All work is completed by the system, eliminating the need for additional manpower, thus simplifying the process; data statistics and inventory recovery are performed through pre-customized programs to reduce the error rate; all statistics are completed by the system alone, which can complete the statistical work accurately and quickly; since the statistical speed of the program is much faster than manpower, more statistical work can be completed in a limited time, so that the activity inventory can be quickly restored when multiple activities are carried out, breaking the bottleneck of manpower processing; at the same time, the system can also record the number of coupon inventory adjusted for each activity, so that relevant personnel can view the progress and status of coupon inventory recovery; the system counts the number of expired coupons for each activity through batch tasks every day; redis caching technology is used to centrally manage all activity expired coupon data information; the inventory management system adjusts the activity coupon inventory by reading the redis cache.

[0086] Figure 4 is a schematic diagram of the main units of the coupon inventory processing device according to an embodiment of the present application. Figure 4 As shown, the coupon inventory processing device 400 includes a receiving unit 401 , a task executing unit 402 , a record generating unit 403 , an inventory adjustment time determining unit 404 and an inventory adjusting unit 405 .

[0087] The receiving unit 401 is configured to receive a coupon inventory processing request and obtain an activity identifier supporting inventory return.

[0088] The task execution unit 402 is configured to execute the end-of-day batch task to count the number of expired coupons of each corresponding activity cluster on the previous day according to the activity identifier, and obtain task execution result data.

[0089] The record generating unit 403 is configured to generate a record, and update the number of statistically completed activity clusters based on the record identifier, activity identifier and task execution result data corresponding to the record.

[0090] The inventory adjustment time determining unit 404 is configured to determine the inventory adjustment time according to the number of active clusters and a preset threshold.

[0091] The inventory adjustment unit 405 is configured to generate inventory adjustment information in response to the inventory adjustment time being the current time and send the information to the inventory management service node, so that the inventory management service node adjusts the coupon inventory corresponding to the activity identifier based on the inventory adjustment information.

[0092] In some embodiments, the record generation unit 403 is further configured to: generate a record for recording the number of activity clusters that have completed the statistics of the number of expired coupons; the record uses the record identifier plus the activity identifier as a key and the number of activity clusters that have completed the statistics as a value.

[0093] In some embodiments, the coupon inventory processing device further includes Figure 4 The storage unit not shown in the figure is configured to: store the records in the key-value database cache.

[0094] In some embodiments, the record generating unit 403 is further configured to: if the task execution result data corresponds to completing the statistics of the number of expired coupons corresponding to an activity cluster, add one to the value of the record corresponding to the record identifier and the activity identifier.

[0095] In some embodiments, the inventory adjustment time determining unit 404 is further configured to: when the number of active clusters is greater than or equal to a preset threshold, determine the inventory adjustment time as the current time.

[0096] In some embodiments, the receiving unit 401 is further configured to: filter the activity identifiers including the rollback identifier from the various activity identifiers, and obtain the activity identifiers including the rollback identifier from the various activity identifiers.

[0097] It should be noted that the coupon inventory processing method and the coupon inventory processing device of the present application have a corresponding relationship in terms of specific implementation content, so the repeated content will not be described again.

[0098] Figure 5 An exemplary system architecture 500 is shown to which the coupon inventory processing method or coupon inventory processing device according to the embodiment of the present application can be applied.

[0099] like Figure 5 As shown, system architecture 500 may include terminal devices 501, 502, 503, a network 504 and a server 505. Network 504 is used to provide a medium for communication links between terminal devices 501, 502, 503 and server 505. Network 504 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0100] Users can use terminal devices 501, 502, 503 to interact with server 505 through network 504 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 501, 502, 503, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only for example).

[0101] The terminal devices 501, 502, 503 may be various electronic devices having a coupon inventory processing screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.

[0102] Server 505 can be a server that provides various services, such as a background management server that provides support for coupon inventory processing requests submitted by users using terminal devices 501, 502, and 503 (only as an example). The background management server can receive coupon inventory processing requests and obtain activity identifiers that support inventory rollback; execute end-of-day batch tasks to count the number of expired coupons in the previous day for each corresponding activity cluster based on the activity identifier, and obtain task execution result data; generate records, and update the number of activity clusters that have been completed based on the record identifier, activity identifier, and task execution result data corresponding to the records; determine the inventory adjustment time based on the number of activity clusters and a preset threshold; in response to the inventory adjustment time being the current time, generate inventory adjustment information and send it to the inventory management service node, so that the inventory management service node adjusts the coupon inventory corresponding to the activity identifier based on the inventory adjustment information. Improve the efficiency and accuracy of expired coupon inventory processing and reduce the impact on the number of valid coupons issued by merchants.

[0103] It should be noted that the coupon inventory processing method provided in the embodiment of the present application is generally executed by the server 505 , and accordingly, the coupon inventory processing device is generally set in the server 505 .

[0104] It should be understood that Figure 5 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0105] Reference below Figure 6, which shows a schematic diagram of the structure of a computer system 600 of a terminal device suitable for implementing an embodiment of the present application. Figure 6 The terminal device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0106] like Figure 6 As shown, the computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage part 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the computer system 600 are also stored. The CPU 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0107] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage section 608 as needed.

[0108] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 609, and / or installed from the removable medium 611. When the computer program is executed by the central processing unit (CPU) 601, the above-mentioned functions defined in the system of the present application are executed.

[0109] It should be noted that the computer-readable medium shown in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. Computer-readable storage media may include, for example, but are not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: 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 the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal 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 computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0110] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the above-mentioned module, program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0111] The units involved in the embodiments described in the present application may be implemented by software or hardware. The units described may also be set in a processor, for example, it may be described as: a processor includes a receiving unit, a task execution unit, a record generation unit, an inventory adjustment time determination unit, and an inventory adjustment unit. The names of these units do not constitute limitations on the units themselves in some cases.

[0112] As another aspect, the present application also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently and not be assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device receives a coupon inventory processing request and obtains an activity identifier that supports inventory rollback; executes a batch task at the end of the day to count the number of expired coupons of each corresponding activity cluster the previous day according to the activity identifier, and obtains task execution result data; generates a record, and updates the number of activity clusters that have been completed based on the record identifier, activity identifier and task execution result data corresponding to the record; determines the inventory adjustment time according to the number of activity clusters and a preset threshold; in response to the inventory adjustment time being the current time, generates inventory adjustment information and sends it to the inventory management service node, so that the inventory management service node adjusts the coupon inventory corresponding to the activity identifier based on the inventory adjustment information.

[0113] The computer program product of the present application includes a computer program, and when the computer program is executed by a processor, the coupon inventory processing method in the embodiment of the present application is implemented.

[0114] According to the technical solution of the embodiment of the present application, the efficiency and accuracy of expired coupon inventory processing can be improved, and the impact on the number of valid coupons issued by merchants can be reduced.

[0115] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.

Claims

1. A coupon inventory processing method, characterized in that: include: Receive the coupon inventory processing request and obtain the activity ID that supports the return of inventory; Execute the end-of-day batch task to count the number of expired coupons of each corresponding activity cluster on the previous day according to the activity identifier, and obtain task execution result data; Generate a record, and update the number of completed activity clusters based on the record identifier corresponding to the record, the activity identifier, and the task execution result data; Determining an inventory adjustment time based on the number of active clusters and a preset threshold; In response to the inventory adjustment time being the current time, inventory adjustment information is generated and sent to the inventory management service node, so that the inventory management service node adjusts the coupon inventory corresponding to the activity identifier based on the inventory adjustment information.

2. The method according to claim 1, characterized in that The generation record includes: A record is generated for recording the number of activity clusters that have completed the statistics of the number of expired coupons; the record uses the record identifier plus the activity identifier as a key and the number of activity clusters that have completed the statistics as a value.

3. The method according to claim 2, characterized in that The method further comprises: The record is stored in a key-value database cache.

4. The method according to claim 2, characterized in that: The updating of the number of activity clusters completed based on the record identifier corresponding to the record, the activity identifier and the task execution result data includes: If the task execution result data corresponds to completing the statistics of the number of expired coupons corresponding to an activity cluster, the value of the record corresponding to the record identifier and the activity identifier is increased by one.

5. The method according to claim 1, characterized in that Determining the inventory adjustment time includes: When the number of active clusters is greater than or equal to a preset threshold, the inventory adjustment time is determined to be the current time.

6. The method according to claim 1, characterized in that The step of obtaining the activity identifier that supports inventory return includes: The activity identifiers including the rollback identifier are screened from the various activity identifiers, and the activity identifiers including the rollback identifier are obtained from the various activity identifiers.

7. A coupon inventory processing device, characterized in that: include: A receiving unit is configured to receive a coupon inventory processing request and obtain an activity identifier supporting the return of inventory; The task execution unit is configured to execute the end-of-day batch task to count the number of expired coupons of each corresponding activity cluster on the previous day according to the activity identifier, and obtain task execution result data; A record generating unit is configured to generate a record, and update the number of statistically completed activity clusters based on a record identifier corresponding to the record, the activity identifier, and the task execution result data; an inventory adjustment time determination unit, configured to determine an inventory adjustment time according to the number of active clusters and a preset threshold; The inventory adjustment unit is configured to generate inventory adjustment information in response to the inventory adjustment time being the current time and send the information to the inventory management service node, so that the inventory management service node adjusts the coupon inventory corresponding to the activity identifier based on the inventory adjustment information.

8. The device according to claim 7, characterized in that The record generation unit is further configured to: A record is generated for recording the number of activity clusters that have completed the statistics of the number of expired coupons; the record uses the record identifier plus the activity identifier as a key and the number of activity clusters that have completed the statistics as a value.

9. The device according to claim 8, characterized in that The device further comprises a storage unit configured to: The record is stored in a key-value database cache.

10. The device according to claim 8, characterized in that The record generation unit is further configured to: If the task execution result data corresponds to completing the statistics of the number of expired coupons corresponding to an activity cluster, the value of the record corresponding to the record identifier and the activity identifier is increased by one.

11. The device according to claim 7, characterized in that The inventory adjustment time determination unit is further configured to: When the number of active clusters is greater than or equal to a preset threshold, the inventory adjustment time is determined to be the current time.

12. The device according to claim 7, characterized in that The receiving unit is further configured to: The activity identifiers including the rollback identifier are screened from the various activity identifiers, and the activity identifiers including the rollback identifier are obtained from the various activity identifiers.

13. A coupon inventory processing electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.

14. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.