Method and device for real-time settlement of card swiping with server delay

By verifying and querying the user's card swiping information and historical consumption information in the local database, calculating the current account balance, and updating the account consumption record in the server without delay, the transaction confirmation delay caused by server delay is solved, and efficient real-time settlement is achieved.

CN119785495APending Publication Date: 2025-04-08CHINA TELECOM YIZHI EDUCATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411995212.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

In the case of server delay, transaction confirmation of meal card consumption may be delayed for several seconds or even dozens of seconds, resulting in users being unable to obtain transaction confirmation information in time, reducing the real-time card swiping experience effect.

Method used

By verifying and querying the user's card swiping information and historical consumption information in the local database, the current account balance is calculated, and the account consumption record in the server is updated without delay.

Benefits of technology

Real-time settlement efficiency is improved in the case of server delays, and users can complete transaction settlements instantly without waiting for a remote server to respond, ensuring data integrity and consistency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119785495A_ABST
    Figure CN119785495A_ABST
Patent Text Reader

Abstract

The present application relates to a method and device for real-time settlement of card swiping with server delay. The method includes: in the case of server delay, obtaining the card swiping information of each user and the current consumption information of each user, and identifying the user account information of each user based on the card swiping information of each user; based on the user account information of each user, querying the historical consumption information of each user in the local database through verification query strategy, and calculating the current account balance information of each user based on the historical consumption information of each user and the current consumption information of each user; sending the current account balance information to the user client, and in the case of no server delay, updating the account consumption record information of each user in the server based on the current account balance information of each user and the current consumption information of each user, and obtaining the new account consumption record information of each user. The use of this method can improve the efficiency of updating school member information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of educational information management technology, and in particular to a method and device for real-time settlement of card swiping with server delay. Background Art

[0002] With the continuous development of Internet of Things technology, meal card systems widely use smart cards based on radio frequency identification (RFID), which realizes contactless payment and improves the convenience of payment. However, in practical applications, network stability and server response speed have an important impact on the real-time settlement of meal cards. Since meal card consumption usually involves a large amount of data interaction, if the network is unstable, such as weak signal, high latency or interruption, the transaction information cannot be transmitted to the server in time, thus affecting the real-time settlement. In addition, the slow response speed of the server will also cause transaction confirmation delays, which brings inconvenience to users. Therefore, how to improve the efficiency of real-time settlement under server delay is the current research focus.

[0003] The traditional real-time settlement method is to confirm the transaction in real time through the system based on the collected card information. However, when the network delay is serious, the transaction confirmation of meal card consumption may be delayed by several seconds or even tens of seconds, which makes it impossible for users to obtain transaction confirmation information in time after swiping the card. Especially during peak meal times, a large number of users consume at the same time. Network delays and server failures may cause transaction congestion, further extending the transaction confirmation time and reducing the user's real-time card swiping experience, resulting in low real-time settlement efficiency in the case of server delays. Summary of the invention

[0004] Based on this, it is necessary to provide a method, device, computer equipment, computer-readable storage medium and computer program product for real-time card settlement with server delay in order to solve the above technical problems.

[0005] In a first aspect, the present application provides a method for real-time card settlement with server delay, comprising:

[0006] In the case of server delay, obtaining card swiping information of each user and current consumption information of each user, and identifying user account information of each user based on the card swiping information of each user;

[0007] Based on the user account information of each user, query the historical consumption information of each user in the local database by verifying the query strategy, and calculate the current account balance information of each user based on the historical consumption information of each user and the current consumption information of each user;

[0008] The current account balance information is sent to the user client, and without delay on the server, based on the current account balance information of each user and the current consumption information of each user, the account consumption record information of each user in the server is updated to obtain new account consumption record information of each user.

[0009] Optionally, the identifying the user account information of each user based on the card swiping information of each user includes:

[0010] For each user, based on the card swiping information of the user, identifying the card identification information of the user;

[0011] In the local database, the account information corresponding to the card identification information is adapted to obtain the user account information of the user.

[0012] Optionally, querying the historical consumption information of each user in the local database by verifying the query strategy based on the user account information of each user includes:

