CN113283825A - Competitive distribution method and device for supply chain financial products - Google Patents

Competitive distribution method and device for supply chain financial products Download PDF

Info

Publication number
CN113283825A
CN113283825A CN202110841971.9A CN202110841971A CN113283825A CN 113283825 A CN113283825 A CN 113283825A CN 202110841971 A CN202110841971 A CN 202110841971A CN 113283825 A CN113283825 A CN 113283825A
Authority
CN
China
Prior art keywords
purchase amount
purchase
user
amount
financial product
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.)
Pending
Application number
CN202110841971.9A
Other languages
Chinese (zh)
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.)
Beijing Yuncheng Financial Information Service Co ltd
Original Assignee
Beijing Yuncheng Financial Information Service Co 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 Beijing Yuncheng Financial Information Service Co ltd filed Critical Beijing Yuncheng Financial Information Service Co ltd
Priority to CN202110841971.9A priority Critical patent/CN113283825A/en
Publication of CN113283825A publication Critical patent/CN113283825A/en
Pending legal-status Critical Current

Links

Images

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
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0631Resource planning, allocation, distributing or scheduling for enterprises or organisations
    • 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/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24552Database cache management
    • 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
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/02Banking, e.g. interest calculation or account maintenance
    • 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
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Human Resources & Organizations (AREA)
  • Economics (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • Marketing (AREA)
  • Development Economics (AREA)
  • General Business, Economics & Management (AREA)
  • Technology Law (AREA)
  • Databases & Information Systems (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Computational Linguistics (AREA)
  • General Engineering & Computer Science (AREA)
  • Educational Administration (AREA)
  • Data Mining & Analysis (AREA)
  • Game Theory and Decision Science (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The invention discloses a competitive distribution method and a competitive distribution device for supply chain financial products, wherein the method comprises the following steps: when a purchase request for a target financial product sent by a user is received, the target financial product is in a sale state, and the purchase amount accords with a preset verification condition, the completed purchase amount and the total amount of the target financial product are determined from the buffer database; if the purchase amount is not larger than the total amount, determining the queue length of the purchase queue from the buffer database; if the queue length is less than the number of the appointed persons and the available balance of the user is not less than the purchase amount, locking the purchase amount, adding the purchase amount and the completed purchase amount to obtain a new completed purchase amount, and adding one to the number of the purchased persons; and if the new finished purchase amount is not larger than the total amount, returning a payment interface corresponding to the purchase amount to the user, so that the response speed when the competitive distribution of the supply chain financial products is carried out under the high concurrency condition is improved, and the user experience is further improved.

Description

Competitive distribution method and device for supply chain financial products
Technical Field
The present application relates to the field of electronic transaction technologies, and more particularly, to a method and an apparatus for competitive distribution of supply chain financial products.
Background
In the application process of electronic transaction, a common scenario is to perform competitive distribution on supply chain financial products, that is, users in a certain range compete for a limited number of supply chain financial products in a specified time.
Aiming at the competitive distribution phenomenon of the supply chain financial products, the biggest problem faced at present is that a large number of users initiate parallel purchase requests, so that the problem that the processing efficiency is reduced under high concurrency and the users wait for a long time easily occurs.
Therefore, how to improve the response speed when performing competitive distribution of supply chain financial products under high concurrency conditions, and further improve the user experience, is a technical problem to be solved at present.
Disclosure of Invention
The invention provides a competitive distribution method of supply chain financial products, which is used for solving the technical problem that the processing efficiency is reduced due to high concurrency when the supply chain financial products are competitively distributed in the prior art, and comprises the following steps:
when a purchase request for a target financial product sent by a user is received, the target financial product is in a sale state, and the purchase amount in the purchase request meets a preset verification condition, determining the finished purchase amount and the total amount of the target financial product from a buffer database;
if the purchase amount is not larger than the total amount, determining the queue length of a purchase queue from the cache database;
if the queue length is less than the designated number of people and the available balance of the user is not less than the purchase amount, locking the purchase amount, adding the purchase amount and the completed purchase amount to obtain a new completed purchase amount, and adding one to the number of the purchased people;
if the new finished purchase amount is not larger than the total amount, returning a payment interface corresponding to the purchase amount to the user so that the user finishes payment;
wherein the queue length characterizes a current number of purchases of the target financial product.
Preferably, after determining the queue length of the purchase queue from the cache database, the method further comprises:
if the queue length is larger than the designated number of people, returning a prompt message that the products are sold out to the user;
and if the queue length is equal to the designated number of people, the purchase times of the user are more than one and not more than the preset times, and the available balance is not less than the purchase amount, locking the purchase amount.
Preferably, after determining the queue length of the purchase queue from the cache database, the method further comprises:
and if the queue length is equal to the designated number of people and the purchase times is one or more than the preset times, returning a prompt message that the products are sold out to the user.
Preferably, after adding one to the number of purchased persons, the method further comprises:
and if the new finished purchase amount is larger than the total amount, unlocking the purchase amount, reducing the number of the purchased people by one, and returning a prompt message of purchase failure to the user.
Preferably, the cache database is a Redis database, the purchase amount is locked after operating the cache database based on a lua script, and before placing the target financial product in the on-sale state, the method further comprises:
configuring the total amount, the completed purchase amount, and the number of purchasers in the initialized cache database based on initialization instructions.
Preferably, after receiving a purchase request for a target financial product sent by a user, the method further comprises:
if the purchase amount does not accord with the preset verification condition, returning prompt information corresponding to the preset verification condition to the user so that the user can change the purchase amount according to the preset verification condition;
the preset verification condition comprises that the purchase amount is not less than the minimum purchase amount, the purchase amount is not more than the maximum purchase amount, and the purchase amount meets the requirement of a preset stepping value.
Preferably, the method further comprises:
if the available balance is less than the purchase amount, sending prompt information for allowing the user to change the purchase amount;
and if a message which is sent by the user and allows the purchase amount to be changed is received, updating the purchase amount based on the available balance.
Preferably, the on-sale state is triggered when the target financial product meets a preset saleable condition, the preset saleable condition includes that product information of the target financial product exists, the target financial product is saleable, and the target financial product is within a preset purchase time.
Accordingly, the present invention also provides an apparatus for competitive distribution of supply chain financial products, the apparatus comprising:
the system comprises a first determining module, a second determining module and a third determining module, wherein the first determining module is used for determining the finished purchase amount and the total amount of a target financial product from a buffer database when a purchase request of the target financial product sent by a user is received, the target financial product is in a sale state, and the purchase amount in the purchase request meets a preset verification condition;
a second determining module, configured to determine a queue length of a purchase queue from the cache database if the purchase amount is not greater than the total amount;
the acquisition module is used for locking the purchase amount if the queue length of the purchase queue is less than the number of appointed persons and the available balance of the user is not less than the purchase amount, adding the purchase amount and the completed purchase amount to acquire a new completed purchase amount, and adding one to the number of purchased persons;
the payment module is used for returning a payment interface corresponding to the purchase amount to the user to enable the user to complete payment if the new completed purchase amount is not larger than the total amount;
wherein the queue length characterizes a current number of purchases of the target financial product.
Accordingly, the present invention also proposes a computer-readable storage medium having stored therein instructions that, when run on a terminal device, cause the terminal device to perform the competitive distribution method for supply chain financial products as described above.
By applying the technical scheme, when a purchase request for a target financial product sent by a user is received, the target financial product is in a sale state, and the purchase amount in the purchase request meets a preset verification condition, the completed purchase amount and the total amount of the target financial product are determined from a buffer database; if the purchase amount is not larger than the total amount, determining the queue length of a purchase queue from the cache database; if the queue length is less than the designated number of people and the available balance of the user is not less than the purchase amount, locking the purchase amount, adding the purchase amount and the completed purchase amount to obtain a new completed purchase amount, and adding one to the number of the purchased people; if the new finished purchase amount is not larger than the total amount, returning a payment interface corresponding to the purchase amount to the user so that the user finishes payment; the queue length represents the current number of purchasers of the target financial product, so that the response speed when competitive distribution of supply chain financial products is carried out under high concurrency conditions is improved, and the user experience is further improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a flow chart illustrating a method for competitive distribution of supply chain financial products in accordance with an embodiment of the present invention;
fig. 2 is a schematic structural diagram illustrating a competitive distribution apparatus for supply chain financial products according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The embodiment of the application provides a competitive distribution method of supply chain financial products, as shown in fig. 1, the method comprises the following steps:
step S101, when a purchase request for a target financial product sent by a user is received, the target financial product is in a sale state, and the purchase amount in the purchase request meets a preset verification condition, the completed purchase amount and the total amount of the target financial product are determined from a buffer database.
In this embodiment, a user may check whether a target financial product is in a selling state through a user terminal installed with a designated client, if the target financial product is in the selling state and the user has an intention to purchase, the user may send a purchase request for the target financial product through the user terminal, where the user terminal may be a mobile phone, a tablet, or a computer, the purchase request includes a purchase amount desired by the user, and if the purchase amount meets a preset verification condition, a completed purchase amount and a total amount of the target financial product are determined from a cache database, where the completed purchase amount is an amount of the sold target financial product, the total amount is a total amount that the target financial product can be sold, and the total amount is a fixed amount, for example, if the target financial product has been sold by 2 million, the completed purchase amount is 2 million, and if the total amount that can be sold is 5 million, the total amount is 5 million, at this point, 3 million remain available for the user to purchase.
It will be appreciated that if the target financial product is not on sale, the user is unable to send a purchase request.
In order to improve the efficiency of competitive distribution, in a preferred embodiment of the present application, after receiving a purchase request for a target financial product sent by a user, the method further includes:
if the purchase amount does not accord with the preset verification condition, returning prompt information corresponding to the preset verification condition to the user so that the user can change the purchase amount according to the preset verification condition;
the preset verification condition comprises that the purchase amount is not less than the minimum purchase amount, the purchase amount is not more than the maximum purchase amount, and the purchase amount meets the requirement of a preset stepping value.
In this embodiment, the preset verification condition includes that the purchase amount is not less than the minimum purchase amount, the purchase amount is not greater than the maximum purchase amount, the purchase amount meets the requirement of the preset step value, and when the purchase amount of the user does not meet the preset verification condition, a prompt message corresponding to the preset verification condition is returned to the user.
For example, if the preset verification condition is that the minimum purchase amount is 1 ten thousand, the maximum purchase amount is 100 ten thousand, and the preset step value is 5 thousand, if the purchase amount of the user is 9000, the purchase amount is smaller than the minimum purchase amount, then a prompt message that the purchase amount is not smaller than 1 ten thousand is returned to the user, so that the user changes the purchase amount; if the purchase amount of the user is 1.1 ten thousand, the purchase amount does not meet the requirement of the preset step value, and a prompt message that the purchase amount needs to meet the step value of 5 thousand is returned to the user to change the user; if the purchase amount of the user is 111 ten thousand, the purchase amount is larger than the maximum purchase amount, and prompt information that the purchase amount is not larger than 100 ten thousand is returned to the user, so that the user can change the purchase amount.
It can be understood that when the purchase amount does not meet the preset verification condition, a prompt message including a part of the preset verification condition corresponding to the purchase amount may be returned to the user, for example, when the purchase amount of the user is 9000, a prompt message that the purchase amount is not less than 1 ten thousand is returned to the user; the total preset verification conditions can also be returned to the user, for example, when the purchase amount of the user is 9000, prompt information that the minimum purchase amount is 1 ten thousand, the maximum purchase amount is 100 ten thousand, and the preset stepping value is 5 thousand is returned to the user, and the technical personnel in the field can set the conditions flexibly.
In order to reliably set a target financial product in an on-sale state, in a preferred embodiment of the present invention, the on-sale state is triggered when the target financial product satisfies a preset saleable condition, the preset saleable condition includes that product information of the target financial product exists, the target financial product is saleable, and the target financial product is within a preset purchase time.
Those skilled in the art can select other preset saleable conditions according to actual needs, which does not affect the protection scope of the present application.
Step S102, if the purchase amount is not larger than the total amount, determining the queue length of the purchase queue from the cache database.
In this embodiment, if the purchase amount is not greater than the total amount, which indicates that the target financial product is not sold out, the queue length of the purchase queue is determined from the cache database, where the queue length represents the current number of purchasers of the target financial product.
And step S103, if the queue length of the purchase queue is less than the number of appointed persons and the available balance of the user is not less than the purchase amount, locking the purchase amount, adding the purchase amount and the completed purchase amount to obtain a new completed purchase amount, and adding one to the number of the purchased persons.
In this embodiment, in order to increase the response speed, the current number of purchasers of the target financial product is limited to the designated number, if the queue length of the purchase queue is smaller than the designated number and the available balance of the user is not smaller than the purchase amount, it is described that the condition of locking the purchase amount is satisfied at this time, the purchase amount is locked, and the purchase amount and the completed purchase amount are added, so as to determine a new completed purchase amount, and add one to the number of purchasers.
In the preferred embodiment of the present application, the specified number is 200.
The specific manner for obtaining the available balance of the user is obvious to those skilled in the art, and will not be described herein.
In order to ensure the reliability and efficiency of competitive allocation, in a preferred embodiment of the present application, after determining the queue length of the purchase queue from the cache database, the method further includes:
if the queue length is larger than the designated number of people, returning a prompt message that the products are sold out to the user;
and if the queue length is equal to the designated number of people, the purchase times of the user are more than one and not more than the preset times, and the available balance is not less than the purchase amount, locking the purchase amount.
In this embodiment, if the queue length is greater than the specified number of people, it indicates that the current number of people purchasing the target financial product is too large, and the target financial product cannot be purchased any more, and a prompt message that the product is sold out is returned to the user;
if the queue length is equal to the number of appointed persons, and the number of times of purchase of the user is greater than one and not greater than the preset number of times, the user is indicated to be the user who purchased before, the number of current purchasing persons cannot be changed when the same user purchases again within the preset number of times, namely the queue length cannot be changed, the queue length cannot be greater than the number of appointed persons, at the moment, if the available balance is not less than the purchasing amount, the purchasing amount can be locked, the purchasing amount and the completed purchasing amount are added to obtain a new completed purchasing amount, and the number of the purchased persons is increased by one.
In order to ensure the reliability and efficiency of competitive allocation, in a preferred embodiment of the present application, after determining the queue length of the purchase queue from the cache database, the method further includes:
and if the queue length is equal to the designated number of people and the purchase times is one or more than the preset times, returning a prompt message that the products are sold out to the user.
In this embodiment, if the queue length is equal to the specified number of people and the number of times of purchase is one, it indicates that the user is the first user who purchased the product, and the user may cause the queue length to be greater than the specified number of people, so that a prompt message that the product is sold out is returned to the user; if the queue length is equal to the designated number of people and the purchase times are larger than the preset times, indicating that the purchase times of the user are too many, and returning a prompt message that the products are sold out to the user.
In order to improve competitive distribution efficiency, in a preferred embodiment of the present application, the cache database is a Redis database, the purchase amount is locked after operating the cache database based on a lua script, and before placing the target financial product in the on-sale state, the method further includes:
configuring the total amount, the completed purchase amount, and the number of purchasers in the initialized cache database based on initialization instructions.
Specifically, a Remote Dictionary service (Remote Dictionary Server) is an open source log-type and Key-Value database written in ANSI C language, supporting network, based on memory and persistent, and provides API in multiple languages. The Redis database may be operated to lock the purchase amount based on the lua script, and the specific locking process will be apparent to those skilled in the art and will not be described herein. To improve the efficiency of competitive distribution, the total amount, the completed purchase amount, and the number of purchasers are configured in an initialized cache database (i.e., Redis database) based on the initialization instructions prior to placing the target financial product in an on-sale state.
In order to improve the user experience, in a preferred embodiment of the present application, the method further includes:
if the available balance is less than the purchase amount, sending prompt information for allowing the user to change the purchase amount;
and if a message which is sent by the user and allows the purchase amount to be changed is received, updating the purchase amount based on the available balance.
In this embodiment, sometimes, although the user submits the purchase amount, the available balance of the user is not enough to pay the purchase amount, at this time, in order to make the user purchase smoothly, a prompt message of whether to allow the purchase amount to be changed is sent to the user, if the user wants to continue to purchase, a message of allowing the purchase amount to be changed is sent, at this time, the available balance can be replaced by the purchase amount, so that the target financial product can be purchased by using the available balance.
It will be appreciated that if a prompt is received that does not allow the purchase amount to be changed, a prompt is returned to the user that the purchase failed.
And step S104, if the new finished purchase amount is not more than the total amount, returning a payment interface corresponding to the purchase amount to the user so as to finish payment for the user.
In this embodiment, if the new completed purchase amount is not greater than the total amount, which indicates that the target financial product is not sold out at this time, a payment interface corresponding to the purchase amount is returned to the user, so that the user completes payment, and the payment interface can be obtained by calling an order placing interface. And after the user finishes payment, storing the transaction information.
To reliably complete the competitive allocation, in some embodiments of the subject application, the batch interface is invoked to send a purchase request to a seller of the target financial product after the target financial product is sold out to complete the purchase of the supply chain financial product. The seller may be a financial platform or a bank.
To improve the efficiency and reliability of competitive distribution, in a preferred embodiment of the present application, after adding one to the number of purchased people, the method further comprises:
and if the new finished purchase amount is larger than the total amount, unlocking the purchase amount, reducing the number of the purchased people by one, and returning a prompt message of purchase failure to the user.
In this embodiment, even if the purchase amount is locked, the target financial product may be purchased by other users due to high concurrency conditions, i.e., the target financial product may be sold out. If the new completed purchase amount is larger than the total amount, which indicates that the target financial product is sold out due to high concurrency conditions, the locking of the purchase amount needs to be released, the number of the purchased people is reduced by one, and a prompt message of purchase failure is returned to the user.
By applying the technical scheme, when a purchase request for a target financial product sent by a user is received, the target financial product is in a sale state, and the purchase amount in the purchase request meets a preset verification condition, the completed purchase amount and the total amount of the target financial product are determined from a buffer database; if the purchase amount is not larger than the total amount, determining the queue length of a purchase queue from the cache database; if the queue length is less than the designated number of people and the available balance of the user is not less than the purchase amount, locking the purchase amount, adding the purchase amount and the completed purchase amount to obtain a new completed purchase amount, and adding one to the number of the purchased people; if the new finished purchase amount is not larger than the total amount, returning a payment interface corresponding to the purchase amount to the user so that the user finishes payment; the queue length represents the current number of purchasers of the target financial product, so that the response speed when competitive distribution of supply chain financial products is carried out under high concurrency conditions is improved, and the user experience is further improved.
In order to further illustrate the technical idea of the present invention, the technical solution of the present invention will now be described with reference to specific application scenarios.
The embodiment of the application provides a competitive distribution method of supply chain financial products, the default scene of competitive distribution is to rob a target financial product, the limiting condition is that the product must be sold and the number of purchasers cannot exceed the number of appointed persons, because the number of the robers is more, the purchase data is highly concurrent, and the user cannot be allowed to wait too long for improving the user experience, a quick response mechanism is needed, the method comprises the following steps:
step one, before the target financial product is sold, the sales limit of the target financial product needs to be configured in an initialized Redis database, wherein the sales limit comprises the total amount of the target financial product, the completed purchase amount and the total number of purchased persons.
And step two, when the product information of the target financial product exists and the target financial product can be sold and the target financial product is in a preset purchasing time, the target financial product is placed in a selling state.
And step three, when a purchase request for the target financial product sent by the user is received, judging whether the purchase amount in the purchase request is not less than the minimum purchase amount, the purchase amount is not more than the maximum purchase amount, the purchase amount meets the requirement of a preset stepping value, and if so, determining the finished purchase amount and the total amount of the target financial product from the caching database. Otherwise, corresponding prompt information is returned to the user so that the user can change the purchase amount according to the preset verification condition.
And step four, if the purchase amount is not more than the total amount, determining the queue length of the purchase queue from the buffer database, otherwise, returning a prompt message that the products are sold out to the user.
Step five, if the queue length is less than the number of the appointed persons, the available balance of the user is not less than the purchase amount, and the available balance is not less than the purchase amount, or if the queue length is equal to the number of the appointed persons, the purchase frequency of the user is more than one and not more than the preset frequency, and the available balance is not less than the purchase amount, operating a Redis database based on the lua script to lock the purchase amount, adding the purchase amount and the completed purchase amount to obtain a new completed purchase amount, and adding one to the number of the purchased persons;
if the queue length is larger than the designated number of people, or the queue length is equal to the designated number of people and the purchase times is one, or the queue length is equal to the designated number of people and the purchase times is larger than the preset times, returning a prompt message that the products are sold out to the user;
if the available balance is smaller than the purchase amount, sending prompt information for allowing the user to change the purchase amount, and if the message for allowing the user to change the purchase amount is received, updating the purchase amount based on the available balance.
Step six, if the new finished purchase amount is not larger than the total amount, returning a payment interface corresponding to the purchase amount to the user so as to enable the user to finish payment; and if the new finished purchase amount is larger than the total amount, unlocking the purchase amount, rolling back the data, reducing the number of the purchased persons by one, and returning a prompt message of purchase failure to the user.
And seventhly, after the user finishes payment, storing transaction information, and after the target financial product is sold out, calling a batch interface to send a purchase request to a bank so as to finish purchasing the supply chain financial product.
Corresponding to the competitive distribution method of supply chain financial products in the embodiment of the present application, the embodiment of the present application further provides a competitive distribution device of supply chain financial products, as shown in fig. 2, the device includes:
a first determining module 201, configured to determine, from a cache database, a completed purchase amount and a total amount of a target financial product when a purchase request for the target financial product sent by a user is received, the target financial product is in an on-sale state, and a purchase amount in the purchase request meets a preset verification condition;
a second determining module 202, configured to determine, if the purchase amount is not greater than the total amount, a queue length of a purchase queue from the cache database;
an obtaining module 203, configured to lock the purchase amount, add the purchase amount to the completed purchase amount to obtain a new completed purchase amount, and add one to the number of purchased persons, if the queue length of the purchase queue is smaller than the specified number of persons and the available balance of the user is not smaller than the purchase amount;
the payment module 204 is configured to return a payment interface corresponding to the purchase amount to the user if the new completed purchase amount is not greater than the total amount, so that the user completes payment;
wherein the queue length characterizes a current number of purchases of the target financial product.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not necessarily depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (10)

1. A method for competitive distribution of supply chain financial products, the method comprising:
when a purchase request for a target financial product sent by a user is received, the target financial product is in a sale state, and the purchase amount in the purchase request meets a preset verification condition, determining the finished purchase amount and the total amount of the target financial product from a buffer database;
if the purchase amount is not larger than the total amount, determining the queue length of a purchase queue from the cache database;
if the queue length is less than the designated number of people and the available balance of the user is not less than the purchase amount, locking the purchase amount, adding the purchase amount and the completed purchase amount to obtain a new completed purchase amount, and adding one to the number of the purchased people;
if the new finished purchase amount is not larger than the total amount, returning a payment interface corresponding to the purchase amount to the user so that the user finishes payment;
wherein the queue length characterizes a current number of purchases of the target financial product.
2. The method of claim 1, wherein after determining the queue length of the buy queue from the cache database, the method further comprises:
if the queue length is larger than the designated number of people, returning a prompt message that the products are sold out to the user;
and if the queue length is equal to the designated number of people, the purchase times of the user are more than one and not more than the preset times, and the available balance is not less than the purchase amount, locking the purchase amount.
3. The method of claim 2, wherein after determining the queue length of the buy queue from the cache database, the method further comprises:
and if the queue length is equal to the designated number of people and the purchase times is one or more than the preset times, returning a prompt message that the products are sold out to the user.
4. The method of claim 1, wherein after adding one to the number of purchased people, the method further comprises:
and if the new finished purchase amount is larger than the total amount, unlocking the purchase amount, reducing the number of the purchased people by one, and returning a prompt message of purchase failure to the user.
5. The method of claim 1, wherein the cache database is a Redis database, the purchase amount is locked after operating the cache database based on a lua script, the method further comprising, prior to placing the target financial product in the on-sale state:
configuring the total amount, the completed purchase amount, and the number of purchasers in the initialized cache database based on initialization instructions.
6. The method of claim 1, wherein after receiving a purchase request for a target financial product sent by a user, the method further comprises:
if the purchase amount does not accord with the preset verification condition, returning prompt information corresponding to the preset verification condition to the user so that the user can change the purchase amount according to the preset verification condition;
the preset verification condition comprises that the purchase amount is not less than the minimum purchase amount, the purchase amount is not more than the maximum purchase amount, and the purchase amount meets the requirement of a preset stepping value.
7. The method of claim 1, wherein the method further comprises:
if the available balance is less than the purchase amount, sending prompt information for allowing the user to change the purchase amount;
and if a message which is sent by the user and allows the purchase amount to be changed is received, updating the purchase amount based on the available balance.
8. The method of claim 1, wherein the on-sale state is triggered when the target financial product meets a preset saleable condition, the preset saleable condition including that product information of the target financial product exists and the target financial product is saleable, and the target financial product is within a preset purchase time.
9. An apparatus for competitive distribution of supply chain financial products, the apparatus comprising:
the system comprises a first determining module, a second determining module and a third determining module, wherein the first determining module is used for determining the finished purchase amount and the total amount of a target financial product from a buffer database when a purchase request of the target financial product sent by a user is received, the target financial product is in a sale state, and the purchase amount in the purchase request meets a preset verification condition;
a second determining module, configured to determine a queue length of a purchase queue from the cache database if the purchase amount is not greater than the total amount;
the acquisition module is used for locking the purchase amount if the queue length of the purchase queue is less than the number of appointed persons and the available balance of the user is not less than the purchase amount, adding the purchase amount and the completed purchase amount to acquire a new completed purchase amount, and adding one to the number of purchased persons;
the payment module is used for returning a payment interface corresponding to the purchase amount to the user to enable the user to complete payment if the new completed purchase amount is not larger than the total amount;
wherein the queue length characterizes a current number of purchases of the target financial product.
10. A computer-readable storage medium having stored therein instructions that, when executed on a terminal device, cause the terminal device to perform a method of competitive distribution of supply chain financial products as claimed in any one of claims 1 to 8.
CN202110841971.9A 2021-07-26 2021-07-26 Competitive distribution method and device for supply chain financial products Pending CN113283825A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110841971.9A CN113283825A (en) 2021-07-26 2021-07-26 Competitive distribution method and device for supply chain financial products

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110841971.9A CN113283825A (en) 2021-07-26 2021-07-26 Competitive distribution method and device for supply chain financial products

Publications (1)

Publication Number Publication Date
CN113283825A true CN113283825A (en) 2021-08-20

Family

ID=77281337

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110841971.9A Pending CN113283825A (en) 2021-07-26 2021-07-26 Competitive distribution method and device for supply chain financial products

Country Status (1)

Country Link
CN (1) CN113283825A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3282415A1 (en) * 2015-03-27 2018-02-14 Nam, Ki-won System for providing changing interest rate financial product that is connected to expenditure
CN109584078A (en) * 2018-10-22 2019-04-05 中国平安人寿保险股份有限公司 Fund applies to purchase management method, device, computer readable storage medium and server
CN111242762A (en) * 2019-12-31 2020-06-05 广东华兴银行股份有限公司 Financial product purchasing method, device and system
CN112884181A (en) * 2021-01-26 2021-06-01 中国建设银行股份有限公司 Quota information processing method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3282415A1 (en) * 2015-03-27 2018-02-14 Nam, Ki-won System for providing changing interest rate financial product that is connected to expenditure
CN109584078A (en) * 2018-10-22 2019-04-05 中国平安人寿保险股份有限公司 Fund applies to purchase management method, device, computer readable storage medium and server
CN111242762A (en) * 2019-12-31 2020-06-05 广东华兴银行股份有限公司 Financial product purchasing method, device and system
CN112884181A (en) * 2021-01-26 2021-06-01 中国建设银行股份有限公司 Quota information processing method and device

Similar Documents

Publication Publication Date Title
CN112132662B (en) Commodity second killing method and device, computer equipment and storage medium
US9659319B2 (en) Method, medium, and system for processing resource returns
US11816658B2 (en) Systems and methods for real-time virtual gift card purchasing
CN112817995A (en) Data processing method and device, electronic equipment and storage medium
US20150206145A1 (en) Id management device, id management method, and id management program
CN111930786A (en) Resource acquisition request processing system, method and device
KR102192937B1 (en) Transaction mediating system
CN114170010A (en) Matching transaction method and device, electronic equipment and storage medium
CN113283825A (en) Competitive distribution method and device for supply chain financial products
US8682787B1 (en) Trade-in program with advance payment
CN112801722A (en) Method and system for issuing invoice after caching
US20190311335A1 (en) Systems and methods for in-application content management
JP2000315226A (en) Cash back clearing method and cash back clearing device
TW202025067A (en) Order checkout device, recording medium and order checkout method capable of simplifying order checkout and improving user convenience
US20220122003A1 (en) Group ticket reservation system and method
CN111415245A (en) Account opening method and device
US20240104646A1 (en) System and method for advanced credit line increase
CN111061573A (en) Resource transfer method, device, electronic equipment and storage medium
CN111292028A (en) Inventory information processing method and system, computer system and readable storage medium
KR102662576B1 (en) Method for providing of generating relationships for providing reservation substitute payment process to affiliated seller and system using the same
CN113706045B (en) Funds payment method, apparatus, device, medium and program product
CN112995244B (en) Subscription withholding method, resource access method and equipment
US20230368189A1 (en) System and method for purchasing customized non-fungible tokens
US20220114589A1 (en) Aggregated transaction accounts
CN116542754A (en) Request response method, device, equipment and storage medium

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20210820

RJ01 Rejection of invention patent application after publication