CN109829712B - Payment mode switching method and device, computer equipment and readable storage medium - Google Patents

Payment mode switching method and device, computer equipment and readable storage medium Download PDF

Info

Publication number
CN109829712B
CN109829712B CN201811583448.5A CN201811583448A CN109829712B CN 109829712 B CN109829712 B CN 109829712B CN 201811583448 A CN201811583448 A CN 201811583448A CN 109829712 B CN109829712 B CN 109829712B
Authority
CN
China
Prior art keywords
payment
mode
field
time
switching
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811583448.5A
Other languages
Chinese (zh)
Other versions
CN109829712A (en
Inventor
宦晓东
山银华
周志文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Koubei Shanghai Information Technology Co Ltd
Original Assignee
Koubei Shanghai Information 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 Koubei Shanghai Information Technology Co Ltd filed Critical Koubei Shanghai Information Technology Co Ltd
Priority to CN201811583448.5A priority Critical patent/CN109829712B/en
Publication of CN109829712A publication Critical patent/CN109829712A/en
Application granted granted Critical
Publication of CN109829712B publication Critical patent/CN109829712B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Cash Registers Or Receiving Machines (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The invention discloses a payment mode switching method, a payment mode switching device, computer equipment and a readable storage medium, relates to the technical field of internet, receives payment switching data generated according to a payment management framework set by a user, determines whether to switch a current payment mode in real time by comparing a failure time field in the payment switching data with a current time field, does not need to uniformly wait for 24 points to switch the payment modes, avoids overload of a payment system, reduces the load of the payment system, shortens processing delay and ensures timeliness of switching the payment modes. The method comprises the following steps: when payment switching data are received, extracting a failure time field in the payment switching data; acquiring a current time field, and comparing the failure time field with the current time field; and if the expiration time field is smaller than the current time field, extracting a target mode field from the payment switching data, and switching the payment mode indicated by the target payment mode field into the current payment mode.

Description

Payment mode switching method and device, computer equipment and readable storage medium
Technical Field
The invention relates to the technical field of internet, in particular to a payment mode switching method, a payment mode switching device, computer equipment and a readable storage medium.
Background
With the rapid development of internet technology and the progress of human society, electronic payment has become an indispensable payment means. Electronic payment means that a unit and an individual directly or authorize others to send payment instructions through an electronic terminal to realize the actions of money payment and fund transfer, and the determinations of cash change, counterfeit money, low transaction speed, incapability of effectively recording transactions by buyers and sellers and the like in cash transaction are overcome, so that the electronic payment is widely applied to various fields. In the catering field, electronic payment usually provides multiple payment modes for merchants to select, for example, the selectable payment modes include payment before meal taking, payment after meal taking and the like, and the merchants can switch different payment modes according to the actual conditions of the storefront.
In the related art, when a merchant switches payment modes, the merchant needs to request the payment system to switch payment modes and provide a target payment mode, so that the payment system processes the target payment mode by using a timing task at 24 o' clock of the day and updates the current payment mode to the target payment mode.
In the process of implementing the invention, the inventor finds that the related art has at least the following problems:
because the payment system uniformly processes the switching of all target payment modes involved in a whole day at 24 points by adopting a timing task, if the data volume of the target payment mode needing to be processed is large, the load of the payment system is high, processing delay exists, and the timeliness of the switching of the payment modes cannot be ensured.
Disclosure of Invention
In view of the above, the present invention provides a payment method switching method, an apparatus, a computer device and a readable storage medium, and mainly aims to solve the problems that the load of the current payment system is high, processing delay exists, and timeliness of switching the payment method cannot be guaranteed.
According to a first aspect of the present invention, a payment method switching method is provided, the method including:
when payment switching data are received, extracting a failure time field in the payment switching data, wherein the payment switching data are generated according to a payment management framework set by a user, and the payment management framework indicates the time when the user requests to switch payment modes;
acquiring a current time field, and comparing the failure time field with the current time field;
and if the expiration time field is smaller than the current time field, extracting a target mode field from the payment switching data, and switching the payment mode indicated by the target payment mode field into the current payment mode.
In another embodiment, before extracting the expiry time field in the payment switch data when the payment switch data is received, the method further comprises:
when detecting that a user requests to switch payment modes, acquiring the payment mode effective time set by the user, wherein the payment mode effective time at least comprises real-time effect and next-day effect;
and setting the effective time of the payment mode as the value of the payment management framework.
In another embodiment, the method further comprises:
if the failure time field is larger than the current time field, acquiring a failure mode field in the payment switching data, and taking the payment mode indicated by the failure mode field as the current payment mode;
and acquiring the target payment mode field in the payment switching data, and taking the payment mode indicated by the target payment mode field as the next day payment mode.
According to a second aspect of the present invention, there is provided a payment method switching method, including:
when detecting that a user requests to switch payment modes, reading a value of a payment management frame, wherein the payment management frame indicates the time when the user requests to switch the payment modes;
if the value of the payment management frame is effective in real time, acquiring the payment mode to be switched set by the user, adding the payment mode to be switched into a target mode field, and setting a failure time field as a first numerical value, wherein the first numerical value is used for indicating the end time of the previous day;
and generating payment switching data based on the target mode field and the expiration time field, and returning the payment switching data.
In another embodiment, after reading the value of the payment management framework when it is detected that the user requests to switch the payment method, the method further includes:
if the value of the payment management frame is valid the next day, acquiring a historical payment mode, adding the historical payment mode into a failure mode field, adding the payment mode to be switched into the target mode field, and setting the failure time field as a second numerical value, wherein the second numerical value is used for indicating the end time of the current day;
accordingly, generating payment switch data includes:
generating the payment switch data based on the failure mode field, the target mode field, and the failure time field.
According to a third aspect of the present invention, there is provided a payment method switching apparatus, the apparatus including:
the payment switching module is used for switching the payment modes of the payment system according to the payment switching data, and sending the payment switching data to the extraction module;
the comparison module is used for acquiring a current time field and comparing the failure time field with the current time field;
and the switching module is used for extracting a target mode field from the payment switching data and switching the payment mode indicated by the target payment mode field into the current payment mode if the expiration time field is smaller than the current time field.
In another embodiment, the apparatus further comprises:
the system comprises an acquisition module, a payment mode switching module and a payment mode setting module, wherein the acquisition module is used for acquiring the payment mode effective time set by a user when the user requests to switch the payment mode, and the payment mode effective time at least comprises real-time effect and next-day effect;
and the setting module is used for setting the effective time of the payment mode as the value of the payment management framework.
In another embodiment, the apparatus further comprises:
a first determining module, configured to, if the expiration time field is greater than the current time field, obtain an expiration mode field in the payment switching data, and use a payment mode indicated by the expiration mode field as a current payment mode;
and the second determining module is used for acquiring the target payment mode field in the payment switching data and taking the payment mode indicated by the target payment mode field as the next-day payment mode.
According to a fourth aspect of the present invention, there is provided a payment method switching apparatus, including:
the payment management system comprises a reading module, a processing module and a processing module, wherein the reading module is used for reading a value of a payment management frame when detecting that a user requests to switch payment modes, and the payment management frame indicates the time when the user requests to switch the payment modes;
the adding module is used for acquiring the payment mode to be switched set by the user if the value of the payment management frame is effective in real time, adding the payment mode to be switched into a target mode field, and setting a failure time field as a first numerical value, wherein the first numerical value is used for indicating the end time of the previous day;
and the generating module is used for generating payment switching data based on the target mode field and the expiration time field and returning the payment switching data.
In another embodiment, the adding module is further configured to, if the value of the payment management framework is valid the next day, obtain a historical payment method, add the historical payment method to a failure mode field, add the to-be-switched payment method to the target mode field, and set the failure time field to a second numerical value, where the second numerical value is used to indicate the end time of the current day;
correspondingly, the generating module is further configured to generate the payment switch data based on the failure mode field, the target mode field, and the failure time field.
According to a fifth aspect of the present invention, there is provided a computer device comprising a memory storing a computer program and a processor implementing the steps of the method of the first and second aspects when the computer program is executed.
According to a sixth aspect of the present invention, there is provided a readable storage medium having stored thereon a computer program which, when executed by a processor, carries out the steps of the method of the first and second aspects described above.
By means of the technical scheme, compared with the conventional mode of uniformly processing the switching of all target payment modes related in a whole day at 24 points by adopting a timing task, the payment mode switching method, the payment mode switching device, the computer equipment and the readable storage medium provided by the invention receive payment switching data generated by a payment management framework set by a user, determine whether to switch the current payment mode in real time or not by comparing a failure time field in the payment switching data with a current time field, do not need to uniformly wait for 24 points to switch the payment modes, avoid the overload of a payment system, reduce the load of the payment system, shorten the processing delay and ensure the timeliness of the switching of the payment modes.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1A shows a schematic flow chart of a payment mode switching method provided in an embodiment of the present invention;
fig. 1B shows a schematic flow chart of a payment mode switching method provided in an embodiment of the present invention;
fig. 2A shows a schematic flow chart of a payment mode switching method provided in an embodiment of the present invention;
fig. 2B is a schematic diagram illustrating a payment mode switching method according to an embodiment of the present invention;
fig. 3A is a schematic structural diagram illustrating a payment mode switching apparatus according to an embodiment of the present invention;
fig. 3B is a schematic structural diagram of a payment mode switching apparatus according to an embodiment of the present invention;
fig. 3C is a schematic structural diagram of a payment mode switching apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram illustrating a payment mode switching apparatus according to an embodiment of the present invention;
fig. 5 is a schematic device structure diagram of a computer apparatus according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
The embodiment of the invention provides a payment mode switching method, which can receive payment switching data generated according to a payment management framework set by a user, determine whether to switch a current payment mode in real time by comparing a failure time field in the payment switching data with a current time field, and do not need to uniformly wait for 24 points to switch the payment modes, so that the purposes of avoiding higher load of a payment system, shortening processing delay and ensuring timeliness of switching the payment modes are achieved, as shown in fig. 1A, the method is applied to a terminal and comprises the following steps:
101. and when the payment switching data is received, extracting the failure time field in the payment switching data, wherein the payment switching data is generated according to a payment management framework set by a user, and the payment management framework indicates the time of requesting the switching of the payment mode by the user.
In the embodiment of the invention, when the payment switching data returned by the payment system is received, because the payment switching data carries the expiration time field and whether the payment mode is switched in real time or the payment mode is switched in the next day needs to be determined according to the expiration time field, the payment system extracts the expiration time field from the payment switching data so as to switch the payment mode based on the expiration time field in the following process.
102. And acquiring a current time field, and comparing the failure time field with the current time field.
In the embodiment of the invention, the payment system acquires the current time field and compares the acquired expiration time field with the current time field to determine whether the payment method is switched in real time or the next day.
103. And if the expiration time field is smaller than the current time field, extracting a target mode field from the payment switching data, and switching the payment mode indicated by the target payment mode field into the current payment mode.
In the embodiment of the invention, if the expiration time field is smaller than the current time field, the user wants to expire the currently set payment mode before the current time, that is, wants to switch the payment mode in real time, so the terminal extracts the target mode field from the payment switching data and switches the payment mode indicated by the target payment mode field to the current payment mode.
The method provided by the embodiment of the invention can receive the payment switching data generated according to the payment management framework set by the user, and can determine whether to switch the current payment mode in real time by comparing the failure time field in the payment switching data with the current time field, and does not need to uniformly wait for 24 points to switch the payment modes, thereby avoiding the overload of the payment system, reducing the load of the payment system, shortening the processing delay and ensuring the timeliness of the payment mode switching.
The embodiment of the invention provides a payment mode switching method, which can receive payment switching data generated according to a payment management framework set by a user, determine whether to switch a current payment mode in real time by comparing a failure time field in the payment switching data with a current time field, and do not need to uniformly wait for 24 points to switch the payment modes, so that the purposes of avoiding higher load of a payment system, shortening processing delay and ensuring timeliness of switching the payment modes are achieved, as shown in fig. 1B, the method is applied to the payment system and comprises the following steps:
104. and when detecting that the user requests to switch the payment mode, reading the value of a payment management frame, wherein the payment management frame indicates the time when the user requests to switch the payment mode.
In the embodiment of the invention, when the user requesting to switch the payment mode is detected, the user indicates whether the payment mode is switched in real time or the payment mode is switched the next day by setting the value taking of the payment management frame, so that the payment system reads the value of the payment management frame, and the payment mode is switched according to the value taking of the payment management frame.
105. And if the value of the payment management frame is effective in real time, acquiring the payment mode to be switched set by the user, adding the payment mode to be switched into the target mode field, and setting the expiration time field as a first numerical value, wherein the first numerical value is used for indicating the end time of the previous day.
In the embodiment of the invention, if the value of the payment management framework is effective in real time, the payment management framework indicates that the user wants to switch the payment modes in real time, so that the payment system acquires the payment modes to be switched set by the user and adds the payment modes to be switched into the target mode field, so that the payment modes indicated by the target mode field are switched to the current payment modes subsequently, the failure time field is set to be a first numerical value, and the user wants to switch the payment modes in real time by using the first numerical value.
106. And generating payment switching data based on the target mode field and the failure time field, and returning the payment switching data.
In the embodiment of the invention, after the target mode field and the expiration time field are determined, the payment switching data can be generated based on the target mode field and the expiration time field, and the payment switching data is returned to the terminal, so that the terminal can switch the payment mode according to the payment switching data.
The method provided by the embodiment of the invention can receive the payment switching data generated according to the payment management framework set by the user, and can determine whether to switch the current payment mode in real time by comparing the failure time field in the payment switching data with the current time field, and does not need to uniformly wait for 24 points to switch the payment modes, thereby avoiding the overload of the payment system, reducing the load of the payment system, shortening the processing delay and ensuring the timeliness of the payment mode switching.
The embodiment of the invention provides a payment mode switching method, which can receive payment switching data generated according to a payment management framework set by a user, determine whether to switch the current payment mode in real time by comparing a failure time field in the payment switching data with a current time field, and do not need to uniformly wait for 24 points to switch the payment modes, thereby achieving the purposes of avoiding higher load of a payment system, shortening processing delay and ensuring timeliness of switching the payment modes, as shown in fig. 2A, the method comprises the following steps:
201. when the terminal detects that the user requests to switch the payment mode, the payment mode effective time set by the user is obtained, and the payment mode effective time is set as a value of the payment management framework.
In the embodiment of the invention, the inventor realizes that when a merchant as a payment system user switches payment modes, different methods may be expected to be adopted for switching different scenes. For example, if the diversified demands of the consumers on the payment modes are urgent, the payment mode which the merchant wants to switch can be effective in real time; if the demand of the consumer on the payment mode is not urgent, the influence on the merchant is not great no matter whether the payment mode switched by the merchant is effective in real time or in the next day, so that the payment mode switching method is carried out according to the intention of the user, namely whether the payment mode is effective in real time or in the next day can be selected by the user.
In order to distinguish the time when the user requests to switch the payment mode, the embodiment of the invention is provided with the payment management framework, and the value of the payment management framework is taken according to the payment mode effective time set by the user, so that the payment switching data can be generated based on the payment management framework in the following. The payment management framework is essentially a real-time dynamic configuration management framework, has real-time performance and consistency, and indicates the time when the user requests to switch payment modes. The payment management framework can be arranged in the payment system, so that when a user changes the value of the payment management framework, the payment system can find the value in time and provide payment mode switching service for the user.
Thus, the terminal can set a payment mode switching entry, when the user is detected to trigger the payment mode switching entry, the payment mode switching page is determined to be switched by the user request, the payment mode switching page is displayed, when the user is detected to confirm the payment mode switching page, the payment mode effective time input by the user on the payment mode switching page is acquired, the payment mode effective time is set as the value of the payment management frame, specifically, the payment mode effective time can be effective in real time and in the next day, when the value of the payment management frame is set according to the payment mode effective time, in order to simplify the value of the payment management frame, the value of the payment management frame is more concise and clear, two values can be set for the payment management frame, namely T and F respectively, wherein if the acquired payment mode effective time set by the user is effective in real time, the value of the payment management framework can be set to T; if the acquired effective time of the payment mode set by the user is effective the next day, the value of the payment management frame can be set to be F. The embodiment of the invention does not limit the specific value mode of the payment management framework.
202. When the payment system detects that the user requests to switch the payment mode, reading the value of the payment management frame, and if the value of the payment management frame is effective in real time, executing the following step 203; if the value of the payment management framework is in effect the next day, the following step 204 is performed.
In the embodiment of the invention, when the value of the payment management framework is changed, the payment system can determine that the user requests to switch the payment mode, and at the moment, the payment system can generate payment switching data according to the payment management framework and transmit the payment switching data to the terminal, so that the terminal can execute the switching of the payment mode according to the payment switching data.
Since the value of the payment management frame indicates whether the payment method switched by the user is in effect in real time or in effect the next day, when the payment system detects that the user requests to switch the payment method, the value of the payment management frame is read, and if the value of the payment management frame is in effect in real time, it indicates that the user wants to realize the switching of the payment method in real time, that is, the following step 203 is executed. If the value of the payment management framework is valid the next day, it indicates that the user wants to implement the switching of the payment modes the next day, that is, the following step 204 is executed.
203. And if the value of the payment management frame is effective in real time, acquiring the payment mode to be switched set by the user, adding the payment mode to be switched into the target mode field, and setting the failure time field as a first numerical value.
In the embodiment of the invention, in order to distinguish the time when the user requests to switch the payment transaction mode, a plurality of fields can be set in the database of the payment system, and different values can be set for the fields under different conditions. Specifically, referring to fig. 2B, a plurality of fields may be set in the extension field of the database, and the plurality of fields may specifically include a target mode field, an expiration mode field, and an expiration time field. The target mode field is used for indicating the payment mode to which the user wants to switch, the failure mode field is used for indicating the payment mode currently set by the terminal of the user, and the failure time field is used for indicating the time when the currently set payment mode fails. In order to more simply represent a plurality of fields, the target mode field may be represented by way _ type, the failure mode field may be represented by way _ type, and the failure time field may be represented by way _ time.
In this way, if the value of the payment management frame set by the user is effective in real time, that is, the value is T, the to-be-switched payment method set by the user can be acquired, the to-be-switched payment method is added to the target method field, that is, the to-be-switched payment method is added to the pay _ type field, and the expiration time field is set to be a first numerical value used for indicating the end time of the previous day, that is, the ex _ time is set to be the first numerical value. In the process of practical application, since the first value indicates the time when the previous piece ended, the first value may be 23:59:59 of yesterday, or may be represented by t for today and t-1 for yesterday, so that the expiration time field is set to t-1.
204. And if the value of the payment management frame is valid the next day, acquiring a historical payment mode, adding the historical payment mode into the failure mode field, adding the payment mode to be switched into the target mode field, and setting the failure time field as a second numerical value.
In the embodiment of the present invention, if the value of the payment management framework set by the user is valid the next day, it indicates that the current payment method still needs to continue to be serviced, and therefore, the payment system reads the current payment method of the terminal as a historical payment method, and the historical payment method needs to be invalidated after the current day is finished, so that the historical payment method needs to be added to the invalidation method field, that is, the ex _ pay _ type field. Subsequently, the payment mode to be switched set by the user can be continuously added to the target mode field, namely, the pay _ type field. When the expiration time field is set, since the time when the user requests the switching of the payment method is tomorrow, the expiration time field is set to the second value, that is, the ex _ time is set to the second value. In particular, the second number indicates the end time of the day, the second number may be 23:59:59 today or may represent today by t, such that the expiration time field is set to t.
205. And the payment system generates payment switching data according to the set field and returns the payment switching data to the terminal.
In the embodiment of the invention, after the target mode field and the expiration time field are set according to the value of the payment management frame set by the user, if the value of the payment management frame set by the user is effective in real time, the target mode field and the expiration time field are only set, so that the payment system can generate the payment switching data based on the target mode field and the expiration time field, namely, the target mode field and the expiration time field are packaged to generate the payment switching data, and the generated payment switching data is returned to the terminal, so that the terminal can switch the payment modes according to the payment switching data.
In the process of practical application, if the value of the payment management framework set by the user is valid the next day, the value is also taken for the failure mode field, so that the failure mode field needs to be added under the condition that the next day is valid, that is, the payment switching data is generated based on the failure mode field, the target mode field and the failure time field, and the generated payment switching data is returned to the terminal.
206. When the terminal receives the payment switching data, extracting a failure time field from the payment switching data, acquiring a current time field, comparing the failure time field with the current time field, and if the failure time field is smaller than the current time field, executing the following step 207; if the expiration time field is greater than the current time field, step 208, described below, is performed.
In the embodiment of the invention, after the terminal receives the payment switching data, the payment mode can be switched according to the instruction of the payment switching data. The payment switching data generated by the payment management framework with the value of real-time effectiveness or next day effectiveness comprises the expiration time field, and the real-time effectiveness or the next day effectiveness can be determined according to the expiration time field, so that the terminal extracts the expiration time field from the payment switching data, acquires the current time field used for indicating the current time, and determines whether the payment mode is switched in real time or the payment mode is switched in the next day by comparing the expiration time field with the current time field.
Specifically, if the expiration time field is smaller than the current time field, it indicates that the current payment method needs to be expired before the current time, that is, it indicates that the user wants the payment method to be switched to be effective in real time, and at this time, the following step 207 needs to be executed; if the expiration time field is larger than the current time field, it indicates that the current payment method needs to be expired after the current time, i.e. at the end time of today, i.e. it indicates that the user wishes the payment method to be switched to be valid the next day, and at this time, the following step 208 needs to be executed.
207. And if the failure time field is smaller than the current time field, the terminal extracts a target mode field from the payment switching data and switches the payment mode indicated by the target payment mode field into the current payment mode.
In the embodiment of the invention, if the expiration time field is less than the current time field, it indicates that the target payment mode needs aging before the current time, and the user wants that the payment mode to be switched can take effect in real time, so the terminal needs to switch the payment mode based on the payment switching data. Because the payment switching data carries the target mode field, the terminal extracts the target mode field from the payment switching data and switches the payment mode indicated by the target mode field into the current payment mode. Therefore, the requests which are effective in real time and the requests which are effective in the next day can be processed separately, the phenomenon that the load of the payment system is too heavy due to the fact that the payment modes are switched in a unified mode is avoided, and the load of the payment system is reduced.
208. And if the failure time field is larger than the current time field, the terminal acquires a failure mode field in the payment switching data, takes the payment mode indicated by the failure mode field as the current payment mode, acquires a target payment mode field in the payment switching data, and takes the payment mode indicated by the target payment mode field as the next-day payment mode.
In the embodiment of the invention, if the expiration time field is larger than the current time field, it indicates that after the current time, that is, at the end time of today, the current payment method needs to be expired, and the user wants that the payment method to be switched can take effect the next day, so that the payment method does not need to be switched at this time, and the current payment method using the previous payment method can be served. The payment switching data carries the failure mode field, and the failure mode field indicates the currently used payment mode, so that the terminal acquires the failure mode field in the payment switching data, takes the payment mode indicated by the failure mode field as the current payment mode, acquires the target payment mode field in the payment switching data, and takes the payment mode indicated by the target payment mode field as the next-day payment mode, so that the payment mode can be switched on the second day, and the service can be provided on the basis of the payment mode indicated by the target payment mode field on the second day.
The method provided by the embodiment of the invention receives the payment switching data generated according to the payment management framework set by the user, determines whether to switch the current payment mode in real time by comparing the failure time field in the payment switching data with the current time field, does not need to uniformly wait for 24 points to switch the payment modes, avoids the overload of the payment system, reduces the load of the payment system, shortens the processing delay and ensures the timeliness of the switching of the payment modes.
Further, as a specific implementation of the method shown in fig. 1A, an embodiment of the present invention provides a payment mode switching apparatus, and as shown in fig. 3A, the apparatus includes: an extraction module 301, a comparison module 302 and a switching module 303.
The extracting module 301 is configured to extract an expiration time field from the payment switching data when the payment switching data is received, where the payment switching data is generated according to a payment management framework set by a user, and the payment management framework indicates a time when the user requests to switch a payment mode;
the comparing module 302 is configured to obtain a current time field, and compare the expiration time field with the current time field;
the switching module 303 is configured to extract a target payment method field from the payment switching data if the expiration time field is smaller than the current time field, and switch the payment method indicated by the target payment method field to the current payment method.
In a specific application scenario, as shown in fig. 3B, the apparatus further includes: an acquisition module 304 and a setup module 305.
The obtaining module 304 is configured to obtain payment mode effective time set by a user when it is detected that the user requests to switch the payment mode, where the payment mode effective time at least includes real-time effectiveness and next-day effectiveness;
the setting module 305 is configured to set the validation time of the payment method as a value of the payment management framework.
In a specific application scenario, as shown in fig. 3C, the apparatus further includes: a first determination module 306 and a second determination module 307.
The first determining module 306 is configured to, if the expiration time field is greater than the current time field, obtain an expiration mode field in the payment switching data, and use the payment mode indicated by the expiration mode field as the current payment mode;
the second determining module 307 is configured to obtain a target payment method field in the payment handover data, and use the payment method indicated by the target payment method field as the next-day payment method.
The device provided by the embodiment of the invention can receive the payment switching data generated according to the payment management framework set by the user, and can determine whether to switch the current payment mode in real time by comparing the failure time field in the payment switching data with the current time field, and the switching of the payment modes does not need to be uniformly carried out at 24 points, so that the overload of the payment system is avoided, the load of the payment system is reduced, the processing delay is shortened, and the timeliness of the switching of the payment modes is ensured.
Further, as a specific implementation of the method shown in fig. 1B, an embodiment of the present invention provides a payment mode switching apparatus, and as shown in fig. 4, the apparatus includes: a reading module 401, an adding module 402 and a generating module 403.
The reading module 401 is configured to, when it is detected that the user requests to switch the payment method, read a value of a payment management framework, where the payment management framework indicates a time when the user requests to switch the payment method;
the adding module 402 is configured to, if the value of the payment management framework is valid in real time, obtain a to-be-switched payment method set by a user, add the to-be-switched payment method to the target method field, and set the expiration time field as a first value, where the first value is used to indicate the end time of the previous day;
the generating module 403 is configured to generate payment switching data based on the target mode field and the expiration time field, and return the payment switching data.
In a specific application scenario, the adding module 402 is further configured to, if the value of the payment management framework is valid the next day, obtain a historical payment manner, add the historical payment manner to the failure manner field, add the payment manner to be switched to the target manner field, and set the failure time field to a second numerical value, where the second numerical value is used to indicate the end time of the day;
accordingly, the generating module 403 is further configured to generate payment switch data based on the failure mode field, the target mode field, and the failure time field.
The device provided by the embodiment of the invention can receive the payment switching data generated according to the payment management framework set by the user, and can determine whether to switch the current payment mode in real time by comparing the failure time field in the payment switching data with the current time field, and the switching of the payment modes does not need to be uniformly carried out at 24 points, so that the overload of the payment system is avoided, the load of the payment system is reduced, the processing delay is shortened, and the timeliness of the switching of the payment modes is ensured.
It should be noted that other corresponding descriptions of the functional units related to the payment method switching device provided in the embodiment of the present invention may refer to the corresponding descriptions in fig. 1A to 1B and fig. 2A to 2B, and are not described again here.
In an exemplary embodiment, referring to fig. 5, there is further provided a device 500, which includes a communication bus, a processor, a memory, and a communication interface, and may further include an input/output interface and a display device, wherein the functional units may communicate with each other through the bus. The memory stores computer programs, and the processor is used for executing the programs stored in the memory and executing the payment mode switching method in the embodiment.
A readable storage medium having stored thereon a computer program which, when executed by a processor, carries out the steps of the payment method switching method.
Through the above description of the embodiments, those skilled in the art will clearly understand that the present application can be implemented by hardware, and also by software plus a necessary general hardware platform. Based on such understanding, the technical solution of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.), and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the implementation scenarios of the present application.
Those skilled in the art will appreciate that the figures are merely schematic representations of one preferred implementation scenario and that the blocks or flow diagrams in the figures are not necessarily required to practice the present application.
Those skilled in the art will appreciate that the modules in the devices in the implementation scenario may be distributed in the devices in the implementation scenario according to the description of the implementation scenario, or may be located in one or more devices different from the present implementation scenario with corresponding changes. The modules of the implementation scenario may be combined into one module, or may be further split into a plurality of sub-modules.
The above application serial numbers are for description purposes only and do not represent the superiority or inferiority of the implementation scenarios.
The above disclosure is only a few specific implementation scenarios of the present application, but the present application is not limited thereto, and any variations that can be made by those skilled in the art are intended to fall within the scope of the present application.

Claims (10)

1. A payment mode switching method is characterized by comprising the following steps:
when detecting that a user requests to switch payment modes, acquiring the payment mode effective time set by the user, wherein the payment mode effective time at least comprises real-time effect and next-day effect;
setting the effective time of the payment mode as a value of a payment management framework, wherein the payment management framework indicates the time of the user for requesting to switch the payment mode, is a real-time dynamic configuration management framework, and is arranged in a payment system;
when payment switching data are received, extracting a failure time field in the payment switching data, wherein the payment switching data are generated according to the payment management framework set by a user;
acquiring a current time field, and comparing the failure time field with the current time field;
if the failure time field is smaller than the current time field, extracting a target mode field from the payment switching data, and switching the payment mode indicated by the target mode field into the current payment mode;
the payment method comprises the steps that a plurality of fields are set, the fields comprise a target mode field, an invalid mode field and an invalid time field, the target mode field is used for indicating the payment mode to which the user wants to switch, the invalid mode field is used for indicating the payment mode currently set by the terminal of the user, and the invalid time field is used for indicating the time when the currently set payment mode is invalid.
2. The method of claim 1, further comprising:
if the failure time field is larger than the current time field, acquiring the failure mode field in the payment switching data, and taking the payment mode indicated by the failure mode field as the current payment mode;
and acquiring the target mode field in the payment switching data, and taking the payment mode indicated by the target mode field as the next day payment mode.
3. A payment mode switching method is characterized by comprising the following steps:
when detecting that a user requests to switch payment modes, reading a value of a payment management frame, wherein the payment management frame indicates time of the user requesting to switch the payment modes, the value of the payment management frame is set according to payment mode effective time set by the user, the payment management frame is a real-time dynamic configuration management frame, the payment management frame is arranged in a payment system, and the payment mode effective time at least comprises real-time effect and next-day effect;
if the value of the payment management frame is effective in real time, acquiring the payment mode to be switched set by the user, adding the payment mode to be switched into a target mode field, and setting a failure time field as a first numerical value, wherein the first numerical value is used for indicating the end time of the previous day;
generating payment switching data based on the target mode field and the failure time field, and returning the payment switching data;
the payment method comprises the steps that a plurality of fields are set, the fields comprise a target mode field, an invalid mode field and an invalid time field, the target mode field is used for indicating the payment mode to which the user wants to switch, the invalid mode field is used for indicating the payment mode currently set by the terminal of the user, and the invalid time field is used for indicating the time when the currently set payment mode is invalid.
4. The method according to claim 3, wherein after reading the value of the payment management framework when detecting that the user requests to switch the payment method, the method further comprises:
if the value of the payment management frame is valid the next day, acquiring a historical payment mode, adding the historical payment mode into the failure mode field, adding the payment mode to be switched into the target mode field, and setting the failure time field as a second numerical value, wherein the second numerical value is used for indicating the end time of the current day;
accordingly, generating payment switch data includes:
generating the payment switch data based on the failure mode field, the target mode field, and the failure time field.
5. A payment means switching apparatus, comprising:
the system comprises an acquisition module, a payment mode switching module and a payment mode setting module, wherein the acquisition module is used for acquiring the payment mode effective time set by a user when the user requests to switch the payment mode, and the payment mode effective time at least comprises real-time effect and next-day effect;
the payment management framework is a real-time dynamic configuration management framework and is arranged in a payment system;
the system comprises an extraction module, a payment switching module and a payment management module, wherein the extraction module is used for extracting a failure time field in payment switching data when the payment switching data is received, and the payment switching data is generated according to a payment management framework set by a user;
the comparison module is used for acquiring a current time field and comparing the failure time field with the current time field;
the switching module is used for extracting a target mode field from the payment switching data and switching the payment mode indicated by the target mode field into the current payment mode if the failure time field is smaller than the current time field;
the payment method comprises the steps that a plurality of fields are set, the fields comprise a target mode field, an invalid mode field and an invalid time field, the target mode field is used for indicating the payment mode to which the user wants to switch, the invalid mode field is used for indicating the payment mode currently set by the terminal of the user, and the invalid time field is used for indicating the time when the currently set payment mode is invalid.
6. The apparatus of claim 5, further comprising:
a first determining module, configured to, if the expiration time field is greater than the current time field, obtain the expiration mode field in the payment switching data, and use the payment mode indicated by the expiration mode field as the current payment mode;
and the second determining module is used for acquiring the target mode field in the payment switching data and taking the payment mode indicated by the target mode field as the next day payment mode.
7. A payment means switching apparatus, comprising:
the payment management framework is a real-time dynamic configuration management framework and is arranged in a payment system, and the payment management framework at least comprises real-time effect and next-day effect;
the adding module is used for acquiring the payment mode to be switched set by the user if the value of the payment management frame is effective in real time, adding the payment mode to be switched into a target mode field, and setting a failure time field as a first numerical value, wherein the first numerical value is used for indicating the end time of the previous day;
the generating module is used for generating payment switching data based on the target mode field and the failure time field and returning the payment switching data;
the payment method comprises the steps that a plurality of fields are set, the fields comprise a target mode field, an invalid mode field and an invalid time field, the target mode field is used for indicating the payment mode to which the user wants to switch, the invalid mode field is used for indicating the payment mode currently set by the terminal of the user, and the invalid time field is used for indicating the time when the currently set payment mode is invalid.
8. The apparatus according to claim 7, wherein the adding module is further configured to, if the value of the payment management framework is valid the next day, obtain a historical payment method, add the historical payment method to the failure mode field, add the to-be-switched payment method to the target mode field, and set the failure time field to a second numerical value, where the second numerical value is used to indicate an end time of the current day;
correspondingly, the generating module is further configured to generate the payment switch data based on the failure mode field, the target mode field, and the failure time field.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 4 when executing the computer program.
10. A readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 4.
CN201811583448.5A 2018-12-24 2018-12-24 Payment mode switching method and device, computer equipment and readable storage medium Active CN109829712B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811583448.5A CN109829712B (en) 2018-12-24 2018-12-24 Payment mode switching method and device, computer equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811583448.5A CN109829712B (en) 2018-12-24 2018-12-24 Payment mode switching method and device, computer equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN109829712A CN109829712A (en) 2019-05-31
CN109829712B true CN109829712B (en) 2020-11-10

Family

ID=66860816

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811583448.5A Active CN109829712B (en) 2018-12-24 2018-12-24 Payment mode switching method and device, computer equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN109829712B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105608115A (en) * 2015-12-11 2016-05-25 北京奇虎科技有限公司 Data acquisition method and apparatus

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103561157B (en) * 2013-10-07 2017-10-10 北京宝利明威软件股份有限公司 A kind of mobile terminal managing device and management method
CN105930178B (en) * 2015-11-12 2018-12-28 中国银联股份有限公司 A kind of configurable dynamic state of parameters stowage and system
US10339934B2 (en) * 2016-06-27 2019-07-02 Google Llc Asynchronous processing of user requests
CN108287751B (en) * 2017-01-09 2022-02-01 阿里巴巴集团控股有限公司 Task execution method and device and distributed system
CN107239987A (en) * 2017-04-24 2017-10-10 北京小度信息科技有限公司 Order processing method and device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105608115A (en) * 2015-12-11 2016-05-25 北京奇虎科技有限公司 Data acquisition method and apparatus

Also Published As

Publication number Publication date
CN109829712A (en) 2019-05-31

Similar Documents

Publication Publication Date Title
RU2718155C1 (en) Resource processing method and device
CN107783861B (en) Transaction rollback method, device, storage medium and computer equipment
CN111709777A (en) Payment mode recommendation method, system, terminal device and storage medium
CN106096926B (en) Event processing method, device, electronic device and storage medium
CN111881329A (en) Account balance management method and system
CN111031140A (en) Resource settlement method and device, electronic equipment and storage medium
CN110956500A (en) Method and system for reducing advertisement request time consumption in advertisement real-time bidding system
CN113515717B (en) Navigation page updating method and device, electronic equipment and storage medium
CN110286981A (en) The display methods and display system of the use state of virtual cloud desktop server
CN112506399B (en) Information publishing method of book reading page, computing device and storage medium
CN109829712B (en) Payment mode switching method and device, computer equipment and readable storage medium
JP2015531518A (en) Method and apparatus for processing electronic transaction information
CN111292028A (en) Inventory information processing method and system, computer system and readable storage medium
CN107943845A (en) A kind of electronic receipt generation method and equipment
CN110413421B (en) Service data processing method and device, and transaction data processing method and device
CN110188297B (en) Resource information display method, computing device and computer storage medium
CN110782310A (en) Method, device and system for asynchronously acquiring user attribute information from third-party platform
CN115358853A (en) Order processing system, method, device, equipment and storage medium
CN108898446B (en) Method and apparatus for outputting information
CN113706272A (en) Commodity information processing method and device and electronic equipment
CN113553203A (en) Request processing method, device, server and storage medium
JP2009031902A (en) Exchange rate update system and its method
CN111209514A (en) Method and device for providing reading incentive information of electronic book
CN110570299A (en) block chain-based digital currency active storage method and device
CN114205639B (en) Video processing method and device, electronic 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
GR01 Patent grant
GR01 Patent grant