[0013] Based on the user account information of the user, identifying the user's identity authentication information and the user's identity identification information, and based on the user's identity identification information and the user's identity authentication information, querying the user's historical consumption records for each card identification information in the local database;

[0014] In each of the historical consumption records, the target historical consumption record of the user in the card identification information is screened, and the last consumption record in the target historical consumption record is used as the historical consumption information of the user.

[0015] Optionally, the calculating the current account balance information of each user based on the historical consumption information of each user and the current consumption information of each user includes:

[0016] For each user, based on the historical consumption information of the user, identify the historical account balance value of the user, and based on the current consumption information of the user, identify the current consumption amount value of the user;

[0017] Calculate the current account balance value of the user based on the historical account balance value of the user and the current consumption amount value of the user;

[0018] When the current account balance value is not less than zero, using the current account balance value as the current account balance information of the user;

[0019] When the current account balance value is lower than zero, based on the current account balance value, generating card amount charging reminder information of the user, and setting temporary freezing information of the user account of the user;

[0020] The card amount charging reminder information of the user is used as the current account balance information of the user.

[0021] Optionally, after sending the current account balance information to the user client, the method further includes:

[0022] Generate a status detection signal of a server delay status, and send the status detection signal to the server respectively through a heartbeat signal detection strategy;

[0023] The current server delay status fed back by the server is received respectively, and when the current server delay status is a no-delay state, it is determined that the server is not delayed.

[0024] Optionally, updating the account consumption record information of each user in the server based on the current account balance information of each user and the current consumption information of each user to obtain new account consumption record information of each user includes:

[0025] For each user, based on the current consumption information of the user, generate the current consumption record of the user, and query the cloud consumption record information of the user and the cloud account balance information of the user in the server;

[0026] Based on the current account balance information of the user, update the cloud account balance information of the user to obtain the new cloud account balance information of the user, and freeze the account of the user when the current account balance value is lower than zero;

[0027] Based on the current consumption record of the user, update the cloud consumption record of the user to obtain a new cloud consumption record of the user;

[0028] The new cloud account balance information of the user and the new cloud consumption record of the user are used as the new account consumption record information of the user.

[0029] In a second aspect, the present application also provides a card swiping real-time settlement device for server delay, comprising:

[0030] An acquisition module, used to acquire the card swiping information of each user and the current consumption information of each user in the case of server delay, and identify the user account information of each user based on the card swiping information of each user;

[0031] A calculation module, configured to query the historical consumption information of each user in a local database by verifying the query strategy based on the user account information of each user, and calculate the current account balance information of each user based on the historical consumption information of each user and the current consumption information of each user;

[0032] The update module is used to send the current account balance information to the user client, and update the account consumption record information of each user in the server based on the current account balance information of each user and the current consumption information of each user without delay on the server, so as to obtain the new account consumption record information of each user.

[0033] Optionally, the acquisition module is specifically used to:

[0034] For each user, based on the card swiping information of the user, identifying the card identification information of the user;

[0035] In the local database, the account information corresponding to the card identification information is adapted to obtain the user account information of the user.

[0036] Optionally, the computing module is specifically used for:

[0037] Based on the user account information of the user, identifying the user's identity authentication information and the user's identity identification information, and based on the user's identity identification information and the user's identity authentication information, querying the user's historical consumption records for each card identification information in the local database;

[0038] In each of the historical consumption records, the target historical consumption record of the user in the card identification information is screened, and the last consumption record in the target historical consumption record is used as the historical consumption information of the user.

[0039] Optionally, the computing module is specifically used for:

[0040] For each user, based on the historical consumption information of the user, identify the historical account balance value of the user, and based on the current consumption information of the user, identify the current consumption amount value of the user;

[0041] Calculate the current account balance value of the user based on the historical account balance value of the user and the current consumption amount value of the user;

[0042] When the current account balance value is not less than zero, using the current account balance value as the current account balance information of the user;

[0043] When the current account balance value is lower than zero, based on the current account balance value, generating card amount charging reminder information of the user, and setting temporary freezing information of the user account of the user;

[0044] The card amount charging reminder information of the user is used as the current account balance information of the user.

