CN109582682B - Data processing method and device, storage medium and computer equipment - Google Patents

Data processing method and device, storage medium and computer equipment Download PDF

Info

Publication number
CN109582682B
CN109582682B CN201811303355.2A CN201811303355A CN109582682B CN 109582682 B CN109582682 B CN 109582682B CN 201811303355 A CN201811303355 A CN 201811303355A CN 109582682 B CN109582682 B CN 109582682B
Authority
CN
China
Prior art keywords
coupons
data record
issued
data
record table
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811303355.2A
Other languages
Chinese (zh)
Other versions
CN109582682A (en
Inventor
李雄
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Life Insurance Company of China Ltd
Original Assignee
Ping An Life Insurance Company of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Life Insurance Company of China Ltd filed Critical Ping An Life Insurance Company of China Ltd
Priority to CN201811303355.2A priority Critical patent/CN109582682B/en
Publication of CN109582682A publication Critical patent/CN109582682A/en
Application granted granted Critical
Publication of CN109582682B publication Critical patent/CN109582682B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0207Discounts or incentives, e.g. coupons or rebates

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Development Economics (AREA)
  • Strategic Management (AREA)
  • Finance (AREA)
  • Game Theory and Decision Science (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention provides a data processing method and device based on coupon issuing, a storage medium and computer equipment, wherein the method comprises the following steps: acquiring the issuing number of coupons to be issued; generating a plurality of data record tables according to the distribution quantity; the data record table is used for recording relevant data of the issued coupons when the system machine issues the coupons; and when confirming that a plurality of system machines issue the coupons to be issued, recording relevant data of the issued coupons through a plurality of data recording tables. The method solves the problem of database lock waiting caused by high concurrency when the system issues the coupons.

Description

Data processing method and device, storage medium and computer equipment
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a data processing method and apparatus, a storage medium, and a computer device.
Background
In the data processing of a database, for a code module, in order to be able to perform the corresponding operation by only one thread at the same time, a flag is generally set when the code module is occupied by a process. The identification is cancelled when the code module is unoccupied. The tag may be recognized by other processes. When the other threads recognize the mark, the code module is not contended any more, and when the process occupying the code module is finished and the mark is synchronously canceled, the code module is contended again. This marking can be understood as a lock.
For a distributed architecture system, the data in the database is limited, and the number of processes for modifying the data at a certain moment needs to be controlled by using the lock technology. In the distributed structure system, aiming at an application scene which is taken by a user coupon, data corresponding to a plurality of coupons need to be modified. Conventionally, a table is used in the system to record the number of issued coupons, and when a user gets coupons and issues coupons during an activity, frequent inquiry, modification and update data occur in the system under the condition of high concurrency, so that lock waiting is more easy to cause and background application is seriously dragged.
Disclosure of Invention
The invention provides a data processing method and device based on coupon issuing, a storage medium and computer equipment, and aims to solve the problem of database lock waiting caused by high concurrency when a system issues coupons.
The invention provides the following scheme:
a data processing method based on coupon issuance, comprising: acquiring the issuing number of coupons to be issued; generating a plurality of data record tables according to the distribution quantity; the data record table is used for recording relevant data of the issued coupons when the system machine issues the coupons; and when confirming that a plurality of system machines issue the coupons to be issued, recording relevant data of the issued coupons through a plurality of data recording tables.
In one embodiment, when the system machines confirm that the system machines issue the coupons to be issued, recording relevant data of the issued coupons through a plurality of data recording tables, including: when any system machine is detected to issue one coupon to be issued, randomly acquiring any one data record table of a plurality of data record tables, and recording the related data of the issued coupon by using the data record table.
In one embodiment, before randomly acquiring any one of the plurality of data record tables, the method further includes: counting the quantity of coupons recorded and issued in each data recording table; sorting a plurality of data record tables from small to large according to the quantity of coupons issued by the records; acquiring a preset number of data record tables which are ranked in front; the random obtaining of any one of the data record tables, recording the related data of the issued coupons by using the data record table, including: randomly acquiring any one data record table from the preset number of data record tables, and recording related data of the issued coupons by using the data record table.
In one embodiment, the random data record table is obtained from the preset number of data record tables, and after the data record table is used for recording the related data of the issued coupons, the method further includes: periodically counting the number of the issued coupons recorded in each data recording table in a preset time period to obtain the frequency of issuing coupons by each periodic system; acquiring the ratio of the frequency of issuing coupons in the current period to the frequency of issuing coupons in the previous period; and obtaining a product value of the preset number and the ratio of the previous period, and taking the product value as a number value of the preset number of the current period.
In one embodiment, the randomly acquiring any one data record table from the preset number of data record tables, and recording relevant data of the issued coupons by using the data record table includes: randomly acquiring any one data record table from the preset number of data record tables, and judging whether the current process modifies the information in the data record table; the process is a process for recording relevant data of the issued coupons; if yes, any other data record table in the preset number of data record tables is obtained, whether the data record table is modified by the process is judged, until a data record table occupied by the process is obtained, and relevant data of the issued coupon is recorded by the data record table occupied by the process; if not, recording the related data of the issued coupons by using any one data recording table.
In one embodiment, the relevant data includes the number of coupons and coupon offer information; before the data record table records the relevant data of the issued coupons, the method further comprises: setting the initial value of the quantity of coupons recorded in each data record table in the plurality of data record tables to be zero; the recording of the relevant data of the issued coupons by using the data record table comprises the following steps: and increasing the numerical value of the quantity of the coupons recorded in the data record table by 1, and recording the coupon information of the issued coupons to be issued by using the data record table.
In one embodiment, after the increasing the number of the coupons recorded in the data record table by 1 and recording the coupon information of the issued coupon to be issued by using the data record table, the method further includes: after a preset time period, acquiring the numerical value of the number of the recorded coupons in each data record table; and accumulating the numerical values in each data record table to obtain the quantity of coupons issued by the system machine until the current time.
A coupon-based data processing apparatus comprising: the acquisition module is used for acquiring the issuing number of coupons to be issued; the generation module is used for generating a plurality of data record tables according to the distribution quantity; the data record table is used for recording relevant data of the issued coupons when the system machine issues the coupons; and the recording module is used for recording relevant data of the issued coupons through a plurality of data recording tables when the plurality of system machines issue the coupons to be issued.
A storage medium having a computer program stored thereon; the computer program is adapted to be loaded by a processor and to perform the data processing method based on coupon release according to any of the embodiments described above.
A computer apparatus, comprising: one or more processors; a memory; one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more applications configured to perform the coupon-based data processing method according to any of the embodiments described above.
According to the data processing method based on the issuing of the coupons, the server generates a plurality of data record tables according to the issuing quantity of the coupons to be issued, and each data record table can record relevant data of the coupons issued by the system machine. When the system machine issues coupons, the relevant data of the issued coupons are recorded by the data record tables. Therefore, when a plurality of machines in the system issue coupons at the same time, the system can record updated data by adopting a plurality of data tables, so that the database lock waiting caused when the system only adopts one data table to record relevant data for issuing coupons under the high concurrency condition is avoided.
Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
Drawings
The foregoing and/or additional aspects and advantages of the invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings, in which:
FIG. 1 is a schematic diagram illustrating an embodiment of an application scenario for issuing coupons by a system according to the present invention;
FIG. 2 is a schematic diagram illustrating the architecture of a backend system for issuing coupons according to one embodiment of the present invention;
FIG. 3 is a flow chart of a method in one embodiment of a data processing method based on coupon issuance provided by the present invention;
FIG. 4 is a flow chart of a method in another embodiment of a data processing method based on coupon issuance provided by the present invention;
FIG. 5 is a block diagram illustrating an exemplary architecture of a coupon-based data processing apparatus according to the present invention;
fig. 6 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements or elements having like or similar functions throughout. The embodiments described below by referring to the drawings are illustrative only and are not to be construed as limiting the invention.
It will be understood by those within the art that, unless expressly stated otherwise, the singular forms "a," "an," "the," and "the" are intended to include the plural forms as well, and that "first," "second," and "the" are used herein merely to distinguish one and the same technical feature and do not limit the order, quantity, etc. of that technical feature. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It will be understood by those skilled in the art that all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs unless defined otherwise. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
The data processing method based on the issuing of the coupons is applicable to operation platforms of various coupons. The background system of the operation platform carries out corresponding data processing on the issued coupons through the data processing method so as to avoid the problem of lock waiting caused in the data processing process under the condition of high concurrency of the system. The application environment of the data processing method based on the coupon issuing is firstly described in the following way:
as shown in fig. 1, the backend system 10 and the user terminal 300 are located in the same network 200 environment, and the backend system 10 and the user terminal 300 interact with data information through the network 200. Specifically, the backend system 10 includes a server 100. The server 100 controls various processes of coupon distribution according to platform requirements. In this embodiment, the backend system 10 issues coupons to the user terminal 300. The user terminal 300 includes a plurality of users, and each user independently interacts with the background system 10 for data information. When a plurality of users in the user terminal 300 initiate a request for acquiring coupons to the server 100 in the background system 10, the server 100 processes each request separately and controls the corresponding coupons to be issued in parallel. The number of servers 100 and the number of users in user terminal 300 are not limited, and are shown in fig. 1 by way of example only. The user terminal 300 is provided with a client corresponding to the coupon operation platform, and is used for browsing or receiving corresponding coupons. The user may interact with the corresponding server 100 through a client. The client and the Server (Server) correspond to each other and follow the same data protocol, so that the Server and the client can mutually analyze the data of the other party and issue corresponding coupons to users. The user terminal 300 may also perform data interaction with the server 100 in the form of a web page to obtain coupons issued by the server 100.
When the backend system 10 issues coupons to the user terminal 300, the system internal will record the relevant data for each issued coupon. Such as the type of coupons issued, the total number of coupons issued, and the corresponding number of coupons issued for each type. To improve the efficiency of coupon issuance, the backend system 10 performs coupon issuance through multiple system machines. A schematic of the structure of the backend system 10 is shown in fig. 2. Background system 10 includes server 100 and system machine cluster 120. The server 100 includes a database 110. The database 110 stores therein a data record table 111 for recording data information of coupons issued by each system machine in the system machine cluster 120. Conventionally, there is only one data record table 111 in the database 110. In the system machine cluster 120, when each system machine issues a coupon, a corresponding process is generated to modify corresponding data in the data record table 111. If multiple system machines issue coupons at the same time, the multiple system machines compete with the data record table 111 to modify the corresponding data, and the system machines that do not compete successfully are in a lock waiting state, thus affecting the efficiency of the whole system.
The invention provides a data processing method based on coupon issuing. In one embodiment, as shown in fig. 3, the data processing method based on coupon issuing includes the following steps:
s100, obtaining the issuing number of coupons to be issued.
In the present embodiment, the server 100 acquires the number of issued coupons to be issued by the backend system 10 to be issued into the user terminal 300. When the system sets the issued coupons for the user, the overall number of issued coupons is typically preset. Wherein the overall number of issued coupons can be set as desired. For example, during the period of normal inactivity, a preset number of issued coupons is set. During the campaign, the number value of the issued coupons is adjusted to a larger value. However, the number of issued coupons to be issued should be a certain value in advance by the system, regardless of the scene. Thus, in this embodiment, the server 100 acquires the determined issue number.
S200, generating a plurality of data record tables according to the distribution quantity; the data record table is used for recording relevant data of the issued coupons when the system machine issues the coupons.
In the present embodiment, after the server 100 generates a plurality of data record tables according to the acquired number of issued coupons to be issued, according to the number of issued coupons. The data record table referred to herein refers to a record table in the database 110 for recording relevant data information for issuing coupons. And determining the number of the data record tables according to the number of the pending messages. Each data record table is used for recording relevant data of coupons issued by the system machine. The relevant data for the coupon may include the name of the campaign for the coupon, the nature of the coupon's campaign, etc.
And S300, when a plurality of system machines are confirmed to issue the coupons to be issued, recording relevant data of the issued coupons through a plurality of data recording tables.
In this embodiment, when the system machine issues coupons to be issued in the coupon library, the server 100 records relevant data of each issued coupon to be issued through the above-described generated plurality of data record tables. Here, the server 100 may randomly acquire one of the plurality of data recording tables to record relevant data of the issued coupon when the system machine issues the coupon. The relevant data of the issued coupons may be recorded by sequentially acquiring each of the plurality of data recording tables. Alternatively, the backend system 10 may acquire each data record table in a round-robin fashion to record coupon related data.
In one embodiment, the data related to the issued coupon includes the number of issued coupons; after the step S300, the method further includes: and counting the number value of the issued coupons recorded in each data record table in the plurality of data record tables to obtain the number of the coupons issued by the system.
In this embodiment, each data record table is used to record the number of coupons issued. Specifically, each time a coupon is issued by the system, the system issues a coupon by using the data record table, and the data record table records the number of the coupons issued by the system in an accumulated mode. For example, each time the system issues a coupon number, the data record table a increases by 1 over the value of the last issued coupon.
In one implementation of this embodiment, the system periodically counts the number of coupons issued recorded in each of the plurality of data record tables to obtain the number of coupons issued in the current statistics time. In this embodiment, the system may periodically obtain the number of coupons in each data record table for recording the coupons issued, and accumulate the number corresponding to each data record table to obtain the number of coupons issued by the system in total in the current statistical time.
Further, after the obtaining the value of the total number of coupons issued by the system in the current statistical time, the method further comprises: and comparing the quantity value with a quantity value preset by the system to determine whether the quantity of coupons issued in the current statistical time of the system is the same as the quantity value preset by the system. The preset quantity value of the system is a quantity value of coupons which are preset by the system and are issued in the current statistical time.
Specifically, after periodically counting the number values of the issued coupons recorded in the plurality of data recording tables, the system compares the counted number values with the preset number values in the system. When the counted number value is equal to the preset number value in the system, determining that the number of coupons issued by the system in the current counting time is consistent with the preset number value. If the counted number value is smaller than the preset number value in the system, determining that the number of coupons issued by the system in the current counting time is smaller than the preset number value. If the counted number value is larger than the preset number value in the system, determining that the number of coupons issued by the system in the current counting time is larger than the preset number value. Thus, the system can periodically detect whether there are multiple or fewer coupons, and adjust the system when multiple or fewer coupons are detected to improve the accuracy of issuing coupons.
In one embodiment, as shown in fig. 4, step S300 includes:
s310, when any system machine is detected to issue one coupon to be issued, randomly acquiring any one data record table of a plurality of data record tables, and recording relevant data of the issued coupon by using the data record table.
In this embodiment, when detecting that the system machine issues a coupon, the server 100 randomly acquires any one data record table from the plurality of data record tables, and records the relevant data of the coupon issue by using the data record table. The related data recorded may include a coupon of X nature issued at the current time. Wherein the X property may be a coupon's coupon type of offer, etc.
Similarly, when the system machine issues a coupon next time, the server 100 again randomly acquires any one data record table from the plurality of data record tables, and records the relevant data of the coupon issued at the current time by using the data record table. The data record table of the last time record of the relevant data of the coupon issued can also participate in the competitive record of the relevant data of the coupon issued at the present time.
In one implementation manner of this embodiment, step S310 further includes step a before "randomly acquiring any one of the plurality of data record tables". The step A comprises the following steps: counting the quantity of coupons recorded and issued in each data recording table; sorting a plurality of data record tables from small to large according to the quantity of coupons issued by the records; and acquiring a preset number of data record tables which are ranked at the front. Wherein, here, "the random acquisition of any one of the plurality of data record tables, and the recording of the relevant data of the issued coupon by using the data record table" includes: randomly acquiring any one data record table from the preset number of data record tables, and recording related data of the issued coupons by using the data record table.
In this embodiment, before the background system 10 controls the process corresponding to the system machine for issuing coupons to acquire the data record table to record relevant data, the server 100 counts the number of issued coupons recorded in each data record table in the database 110, acquires a preset number of data record tables with a smaller number of issued coupons, and controls the system machine for issuing coupons to randomly acquire a data record table from the preset number of data record tables so as to record relevant data information of issued coupons. Therefore, the problem of deadlock or lock waiting caused by frequently accessing the same data record table when the subsequent server 100 needs to access the corresponding related data due to the excessive related data recorded in the same data record table can be avoided.
Further, in one embodiment, the step of randomly acquiring any one data record table from the preset number of data record tables, and recording the relevant data of the issued coupons by using the data record table further includes: periodically counting the number of the issued coupons recorded in each data recording table in a preset time period to obtain the frequency of issuing coupons by each periodic system; acquiring the ratio of the frequency of issuing coupons in the current period to the frequency of issuing coupons in the previous period; and obtaining a product value of the preset number and the ratio of the previous period, and taking the product value as a number value of the preset number of the current period.
In this embodiment, the server 100 periodically counts the number of issued coupons recorded in each of the data record tables for a preset period of time at a preset period of time, and divides the number by the preset period of time to obtain the frequency of system issued coupons in each period. Further, before each execution of the method described in the above step a, the server 100 obtains the ratio of the frequency of issuing coupons in the current period to the frequency of issuing coupons in the previous period, and multiplies the ratio by the preset number in the previous period to obtain the preset number in the current period. Using the preset number, the above step a is performed. Therefore, in this embodiment, the server 100 may adjust the speed of the coupons issued by the system according to the request for acquiring coupons initiated by the user terminal 300 in each period of time, so as to record the speed of issuing coupons by the system, so as to match the request amount of the user in the user terminal 300, and improve the efficiency of processing the user request by the system.
In one embodiment, the step a of "randomly acquiring any one data record table from the preset number of data record tables and recording the related data of the issued coupons by using the data record table" includes: randomly acquiring any one data record table from the preset number of data record tables, and judging whether the current process modifies the information in the data record table; the process is a process for recording relevant data of the issued coupons; if yes, any other data record table in the preset number of data record tables is obtained, whether the data record table is modified by the process is judged, until a data record table occupied by the process is obtained, and relevant data of the issued coupon is recorded by the data record table occupied by the process; if not, recording the related data of the issued coupons by using any one data recording table.
In this embodiment, after the server 100 obtains the preset number of data record tables according to the method in step a, a piece of data record table is randomly obtained from the preset number of data record tables, and it is determined whether the data record table is occupied by a process corresponding to the system machine. If not, the control system machine directly records the related data of the issued coupons by using the data record table. If so, the server 100 continues to acquire one data record table from other data record tables in the preset number of data record tables, and executes the step of judging whether the data record table is occupied by the system machine process or not until the acquired data record table is unoccupied by the process. Meanwhile, the control system machine records the related data of the issued coupons by using the data record table without process occupation. Therefore, the problem of lock waiting caused by that a plurality of system machines compete for the same data record table can be avoided.
In one embodiment, the relevant data includes the number of coupons and coupon offer information. Before the step S300, the method further includes: and setting the initial value of the number of coupons recorded in each data record table in the plurality of data record tables to be zero. The step S310 of recording the related data of the issued coupon using the data recording table includes: and increasing the numerical value of the quantity of the coupons recorded in the data record table by 1, and recording the coupon information of the issued coupons to be issued by using the data record table.
In this implementation, the relevant data for the coupon to be issued may include the number and the coupon's coupon properties. Here, the number refers to a coupon issued by the system each time, and the number of records is 1. The coupon's coupon properties include the name of the campaign in the coupon, the form of the campaign in the coupon, etc. In particular, the coupon's offer property may be full deactivation. For example, 100-50, 100-30, 200-80, etc. The coupon's preferential nature may also be a buy-gift campaign. For example, any article in the A area is purchased, any article in the B area is added and sent, and the like.
In this embodiment, the database 110 sets the initial value of the number of coupons recorded in each data-wise table to zero when generating a plurality of data-wise tables. That is, each data record table is initialized so that the number of data records in each data record table is zero. Of course, the initial value of the number of records of each data record table may be another value. When detecting that the system machine issues coupons, the server 100 records that the number of coupons issued at the present time is 1 by using any one of the plurality of data record tables. The recording mode may be that 1 is added to the value for recording the number in the data recording table, and the result value after 1 is added is used as the value for recording the coupon issued by the current system in the data recording table.
And recording the preferential activity information by using the data record table. Specifically, the data record is used for recording that the system machine has issued a coupon and simultaneously records the coupon property of the coupon. That is, the server 100 detects a coupon of which the number is one, records the coupon of which the number is one using the data record table, and records the coupon information of the coupon. Here, the coupon information may be coupon surface information of a coupon finally displayed to the user terminal.
In one implementation manner of this embodiment, after the increasing the number of the coupons recorded in the data record table by 1 and recording the coupon information of the issued coupon to be issued by using the data record table, the method further includes: after a preset time period, acquiring the numerical value of the number of the recorded coupons in each data record table; and accumulating the numerical values in each data record table to obtain the quantity of coupons issued by the system machine until the current time.
In this embodiment, the server 100 may obtain the numerical value of the number of coupons recorded in each data record table from the database 110, and accumulate the corresponding numerical values in each data record table to obtain the total number of coupons issued by the backend system 10 to the user terminal 300 in the preset time period.
According to the data processing method based on the issuing of the coupons, the server generates a plurality of data record tables according to the issuing quantity of the coupons to be issued, and each data record table can record relevant data of the coupons issued by the system machine. When the system machine issues coupons, the relevant data of the issued coupons are recorded by the data record tables. Therefore, in the whole coupon issuing process, when only one data record table is adopted to record the quantity of coupons and other related information, a plurality of program modules contend for the problem of lock waiting which is easy to cause when the data record table is subjected to data modification, and meanwhile, the coupon issuing efficiency is improved.
The invention also provides a data processing device based on the issuing of the coupons. In one embodiment, as shown in fig. 5, the coupon-based data processing apparatus includes an acquisition module 11, a generation module 12, and a recording module 13.
The obtaining module 11 is configured to obtain a number of issued coupons to be issued. In the present embodiment, the server 100 acquires the number of issued coupons to be issued by the backend system 10 to be issued into the user terminal 300. When the system sets the issued coupons for the user, the overall number of issued coupons is typically preset. Wherein the overall number of issued coupons can be set as desired. For example, during the period of normal inactivity, a preset number of issued coupons is set. During the campaign, the number value of the issued coupons is adjusted to a larger value. However, the number of issued coupons to be issued should be a certain value in advance by the system, regardless of the scene. Thus, in this embodiment, the server 100 acquires the determined issue number.
The generating module 12 is used for generating a plurality of data record tables according to the distribution quantity; the data record table is used for recording relevant data of the issued coupons when the system machine issues the coupons. In the present embodiment, after the server 100 generates a plurality of data record tables according to the acquired number of issued coupons to be issued, according to the number of issued coupons. The data record table referred to herein refers to a record table in the database 10 for recording relevant data information for issuing coupons. And determining the number of the data record tables according to the number of the pending messages. Each data record table is used for recording relevant data of coupons issued by the system machine. The relevant data for the coupon may include the name of the campaign for the coupon, the nature of the coupon's campaign, etc.
The recording module 13 is configured to record relevant data of the issued coupons through a plurality of data recording tables when a plurality of the system machines issue the coupons to be issued. In this embodiment, when the system machine issues coupons to be issued in the coupon library, the relevant data of each issued coupon to be issued is recorded through the generated plurality of data recording tables. Here, the server 100 may randomly acquire one of the plurality of data recording tables to record relevant data of the issued coupon when the system machine issues the coupon. The relevant data of the issued coupons may be recorded by sequentially acquiring each of the plurality of data recording tables. Alternatively, the server 100 acquires each data record table in a round-robin fashion to record the relevant data of the coupon.
In other embodiments, each module in the data processing apparatus based on coupon issuing provided by the present invention is further configured to execute operations corresponding to each step in the data processing method based on coupon issuing provided by the present invention, which are not described in detail herein.
The invention also provides a storage medium. The storage medium has a computer program stored thereon; the computer program, when executed by a processor, implements the data processing method based on coupon issuing according to any one of the above embodiments. The storage medium may be a memory. Such as internal memory or external memory, or both. The internal memory may include read-only memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), flash memory, or random access memory. The external memory may include a hard disk, floppy disk, ZIP disk, U-disk, tape, etc. The storage media disclosed herein include, but are not limited to, these types of memory. The memory disclosed herein is by way of example only and not by way of limitation.
The invention also provides computer equipment. A computer device comprising: one or more processors; a memory; one or more applications. Wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more applications configured to perform the coupon-based data processing method of any of the embodiments described above.
Fig. 6 is a schematic structural diagram of a computer device according to an embodiment of the invention. The computer device in this embodiment may be a server, a personal computer, or a network device. As shown in fig. 6, the apparatus includes a processor 603, a memory 605, an input unit 607, a display unit 609, and the like. Those skilled in the art will appreciate that the device architecture shown in fig. 6 does not constitute a limitation of all devices, and may include more or fewer components than shown, or may combine certain components. The memory 605 may be used to store an application 601 and various functional modules, and the processor 603 runs the application 601 stored in the memory 605 to perform various functional applications of the device and data processing. The memory may be internal memory or external memory, or include both internal memory and external memory. The internal memory may include read-only memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), flash memory, or random access memory. The external memory may include a hard disk, floppy disk, ZIP disk, U-disk, tape, etc. The disclosed memory includes, but is not limited to, these types of memory. The memory disclosed herein is by way of example only and not by way of limitation.
The input unit 607 is for receiving input of a signal and receiving keywords input by a user. The input unit 607 may include a touch panel and other input devices. The touch panel may collect touch operations on or near the user (e.g., the user's operation on or near the touch panel using any suitable object or accessory such as a finger, stylus, etc.), and drive the corresponding connection device according to a preset program; other input devices may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., play control keys, switch keys, etc.), a trackball, mouse, joystick, etc. The display unit 609 may be used to display information input by a user or information provided to the user and various menus of the computer device. The display unit 609 may take the form of a liquid crystal display, an organic light emitting diode, or the like. The processor 603 is a control center of the computer device, connects various parts of the entire computer using various interfaces and lines, performs various functions and processes data by running or executing software programs and/or modules stored in the memory 603, and invoking data stored in the memory.
In one embodiment, the device includes one or more processors 603, and one or more memories 605, one or more applications 601. Wherein the one or more application programs 601 are stored in the memory 605 and configured to be executed by the one or more processors 803, the one or more application programs 601 configured to perform the coupon-based data processing method described in the above embodiments.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing module, or each unit may exist alone physically, or two or more units may be integrated in one module. The integrated modules may be implemented in hardware or in software functional modules. The integrated modules may also be stored in a computer readable storage medium if implemented in the form of software functional modules and sold or used as a stand-alone product.
Those of ordinary skill in the art will appreciate that all or a portion of the steps implementing the above embodiments may be implemented by hardware, or may be implemented by a program to instruct related hardware, where the program may be stored in a computer readable storage medium, and the storage medium may include a memory, a magnetic disk, an optical disk, or the like.
The foregoing is only a partial embodiment of the present invention, and it should be noted that it will be apparent to those skilled in the art that modifications and adaptations can be made without departing from the principles of the present invention, and such modifications and adaptations are intended to be comprehended within the scope of the present invention.
It should be understood that each functional unit in the embodiments of the present invention may be integrated in one processing module, or each unit may exist alone physically, or two or more units may be integrated in one module. The integrated modules may be implemented in hardware or in software functional modules.
The foregoing is only a partial embodiment of the present invention, and it should be noted that it will be apparent to those skilled in the art that modifications and adaptations can be made without departing from the principles of the present invention, and such modifications and adaptations are intended to be comprehended within the scope of the present invention.

Claims (7)

1. A data processing method based on coupon issuance, comprising:
acquiring the issuing number of coupons to be issued;
generating a plurality of data record tables according to the distribution quantity; the data record table is used for recording relevant data of the issued coupons when the system machine issues the coupons;
periodically counting the number of the issued coupons recorded in each data recording table in a preset time period to obtain the frequency of issuing coupons by each periodic system;
acquiring the ratio of the frequency of issuing coupons in the current period to the frequency of issuing coupons in the previous period;
obtaining a product value of the preset number of the previous period and the ratio, and taking the product value as a number value of the preset number of the current period;
counting the number of the issued coupons recorded in each data record table when any system machine issues one to-be-issued coupon is detected;
sorting a plurality of data record tables from small to large according to the quantity of coupons issued by the records;
acquiring the data record tables which are ordered at the front and have the preset number of the current period;
randomly acquiring any one data record table from the preset number of data record tables, and recording related data of the issued coupons by using the data record table.
2. The method of claim 1, wherein randomly acquiring any one data record table from the preset number of data record tables, and recording relevant data of the issued coupons using the data record table, comprises:
randomly acquiring any one data record table from the preset number of data record tables, and judging whether the current process modifies the information in the data record table; the process is a process for recording relevant data of the issued coupons;
if yes, any other data record table in the preset number of data record tables is obtained, whether the data record table is modified by the process is judged, until a data record table occupied by the process is obtained, and relevant data of the issued coupon is recorded by the data record table occupied by the process;
if not, recording the related data of the issued coupons by using any one data recording table.
3. The method of claim 1, wherein the related data includes a number of coupons and coupon offer information; when generating a plurality of data record tables according to the distribution quantity, the method further comprises the following steps: setting the initial value of the quantity of coupons recorded in each data record table in the plurality of data record tables to be zero;
the recording of the relevant data of the issued coupons by using the data record table comprises the following steps: and increasing the numerical value of the quantity of the coupons recorded in the data record table by 1, and recording the coupon information of the issued coupons to be issued by using the data record table.
4. A method according to claim 3, wherein said incrementing the number of said recorded coupons in the data record table by 1 while recording the coupon information of the issued coupon using the data record table further comprises:
after a preset time period, acquiring the numerical value of the number of the recorded coupons in each data record table;
and accumulating the numerical values in each data record table to obtain the quantity of coupons issued by the system machine until the current time.
5. A coupon-based data processing apparatus, comprising:
the acquisition module is used for acquiring the issuing number of coupons to be issued;
the generation module is used for generating a plurality of data record tables according to the distribution quantity; the data record table is used for recording relevant data of the issued coupons when the system machine issues the coupons;
the recording module is used for periodically counting the quantity of the issued coupons recorded in each data recording table in a preset time period to obtain the frequency of issuing the coupons by each periodic system; acquiring the ratio of the frequency of issuing coupons in the current period to the frequency of issuing coupons in the previous period; obtaining a product value of the preset number of the previous period and the ratio, and taking the product value as a number value of the preset number of the current period; counting the number of the issued coupons recorded in each data record table when any system machine issues one to-be-issued coupon is detected; sorting a plurality of data record tables from small to large according to the quantity of coupons issued by the records; acquiring the data record tables which are ordered at the front and have the preset number of the current period; randomly acquiring any one data record table from the preset number of data record tables, and recording related data of the issued coupons by using the data record table.
6. A storage medium having a computer program stored thereon; the computer program being adapted to be loaded by a processor and to perform the coupon-based data processing method of any of the preceding claims 1 to 4.
7. A computer device, comprising:
one or more processors;
a memory;
one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more applications configured to perform the coupon-based data processing method of any of claims 1 to 4.
CN201811303355.2A 2018-11-02 2018-11-02 Data processing method and device, storage medium and computer equipment Active CN109582682B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811303355.2A CN109582682B (en) 2018-11-02 2018-11-02 Data processing method and device, storage medium and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811303355.2A CN109582682B (en) 2018-11-02 2018-11-02 Data processing method and device, storage medium and computer equipment

Publications (2)

Publication Number Publication Date
CN109582682A CN109582682A (en) 2019-04-05
CN109582682B true CN109582682B (en) 2024-04-09

Family

ID=65921326

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811303355.2A Active CN109582682B (en) 2018-11-02 2018-11-02 Data processing method and device, storage medium and computer equipment

Country Status (1)

Country Link
CN (1) CN109582682B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111258678B (en) * 2020-01-20 2022-02-11 北京字节跳动网络技术有限公司 Data allocation method and device, electronic equipment and computer readable medium
CN111915344A (en) * 2020-06-20 2020-11-10 武汉海云健康科技股份有限公司 New member ripening accelerating method and device based on medical big data
CN112328600A (en) * 2020-11-16 2021-02-05 北京首汽智行科技有限公司 Electronic coupon management method
CN113780962A (en) * 2021-11-12 2021-12-10 北京江融信科技有限公司 Management method and system for activity-level inventory of equity mall

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104123340A (en) * 2014-06-25 2014-10-29 世纪禾光科技发展(北京)有限公司 Table-by-table and page-by-page query method and system for database
CN104866577A (en) * 2015-05-26 2015-08-26 深圳市六度人和科技有限公司 Data processing method and apparatus based on embedded database
CN105303403A (en) * 2015-10-23 2016-02-03 北京京东尚科信息技术有限公司 Method of issuing coupon and system
CN106846024A (en) * 2015-12-07 2017-06-13 北京京东尚科信息技术有限公司 Reward voucher distribution method and system based on Redis
CN107092624A (en) * 2016-12-28 2017-08-25 北京小度信息科技有限公司 Date storage method, apparatus and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104123340A (en) * 2014-06-25 2014-10-29 世纪禾光科技发展(北京)有限公司 Table-by-table and page-by-page query method and system for database
CN104866577A (en) * 2015-05-26 2015-08-26 深圳市六度人和科技有限公司 Data processing method and apparatus based on embedded database
CN105303403A (en) * 2015-10-23 2016-02-03 北京京东尚科信息技术有限公司 Method of issuing coupon and system
CN106846024A (en) * 2015-12-07 2017-06-13 北京京东尚科信息技术有限公司 Reward voucher distribution method and system based on Redis
CN107092624A (en) * 2016-12-28 2017-08-25 北京小度信息科技有限公司 Date storage method, apparatus and system

Also Published As

Publication number Publication date
CN109582682A (en) 2019-04-05

Similar Documents

Publication Publication Date Title
CN109582682B (en) Data processing method and device, storage medium and computer equipment
CN107315761B (en) Data updating method, data query method and device
US9015441B2 (en) Memory usage scanning
CN100580625C (en) Method and system for presenting database event information according to time sequence
AU2003278998B2 (en) Method and apparatus for providing price updates
CN100423006C (en) Apparatus and method for dynamic filtering search results
US7181460B2 (en) User-defined aggregate functions in database systems without native support
KR101183303B1 (en) Method and system for multithread processing of spreadsheet chain calculations
WO2015057400A1 (en) Acceleration based on cached flows
CN113779479B (en) Webpage form editing method, device, equipment and storage medium
JP2010217992A (en) Cache controller, cache control method, and cache control program
US9760611B2 (en) Identifying element relationships in a document
EP3691765B1 (en) Method and system for game data processing, server and computer readable storage medium
JP5845789B2 (en) Control program, data access control device, and data control method
WO2020057369A1 (en) Query plan acquisition method, and data query method and apparatus
CN109660587B (en) Data pushing method and device based on random number, storage medium and server
WO2016088237A1 (en) Distribution method, device, and program
US20090287735A1 (en) Memory allocator for optimistic data access
CN110928885A (en) Method and device for updating data of Mysql database to Es database
CN110223108B (en) Click through rate prediction method, device and equipment
US9697049B2 (en) Job scheduling apparatus and method based on island execution time
CN110929207A (en) Data processing method, device and computer readable storage medium
CN112612605B (en) Thread allocation method, thread allocation device, computer equipment and readable storage medium
CN105488076A (en) Data accumulation method and device
CN110209301A (en) Touch screen scanning method, device, storage medium, touch chip and terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant