CN111080272A - Payment method and device for purchasing products in APP - Google Patents

Payment method and device for purchasing products in APP Download PDF

Info

Publication number
CN111080272A
CN111080272A CN201911133465.3A CN201911133465A CN111080272A CN 111080272 A CN111080272 A CN 111080272A CN 201911133465 A CN201911133465 A CN 201911133465A CN 111080272 A CN111080272 A CN 111080272A
Authority
CN
China
Prior art keywords
target product
app
product data
product
client device
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
CN201911133465.3A
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 QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology 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 QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201911133465.3A priority Critical patent/CN111080272A/en
Publication of CN111080272A publication Critical patent/CN111080272A/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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/08Payment architectures
    • G06Q20/085Payment architectures involving remote charge determination or related payment systems
    • G06Q20/0855Payment architectures involving remote charge determination or related payment systems involving a third party
    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/30Payment architectures, schemes or protocols characterised by the use of specific devices or networks
    • G06Q20/32Payment architectures, schemes or protocols characterised by the use of specific devices or networks using wireless devices
    • G06Q20/325Payment architectures, schemes or protocols characterised by the use of specific devices or networks using wireless devices using wireless networks

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Engineering & Computer Science (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Finance (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the invention provides a payment method and a payment device for purchasing products in an APP (application), wherein the method comprises the following steps: after the APP is started, product data of each product in the APP are obtained from an application store and stored in a buffer pool in the APP client device; obtaining a target product selected by a user in an APP; if the buffer pool in the APP client device is detected to contain the target product data of the target product, reading the target product data of the target product from the buffer pool in the APP client device; and sending a fee deduction request containing the target product data to the application store so as to enable the application store to carry out purchase fee deduction. Therefore, by applying the embodiment of the invention, after the user selects the target product, if the buffer pool in the APP client device is detected to contain the target product data of the target product, the target product data of the target product is read from the buffer pool in the APP client device, and the obtaining process is irrelevant to the current network condition, so that the probability of payment failure is reduced.

Description

Payment method and device for purchasing products in APP
Technical Field
The invention relates to the technical field of purchase of application program APP products, in particular to a payment method and device for purchasing products in an APP.
Background
At present, in the process of purchasing a product in an application program APP, after a user selects a product to be purchased, during payment, the user needs to go to an application server corresponding to the APP to obtain a product ID of the product to be purchased, then go to an application Store (APP Store) corresponding to the platform to obtain product data of the product to be purchased, and then return the obtained product data to the APP Store to make a purchase deduction.
However, in the payment process, if a network problem such as a slow network speed occurs, the payment may fail.
Disclosure of Invention
The embodiment of the invention aims to provide a payment method and a payment device for purchasing products in an APP (application), so as to reduce the probability of payment failure. The specific technical scheme is as follows:
in a first aspect of the embodiments of the present invention, there is provided a payment method for purchasing a product in APP, applied to an APP client device, the method including:
after the APP is started, acquiring product data of each product in the APP from an application store, and storing the product data to a buffer pool in the APP client device; the buffer pool is used for storing product data of each product in the APP;
obtaining a target product selected by a user in the APP;
if the buffer pool in the APP client device is detected to contain the target product data of the target product, reading the target product data of the target product from the buffer pool in the APP client device;
and sending a fee deduction request containing the target product data to an application store so as to enable the application store to carry out purchase fee deduction.
Optionally, after the APP is started, the step of obtaining product data of each product in the APP from an APP store and storing the product data to a buffer pool in the APP client device includes:
when the APP is started to reach the preset time, obtaining product identifications corresponding to products in the APP;
acquiring each product data corresponding to each product identification from an application store; the product data comprises a product identification;
storing each product data to a buffer pool in the APP client device;
after the step of obtaining the target product selected by the user in the APP, the method further includes:
acquiring a target product identifier corresponding to the target product;
the step of reading the target product data of the target product from the buffer pool in the APP client device if it is detected that the buffer pool in the APP client device contains the target product data of the target product includes:
and if the buffer pool in the APP client device is detected to contain the target product data of the target product, reading the target product data corresponding to the target product identification from the buffer pool in the APP client device.
Optionally, the product data carries product parameters, and after the step of reading the target product data of the target product from the buffer pool in the APP client device, the method further includes:
judging whether the product parameters carried by the target product data are target product parameters or not;
and if the product parameters carried by the target product data are not the target product parameters, acquiring the target product data from an application store, and storing the acquired target product data to a buffer pool in the APP client device.
Optionally, the step of obtaining each product identifier corresponding to each product in the APP includes:
and obtaining each product identifier corresponding to each product in the APP from a product identifier list in a program application file in which the APP is pre-stored.
Optionally, the method further includes:
and if the buffer pool in the APP client device does not contain the target product data of the target product, acquiring the target product data of the target product from an application store, storing the target product data into the buffer pool in the APP client device, and executing the step of sending the fee deduction request containing the target product data to the application store.
In a second aspect of the present invention, there is also provided an apparatus for purchasing payment for a product in APP, applied to an APP client device, the apparatus including:
the product data storage unit is used for acquiring product data of each product in the APP from an application store after the APP is started and storing the product data to a buffer pool in the APP client device; the buffer pool is used for storing product data of each product in the APP;
the target product obtaining unit is used for obtaining a target product selected by a user in the APP;
a target product data reading unit, configured to read target product data of the target product from a buffer pool in the APP client device if it is detected that the buffer pool in the APP client device contains the target product data of the target product;
and the sending unit is used for sending the fee deduction request containing the target product data to an application store so as to enable the application store to carry out purchase fee deduction.
Optionally, the product data saving unit includes:
the product identification acquisition module is used for acquiring each product identification corresponding to each product in the APP when the APP is started to reach the preset time;
the product data acquisition module is used for acquiring each product data corresponding to each product identification from an application store; the product data comprises a product identification;
a product data storage module, configured to store each piece of product data to a buffer pool in the APP client device;
the device, still include: the target product identification obtaining unit is used for obtaining a target product identification corresponding to a target product after the target product obtaining unit obtains the target product selected by a user in the APP;
the target product data reading unit includes:
and the target product data reading module is used for reading the target product data corresponding to the target product identification from the buffer pool in the APP client device if the buffer pool in the APP client device is detected to contain the target product data of the target product.
Optionally, the product data carries product parameters, and the apparatus further includes:
the judging unit is used for judging whether a product parameter carried by the target product data is a target product parameter or not after the target product data of the target product is read from a buffer pool in the APP client device by the target product data reading unit; and if the product parameters carried by the target product data are not the target product parameters, acquiring the target product data from an application store, and storing the acquired target product data to a buffer pool in the APP client device.
Optionally, the product identifier obtaining module is specifically configured to:
when the APP starts to reach the preset time, obtaining each product identification corresponding to each product in the APP from a product identification list in a program application file in which the APP is stored in advance.
Optionally, the apparatus further includes:
and the target product data storage unit is used for acquiring the target product data of the target product from an application store if the buffer pool in the APP client device is detected not to contain the target product data of the target product, storing the target product data into the buffer pool in the APP client device, and triggering the sending unit to send the fee deduction request containing the target product data to the application store.
In another aspect of the present invention, there is also provided an electronic device, including a processor, a communication interface, a memory and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing any method step for purchasing payment of products in the APP when executing the program stored in the memory.
In yet another aspect of the present invention, there is also provided a computer-readable storage medium having stored therein instructions which, when run on a computer, cause the computer to perform any of the above-described payment methods for purchasing a product within an APP.
In yet another aspect of the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform any of the above-described payment methods for purchasing a product within an APP.
According to the payment method and device for purchasing products in APP, provided by the embodiment of the invention, after the APP is started, product data of each product in the APP is obtained from an application store and stored in a buffer pool in APP client equipment; the buffer pool is used for storing product data of each product in the APP; obtaining a target product selected by a user in the APP; reading target product data of the target product from a buffer pool in the APP client device; and sending a fee deduction request containing the target product data to an application store so as to enable the application store to carry out purchase fee deduction. Therefore, by applying the embodiment of the present invention, after the APP is started, the product data of each product in the APP is obtained from the APP store and stored in the buffer pool in the APP client device, so that after the user selects the target product, if it is detected that the buffer pool in the APP client device contains the target product data of the target product, the target product data of the target product is directly read from the buffer pool in the APP client device, and the obtaining process is unrelated to the current network condition, thereby reducing the probability of payment failure.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
FIG. 1 is a flow chart of a payment method for purchasing a product in APP provided by an embodiment of the present invention;
FIG. 2 is another flow chart of a payment method for purchasing products in APP according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a buffer pool for storing each product data in an APP client device according to an embodiment of the present invention;
FIG. 4a is an example of a payment process in the related art;
FIG. 4b is an example of a payment process according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of an apparatus for purchasing payment for a product in APP provided by an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention.
In order to reduce the failure probability when a product is purchased in an application program APP and paid, the embodiment of the invention provides a payment method and device for purchasing the product in the APP.
The payment method for purchasing the products in the APP provided by the embodiment of the invention can be applied to any electronic equipment needing to purchase the products in the APP for payment, such as: a computer or a mobile terminal, etc., which are not limited herein. For convenience of description, the electronic device is hereinafter referred to simply as an electronic device.
Referring to fig. 1, a payment method for purchasing a product in APP according to an embodiment of the present invention is applied to a client device, and as shown in fig. 1, a specific processing flow of the method may include:
and S101, after the APP is started, acquiring product data of each product in the APP from an application store, and storing the product data to a buffer pool in the APP client device.
The method can be implemented, and the product data of all products in the APP can be acquired from the application store and stored in the buffer pool in the APP client device. In a specific embodiment, when the APP starts up to reach a preset time, obtaining product identifiers corresponding to products in the APP; acquiring each product data corresponding to each product identification from an application store; the product data comprises a product identification; and storing the product data to a buffer pool in the APP client device. The preset time may be 1s, 2s, or 3s, and the like, and is not particularly limited herein.
And S102, obtaining a target product selected by the user in the APP.
The user can click the payment button preset on the APP page to select the target product, and the product in the APP page can be checked to select the purchased target product.
The method can be implemented, and the target product identification corresponding to the target product can be obtained after the target product selected by the user is obtained.
Step S103, if the buffer pool in the APP client device is detected to contain the target product data of the target product, reading the target product data of the target product from the buffer pool in the APP client device.
In an implementation manner, if it is detected that the buffer pool in the APP client device contains the target product data of the target product, the target product data corresponding to the target product identifier may be read from the buffer pool in the APP client device.
And step S104, sending the fee deduction request containing the target product data to an application store so as to enable the application store to carry out purchase fee deduction.
Therefore, by applying the embodiment of the invention, after the APP is started, the product data of each product in the APP is obtained from the application store and stored in the buffer pool in the APP client device, so that after the user selects the target product, if the buffer pool in the APP client device is detected to contain the target product data of the target product, the target product data of the target product is directly read from the buffer pool in the APP client device, the obtaining process is irrelevant to the current network condition, and the probability of payment failure is reduced.
The embodiment of the invention can be applied to a plurality of scenes, such as:
scene one: the APP page needs to be displayed first, and then the payment is carried out.
For example, when a user first views a target product in a page in an APP, after the APP is started, acquiring product data of each product in the APP from an application store, storing the product data into the APP client device, after the target product to be checked selected by the user is obtained, the target product data of the target product to be checked is read from the APP client device, displaying the target product information on a user interface for a user to browse according to the target product data, when the user selects a target product in the APP for payment, if it is detected that the buffer pool in the APP client device contains target product data of the target product, reading target product data of the target product from a buffer pool in the APP client device, and sending a fee deduction request containing the target product data to an application store so as to enable the application store to carry out purchase fee deduction.
Because the target product data of the target product can be read from the APP client device during payment, the probability of payment failure is reduced regardless of network conditions. And when the target product information is displayed on a user interface for a user to browse, the display speed is improved, and the user experience is high.
Scene two: in some services, product information which can be displayed is preset in an APP page, but there is no product data, and at this time, although a user can browse the product information, the user still needs to acquire the product data during payment.
By applying the embodiment of the invention, after the APP is started, the product data of each product in the APP can be acquired from the application store and stored in the buffer pool in the APP client device, and when the target product selected by the user is obtained for payment, if the buffer pool in the APP client device is detected to contain the target product data of the target product, the target product data of the target product can be read from the buffer pool in the APP client device. Because the target product data of the target product can be read from the buffer pool in the APP client device during payment, the probability of payment failure is reduced regardless of network conditions.
Another flowchart of a payment method for purchasing a product in an APP provided in an embodiment of the present invention, as shown in fig. 2, may include:
step S201, when the APP starts to reach the preset time, obtaining each product identification corresponding to each product in the APP from a product identification list in a program application file in which the APP is stored in advance.
In an implementation manner, each product identifier may be packaged in a program application file corresponding to the APP in the form of a property list file plist. For example: the apple product identification may be packaged in an IPA bag.
Step S202, obtaining each product data corresponding to each product identification from the application store.
It may be implemented that the product data includes a product identifier.
The APP client device sends a request for obtaining product data containing each product identifier to the application store; and receiving each product data corresponding to each product identification returned by the application store. All product identifications can be included in the request; of course, if there are too many product identifiers corresponding to the products in the APP, all the product identifiers may be divided into preset batches, and a request may be sent to the APP store.
If the product data is a SKProduct model object, this step is to obtain each SKProduct model object corresponding to each product identifier from an application store.
And step S203, storing the product data to a buffer pool in the APP client device.
In practice, the buffer pool may be located in the random access memory or the read-only memory, and stores each product data in at least two ways.
The first mode is as follows: the buffer pool is located in the random access memory. And only storing the product data to a buffer pool in a random storage memory in the APP client device. If the product quantity of APP is few, the product data volume of the product in APP is small, and this way can be used, although the space of part of random access memory, namely the running memory, is occupied, because the data volume is small, the influence on the equipment running is not great.
The second mode is as follows: the buffer pool is located in the read-only memory. And storing each product data into a random storage memory in the APP client device, and then storing each product data into a buffer pool in a read-only memory from the random storage memory.
The mode does not occupy the random storage memory as much as possible, namely the space of the operating memory, and can reduce the influence of product data on the operation of equipment to a greater extent.
Specifically, each SKProduct model object obtained from an application store may be archived as each QYSKProduct model object in a random storage memory; then a plurality of threads are created; and storing each product data, namely the QYSKProduct model object, to a buffer pool in a read-only memory in the APP client equipment by using a plurality of threads. In this way, the main thread can be prevented from being blocked from running.
For example: if the APP client device is a computer, the product data can be stored in the memory first and then stored in the buffer pool on the hard disk, and the product data in the memory is released. If the APP client device is a mobile terminal such as a mobile phone, the data of each product can be stored in the running memory first, and then stored in the buffer pool in the non-running memory from the running memory, and each product data in the running memory is released.
For example: on the device based on the mobile operating system iOS of the apple company, each product data corresponding to each product identifier can be acquired from an application store of the apple company to an automatic release pool autoReleasePool in a random storage memory, each product data is stored in a buffer pool in a read-only storage memory by using a plurality of threads from the automatic release pool autoReleasePool, each product data in the automatic release pool autoReleasePool in the random storage memory is released, and a memory space is recovered. In this way, the occupied random memory space can be released, and the phenomena of jamming and the like can be prevented.
And step S204, obtaining a target product selected by the user in the APP.
Step S205, acquiring a target product identifier corresponding to the target product.
The method can be implemented, and the target product identifier corresponding to the target product can be obtained from an application server corresponding to the APP;
a target product identifier corresponding to the target product can also be obtained from a product identifier list pre-stored in the APP client device; and if the target product identification cannot be obtained, obtaining the target product identification corresponding to the target product from the application server corresponding to the APP.
According to actual needs, research and development personnel can set the target product identifier according to actual needs, and the target product identifier corresponding to the target product can be acquired by one of the modes.
Step S206, detecting whether a buffer pool in the APP client device contains target product data corresponding to the target product identification.
Alternatively, the target product data may be a target QYSKProduct model object, corresponding to the above steps.
If the buffer pool in the APP client device is detected to contain the target product data corresponding to the target product identifier, executing step S207; and if the buffer pool in the APP client device is detected not to contain the target product data corresponding to the target product identifier, executing step S208.
Step S207, if it is detected that the buffer pool in the APP client device contains the target product data, reading the target product data from the buffer pool in the APP client device. Step S209 is performed.
If the target product data are detected, the target product data are read from the APP client device, and time can be saved.
Step S208, if the buffer pool in the APP client device is detected not to contain the target product data, the target product data corresponding to the target product identification is obtained from an application store and stored in the buffer pool in the APP client device. Step S211 is performed.
In an implementation manner, when the target product is a newly added product and the target product identifier is not preset in the application file of the APP pre-stored in the client device, the target product data cannot be detected. Target product data corresponding to the target product identification can be acquired from an application store and stored in the APP client device.
And if the buffer pool in the APP client device does not contain the target product data, at least the following three ways are used for processing after the target product data corresponding to the target product identifier is obtained from the application store.
The first mode is as follows: the obtained target product data may be first stored in a buffer pool in the APP client device, and then step S211 is executed.
The second mode is as follows: step S211 is executed first, and then the obtained target product data is stored in the buffer pool in the APP client device. In this way, payment time is saved even more because the request containing the target product data is sent to the application store first.
The third mode is as follows: after target product data is acquired from an application store, after it is judged that product parameters carried by the target product data are target product parameters, the acquired target product data is stored in a buffer pool in the APP client device, and then step S211 is executed; and if the target product parameter is not the target product parameter, acquiring the target product data from the application store again.
Step S209, determining whether the product parameter carried by the target product data is a target product parameter.
In practice, the product data carries product parameters, and whether the product parameters of the target product data are target product parameters or not can be judged. For example: and judging whether the QYSKProduct model object is correct or not according to whether the attribute localizedtite value of the QYSKProduct model object is null or whether the price value is null or not, and judging that the product parameters carried by the target product data are not the target product parameters if the value is null.
If the result of the judgment is no, that is, the product parameter carried by the target product data is not the target product parameter, executing step S210; if the result of the determination is yes, that is, the product parameter carried by the target product data is the target product parameter, step S211 is executed.
Step S210, target product data are obtained from an application store, and the obtained target product data are stored in a buffer pool in the APP client device.
In an implementation manner, if the product parameter carried by the target product data is not the target product parameter, it indicates that the target product data in the buffer pool is erroneous, and at least the following three ways may be performed after the target product data in the buffer pool is set to be invalid and deleted.
The first mode is as follows: after the target product data is obtained from the APP store, the obtained target product data may be stored in a buffer pool in the APP client device, and then step S211 is executed.
The second mode is as follows: after the target product data is acquired from the APP store, step S211 is executed first, and then the acquired target product data is stored in a buffer pool in the APP client device. In this way, payment time is saved even more because the target product data is returned to the application store first.
The third mode is as follows: after the target product data is acquired from the application store, the acquired target product data can be stored in a buffer pool in the APP client device after the product parameter carried by the target product data is judged to be the target product parameter, and step S211 is executed; and if the target product parameter is not the target product parameter, acquiring the target product data from the application store again.
Step S211, sending the fee deduction request containing the target product data to an application store, so that the application store carries out purchase fee deduction.
Therefore, by applying the embodiment of the invention, after the APP is started, the product data of each product in the APP is obtained from the application store and stored in the buffer pool in the APP client device, so that after the user selects the target product, if the buffer pool in the APP client device is detected to contain the target product data of the target product, the target product data of the target product is directly read from the buffer pool in the APP client device, the obtaining process is irrelevant to the current network condition, and the probability of payment failure is reduced.
Moreover, by applying the embodiment, it can be determined whether the product parameter carried by the target product data is the target product parameter, and when it is determined that the target product parameter is not the target product parameter, for example, when it is determined that a title of a product is missing or a price is missing, the target product data in the cache pool can be set to be deleted in an invalid manner, and the target product data is obtained from the application store again and stored in the cache pool in the APP client device, so that the payment is ensured to be executed continuously, and the user experience is improved.
As shown in fig. 3, a schematic diagram of storing each product data to a buffer pool in the APP client device in the foregoing embodiment is shown in fig. 3, and includes:
the method comprises the steps that product data 1, product data 2, product data 3, product data 4, product data 5, product data 6 and other product data are obtained from an application store and are sent to an automatic release pool autoReleasePool in a random storage memory;
and storing each product data into a buffer pool of a read-only memory by using a plurality of threads from the automatic release pool autoReleasePool. Here two threads are taken as an example. The system allocates resources to submit individual product data to each thread's Queue. The product data 1, the product data 3 and the product data 5 are submitted to a thread in a block form; the product data 2, the product data 4 and the product data 6 are submitted in block form to another thread. One thread is asynchronous with another thread. In each thread, it is processed serially.
Therefore, the multiple threads are utilized, and the phenomenon that the work of the main thread is blocked when the product data in the APP is more is prevented. Moreover, each thread is processed in series, so that the same product data is prevented from being accessed by a plurality of threads at the same time, and the integrity of the product data is ensured.
And after storing each product data into the read-only memory, releasing each product data in the automatic release pool autoReleasePool in the random memory, and recycling the space of the random memory. In this way, the occupied random memory space can be released, and the phenomena of jamming and the like can be prevented.
Hereinafter, a description will be made of a payment flow example purchased in APP in the related art in comparison with a payment flow example purchased in APP of an embodiment of the present invention.
Fig. 4a shows an example of a payment process in the related art; fig. 4b shows an example of a payment process according to an embodiment of the present invention.
In the related art, as shown in fig. 4a, the payment process includes the following steps:
step S410, the APP client device obtains a target product selected by the user in the APP.
Step S411, sending a request for obtaining a target product identifier of a target product selected by a user to an application server corresponding to the APP.
Step S412, the application server sends the target product identifier of the target product selected by the user to the APP client device.
In step S413, the APP client device sends a request for obtaining target product data corresponding to the target product identifier to the APP store.
Step S414, the APP store sends the target product data corresponding to the target product identifier to the APP client device.
Step S415, the APP client device displays the target product data.
And step S416, sending the fee deduction request containing the target product data to an application store.
In step S417, the application store makes a purchase deduction.
In the embodiment of the present invention, as shown in fig. 4b, the payment process includes the following steps:
step S420, the APP client device obtains a target product selected by the user in the APP.
Step S421, obtaining a target product identifier corresponding to the target product from a product identifier list pre-stored in the APP client device.
Step S422, if the APP client device detects that the buffer pool in the APP client device contains the target product data of the target product, the target product data of the target product is read from the buffer pool in the APP client device.
Step S423, the APP client device displays the target product data.
Step S424, sending the deduction request containing the target product data to the application store.
Step S425, the app store makes a purchase deduction.
Therefore, by applying the embodiment of the invention, after the APP is started, the product data of each product in the APP is obtained from the application store and stored in the buffer pool in the APP client device; therefore, after a user selects a target product, if the buffer pool in the APP client device is detected to contain the target product data, the target product data of the target product is directly read from the APP client device, the obtaining process is irrelevant to the current network condition, and the probability of payment failure is reduced. Meanwhile, in this embodiment, the target product identifier corresponding to the target product may also be directly obtained from a product identifier list pre-stored in the APP client device. The interaction with the application server is reduced compared to the flow shown in fig. 4a, further reducing the probability of payment failure.
The structure schematic diagram of the device for purchasing payment of products in APP provided by the embodiment of the present invention is shown in fig. 5, and the device includes:
a product data storage unit 501, configured to obtain product data of each product in an APP from an APP store after the APP is started, and store the product data to a buffer pool in the APP client device; the buffer pool is used for storing product data of each product in the APP;
a target product obtaining unit 502, configured to obtain a target product selected by a user in the APP;
a target product data reading unit 503, configured to read target product data of the target product from a buffer pool in the APP client device if it is detected that the buffer pool in the APP client device contains the target product data of the target product;
a sending unit 504, configured to send a deduction request including the target product data to an application store, so that the application store makes a purchase deduction.
Optionally, the product data saving unit includes:
the product identification acquisition module is used for acquiring each product identification corresponding to each product in the APP when the APP is started to reach the preset time;
the product data acquisition module is used for acquiring each product data corresponding to each product identification from an application store; the product data comprises a product identification;
a product data storage module, configured to store each piece of product data to a buffer pool in the APP client device;
the device, still include: the target product identification obtaining unit is used for obtaining a target product identification corresponding to a target product after the target product obtaining unit obtains the target product selected by a user in the APP;
the target product data reading unit includes:
and the target product data reading module is used for reading the target product data corresponding to the target product identification from the buffer pool in the APP client device if the buffer pool in the APP client device is detected to contain the target product data of the target product.
Optionally, the product data carries product parameters, and the apparatus further includes:
the judging unit is used for judging whether a product parameter carried by the target product data is a target product parameter or not after the target product data of the target product is read from a buffer pool in the APP client device by the target product data reading unit; and if the product parameters carried by the target product data are not the target product parameters, acquiring the target product data from an application store, and storing the acquired target product data to a buffer pool in the APP client device.
Optionally, the product identifier obtaining module is specifically configured to:
when the APP starts to reach the preset time, obtaining each product identification corresponding to each product in the APP from a product identification list in a program application file in which the APP is stored in advance.
Optionally, the apparatus further includes:
and the target product data storage unit is used for acquiring the target product data of the target product from an application store if the buffer pool in the APP client device is detected not to contain the target product data of the target product, storing the target product data into the buffer pool in the APP client device, and triggering the sending unit to send the fee deduction request containing the target product data to the application store.
Therefore, by applying the embodiment of the invention, after the APP is started, the product data of each product in the APP is obtained from the application store and stored in the buffer pool in the APP client device, so that after the user selects the target product, if the buffer pool in the APP client device is detected to contain the target product data of the target product, the target product data of the target product is directly read from the buffer pool in the APP client device, the obtaining process is irrelevant to the current network condition, and the probability of payment failure is reduced.
An embodiment of the present invention further provides an electronic device, as shown in fig. 6, including a processor 601, a communication interface 602, a memory 603, and a communication bus 604, where the processor 601, the communication interface 602, and the memory 603 complete mutual communication through the communication bus 604,
a memory 603 for storing a computer program;
the processor 601 is configured to implement the following steps when executing the program stored in the memory 603:
after the APP is started, acquiring product data of each product in the APP from an application store, and storing the product data to a buffer pool in the APP client device; the buffer pool is used for storing product data of each product in the APP;
obtaining a target product selected by a user in the APP;
if the buffer pool in the APP client device is detected to contain the target product data of the target product, reading the target product data of the target product from the buffer pool in the APP client device;
and sending a fee deduction request containing the target product data to an application store so as to enable the application store to carry out purchase fee deduction.
Therefore, by applying the embodiment of the invention, after the APP is started, the product data of each product in the APP is obtained from the application store and stored in the buffer pool in the APP client device, so that after the user selects the target product, if the buffer pool in the APP client device is detected to contain the target product data of the target product, the target product data of the target product is directly read from the buffer pool in the APP client device, the obtaining process is irrelevant to the current network condition, and the probability of payment failure is reduced.
The communication bus mentioned in the above terminal may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the terminal and other equipment.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In yet another embodiment provided by the present invention, there is also provided a computer-readable storage medium having stored therein instructions, which when run on a computer, cause the computer to perform the payment method for purchasing a product within an APP as described in any one of the above embodiments.
In a further embodiment provided by the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the payment method for purchasing a product within an APP as described in any one of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be 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. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus 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 apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for embodiments such as the apparatus, the electronic device, the computer-readable storage medium, and the computer program product, since they are substantially similar to the method embodiments, the description is simple, and for relevant points, reference may be made to part of the description of the method embodiments.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (10)

1. A payment method for purchasing a product in an APP, applied to an APP client device, the method comprising:
after the APP is started, acquiring product data of each product in the APP from an application store, and storing the product data to a buffer pool in the APP client device; the buffer pool is used for storing product data of each product in the APP;
obtaining a target product selected by a user in the APP;
if the buffer pool in the APP client device is detected to contain the target product data of the target product, reading the target product data of the target product from the buffer pool in the APP client device;
and sending a fee deduction request containing the target product data to an application store so as to enable the application store to carry out purchase fee deduction.
2. The method of claim 1,
after the APP is started, product data of each product in the APP are obtained from an application store and stored to a buffer pool in the APP client device, and the method comprises the following steps:
when the APP is started to reach the preset time, obtaining product identifications corresponding to products in the APP;
acquiring each product data corresponding to each product identification from an application store; the product data comprises a product identification;
storing each product data to a buffer pool in the APP client device;
after the step of obtaining the target product selected by the user in the APP, the method further includes:
acquiring a target product identifier corresponding to the target product;
the step of reading the target product data of the target product from the buffer pool in the APP client device if it is detected that the buffer pool in the APP client device contains the target product data of the target product includes:
and if the buffer pool in the APP client device is detected to contain the target product data of the target product, reading the target product data corresponding to the target product identification from the buffer pool in the APP client device.
3. The method according to claim 1 or 2, wherein the product data carries product parameters, and after the step of reading the target product data of the target product from the buffer pool in the APP client device, the method further comprises:
judging whether the product parameters carried by the target product data are target product parameters or not;
and if the product parameters carried by the target product data are not the target product parameters, acquiring the target product data from an application store, and storing the acquired target product data to a buffer pool in the APP client device.
4. The method according to claim 2, wherein the step of obtaining each product identifier corresponding to each product in the APP includes:
and obtaining each product identifier corresponding to each product in the APP from a product identifier list in a program application file in which the APP is pre-stored.
5. The method of claim 1, further comprising:
and if the buffer pool in the APP client device does not contain the target product data of the target product, acquiring the target product data of the target product from an application store, storing the target product data into the buffer pool in the APP client device, and executing the step of sending the fee deduction request containing the target product data to the application store.
6. Payment apparatus for purchasing a product within an APP, for application to an APP client device, the apparatus comprising:
the product data storage unit is used for acquiring product data of each product in the APP from an application store after the APP is started and storing the product data to a buffer pool in the APP client device; the buffer pool is used for storing product data of each product in the APP;
the target product obtaining unit is used for obtaining a target product selected by a user in the APP;
a target product data reading unit, configured to read target product data of the target product from a buffer pool in the APP client device if it is detected that the buffer pool in the APP client device contains the target product data of the target product;
and the sending unit is used for sending the fee deduction request containing the target product data to an application store so as to enable the application store to carry out purchase fee deduction.
7. The apparatus of claim 6, wherein the product data holding unit comprises:
the product identification acquisition module is used for acquiring each product identification corresponding to each product in the APP when the APP is started to reach the preset time;
the product data acquisition module is used for acquiring each product data corresponding to each product identification from an application store; the product data comprises a product identification;
a product data storage module, configured to store each piece of product data to a buffer pool in the APP client device;
the device, still include: the target product identification obtaining unit is used for obtaining a target product identification corresponding to a target product after the target product obtaining unit obtains the target product selected by a user in the APP;
the target product data reading unit includes:
and the target product data reading module is used for reading the target product data corresponding to the target product identification from the buffer pool in the APP client device if the buffer pool in the APP client device is detected to contain the target product data of the target product.
8. The apparatus of claim 6 or 7, wherein the product data carries product parameters, the apparatus further comprising:
the judging unit is used for judging whether a product parameter carried by the target product data is a target product parameter or not after the target product data of the target product is read from a buffer pool in the APP client device by the target product data reading unit; and if the product parameters carried by the target product data are not the target product parameters, acquiring the target product data from an application store, and storing the acquired target product data to a buffer pool in the APP client device.
9. The apparatus according to claim 7, wherein the product identifier obtaining module is specifically configured to:
when the APP starts to reach the preset time, obtaining each product identification corresponding to each product in the APP from a product identification list in a program application file in which the APP is stored in advance.
10. The apparatus of claim 6, further comprising:
and the target product data storage unit is used for acquiring the target product data of the target product from an application store if the buffer pool in the APP client device is detected not to contain the target product data of the target product, storing the target product data into the buffer pool in the APP client device, and triggering the sending unit to send the fee deduction request containing the target product data to the application store.
CN201911133465.3A 2019-11-19 2019-11-19 Payment method and device for purchasing products in APP Pending CN111080272A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911133465.3A CN111080272A (en) 2019-11-19 2019-11-19 Payment method and device for purchasing products in APP

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911133465.3A CN111080272A (en) 2019-11-19 2019-11-19 Payment method and device for purchasing products in APP

Publications (1)

Publication Number Publication Date
CN111080272A true CN111080272A (en) 2020-04-28

Family

ID=70311026

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911133465.3A Pending CN111080272A (en) 2019-11-19 2019-11-19 Payment method and device for purchasing products in APP

Country Status (1)

Country Link
CN (1) CN111080272A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102737341A (en) * 2011-03-31 2012-10-17 中兴通讯股份有限公司 Application store system and method for realizing in-application purchasing function
CN107833087A (en) * 2017-10-13 2018-03-23 中国银行股份有限公司 The online method for selling and equipment of a kind of killing property of second product
CN110069731A (en) * 2019-03-20 2019-07-30 北京奇艺世纪科技有限公司 Data processing method, device, electronic equipment and computer readable storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102737341A (en) * 2011-03-31 2012-10-17 中兴通讯股份有限公司 Application store system and method for realizing in-application purchasing function
CN107833087A (en) * 2017-10-13 2018-03-23 中国银行股份有限公司 The online method for selling and equipment of a kind of killing property of second product
CN110069731A (en) * 2019-03-20 2019-07-30 北京奇艺世纪科技有限公司 Data processing method, device, electronic equipment and computer readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"苹果新研究:iPhone离线也可买应用", 现代电子技术 *

Similar Documents

Publication Publication Date Title
CN110795192B (en) Language switching method and device and terminal equipment
WO2018103402A1 (en) Wireless fidelity (wifi) scan method and related product
CN110908865A (en) Memory leakage monitoring method and device and electronic equipment
CN107066269A (en) A kind of split screen processing method and processing device of terminal
CN110996154B (en) Video playing method and device and electronic equipment
US20160179296A1 (en) Method and device for video rendering
CN110634049A (en) Page display content processing method and device, electronic equipment and readable medium
US10582388B2 (en) Electronic apparatus and method of executing application program
CN110688353A (en) File management method, device and computer readable medium
CN111666516A (en) Page loading method and device, electronic equipment and storage medium
CN111597553A (en) Process processing method, device, equipment and storage medium in virus searching and killing
CN109062602B (en) Data processing method and device for application program and electronic equipment
CN112800401A (en) Privacy processing method and device and terminal
CN111050217B (en) Video playing method and device
CN110297575B (en) Page display method and device, terminal equipment and storage medium
CN104298548A (en) Information processing method and electronic device
CN109976828B (en) Method and device for configuring file
CN111080272A (en) Payment method and device for purchasing products in APP
CN108446144B (en) Application program starting method and device, terminal and storage medium
CN111008058A (en) Page display method and device
CN108536512B (en) Interface switching method and device and terminal equipment
CN108268298B (en) Desktop icon generation method and device, storage medium and electronic equipment
CN109840113B (en) Application data processing method and equipment, storage medium and terminal thereof
CN106302821B (en) Data request method and equipment thereof
CN110069731B (en) Data processing method and device, electronic equipment and computer readable 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