[0045] Optionally, the device further comprises:

[0046] A sending module, used for generating a status detection signal of a server delay status, and sending the status detection signal to the server respectively through a heartbeat signal detection strategy;

[0047] The receiving module is used to respectively receive the current server delay status fed back by the server, and when the current server delay status is a no-delay state, determine that the server is not delayed.

[0048] Optionally, the update module is specifically used to:

[0049] For each user, based on the current consumption information of the user, generate the current consumption record of the user, and query the cloud consumption record information of the user and the cloud account balance information of the user in the server;

[0050] Based on the current account balance information of the user, update the cloud account balance information of the user to obtain the new cloud account balance information of the user, and freeze the account of the user when the current account balance value is lower than zero;

[0051] Based on the current consumption record of the user, update the cloud consumption record of the user to obtain a new cloud consumption record of the user;

[0052] The new cloud account balance information of the user and the new cloud consumption record of the user are used as the new account consumption record information of the user.

[0053] In a third aspect, the present application provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of any one of the methods in the first aspect are implemented.

[0054] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of any one of the methods in the first aspect are implemented.

[0055] In a fifth aspect, the present application provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the steps of any one of the methods in the first aspect are implemented.

[0056] The above-mentioned card swiping real-time settlement method and device for server delay obtains the card swiping information of each user and the current consumption information of each user under the condition of server delay, and identifies the user account information of each user based on the card swiping information of each user; based on the user account information of each user, in the local database, through the verification query strategy, queries the historical consumption information of each user, and calculates the current account balance information of each user based on the historical consumption information of each user and the current consumption information of each user; sends the current account balance information to the user client, and updates the account consumption record information of each user in the server based on the current account balance information of each user and the current consumption information of each user when the server is not delayed, and obtains the new account consumption record information of each user. This scheme uses the built-in storage function and combines the local real-time settlement and heartbeat synchronization mechanism. When the user swipes the card for consumption, the card swiping machine first stores the transaction information in the local cache, and then completes the transaction settlement instantly according to the locally stored user balance information through the local real-time settlement function, without waiting for the response of the remote server. In this way, even in the case of network instability or server failure, the user can use the meal card normally to achieve instant transaction confirmation. At the same time, this solution detects the continuous communication between the card reader and the server in real time. In this way, the server delay status is detected. If the server is delayed, the card reader uploads the locally cached transaction records to the server, and the server synchronizes the data and updates the user account balance. If the server is not delayed, it waits for the connection to be restored before processing to ensure the integrity and consistency of the data. This comprehensively improves the efficiency of real-time settlement in the case of server delay. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0058] Figure 1 It is a flowchart of a method for real-time settlement of card swiping with server delay in one embodiment;

[0059] Figure 2 A flowchart of an example of real-time card settlement with server delay in one embodiment;

[0060] Figure 3 It is a structural block diagram of a card swiping real-time settlement device for server delay in one embodiment;

[0061] Figure 4 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0062] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0063] The method for real-time settlement of card swiping with server delay provided in the embodiment of the present application can be applied to the application environment of real-time settlement of card swiping with server delay. Among them, the method can be applied to the terminal corresponding to the card swiping device with local storage space. Among them, the terminal uses the built-in storage function and combines the local real-time settlement and heartbeat synchronization mechanism. When the user swipes the card for consumption, the card swiping machine first stores the transaction information in the local cache, and then uses the local real-time settlement function to complete the transaction settlement immediately according to the locally stored user balance information without waiting for the response of the remote server. In this way, even in the case of unstable network or server failure, the user can use the meal card normally to realize instant transaction confirmation. At the same time, this scheme detects the continuous communication between the card swiping machine and the server in real time. Thereby detecting the delay state of the server, if the server is delayed, the card swiping machine uploads the transaction record of the local cache to the server, and the server synchronizes the data and updates the user account balance. If the server is not delayed, wait for the connection to be restored before processing to ensure the integrity and consistency of the data. Thereby comprehensively improving the efficiency of real-time settlement in the case of server delay.

