CN108153795B - Data processing method, system and device for electronic red packet - Google Patents

Data processing method, system and device for electronic red packet Download PDF

Info

Publication number
CN108153795B
CN108153795B CN201611111479.1A CN201611111479A CN108153795B CN 108153795 B CN108153795 B CN 108153795B CN 201611111479 A CN201611111479 A CN 201611111479A CN 108153795 B CN108153795 B CN 108153795B
Authority
CN
China
Prior art keywords
red packet
issuing
receiving
transaction
database system
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
CN201611111479.1A
Other languages
Chinese (zh)
Other versions
CN108153795A (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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201611111479.1A priority Critical patent/CN108153795B/en
Publication of CN108153795A publication Critical patent/CN108153795A/en
Application granted granted Critical
Publication of CN108153795B publication Critical patent/CN108153795B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • 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
    • G06Q30/0211Determining the effectiveness of discounts or incentives

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Development Economics (AREA)
  • Finance (AREA)
  • Databases & Information Systems (AREA)
  • Strategic Management (AREA)
  • General Physics & Mathematics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • General Business, Economics & Management (AREA)
  • Marketing (AREA)
  • Economics (AREA)
  • Game Theory and Decision Science (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the application provides a data processing method, a system and a device for electronic red packets, wherein after an electronic red packet issuing transaction is successfully executed based on an issuing database system, a corresponding red packet issuing record is added in an issuing event table, and the state of the red packet to be taken is marked in the red packet issuing record; after the corresponding electronic red packet receiving transaction is successfully executed based on the receiving database system, extracting a corresponding red packet receiving record from the receiving event table, and updating the state of the red packet to be received into the state of the red packet received in the red packet receiving record; traversing a release event table according to a preset time interval, and determining an electronic red packet receiving transaction to be executed according to the state of the red packet to be received or the state of the red packet received; triggering the leading database system to execute the electronic red envelope leading transaction to be executed. The embodiment of the application effectively ensures the consistency of the transaction, thereby achieving the purpose of ensuring the consistency of the transaction at lower cost.

Description

Data processing method, system and device for electronic red packet
Technical Field
The present disclosure relates to the field of database systems, and in particular, to a method for processing electronic red packets, a system for processing electronic red packets, and a device for processing electronic red packets.
Background
In more and more electronic commerce platforms, issuing a variety of electronic red packages (e.g., market red packages, store red packages, electronic coupons, etc.) to users has become one of the popular marketing approaches. Users can use electronic red packages to reduce costs from different approaches when purchasing goods on an e-commerce platform. A typical application scenario is that when a user purchases in an e-commerce platform, if an electronic red packet configured with a corresponding amount and a use condition (such as a permissible use preference, a full-rate reduction, a full-rate return preference, a star-rate customer preference, etc.) is acquired, on the basis of meeting the use condition of the electronic red packet, the corresponding amount of the electronic red packet can be directly deducted for the price of a commodity purchased by the user, and then payment is performed, or after the user pays, compensation of the corresponding amount is returned. For example, the user has picked up a full 20-element minus 5-element red envelope, and when the user selects the target commodity to be purchased to be 25-element, the user actually only needs to pay 20-element.
In practice, electronic red packets are often issued based on a certain budget, and thus, electronic red packet issue involves a process of deducting the deduction amount of the corresponding red packet from the total budget, and accordingly, electronic red packet reception involves a process of generating electronic red packet data at the user side in case of successful electronic red packet issue. The issuing and the receiving of the electronic red packet need to ensure the consistency of the transaction, namely the successful issuing of the electronic red packet must be received successfully.
The budget data of the electronic red package and the red package data issued to the user often exist in different database systems, so that for the issuing and the receiving of the electronic red package, a traditional distributed transaction framework is generally used for management, for example, a scheme of distributed transaction XTS, or XA (specification of distributed transaction proposed by X/Open organization) transactions of SQL Server, etc., which need to ensure transaction consistency in a general scene, so that the implementation logic is heavier, complex business logic needs to be developed according to the mechanism in the corresponding business logic to solve the potential different treatment problem, and the development complexity and the development and operation costs are higher; furthermore, another set of independent systems are often required to be introduced for coordinating distributed transactions, namely, another set of systems are required to be referenced outside the database system to perform consistency management of transactions across databases, and the system resource overhead is high; in addition, once a certain intermediate task node fails, the whole electronic red packet issuing and receiving operation needs to be rolled back, the operation is very complex, and the resource consumption is very serious.
Disclosure of Invention
In view of the foregoing, embodiments of the present application have been proposed to provide a data processing method of an electronic red packet, a data processing system of an electronic red packet, and a data processing apparatus of an electronic red packet, which overcome or at least partially solve the foregoing problems.
In order to solve the above problems, the present application discloses a data processing method of an electronic red packet, where the electronic red packet has a distribution database system and a reception database system, and a distribution event table is set in the distribution database system, and the method includes:
after the electronic red packet issuing transaction is successfully executed based on the issuing database system, adding a corresponding red packet issuing record in the issuing event table, and marking the state of the red packet to be taken in the red packet issuing record;
after the corresponding electronic red packet receiving transaction is successfully executed based on the receiving database system, extracting a corresponding red packet receiving record from the receiving event table, and updating the state of the red packet to be received into the state of the red packet received in the red packet receiving record;
traversing the issuing event table according to a preset time interval, and determining an electronic red packet receiving transaction to be executed according to the state of the red packet to be received or the state of the red packet received;
and triggering the leading database system to execute the electronic red envelope leading transaction to be executed.
Optionally, the next processing time generated according to a preset time interval is set in the release event table, the step of traversing the release event table according to the preset time interval and determining the electronic red packet receiving transaction to be executed according to the state of the red packet to be received or the state of the red packet to be received includes:
Traversing the issuing event table according to a preset time interval, extracting a red packet issuing record which is in a state that all red packets are to be led currently and has the next processing time earlier than the current time, and determining an electronic red packet leading transaction to be executed according to the red packet issuing record.
Optionally, the next processing time generated according to a preset time interval is set in the release event table, the step of traversing the release event table according to the preset time interval and determining the electronic red packet receiving transaction to be executed according to the state of the red packet to be received or the state of the red packet to be received includes:
traversing the issuing event table according to a preset time interval, extracting all current red packet issuing records with the processing time less than the current time in a state of not being led by the red packet, and determining the electronic red packet led transaction to be executed according to the red packet issuing records.
Optionally, the method further comprises:
and after the receiving database system successfully executes the electronic red packet receiving transaction to be executed, extracting a corresponding red packet receiving record from the receiving event table, and marking the received state of the red packet in the red packet receiving record.
Optionally, the method further comprises:
And if the lead database system does not successfully execute the electronic red package lead transaction to be executed, adjusting the preset time interval.
Optionally, after the step of marking the status of the red packet to be received in the red packet distribution record, the method further includes:
and generating prompt information of successful issuing of the red packet.
Optionally, the step of triggering the lead database system to execute the electronic red-envelope lead transaction to be executed includes:
the issuing database system calls a predefined receiving service object, wherein the receiving service object is used for writing electronic red packet data into the receiving database system, and the electronic red packet data comprises electronic red packet data corresponding to the electronic red packet receiving transaction to be executed;
and when receiving the information returned by the receiving service object and written into the electronic red packet data successfully, judging that the receiving database system successfully executes the corresponding electronic red packet receiving transaction.
The application also discloses a data processing system of electronic red packet, the data processing system of electronic red packet communicates with a issuing database system and a receiving database system, the issuing database system is provided with an issuing event table, the system comprises:
The record inserting module is used for adding corresponding red packet issuing records in the issuing event table after the electronic red packet issuing transaction is successfully executed based on the issuing database system, and marking the state of the red packet to be taken in the red packet issuing records;
the state updating module is used for extracting a corresponding red packet issuing record from the issuing event table after the corresponding electronic red packet receiving transaction is successfully executed based on the receiving database system, and updating the state of the red packet to be received into the state of the received red packet in the red packet issuing record;
the event table traversing module is used for traversing the issuing event table according to a preset time interval and determining an electronic red packet receiving transaction to be executed according to the state to be received by the red packet or the state received by the red packet;
and the receiving compensation processing module is used for triggering the receiving database system to execute the electronic red envelope receiving transaction to be executed.
Optionally, the issuing event table is provided with a next processing time generated according to a preset time interval, and the event table traversing module includes:
the first transaction to be executed determining submodule is used for traversing the issuing event table according to a preset time interval, extracting a red packet issuing record of which the current state of all red packets to be led is higher than the current time in the next processing time, and determining an electronic red packet leading transaction to be executed according to the red packet issuing record;
Or,
and the second transaction to be executed determining submodule is used for traversing the issuing event table according to a preset time interval, extracting all red packet issuing records with the next processing time earlier than the current time in the state that the red packet is not already led, and determining the electronic red packet led transaction to be executed according to the red packet issuing records.
Optionally, the method further comprises:
and the receiving updating module is used for extracting corresponding red packet sending records from the sending event table after the receiving database system successfully executes the electronic red packet receiving transaction to be executed, and marking the received state of the red packet in the red packet sending records.
Optionally, the method further comprises:
and the time adjustment module is used for adjusting the preset time interval when the lead database system does not successfully execute the electronic red package lead transaction to be executed.
Optionally, the method further comprises:
and the prompt module is connected with the record insertion module and is used for generating prompt information of successful issuing of the red packet.
Optionally, the lead compensation processing module includes:
a service calling sub-module for calling a predefined receiving service object;
the receiving service object is used for writing electronic red packet data into the receiving database system, and the electronic red packet data comprises electronic red packet data corresponding to the electronic red packet receiving transaction to be executed;
And the notification sub-module is used for judging that the receiving database system successfully executes the corresponding electronic red packet receiving transaction when receiving the information returned by the receiving service object and written into the electronic red packet data successfully.
The application also discloses a data processing device of electronic red packet, the electronic red packet has a issuing database system and a receiving database system, the issuing database system is provided with a issuing event table, the device comprises:
one or more processors;
a memory; and
one or more modules stored in the memory and configured to be executed by the one or more processors, the one or more modules having the following functionality:
after the electronic red packet issuing transaction is successfully executed based on the issuing database system, adding a corresponding red packet issuing record in the issuing event table, and marking the state of the red packet to be taken in the red packet issuing record;
after the corresponding electronic red packet receiving transaction is successfully executed based on the receiving database system, extracting a corresponding red packet receiving record from the receiving event table, and updating the state of the red packet to be received into the state of the red packet received in the red packet receiving record;
Traversing the issuing event table according to a preset time interval, and determining an electronic red packet receiving transaction to be executed according to the state of the red packet to be received or the state of the red packet received;
and triggering the leading database system to execute the electronic red envelope leading transaction to be executed.
The application also discloses a data processing method of the electronic red packet, the electronic red packet is provided with a distribution database system and a reception database system, a distribution event table is arranged in the distribution database system, and the method comprises the following steps:
after the electronic red packet issuing transaction is successfully executed based on the issuing database system, adding a corresponding red packet issuing record in the issuing event table, and marking the state of the red packet to be taken in the red packet issuing record;
and after the corresponding electronic red packet receiving transaction is successfully executed based on the receiving database system, extracting a corresponding red packet receiving record from the receiving event table, and updating the state of the red packet to be received into the state of the red packet received in the red packet receiving record.
The application also discloses a data processing method of the electronic red packet, the electronic red packet is provided with a distribution database system and a reception database system, a distribution event table is arranged in the distribution database system, and the method comprises the following steps:
Traversing the issuing event table according to a preset time interval, and determining an electronic red packet receiving transaction to be executed according to the state of the red packet to be received or the state of the red packet received;
and triggering the leading database system to execute the electronic red envelope leading transaction to be executed.
The application also discloses a data processing system of the electronic red packet, the data processing system of the electronic red packet is communicated with a issuing database system and a receiving database system, the issuing database system is used for executing the issuing transaction of the electronic red packet, the receiving database system is used for executing the receiving transaction of the electronic red packet, wherein, the issuing database system is provided with an issuing event table, and the data processing system of the electronic red packet comprises:
the program object module is used for triggering the issuing database system to execute the electronic red packet issuing transaction; after the electronic red packet issuing transaction is successfully executed by the issuing database system, adding a corresponding red packet issuing record in the issuing event table, and marking the state of the red packet to be taken in the red packet issuing record; then calling a receiving service object module;
the receiving service object module is used for triggering the receiving database system to execute the electronic red package receiving transaction, and notifying the program object module after the receiving database system successfully executes the corresponding electronic red package receiving transaction;
The program object module is further configured to extract a corresponding packet issuing record from the issuing event table, and update the state of the packet to be received to the state of the packet received in the packet issuing record.
The application also discloses a device, comprising:
one or more processors; and
instructions in one or more computer-readable media stored thereon, which when executed by the one or more processors, cause the apparatus to perform a method of data processing of an electronic red envelope as described.
The application also discloses one or more computer-readable media having instructions stored thereon that, when executed by one or more processors, cause a terminal device to perform a method of data processing of the electronic red envelope.
Embodiments of the present application include the following advantages:
according to the embodiment of the application, a release event table is set in a release database system of the electronic red packet, and after the electronic red packet release transaction is successfully executed, a corresponding red packet release record is added in the release event table. Because the record operation in the issuing event table and the issuing operation of the electronic red packet are in the same transaction, the transaction consistency can be effectively ensured, and the purpose of ensuring the transaction consistency is achieved at lower cost. Meanwhile, as only one insert sentence is added in the existing issuing transaction to increase the corresponding red packet issuing record, excessive development complexity is not increased, and the development cost is low.
Moreover, aiming at the electronic red package data which is not received after the electronic red package is sent out, the electronic red package data can be reflected in a backlog pending record mode in the sending event table, so that monitoring and fault recovery can be easily carried out, a complex consistency management system is not required to be introduced, and the system overhead is very small.
Drawings
FIG. 1 is a flow chart showing the steps of an embodiment 1 of a data processing method for electronic red packets according to the present application;
FIG. 2 is a task diagram of data processing of an electronic red envelope of the present application;
FIG. 3 is a signaling flow diagram of electronic red packet distribution and reception transaction execution;
FIG. 4 is a flow chart showing the steps of embodiment 2 of a method for processing electronic red packets;
FIG. 5 is a flow chart showing the steps of embodiment 3 of a method for processing electronic red packets;
FIG. 6 is a block diagram of an embodiment 1 of a data processing system for electronic red packets of the present application;
FIG. 7 is a block diagram of an embodiment 2 of a data processing system for electronic red packets of the present application;
FIG. 8 is a block diagram of an exemplary system embodiment of the present application.
Detailed Description
In order that the above-recited objects, features and advantages of the present application will become more readily apparent, a more particular description of the invention briefly described above will be rendered by reference to specific embodiments that are illustrated in the appended drawings.
The concepts of the present application are susceptible to various modifications and alternative forms, specific embodiments thereof have been shown by way of example in the drawings and will herein be described in detail. It should be understood, however, that the description herein of specific embodiments is not intended to limit the concepts of the present application to the particular forms disclosed, but on the contrary, the intention is to cover all modifications, equivalents, and alternatives falling within the scope of the present application.
Reference in the specification to "one embodiment," "an embodiment," "one particular embodiment," etc., means that a particular feature, structure, or characteristic may be included in the described embodiments, but every embodiment may or may not necessarily include the particular feature, structure, or characteristic. Moreover, such phrases are not necessarily referring to the same embodiment. Further, where a particular feature, structure, or characteristic is described in connection with an embodiment, it is submitted that it is within the purview of one skilled in the art to effect such feature, structure, or characteristic in connection with other ones of the embodiments whether or not explicitly described. In addition, it should be understood that the items in the list included in this form of "at least one of A, B and C" may include the following possible items: (A); (B); (C); (A and B); (A and C); (B and C); or (A, B and C). Likewise, an item listed in this form of "at least one of A, B or C" may mean (A); (B); (C); (A and B); (A and C); (B and C); or (A, B and C).
In some cases, the disclosed embodiments may be implemented as hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried on or stored on one or more transitory or non-transitory machine-readable (e.g., computer-readable) storage media, which may be executed by one or more processors. A machine-readable storage medium may be implemented as a storage device, mechanism, or other physical structure (e.g., volatile or non-volatile memory, a media disc, or other media other physical structure device) for storing or transmitting information in a form readable by a machine.
In the drawings, some structural or methodological features may be shown in a particular arrangement and/or ordering. Preferably, however, such specific arrangement and/or ordering is not necessary. Rather, in some embodiments, such features may be arranged in a different manner and/or order than as shown in the drawings. Furthermore, inclusion of a feature in a particular figure that is not necessarily meant to imply that such feature is required in all embodiments and that, in some embodiments, may not be included or may be combined with other features.
In general, electronic red packages used in various electronic commerce platforms have various forms, and besides the examples in the background art, there are red packages which can be correspondingly discounted by swiping a bank card of a certain bank, red packages which are not limited to use by merchants in the whole platform (such as panning), and the like. For example, the electronic red packages can be classified into Gold standard (Gold standard is a currency system using Gold as a home currency), and electronic red packages with a monetary value per unit equivalent to several weights of Gold (i.e., a monetary Gold content) and electronic red packages with non-Gold home currency.
The electronic red envelope of the home location typically requires a substantial real-world fund reserve, the management of which involves financial data. Accordingly, the issuance of the electronic purse requires a budget for the real funds, and the amount to be deducted by the electronic purse is also credited to the transaction, except that the user does not have to pay for this portion. The platform universal red envelope which needs to be counted into the fund reserve and the transaction amount of the mall is the electronic red envelope with the gold home position.
The management of the electronic red package in the non-gold place often does not occupy the real fund reserve, the management does not involve financial data, correspondingly, the issuing of the electronic red package does not make the budget of the real fund, the deducted amount is not counted into the transaction amount, and the coupon issued in the unlimited amount is the electronic red package in the non-gold place.
The differences between the electronic red package in the gold home position and the electronic red package in the non-gold home position are briefly clarified by the following example. Assuming that under the application scene of independent tax calculation, the original price of a commodity is 300 yuan, the tax rate is 10%, and under the condition of using 50 yuan electronic red packages which are not in the home position, the price of the commodity actually required to be paid by a user is as follows: commodity price of 250 yuan deduction +25 yuan tax = 275 yuan; under the condition of using the 50-element gold home electronic red envelope, the price of the commodity actually required to be paid by the user is as follows: 300 original price of commodity +30 tax-50 deduction amount = 280.
The application of the embodiment of the application is not limited to the electronic red package in the gold home position or the electronic red package in the non-gold home position, but mainly focuses on the application of ensuring the consistency of the issuing of the electronic red package and the receiving transaction of the electronic red package (namely, the successfully issued electronic red package must be received successfully).
Referring to fig. 1, a flowchart illustrating steps of an embodiment 1 of a data processing method for an electronic red packet in the present application is shown, in this embodiment of the present application, the electronic red packet has a release database system and a lead database system, where a release event table is set in the release database system, and this embodiment of the present application specifically may include the following steps:
Step 101, after an electronic red packet issuing transaction is successfully executed based on the issuing database system, adding a corresponding red packet issuing record in the issuing event table, and marking a state of the red packet to be received in the red packet issuing record;
step 102, after the corresponding electronic red packet receiving transaction is successfully executed based on the receiving database system, extracting a corresponding red packet sending record from the sending event table, and updating the state of the red packet to be received into the state of the red packet received in the red packet sending record;
step 103, traversing the issuing event table according to a preset time interval, and determining an electronic red packet receiving transaction to be executed according to the state of the red packet to be received or the state of the red packet received;
and 104, triggering the lead database system to execute the electronic red package lead transaction to be executed.
For a better understanding of the embodiments of the present application, a typical electronic red envelope distribution and retrieval process is illustrated below:
the electronic commerce website distributes red packets to the buyer users according to the budget, namely triggers an electronic red packet distribution database system to execute electronic red packet distribution transactions;
And after logging in the e-commerce website, the buyer user correspondingly retrieves the issued electronic red packet, namely, triggers the receiving database system to execute the corresponding electronic red packet receiving transaction.
In this embodiment of the present application, the issuing database system and the receiving database system may be servers, server clusters, cloud processors, or the like in the electronic commerce website, which are responsible for processing the issuing transaction and the receiving transaction of the electronic red packet.
In order to ensure the consistency of the transaction between the issuing and the receiving of the electronic red packet, that is, the successful issuing of the electronic red packet needs to be received successfully, the embodiment of the application introduces a issuing event table hjbus, wherein the hjbus is arranged in the issuing database system and has a task processing schematic diagram shown by referring to fig. 2. When the electronic red packet issuing action (S21 funds issuing in fig. 2) is executed, only an insertion statement (hjbus task is inserted in a transaction manner in S22 in fig. 2) is added to the corresponding electronic red packet issuing transaction, so that a red packet issuing record can be inserted into hjbus, which indicates that the execution of one electronic red packet issuing operation is successful, and the red packet sending record can be marked as a state to be led for the red packet.
When the electronic red packet issuing operation is successfully performed and the electronic red packet receiving operation is also successfully performed (fund receiving in step S23 of fig. 2), the status of the red packet issuing record inserted in the previous step is marked as the status that the red packet is received.
In a preferred embodiment of the present application, whether the above-mentioned synchronous receiving operation corresponding to the issuing is executed successfully or not, a prompt message indicating that the issuing of the red packet is successful may be generated, so as to return a result that the issuing of the red packet has been successful to the user or other devices.
Specifically, referring to the signaling flow chart of the electronic red packet issuing and the execution of the reception transaction shown in fig. 3, the electronic red packet issuing program a is executed, and after the issuing database system 301 successfully executes the electronic red packet issuing transaction, step S31 is executed: adding a corresponding red packet issuing record in the issuing event table, and marking the state of the red packet to be received in the red packet issuing record; then, step S32 is performed: the program a invokes a predefined led-to service object B (RPC (Remote Procedure Call Protocol) —remote procedure call protocol) service, which performs step S33: electronic red package data is written into the lead database system 302, and after the call-up service object B receives the notification of successful lead returned from the lead database system 302 (S34), the notification of successful lead of the red package is performed by the program a (S35), and then the program a performs step S36: and extracting a corresponding red packet issuing record from the issuing event table, and updating the state of the red packet to be received into the state of the red packet received in the red packet issuing record. Since the issue event table is set in the issue database system 301, that is, the record operation in the issue event table and the issue operation of the electronic red packet are in the same transaction, the transaction consistency can be effectively ensured.
In the embodiment of the present application, additional scheduling tasks are added (step S24schedule scheduling task in fig. 2), hjbus is traversed according to a preset time interval, and unsuccessful records (records of a state of a red packet to be received or records of a state of a non-red packet to be received) in the hjbus table are scanned, so as to determine an electronic red packet receiving transaction to be executed.
As a preferred example of the embodiment of the present application, the hjbus may set a next processing time generated at a preset time interval, and the step 103 may include the following sub-steps:
and step S1031, traversing the issuing event table according to a preset time interval, extracting the current state of all red packets to be led and the red packet issuing record with the next processing time being earlier than the current time, and determining the electronic red packet led transaction to be executed according to the red packet issuing record.
Or,
and S1032, traversing the issuing event table according to a preset time interval, extracting all red packet issuing records which are not currently in a red packet led state and have the next processing time earlier than the current time, and determining the electronic red packet led transaction to be executed according to the red packet issuing records.
And after determining the electronic red package receiving transaction to be executed, asynchronous receiving compensation operation can be performed, namely triggering the receiving database system to execute the electronic red package receiving transaction to be executed.
As an example of a specific application of the embodiment of the present application, the lead database system may be triggered to execute the electronic red-package lead transaction to be executed by:
the issuing database system calls a predefined receiving service object, wherein the receiving service object is used for writing electronic red packet data into the receiving database system, and the electronic red packet data comprises electronic red packet data corresponding to the electronic red packet receiving transaction to be executed;
and when receiving the information returned by the receiving service object and written into the electronic red packet data successfully, judging that the receiving database system successfully executes the corresponding electronic red packet receiving transaction.
Wherein the predefined, received service object may be RPC (Remote Procedure Call Protocol) —remote procedure call protocol) service, RPC service is a protocol that requests a service from a remote computer program over a network without knowledge of underlying network technology. The RPC adopts a client/server mode. The requesting program is a client and the service provider is a server. First, the client calling process sends a call message with process parameters to the service process and then waits for a response message. At the server side, the process remains dormant until the call information arrives. When one call information arrives, the server obtains the process parameters, calculates the result, sends the reply information, then waits for the next call information, finally, the client calls the process to receive the reply information, obtains the process result, and then calls the execution to continue. In this example, this RPC service is used to write corresponding electronic red packet data in the lead database system. The issuing database system can call the RPC service, and when the RPC service returns success, the receiving database system is indicated to successfully execute the corresponding electronic red package receiving transaction.
In a preferred embodiment of the present application, after the receiving database system successfully executes the electronic red packet receiving transaction to be executed, a corresponding red packet issuing record may be extracted in hjbus, and the red packet received status may be marked in the red packet issuing record.
That is, when the electronic red packet is successfully received, the status of the hjbus record is updated to be the status that the red packet is received.
In a specific implementation, the embodiment of the application may further include the following steps:
and if the lead database system does not successfully execute the electronic red package lead transaction to be executed, adjusting the preset time interval.
Aiming at the situation that the red packet receiving failure occurs again in practice, the application of the embodiment of the application can gradually reduce the retry frequency of the hjbus record and inform relevant persons to pay attention through corresponding monitoring means.
It should be noted that, in the embodiments of the present application, the "state to be led by the red packet" and the "state to be led by the red packet" are only used to describe the current processing state of the electronic red packet, and any setting by those skilled in the art is possible, for example, recording as "unsuccessful" or "successful", "0" or "1", etc., which is not limited in this application.
For a better understanding of the embodiments of the present application, the following illustrates an example of electronic red packet data processing using the embodiments of the present application:
setting a release event table hjbus in a release database system, wherein the hjbus comprises the following information:
internal Id, creation time, user Id, message topic, message body, sender IP address, message processing times, message processing progress, next processing time, tracking context.
In the case that the electronic red packet issuing transaction is successfully executed based on the issuing database system, the inserted red packet issuing record comprises the following information:
internal Id:100000753,
creation time: 2016-11-10 09:00:00,
the belonged user Id:3240753,
message subject: the distribution of the red packet is successful,
message body: a 5-membered user was issued to user 100321, with an activity name of double 11 red packets, red packet Id 10043530321,
sender IP address: 10.172.86.34
Message processing times: 0
Message processing progress: unconsumed by
The next treatment time: 2016-11-10 09:00:01
Tracking context:
after the issuing transaction is completed, performing synchronous leading (based on the fact that the leading database system successfully executes the corresponding electronic red packet leading transaction), if the synchronous leading is completed, marking the message as successful, namely updating the processing progress of the message as follows: subscribers have already been processed.
In practice, hjbus is a scenario where the same message can be associated with multiple consistency relying parties, and in a scenario where a red packet is issued and received, it can be configured as a one-to-one association.
Accordingly, the logic for scheduling tasks by Schedule is:
at intervals of a certain time (for example, 1 second), the data that the message processing progress is not "subscriber processed" and the next processing time is earlier than the current time is queried in hjbus.
After inquiring the data, the message is processed according to the relationship between the subject of the message and the subscriber. For example, the scenario of issuing and receiving a red packet is that a receiving operation of the red packet is performed, and all information required for the operation is stored in a message body, that is, a 5-element double 11 red packet is required to be generated for the user 100321, and the internal id is 10043530321.
After a batch of scanned messages to be processed are processed, a rest period is decided according to a certain algorithm, and then an action of inquiring the messages to be processed is initiated again. And then reciprocates in this way.
In a specific implementation, the method does not add a new hjbus, but adds corresponding fields such as a state to be received or received of a red packet, next processing time and the like in an original service operation record table of the issuing database system, namely, all main fields in the hjbus table are added to the service operation record table of the issuing database system, so that the aim of the invention can be fulfilled.
By applying the embodiment of the application, the recording operation in the hjbus and the issuing operation of the electronic red packet are in the same transaction, so that the transaction consistency can be effectively ensured, and the purpose of ensuring the transaction consistency is achieved at lower cost. Meanwhile, as only one insert sentence is added in the existing issuing transaction to increase the corresponding red packet issuing record, excessive development complexity is not increased, and the development cost is low. Moreover, aiming at the electronic red package data which is not received after the electronic red package is sent out, the electronic red package data can be reflected in a backlog pending record mode in the sending event table, so that monitoring and fault recovery can be easily carried out, a complex consistency management system is not required to be introduced, and the system overhead is very small.
Referring to fig. 4, a flowchart illustrating steps of an embodiment 2 of a data processing method for an electronic red packet in the present application is shown, in this embodiment of the present application, the electronic red packet has a release database system and a lead database system, where a release event table is set in the release database system, and this embodiment of the present application specifically may include the following steps:
step 401, after the electronic red packet issuing transaction is successfully executed based on the issuing database system, adding a corresponding red packet issuing record in the issuing event table, and marking the state of the red packet to be received in the red packet issuing record;
Step 402, after the corresponding electronic red packet receiving transaction is successfully executed based on the receiving database system, extracting a corresponding red packet receiving record from the receiving event table, and updating the state of the red packet to be received into the state of the red packet received in the red packet receiving record.
Referring to fig. 5, a flowchart illustrating steps of an embodiment 3 of a data processing method for an electronic red packet in the present application is shown, in this embodiment of the present application, the electronic red packet has a release database system and a lead database system, where a release event table is set in the release database system, and this embodiment of the present application specifically may include the following steps:
step 501, traversing the issuing event table according to a preset time interval, and determining an electronic red packet receiving transaction to be executed according to the state of the red packet to be received or the state of the red packet received;
step 502, triggering the lead database system to execute the electronic red package lead transaction to be executed.
It should be noted that, for simplicity of description, the method embodiments are shown as a series of acts, but it should be understood by those skilled in the art that the embodiments are not limited by the order of acts described, as some steps may occur in other orders or concurrently in accordance with the embodiments. Further, those skilled in the art will appreciate that the embodiments described in the specification are all preferred embodiments and that the acts referred to are not necessarily required by the embodiments of the present application.
Referring to FIG. 6, there is shown a block diagram of an embodiment 1 of an electronic red packet data processing system in communication with a distribution database system having a distribution event table disposed therein and a lead database system, the system embodiment may specifically include the following modules:
the record inserting module 61 is configured to add a corresponding packet issuing record in the issuing event table after the electronic packet issuing transaction is successfully executed based on the issuing database system, and mark a state of the packet to be taken in the packet issuing record;
the status updating module 62 is configured to extract a corresponding packet issuing record from the issuing event table after the corresponding electronic packet receiving transaction is successfully executed based on the receiving database system, and update the status of the packet to be received into a status of the received packet in the packet issuing record;
the event table traversing module 63 is configured to traverse the issuing event table at preset time intervals, and determine an electronic packet receiving transaction to be executed according to the state to be received by the packet or the state received by the packet;
And the lead compensation processing module 64 is used for triggering the lead database system to execute the electronic red envelope lead transaction to be executed.
In a preferred embodiment of the present application, the next processing time generated at a preset time interval may be set in the issuing event table, and in this case, the event table traversing module 63 may include the following sub-modules:
the first transaction to be executed determining submodule is used for traversing the issuing event table according to a preset time interval, extracting a red packet issuing record of which the current state of all red packets to be led is higher than the current time in the next processing time, and determining an electronic red packet leading transaction to be executed according to the red packet issuing record;
or,
and the second transaction to be executed determining submodule is used for traversing the issuing event table according to a preset time interval, extracting all red packet issuing records with the next processing time earlier than the current time in the state that the red packet is not already led, and determining the electronic red packet led transaction to be executed according to the red packet issuing records.
As an example of a specific application of the embodiment of the present application, the system embodiment may further include the following modules:
and the receiving updating module is used for extracting corresponding red packet sending records from the sending event table after the receiving database system successfully executes the electronic red packet receiving transaction to be executed, and marking the received state of the red packet in the red packet sending records.
In a specific implementation, the system embodiment may further include the following modules:
and the time adjustment module is used for adjusting the preset time interval when the lead database system does not successfully execute the electronic red package lead transaction to be executed.
In a preferred embodiment of the present application, the system embodiment may further comprise the following modules:
and the prompt module is connected with the record insertion module and is used for generating prompt information of successful issuing of the red packet.
In a specific implementation, the lead compensation processing module may include the following sub-modules:
a service calling sub-module for calling a predefined receiving service object;
the receiving service object is used for writing electronic red packet data into the receiving database system, and the electronic red packet data comprises electronic red packet data corresponding to the electronic red packet receiving transaction to be executed;
and the notification sub-module is used for judging that the receiving database system successfully executes the corresponding electronic red packet receiving transaction when receiving the information returned by the receiving service object and written into the electronic red packet data successfully.
Referring to fig. 7, there is shown a block diagram of an embodiment 2 of a data processing system for electronic red packets of the present application, in this embodiment, the data processing system for electronic red packets is in communication with a issuing database system 72 and a receiving database system 73, where the issuing database system 72 is configured to execute electronic red packet issuing transactions, and the receiving database system 73 is configured to execute electronic red packet receiving transactions, where a issuing event table is provided in the issuing database system 72, and the data processing system for electronic red packets may specifically include the following modules:
Program object module 71 for triggering said issuing database system 72 to execute an electronic red packet issuing transaction; after the electronic red packet issuing transaction is successfully executed by the issuing database system 72, adding a corresponding red packet issuing record in the issuing event table, and marking the state of the red packet to be received in the red packet issuing record; then call the get service object module 74;
a receiving service object module 74, configured to trigger the receiving database system 73 to execute an electronic red packet receiving transaction, and notify the program object module 71 after the receiving database system 73 successfully executes a corresponding electronic red packet receiving transaction;
the program object module 71 is further configured to extract a corresponding packet issuing record from the issuing event table, and update the state of the packet to be received into the state of the packet received in the packet issuing record.
In a preferred embodiment of the present application, the system embodiment may further comprise the following modules:
the event table traversing module is used for traversing the issuing event table according to a preset time interval and determining an electronic red packet receiving transaction to be executed according to the state to be received by the red packet or the state received by the red packet;
And the receiving compensation processing module is used for triggering the receiving database system to execute the electronic red envelope receiving transaction to be executed.
For system embodiments, the description is relatively simple as it is substantially similar to method embodiments, and reference is made to the description of method embodiments for relevant points.
The embodiment of the application also provides a data processing device of the electronic red packet, the electronic red packet is provided with a distribution database system and a reception database system, a distribution event table is arranged in the distribution database system, and the device comprises:
one or more processors;
a memory; and
one or more modules stored in the memory and configured to be executed by the one or more processors, the one or more modules having the following functionality:
after the electronic red packet issuing transaction is successfully executed based on the issuing database system, adding a corresponding red packet issuing record in the issuing event table, and marking the state of the red packet to be taken in the red packet issuing record;
after the corresponding electronic red packet receiving transaction is successfully executed based on the receiving database system, extracting a corresponding red packet receiving record from the receiving event table, and updating the state of the red packet to be received into the state of the red packet received in the red packet receiving record;
Traversing the issuing event table according to a preset time interval, and determining an electronic red packet receiving transaction to be executed according to the state of the red packet to be received or the state of the red packet received;
and triggering the leading database system to execute the electronic red envelope leading transaction to be executed.
Optionally, the issuing event table is provided with a next processing time generated according to a preset time interval, and the one or more modules may have the following functions:
traversing the issuing event table according to a preset time interval, extracting a red packet issuing record of which the current state of all red packets to be led is longer than the current time in the next processing time, and determining an electronic red packet leading transaction to be executed according to the red packet issuing record; or,
traversing the issuing event table according to a preset time interval, extracting all current red packet issuing records with the processing time less than the current time in a state of not being led by the red packet, and determining the electronic red packet led transaction to be executed according to the red packet issuing records.
Optionally, the one or more modules may have the following functions:
and after the receiving database system successfully executes the electronic red packet receiving transaction to be executed, extracting a corresponding red packet receiving record from the receiving event table, and marking the received state of the red packet in the red packet receiving record.
Optionally, the one or more modules may have the following functions:
and if the lead database system does not successfully execute the electronic red package lead transaction to be executed, adjusting the preset time interval.
Optionally, the one or more modules may have the following functions:
and generating prompt information of successful issuing of the red packet.
Optionally, the one or more modules may have the following functions:
the issuing database system calls a predefined receiving service object, wherein the receiving service object is used for writing electronic red packet data into the receiving database system, and the electronic red packet data comprises electronic red packet data corresponding to the electronic red packet receiving transaction to be executed;
and when receiving the information returned by the receiving service object and written into the electronic red packet data successfully, judging that the receiving database system successfully executes the corresponding electronic red packet receiving transaction.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described by differences from other embodiments, and identical and similar parts between the embodiments are all enough to be referred to each other.
Embodiments of the present disclosure may be implemented as a system configured as desired using any suitable hardware and/or software. Fig. 8 schematically illustrates an example system 600 that can be used to implement various embodiments described in this disclosure.
For one embodiment, FIG. 8 illustrates an exemplary system 600 having one or more processors 602, a system control module (chipset) 604 coupled to at least one of the processor(s) 602, a system memory 606 coupled to the system control module 604, a non-volatile memory (NVM)/storage device 608 coupled to the system control module 604, one or more input/output devices 610 coupled to the system control module 604, and a network interface 612 coupled to the system control module 606.
The processor 602 may include one or more single-core or multi-core processors, and the processor 602 may include any combination of general-purpose or special-purpose processors (e.g., graphics processors, application processors, baseband processors, etc.).
In some embodiments, the system 600 can include one or more computer-readable media (e.g., system memory 606 or NVM/storage 608) having instructions and one or more processors 602 combined with the one or more computer-readable media configured to execute the instructions to implement the modules to perform the actions described in this disclosure.
For one embodiment, the system control module 604 may include any suitable interface controller to provide any suitable interface to at least one of the processor(s) 602 and/or any suitable device or component in communication with the system control module 604.
The system control module 604 may include a memory controller module to provide an interface to the system memory 606. The memory controller modules may be hardware modules, software modules, and/or firmware modules.
The system memory 606 may be used to load and store data and/or instructions for the system 600, for example. For one embodiment, system memory 606 may comprise any suitable volatile memory, such as, for example, a suitable DRAM. In some embodiments, the system memory 606 may comprise double data rate type four synchronous dynamic random access memory (DDR 4 SDRAM).
For one embodiment, the system control module 604 may include one or more input/output controllers to provide an interface to the NVM/storage 608 and the input/output device(s) 610.
For example, NVM/storage 608 may be used to store data and/or instructions. NVM/storage 608 may include any suitable non-volatile memory (e.g., flash memory) and/or may include any suitable non-volatile storage device(s) (e.g., one or more Hard Disk Drives (HDDs), one or more Compact Disc (CD) drives, and/or one or more Digital Versatile Disc (DVD) drives).
NVM/storage 608 may include storage resources physically part of the device on which system 600 is installed or it may be accessed by the device without necessarily being part of the device. For example, NVM/storage 608 may be accessed over a network via input/output device(s) 610.
Input/output device(s) 610 can provide an interface for system 600 to communicate with any other suitable devices, input/output device 610 can include communication components, audio components, sensor components, and the like. Network interface 612 may provide an interface for system 600 to communicate over one or more networks, and system 600 may communicate wirelessly with one or more components of a wireless network according to any of one or more wireless network standards and/or protocols, such as accessing a wireless network based on a communication standard, such as WiFi,2G, or 3G, or a combination thereof.
For one embodiment, at least one of the processor(s) 602 may be packaged together with logic of one or more controllers (e.g., memory controller modules) of the system control module 604. For one embodiment, at least one of the processor(s) 602 may be packaged together with logic of one or more controllers of the system control module 604 to form a System In Package (SiP). For one embodiment, at least one of the processor(s) 602 may be integrated on the same die with logic of one or more controllers of the system control module 604. For one embodiment, at least one of the processor(s) 602 may be integrated on the same die with logic of one or more controllers of the system control module 604 to form a system on chip (SoC).
In various embodiments, system 600 may be, but is not limited to being: servers, server clusters, cloud processing devices, and the like. In various embodiments, system 600 may have more or fewer components and/or different architectures. For example, in some embodiments, system 600 includes one or more cameras, keyboards, liquid Crystal Display (LCD) screens (including touch screen displays), non-volatile memory ports, multiple antennas, graphics chips, application Specific Integrated Circuits (ASICs), and speakers.
Wherein if the display comprises a touch panel, the display screen may be implemented as a touch screen display to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or slide action, but also the duration and pressure associated with the touch or slide operation.
The embodiment of the application also provides a non-volatile readable storage medium, in which one or more modules (programs) are stored, where the one or more modules are applied to a terminal device, and the terminal device may be caused to execute instructions (instructions) of each method step in the embodiment of the application.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described by differences from other embodiments, and identical and similar parts between the embodiments are all enough to be referred to each other.
It will be apparent to those skilled in the art that embodiments of the present application may be provided as a method, apparatus, or computer program product. Accordingly, the present embodiments may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
In a typical configuration, the computer device includes one or more processors (CPUs), an input/output interface, a network interface, and memory. The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media. Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include non-transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present embodiments have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the present application.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or terminal device comprising the element.
The foregoing has described in detail a data processing method of an electronic red packet, a data processing system of an electronic red packet and a data processing device of an electronic red packet provided in the present application, and specific examples have been applied herein to illustrate the principles and embodiments of the present application, where the above examples are only used to help understand the method of the present application and the core ideas thereof; meanwhile, as those skilled in the art will have modifications in the specific embodiments and application scope in accordance with the ideas of the present application, the present description should not be construed as limiting the present application in view of the above.

Claims (19)

1. The data processing method of the electronic red packet is characterized in that the electronic red packet is provided with a distribution database system and a receiving database system, a distribution event table is arranged in the distribution database system, and the method comprises the following steps:
after the electronic red packet issuing transaction is successfully executed based on the issuing database system, adding a corresponding red packet issuing record in the issuing event table, and marking the state of the red packet to be taken in the red packet issuing record;
after the corresponding electronic red packet receiving transaction is successfully executed based on the receiving database system, extracting a corresponding red packet receiving record from the receiving event table, and updating the state of the red packet to be received into the state of the red packet received in the red packet receiving record;
Traversing the issuing event table according to a preset time interval, and determining an electronic red packet receiving transaction to be executed according to the state of the red packet to be received or the state of the red packet received;
and triggering the leading database system to execute the electronic red envelope leading transaction to be executed.
2. The method according to claim 1, wherein the issuing event table is provided with a next processing time generated according to a preset time interval, the step of traversing the issuing event table according to the preset time interval, and determining the electronic red-envelope-receiving transaction to be executed according to the state of the red envelope to be received or the state of the red envelope to be received includes:
traversing the issuing event table according to a preset time interval, extracting a red packet issuing record which is in a state that all red packets are to be led currently and has the next processing time earlier than the current time, and determining an electronic red packet leading transaction to be executed according to the red packet issuing record.
3. The method according to claim 1, wherein the issuing event table is provided with a next processing time generated according to a preset time interval, the step of traversing the issuing event table according to the preset time interval, and determining the electronic red-envelope-receiving transaction to be executed according to the state of the red envelope to be received or the state of the red envelope to be received includes:
Traversing the issuing event table according to a preset time interval, extracting all current red packet issuing records with the processing time less than the current time in a state of not being led by the red packet, and determining the electronic red packet led transaction to be executed according to the red packet issuing records.
4. A method according to claim 1 or 2 or 3, further comprising:
and after the receiving database system successfully executes the electronic red packet receiving transaction to be executed, extracting a corresponding red packet receiving record from the receiving event table, and marking the received state of the red packet in the red packet receiving record.
5. A method according to claim 1 or 2 or 3, further comprising:
and if the lead database system does not successfully execute the electronic red package lead transaction to be executed, adjusting the preset time interval.
6. A method according to claim 1, 2 or 3, wherein after the step of marking the status of the red packet to be received in the red packet delivery record, the method further comprises:
and generating prompt information of successful issuing of the red packet.
7. A method according to claim 1, 2 or 3, wherein the step of triggering the lead database system to execute the electronic red-envelope lead transaction to be executed comprises:
The issuing database system calls a predefined receiving service object, wherein the receiving service object is used for writing electronic red packet data into the receiving database system, and the electronic red packet data comprises electronic red packet data corresponding to the electronic red packet receiving transaction to be executed;
and when receiving the information returned by the receiving service object and written into the electronic red packet data successfully, judging that the receiving database system successfully executes the corresponding electronic red packet receiving transaction.
8. A data processing system for electronic red packets, the data processing system for electronic red packets in communication with a distribution database system and a lead database system, the distribution database system having a distribution event table disposed therein, the system comprising:
the record inserting module is used for adding corresponding red packet issuing records in the issuing event table after the electronic red packet issuing transaction is successfully executed based on the issuing database system, and marking the state of the red packet to be taken in the red packet issuing records;
the state updating module is used for extracting a corresponding red packet issuing record from the issuing event table after the corresponding electronic red packet receiving transaction is successfully executed based on the receiving database system, and updating the state of the red packet to be received into the state of the received red packet in the red packet issuing record;
The event table traversing module is used for traversing the issuing event table according to a preset time interval and determining an electronic red packet receiving transaction to be executed according to the state to be received by the red packet or the state received by the red packet;
and the receiving compensation processing module is used for triggering the receiving database system to execute the electronic red envelope receiving transaction to be executed.
9. The system of claim 8, wherein the issuing event table is provided with a next processing time generated at a preset time interval, and the event table traversing module comprises:
the first transaction to be executed determining submodule is used for traversing the issuing event table according to a preset time interval, extracting a red packet issuing record of which the current state of all red packets to be led is higher than the current time in the next processing time, and determining an electronic red packet leading transaction to be executed according to the red packet issuing record;
or,
and the second transaction to be executed determining submodule is used for traversing the issuing event table according to a preset time interval, extracting all red packet issuing records with the next processing time earlier than the current time in the state that the red packet is not already led, and determining the electronic red packet led transaction to be executed according to the red packet issuing records.
10. The system according to claim 8 or 9, further comprising:
and the receiving updating module is used for extracting corresponding red packet sending records from the sending event table after the receiving database system successfully executes the electronic red packet receiving transaction to be executed, and marking the received state of the red packet in the red packet sending records.
11. The system according to claim 8 or 9, further comprising:
and the time adjustment module is used for adjusting the preset time interval when the lead database system does not successfully execute the electronic red package lead transaction to be executed.
12. The system according to claim 8 or 9, further comprising:
and the prompt module is connected with the record insertion module and is used for generating prompt information of successful issuing of the red packet.
13. The system of claim 8 or 9, wherein the lead compensation processing module comprises:
a service calling sub-module for calling a predefined receiving service object;
the receiving service object is used for writing electronic red packet data into the receiving database system, and the electronic red packet data comprises electronic red packet data corresponding to the electronic red packet receiving transaction to be executed;
And the notification sub-module is used for judging that the receiving database system successfully executes the corresponding electronic red packet receiving transaction when receiving the information returned by the receiving service object and written into the electronic red packet data successfully.
14. A data processing apparatus for an electronic red package, the electronic red package having a distribution database system and a reception database system, the distribution database system having a distribution event table provided therein, the apparatus comprising:
one or more processors;
a memory; and
one or more modules stored in the memory and configured to be executed by the one or more processors, the one or more modules having the following functionality:
after the electronic red packet issuing transaction is successfully executed based on the issuing database system, adding a corresponding red packet issuing record in the issuing event table, and marking the state of the red packet to be taken in the red packet issuing record;
after the corresponding electronic red packet receiving transaction is successfully executed based on the receiving database system, extracting a corresponding red packet receiving record from the receiving event table, and updating the state of the red packet to be received into the state of the red packet received in the red packet receiving record;
Traversing the issuing event table according to a preset time interval, and determining an electronic red packet receiving transaction to be executed according to the state of the red packet to be received or the state of the red packet received;
and triggering the leading database system to execute the electronic red envelope leading transaction to be executed.
15. The data processing method of the electronic red packet is characterized in that the electronic red packet is provided with a distribution database system and a receiving database system, a distribution event table is arranged in the distribution database system, and the method comprises the following steps:
after the electronic red packet issuing transaction is successfully executed based on the issuing database system, adding a corresponding red packet issuing record in the issuing event table, and marking the state of the red packet to be taken in the red packet issuing record;
after the corresponding electronic red packet receiving transaction is successfully executed based on the receiving database system, extracting a corresponding red packet receiving record from the receiving event table, and updating the state of the red packet to be received into the state of the red packet received in the red packet receiving record;
wherein the method further comprises:
after the electronic red packet receiving transaction to be executed is successfully executed by the receiving database system, extracting a corresponding red packet receiving record from the receiving event table, and marking the received state of the red packet in the red packet receiving record;
The electronic red package receiving transaction to be executed is the electronic red package receiving transaction to be executed, which traverses the issuing event table according to a preset time interval and is determined according to the state to be received by the red package or the state to be received by the red package.
16. The data processing method of the electronic red packet is characterized in that the electronic red packet is provided with a distribution database system and a receiving database system, a distribution event table is arranged in the distribution database system, and the method comprises the following steps:
traversing the issuing event table according to a preset time interval, and determining an electronic red packet receiving transaction to be executed according to the state of the red packet to be received or the state of the red packet received;
triggering the leading database system to execute the electronic red envelope leading transaction to be executed;
the step of traversing the issuing event table according to the preset time interval and determining the electronic red packet receiving transaction to be executed according to the state of the red packet to be received or the state of the red packet to be received comprises the following steps of:
traversing the issuing event table according to a preset time interval, extracting a red packet issuing record which is in a state that all red packets are to be led currently and has the next processing time earlier than the current time, and determining an electronic red packet leading transaction to be executed according to the red packet issuing record.
17. The utility model provides a data processing system of electronic red package, its characterized in that, the data processing system of electronic red package communicates with issue database system and receive database system, issue database system is used for carrying out electronic red package and issues the transaction, receive database system is used for carrying out electronic red package and receive the transaction, wherein, be provided with in the issue database system and issue the event table, the data processing system of electronic red package includes:
the program object module is used for triggering the issuing database system to execute the electronic red packet issuing transaction; after the electronic red packet issuing transaction is successfully executed by the issuing database system, adding a corresponding red packet issuing record in the issuing event table, and marking the state of the red packet to be taken in the red packet issuing record; then calling a receiving service object module;
the receiving service object module is used for triggering the receiving database system to execute the electronic red package receiving transaction, and notifying the program object module after the receiving database system successfully executes the corresponding electronic red package receiving transaction;
the program object module is further configured to extract a corresponding packet issuing record from the issuing event table, and update the state of the packet to be received to the state of the packet received in the packet issuing record.
18. A data processing apparatus for electronic red packets, comprising:
one or more processors; and
instructions in one or more computer-readable media stored thereon, which when executed by the one or more processors, cause the apparatus to perform the method of any of claims 1-7.
19. A computer readable medium having instructions stored thereon, which when executed by one or more processors, cause a terminal device to perform the method of any of claims 1-7.
CN201611111479.1A 2016-12-02 2016-12-02 Data processing method, system and device for electronic red packet Active CN108153795B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611111479.1A CN108153795B (en) 2016-12-02 2016-12-02 Data processing method, system and device for electronic red packet

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611111479.1A CN108153795B (en) 2016-12-02 2016-12-02 Data processing method, system and device for electronic red packet

Publications (2)

Publication Number Publication Date
CN108153795A CN108153795A (en) 2018-06-12
CN108153795B true CN108153795B (en) 2023-12-26

Family

ID=62468534

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611111479.1A Active CN108153795B (en) 2016-12-02 2016-12-02 Data processing method, system and device for electronic red packet

Country Status (1)

Country Link
CN (1) CN108153795B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108984254A (en) * 2018-07-03 2018-12-11 深圳市必发达科技有限公司 A kind of information processing method based on immediate communication tool
CN109242454A (en) * 2018-08-14 2019-01-18 阿里巴巴集团控股有限公司 Distribution method, device, server and the readable storage medium storing program for executing of electronics red packet
CN111626787B (en) * 2020-05-29 2023-09-01 北京字节跳动网络技术有限公司 Resource issuing method, device, medium and equipment
CN111985799A (en) * 2020-08-11 2020-11-24 北京达佳互联信息技术有限公司 Object set updating method and device, electronic equipment and storage medium
CN113301390B (en) * 2021-05-21 2023-05-26 北京达佳互联信息技术有限公司 Data processing method, device and server for calling virtual resources

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105592117A (en) * 2014-10-23 2016-05-18 阿里巴巴集团控股有限公司 Method and device for processing transaction message
CN106095877A (en) * 2016-06-07 2016-11-09 中国建设银行股份有限公司 A kind of red packet data processing method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10430298B2 (en) * 2010-10-28 2019-10-01 Microsoft Technology Licensing, Llc Versatile in-memory database recovery using logical log records

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105592117A (en) * 2014-10-23 2016-05-18 阿里巴巴集团控股有限公司 Method and device for processing transaction message
CN106095877A (en) * 2016-06-07 2016-11-09 中国建设银行股份有限公司 A kind of red packet data processing method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
核心化多级安全数据库系统未决提交事务日志写出依赖研究;徐震等;《计算机学报》;20060812(第08期);全文 *

Also Published As

Publication number Publication date
CN108153795A (en) 2018-06-12

Similar Documents

Publication Publication Date Title
CN108153795B (en) Data processing method, system and device for electronic red packet
TW201800994A (en) Resource processing method and device
WO2015164425A1 (en) Method and system of processing commodity object information
CN105787733B (en) Service information processing method and device
WO2012148773A2 (en) Online payment method and device
CN108960790B (en) Method, device, server and system for processing bill service
US11948191B1 (en) Device-to-device microlending within a distributed system
CN105046482A (en) Mobile terminal payment method, device, and system
US20170221062A1 (en) Order insights system and method
CN109005214B (en) Resource scheduling method and device
TWI793087B (en) Currency type switching method and device
CN108985817B (en) Associated business processing method and device and shop recommendation method and device
US20230306395A1 (en) Automatic invoice notification
KR20160113118A (en) Method and apparatus of displaying information
TWM605341U (en) Device and system of reconfirming the transaction when the transaction is judged as impulsive consumption
CN111553699A (en) Resource scheduling method and device
CN106372878A (en) Payment method, payment client and payment server
CN107301550B (en) Acquisition method of credit information and establishment method and device of credit management and control rule
US9871694B1 (en) Parallel processing for transaction data generation
CN108153796B (en) Data processing method, device and system for electronic red packet
CN116596529A (en) Transaction processing method and device
US20230394467A1 (en) System and method for providing restricted token usage during an onboarding phase
WO2016174519A1 (en) Methods and devices for processing values
US20160071092A1 (en) Systems and Methods for Transferring Value to Payment Accounts
CN111669341B (en) Internet resource scheduling method and device

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