[0064] In an exemplary embodiment, Figure 1 As shown, a method for real-time card settlement with server delay is provided, and the method is applied to a terminal as an example for explanation, including the following steps S101 to S103. Among them:

[0065] Step S101, in the case of server delay, obtain the card swiping information of each user and the current consumption information of each user, and identify the user account information of each user based on the card swiping information of each user.

[0066] In this embodiment, the terminal sends a heartbeat signal to the server in real time through a heartbeat mechanism, thereby collecting the server's delay status in real time, and obtaining the card swiping information of each user and the current consumption information of each user in the case of server delay. Wherein, in the case of no server delay, the terminal directly uploads the user's card swiping information and current consumption information to the server. In the case of server delay, after the terminal obtains the card swiping information of each user and the current consumption information of each user, it identifies the user account information of each user based on the control program preset in the terminal. Wherein, the delay status includes abnormal connection information such as connection fluctuation and connection interruption between the card swiping device and the server, and information that the server information response delay time is greater than the delay time preset in the terminal. Wherein, the user's current consumption information is the actual consumption information of each user input into the card swiping device by the staff, and the consumption information includes the consumption amount and the consumption amount corresponding to each consumption amount. The user's card swiping information is the card identification information of the user. The card identification information is used to verify the user account information of the user holding the card. The specific identification process will be described in detail later.

[0067] Step S102, based on the user account information of each user, in the local database, by verifying the query strategy, querying the historical consumption information of each user, and calculating the current account balance information of each user based on the historical consumption information of each user and the current consumption information of each user.

[0068] In this embodiment, the terminal queries the historical consumption information of each user in the local database by verifying the query strategy based on the user account information of each user, and calculates the current account balance information of each user based on the historical consumption information of each user and the current consumption information of each user. Among them, the local database is a database preset in the local storage space of the terminal, which stores the user account information corresponding to each card identification information and the user consumption record corresponding to each card identification information. Then, the current account balance information of each user calculated by the terminal includes the balance value of the current account. The specific calculation process will be described in detail later.

[0069] Step S103,.

[0070] In this embodiment, the terminal sends the current account balance information to the user client, and updates the account consumption record information of each user in the server based on the current account balance information of each user and the current consumption information of each user without delay on the server, and obtains the new account consumption record information of each user. The specific update process will be described in detail later. Among them, when the current account balance information is sent to the user client, the account balance change information will be displayed in the entry interface of the user client, and the account balance change information and the current account balance value of the user and the current consumption information will be displayed.

[0071] Based on the above scheme, through the built-in storage function, combined with the local real-time settlement and heartbeat synchronization mechanism. When the user swipes the card for consumption, the card reader first stores the transaction information in the local cache, and then uses the local real-time settlement function to complete the transaction settlement instantly based on the locally stored user balance information, without waiting for the response of the remote server. In this way, even in the case of unstable network or server failure, users can use the meal card normally and realize instant transaction confirmation. At the same time, this scheme detects the continuous communication between the card reader and the server in real time. In order to detect the delay status of the server, if the server is delayed, the card reader uploads the locally cached transaction records to the server, and the server synchronizes the data and updates the user account balance. If the server is not delayed, wait for the connection to be restored before processing to ensure the integrity and consistency of the data. Thereby comprehensively improving the efficiency of real-time settlement in the case of server delay.

[0072] Optionally, based on the card swiping information of each user, the user account information of each user is identified, including: for each user, based on the user's card swiping information, the user's card identification information is identified; in the local database, the account information corresponding to the card identification information is adapted to obtain the user's user account information.

[0073] In this embodiment, the terminal identifies the card identification information of each user based on the card swiping information of the user. The card identification information is the card identification code of the user, the card magnetic stripe ID ( Identity document ) and other information.

[0074] In the local database, the terminal matches the account information corresponding to the card identification information to obtain the user account information of the user.

[0075] Based on the above solution, the user account information of the user is queried by identifying the card identification information of each card swiping information, thereby improving the recognition efficiency of the user account information.

[0076] Optionally, based on the user account information of each user, in the local database, through the verification query strategy, the historical consumption information of each user is queried, including: based on the user account information of the user, identifying the user's identity authentication information and the user's identity identification information, and based on the user's identity identification information and the user's identity authentication information, querying the user's historical consumption record in each card identification information in the local database; in each historical consumption record, filtering the target historical consumption record of the user in the card identification information, and taking the last consumption record in the target historical consumption record as the user's historical consumption information.

[0077] In this embodiment, the terminal identifies the user's authentication information and the user's identity information based on the user's user account information, and based on the user's identity information and the user's authentication information, queries the user's historical consumption records for each card identification information in the local database. Wherein, due to the existence of card loss, card damage, card demagnetization, etc., each user account corresponds to one or more card identification information, and then, the historical consumption record of each card identification information queried by the terminal includes the consumption record information of each card identification information within a preset period of time. Wherein, the preset period of time can be, but is not limited to, 10 days, 20 days, 30 days, etc., and the terminal will regularly clear the storage database in the local storage interval to ensure the space storage capacity of the local storage space. Wherein, the historical consumption record of each card identification information obtained by the terminal includes the time point of each consumption of each card identification information, the consumption amount of each consumption, and the consumption amount, etc.

[0078] In each historical consumption record, the terminal screens the target historical consumption record of the user in the card identification information, and uses the last consumption record in the target historical consumption record as the historical consumption information of the user.

[0079] Based on the above solution, the user's historical consumption information is screened through card information recognition, which improves the comprehensiveness and accuracy of the recognition of historical consumption information.

[0080] Optionally, based on the historical consumption information of each user and the current consumption information of each user, the current account balance information of each user is calculated, including: for each user, based on the user's historical consumption information, identifying the user's historical account balance value, and based on the user's current consumption information, identifying the user's current consumption amount value; based on the user's historical account balance value and the user's current consumption amount value, calculating the user's current account balance value; when the current account balance value is not less than zero, using the current account balance value as the user's current account balance information; when the current account balance value is less than zero, generating the user's card amount recharge reminder information based on the current account balance value, and setting the user's user account temporary freeze information; using the user's card amount recharge reminder information as the user's current account balance information.

[0081] In this embodiment, the terminal identifies the historical account balance value of each user based on the historical consumption information of the user, and identifies the current consumption amount value of the user based on the current consumption information of the user. The current consumption amount value includes the sub-consumption amount value of each consumption item. Then, the terminal subtracts all the current consumption amount values ​​of the user from the historical account balance value of the user to obtain the current account balance value of the user. When the current account balance value is not less than zero, the current account balance value is used as the current account balance information of the user. Then, when the current account balance value is less than zero, the terminal generates the card amount charging reminder information of the user based on the current account balance value, and sets the temporary freezing information of the user's user account. The temporary freezing information of the user account is to establish the corresponding relationship between the user account information of the user and the temporary freezing identifier, so that the user account information of the user can no longer use the card corresponding to each card identification information bound to the user account information of the user for consumption.

[0082] Finally, the terminal uses the user's card amount charging reminder information as the user's current account balance information.

[0083] Based on the above scheme, the consumption amount is calculated to identify the user's current account balance value, and a split analysis is performed when the current account balance value is lower than zero, so that the balance situation of the user's account information can be analyzed to avoid users with no balance making abnormal consumption with the help of server anomalies, thereby causing abnormal consumption problems.

[0084] Optionally, after sending the current account balance information to the user client, it also includes: generating a status detection signal of the server delay status, and sending the status detection signal to the server respectively through a heartbeat signal detection strategy; receiving the current server delay status fed back by the server respectively, and determining that the server is not delayed when the current server delay status is a no-delay state.

[0085] In this embodiment, the terminal generates a status detection signal of the server delay state, and sends the status detection signal to the server respectively through the heartbeat signal detection strategy. Then, the terminal receives the current server delay state fed back by the server respectively, and determines that the server is not delayed when the current server delay state is a no-delay state. Specifically, the terminal generates a heartbeat signal (i.e., a status detection signal), and sends a heartbeat signal to the server regularly through the heartbeat signal detection strategy. Among them, the heartbeat signal is used to detect the connection state between the card swiping machine and the server in real time. When the connection state is normal (i.e., when the delay state is a no-delay state), it is determined that the server is not delayed, and the heartbeat signal continues to be sent to the server regularly until the connection state between the card swiping machine and the server is detected to be abnormal, and the server is determined to be delayed.

[0086] Based on the above solution, the server connection status is detected in real time through the heartbeat signal to ensure the accuracy and timeliness of the recognition of the server connection status.

[0087] Optionally, based on the current account balance information of each user and the current consumption information of each user, the account consumption record information of each user in the server is updated to obtain the new account consumption record information of each user, including: for each user, based on the current consumption information of the user, the user's current consumption record is generated, and the user's cloud consumption record information and the user's cloud account balance information are queried in the server; based on the user's current account balance information, the user's cloud account balance information is updated to obtain the user's new cloud account balance information, and when the current account balance value is lower than zero, the user's account is frozen; based on the user's current consumption record, the user's cloud consumption record is updated to obtain the user's new cloud consumption record; the user's new cloud account balance information and the user's new cloud consumption record are used as the user's new account consumption record information.

[0088] In this embodiment, the terminal generates the current consumption record of each user based on the current consumption information of the user, and queries the cloud consumption record information of the user and the cloud account balance information of the user in the server. Then, the terminal updates the cloud account balance information of the user based on the current account balance information of the user, obtains the new cloud account balance information of the user, and freezes the account of the user when the current account balance value is lower than zero. Among them, the account freezing processing method is to stop the consumption information of the card corresponding to each card identification information of the user. That is, when the user uses the card corresponding to other card identification information for consumption, it is necessary to recharge the cloud account balance information of the card corresponding to this card identification information to not less than zero before consumption can be made on other cards, otherwise, all cards corresponding to the user's account information cannot be consumed. When the terminal collects the consumption record of the card, it directly feedbacks the information "card frozen, cannot consume" to the staff.

[0089] Then, the terminal updates the user's cloud consumption record based on the user's current consumption record to obtain the user's new cloud consumption record. Finally, the terminal uses the user's new cloud account balance information and the user's new cloud consumption record as the user's new account consumption record information.

[0090] Based on the above solution, by updating data when the card swiping device is connected to the server normally, not only can the problem of excessive storage space occupation of the card swiping device be avoided, but also the card swiping information can be updated to the server in real time, ensuring the timeliness of data synchronization in the server and the integrity of data updates.

[0091] This application also provides an example of real-time card settlement with server delay, such as Figure 2As shown, the specific processing process includes the following steps:

[0092] Step S201, in case of server delay, obtain the card swiping information of each user and the current consumption information of each user.

[0093] Step S202: for each user, based on the card swiping information of the user, identify the card identification information of the user.

[0094] Step S203: In the local database, the account information corresponding to the card identification information is matched to obtain the user account information of the user.

[0095] Step S204, based on the user's user account information, identify the user's authentication information and the user's identity information, and based on the user's identity information and the user's authentication information, query the user's historical consumption records for each card identification information in the local database.

[0096] Step S205, in each historical consumption record, select the target historical consumption record of the user in the card identification information, and use the last consumption record in the target historical consumption record as the historical consumption information of the user.

[0097] Step S206, for each user, based on the user's historical consumption information, identify the user's historical account balance value, and based on the user's current consumption information, identify the user's current consumption amount value.

[0098] Step S207, calculating the current account balance value of the user based on the historical account balance value of the user and the current consumption amount value of the user.

[0099] Step S208, when the current account balance value is not less than zero, the current account balance value is used as the user's current account balance information.

[0100] Step S209, when the current account balance value is lower than zero, based on the current account balance value, generate the user's card amount charging reminder information, and set the user's user account temporary freezing information.

[0101] Step S210: Using the card balance charging reminder information of the user as the current account balance information of the user.

[0102] Step S211, sending the current account balance information to the user client.

[0103] Step S212, generating a status detection signal of the server delay status, and sending the status detection signal to the server respectively through a heartbeat signal detection strategy.

[0104] Step S213, receiving the current server delay status fed back by the server respectively, and determining that the server is not delayed when the current server delay status is a no-delay state.

[0105] Step S214, when the server is not delayed, for each user, based on the user's current consumption information, the user's current consumption record is generated, and the user's cloud consumption record information and the user's cloud account balance information are queried in the server.

[0106] Step S215: based on the current account balance information of the user, update the cloud account balance information of the user, obtain the new cloud account balance information of the user, and freeze the account of the user when the current account balance value is lower than zero.

[0107] Step S216: based on the user's current consumption record, update the user's cloud consumption record to obtain the user's new cloud consumption record.

[0108] Step S217: The user's new cloud account balance information and the user's new cloud consumption record are used as the user's new account consumption record information.

[0109] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0110] Based on the same inventive concept, the embodiment of the present application also provides a device for real-time settlement of card swiping with server delay for implementing the above-mentioned method for real-time settlement of card swiping with server delay. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above-mentioned method, so the specific limitations in one or more embodiments of the device for real-time settlement of card swiping with server delay provided below can refer to the limitations of the method for real-time settlement of card swiping with server delay above, and will not be repeated here.

[0111] In an exemplary embodiment, Figure 3 As shown, a card swiping real-time settlement device for server delay is provided, comprising: an acquisition module 310, a calculation module 320 and an update module 330, wherein:

[0112] The acquisition module 310 is used to acquire the card swiping information of each user and the current consumption information of each user in the case of server delay, and identify the user account information of each user based on the card swiping information of each user;

[0113] The calculation module 320 is used to query the historical consumption information of each user in the local database by verifying the query strategy based on the user account information of each user, and calculate the current account balance information of each user based on the historical consumption information of each user and the current consumption information of each user;

[0114] The update module 330 is used to send the current account balance information to the user client, and update the account consumption record information of each user in the server based on the current account balance information of each user and the current consumption information of each user without delay on the server, so as to obtain the new account consumption record information of each user.

[0115] Optionally, the acquisition module 310 is specifically configured to:

[0116] For each user, based on the card swiping information of the user, identifying the card identification information of the user;

[0117] In the local database, the account information corresponding to the card identification information is adapted to obtain the user account information of the user.

[0118] Optionally, the calculation module 320 is specifically used for:

[0119] Based on the user account information of the user, identifying the user's identity authentication information and the user's identity identification information, and based on the user's identity identification information and the user's identity authentication information, querying the user's historical consumption records for each card identification information in the local database;

[0120] In each of the historical consumption records, the target historical consumption record of the user in the card identification information is screened, and the last consumption record in the target historical consumption record is used as the historical consumption information of the user.

[0121] Optionally, the calculation module 320 is specifically used for:

[0122] For each user, based on the historical consumption information of the user, identify the historical account balance value of the user, and based on the current consumption information of the user, identify the current consumption amount value of the user;

[0123] Calculate the current account balance value of the user based on the historical account balance value of the user and the current consumption amount value of the user;

[0124] When the current account balance value is not less than zero, using the current account balance value as the current account balance information of the user;

[0125] When the current account balance value is lower than zero, based on the current account balance value, generating card amount charging reminder information of the user, and setting temporary freezing information of the user account of the user;

[0126] The card amount charging reminder information of the user is used as the current account balance information of the user.

[0127] Optionally, the device further comprises:

[0128] A sending module, used for generating a status detection signal of a server delay status, and sending the status detection signal to the server respectively through a heartbeat signal detection strategy;

[0129] The receiving module is used to respectively receive the current server delay status fed back by the server, and when the current server delay status is a no-delay state, determine that the server is not delayed.

[0130] Optionally, the updating module 330 is specifically configured to:

[0131] For each user, based on the current consumption information of the user, generate the current consumption record of the user, and query the cloud consumption record information of the user and the cloud account balance information of the user in the server;

[0132] Based on the current account balance information of the user, update the cloud account balance information of the user to obtain the new cloud account balance information of the user, and freeze the account of the user when the current account balance value is lower than zero;

[0133] Based on the current consumption record of the user, update the cloud consumption record of the user to obtain a new cloud consumption record of the user;

[0134] The new cloud account balance information of the user and the new cloud consumption record of the user are used as the new account consumption record information of the user.

[0135] Each module in the above-mentioned card swiping real-time settlement device for server delay can be implemented in whole or in part by software, hardware and their combination. Each module can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module above.

[0136] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 4 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a real-time settlement method for swiping a card with server delay is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

[0137] Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0138] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the steps of a method for real-time settlement of card swiping with server delay are implemented.

[0139] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of a method for real-time settlement of card swiping with server delay are implemented.

[0140] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the steps of a method for real-time settlement of card swiping with server delay.

[0141] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0142] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0143] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0144] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for real-time settlement of card payments with server delay, characterized in that: The method comprises: In the case of server delay, obtaining card swiping information of each user and current consumption information of each user, and identifying user account information of each user based on the card swiping information of each user; Based on the user account information of each user, query the historical consumption information of each user in the local database by verifying the query strategy, and calculate the current account balance information of each user based on the historical consumption information of each user and the current consumption information of each user; The current account balance information is sent to the user client, and without delay on the server, based on the current account balance information of each user and the current consumption information of each user, the account consumption record information of each user in the server is updated to obtain new account consumption record information of each user.

2. The method according to claim 1, characterized in that The identifying the user account information of each user based on the card swiping information of each user includes: For each user, based on the card swiping information of the user, identifying the card identification information of the user; In the local database, the account information corresponding to the card identification information is adapted to obtain the user account information of the user.

3. The method according to claim 2, characterized in that The querying of the historical consumption information of each user in the local database by verifying the query strategy based on the user account information of each user includes: Based on the user account information of the user, identifying the user's identity authentication information and the user's identity identification information, and based on the user's identity identification information and the user's identity authentication information, querying the user's historical consumption records for each card identification information in the local database; In each of the historical consumption records, the target historical consumption record of the user in the card identification information is screened, and the last consumption record in the target historical consumption record is used as the historical consumption information of the user.

4. The method according to claim 1, characterized in that The calculating the current account balance information of each user based on the historical consumption information of each user and the current consumption information of each user includes: For each user, based on the historical consumption information of the user, identify the historical account balance value of the user, and based on the current consumption information of the user, identify the current consumption amount value of the user; Calculate the current account balance value of the user based on the historical account balance value of the user and the current consumption amount value of the user; When the current account balance value is not less than zero, using the current account balance value as the current account balance information of the user; When the current account balance value is lower than zero, based on the current account balance value, generating card amount charging reminder information of the user, and setting temporary freezing information of the user account of the user; The card amount charging reminder information of the user is used as the current account balance information of the user.

5. The method according to claim 1, characterized in that After sending the current account balance information to the user client, the method further includes: Generate a status detection signal of a server delay status, and send the status detection signal to the server respectively through a heartbeat signal detection strategy; The current server delay status fed back by the server is received respectively, and when the current server delay status is a no-delay state, it is determined that the server is not delayed.

6. The method according to claim 1, characterized in that The updating of the account consumption record information of each user in the server based on the current account balance information of each user and the current consumption information of each user to obtain the new account consumption record information of each user includes: For each user, based on the current consumption information of the user, generate the current consumption record of the user, and query the cloud consumption record information of the user and the cloud account balance information of the user in the server; Based on the current account balance information of the user, update the cloud account balance information of the user to obtain the new cloud account balance information of the user, and freeze the account of the user when the current account balance value is lower than zero; Based on the current consumption record of the user, update the cloud consumption record of the user to obtain a new cloud consumption record of the user; The new cloud account balance information of the user and the new cloud consumption record of the user are used as the new account consumption record information of the user.

7. A card swiping real-time settlement device for server delay, characterized in that: The device comprises: An acquisition module, used to acquire the card swiping information of each user and the current consumption information of each user in the case of server delay, and identify the user account information of each user based on the card swiping information of each user; A calculation module, configured to query the historical consumption information of each user in a local database by verifying the query strategy based on the user account information of each user, and calculate the current account balance information of each user based on the historical consumption information of each user and the current consumption information of each user; The update module is used to send the current account balance information to the user client, and update the account consumption record information of each user in the server based on the current account balance information of each user and the current consumption information of each user without delay on the server, so as to obtain the new account consumption record information of each user.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.