Account data processing method and device, electronic equipment and storage medium

文档序号:1905909 发布日期:2021-11-30 浏览:7次 中文

阅读说明:本技术 账户数据处理方法、装置、电子设备及存储介质 (Account data processing method and device, electronic equipment and storage medium ) 是由 冯鹏 于 2021-09-01 设计创作,主要内容包括:本公开提供一种账户数据处理方法、装置、电子设备及存储介质,该方法包括:基于客户端的余额查询请求获取对应的用户账户信息;其中,用户账户信息包括未过期金额、即将过期金额和统计时间;获取余额查询请求的查询时间并与统计时间进行比较;若查询时间与统计时间为同一天,则向客户端返回未过期金额与即将过期金额之和;若查询时间与统计时间的时间差小于或等于第一预设阈值,则向客户端返回未过期金额;若查询时间与统计时间的时间差大于第一预设阈值,则向客户端返回系统异常信息。本公开实现数据处理的无延迟的账户金额过期,同时在查询过程中不需要对账户明细实时汇总操作进而提升了查询性能。(The present disclosure provides an account data processing method, an account data processing apparatus, an electronic device, and a storage medium, where the method includes: acquiring corresponding user account information based on a balance inquiry request of a client; the user account information comprises unexpired money, namely overdue money and statistical time; acquiring the query time of the balance query request and comparing the query time with the statistical time; if the query time and the statistical time are the same day, returning the sum of the unexpired amount and the to-be-expired amount to the client; if the time difference between the query time and the statistical time is less than or equal to a first preset threshold value, returning unexpired money to the client; and if the time difference between the query time and the statistical time is greater than a first preset threshold value, returning system abnormal information to the client. The method and the device for processing the account amount achieve data processing without delay and meanwhile do not need to collect account details in real time in the inquiry process, so that the inquiry performance is improved.)

1. An account data processing method, comprising:

acquiring corresponding user account information based on a balance inquiry request of a client; wherein the user account information comprises unexpired amount, namely, overdue amount and statistical time;

acquiring the query time of the balance query request and comparing the query time with the statistical time;

if the query time and the statistical time are the same day, returning the sum of the unexpired amount and the to-be-expired amount to the client;

if the time difference between the query time and the statistical time is smaller than or equal to a first preset threshold value, returning the unexpired money to the client;

and if the time difference between the query time and the statistical time is greater than the first preset threshold, returning system abnormal information to the client.

2. The account data processing method of claim 1, further comprising:

and executing an account balance expiration task based on a first preset time to update the user account information.

3. The account data processing method of claim 1, wherein the user account information comprises an execution counter, the method further comprising:

acquiring the posting detail of the user and corresponding posting enabling time and invalidation time;

updating the unexpired amount or the immediately expired amount based on the user posting details and the corresponding posting enabling time and the corresponding expiration time, and adding 1 to the count value of the execution counter;

and starting the posting operation of the user and waiting for posting completion information.

4. The account data processing method of claim 3, wherein performing the user posting operation comprises:

and asynchronously storing the user posting details, subtracting 1 from the count value of the execution counter and sending posting completion information to the process for starting the user posting operation.

5. The account data processing method of claim 1, wherein the user account information comprises an execution counter, the method further comprising:

acquiring the user account statement;

updating the unexpired amount or the just-to-expire amount based on the user statement details, and adding 1 to the count value of the execution counter;

and starting the charge-out operation of the user and waiting for charge-out completion information.

6. The account data processing method of claim 5, wherein the updating the unexpired amount or the upcoming expired amount based on the user billing details comprises:

acquiring the incoming time of the user account statement and comparing the incoming time with the statistical time;

if the incoming time is the same as the statistical time, sequentially deducting the amount to be overdue and the amount which is not overdue;

if the time difference between the incoming time and the statistical time is smaller than or equal to a second preset threshold value, deducting the unexpired amount;

and if the time difference between the incoming time and the statistical time is greater than the second preset threshold, returning system abnormal information to the client.

7. The account data processing method of claim 5, wherein performing the user checkout operation comprises:

sorting the user posting details according to the failure time of the user posting details, and sequentially changing the use amount and the state of the user posting details based on the user posting details;

and asynchronously storing the user account-out details, subtracting 1 from the count value of the execution counter and sending account-out completion information to the process starting the user account-out operation.

8. The account data processing method according to claim 4 or 7, wherein the method further comprises:

judging whether the count value of the execution counter is 0 or not at a second preset time;

if the count value of the execution counter is 0, judging whether the statistical time is the system time;

and if the statistical time is not the system time, updating the user account information and updating the state of the corresponding user posting detail to be overdue.

9. An account data processing apparatus, comprising:

the account information module is used for acquiring corresponding user account information based on a balance inquiry request of the client; wherein the user account information comprises unexpired amount, namely, overdue amount and statistical time;

the balance inquiry module is used for acquiring the inquiry time of the balance inquiry request and comparing the inquiry time with the statistical time;

if the query time and the statistical time are the same day, returning the sum of the unexpired amount and the to-be-expired amount to the client;

if the time difference between the query time and the statistical time is smaller than or equal to a first preset threshold value, returning the unexpired money to the client;

and if the time difference between the query time and the statistical time is greater than the first preset threshold, returning system abnormal information to the client.

10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the account data processing method according to any of claims 1 to 8 are implemented when the processor executes the program.

11. A non-transitory computer readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the account data processing method according to any one of claims 1 to 8.

Technical Field

The present disclosure relates to the field of computer technologies, and in particular, to an account data processing method and apparatus, an electronic device, and a storage medium.

Background

In the internet marketing activity, the expiration of the user account balance under specified conditions (such as timeout, abnormal termination of activities and the like) becomes a common business requirement, and two common solutions are currently provided, namely, a regular task is used for scanning the user account balance to execute batch expiration, and account balance is filtered and summarized in real time.

The problem of expiration delay of data processing mainly exists when the balance of a user account scanned by a timing task is overdue in batch. The timed task overdue job belongs to batch processing operation, the processing of the whole job needs a period of time, and the balance which should be overdue in the user account is available before the operation of the user account is completed after the overdue time. There is an obvious performance bottleneck in filtering the entering details and summarizing the account balance in real time. When a user inquires account balance, the user must perform real-time operation on the account entry details, and when the user has more account entry details or operates frequently, the data processing process brings great pressure to the database, so that the performance and throughput of the whole system are affected.

Disclosure of Invention

The invention provides an account data processing method, which is used for overcoming the defects of expiration delay or obvious performance bottleneck of data processing in the prior art and realizing the account balance non-delay expiration without operating account details.

The present disclosure provides an account data processing method, including:

acquiring corresponding user account information based on a balance inquiry request of a client; wherein the user account information comprises unexpired amount, namely, overdue amount and statistical time;

acquiring the query time of the balance query request and comparing the query time with the statistical time;

if the query time and the statistical time are the same day, the client returns the sum of the unexpired amount and the to-be-expired amount;

if the time difference between the query time and the statistical time is smaller than or equal to a first preset threshold value, returning the unexpired money to the client;

and if the time difference between the query time and the statistical time is greater than the first preset threshold, returning system abnormal information to the client.

According to the account data processing method provided by the disclosure, the method further comprises the following steps:

and executing an account balance expiration task based on a first preset time to update the user account information.

According to the account data processing method provided by the present disclosure, the user account information includes an execution counter, and the method further includes:

acquiring the posting detail of the user and corresponding posting enabling time and invalidation time;

updating the unexpired amount or the immediately expired amount based on the user posting details and the corresponding posting enabling time and the corresponding expiration time, and adding 1 to the count value of the execution counter;

and starting the posting operation of the user and waiting for posting completion information.

According to the account data processing method provided by the disclosure, the executing of the user account entry operation comprises the following steps:

and asynchronously storing the user posting details, subtracting 1 from the count value of the execution counter and sending posting completion information to the process for starting the user posting operation.

According to the account data processing method provided by the present disclosure, the user account information includes an execution counter, and the method further includes:

acquiring the user account statement;

updating the unexpired amount or the just-to-expire amount based on the user statement details, and adding 1 to the count value of the execution counter;

and starting the charge-out operation of the user and waiting for charge-out completion information.

According to the account data processing method provided by the disclosure, the updating the unexpired amount or the upcoming expired amount based on the user billing details comprises:

acquiring the incoming time of the user account statement and comparing the incoming time with the statistical time;

if the incoming time is the same as the statistical time, sequentially deducting the amount to be overdue and the amount which is not overdue;

if the time difference between the incoming time and the statistical time is smaller than or equal to a second preset threshold value, deducting the unexpired amount;

and if the time difference between the incoming time and the statistical time is greater than the second preset threshold, returning system abnormal information to the client.

According to the account data processing method provided by the disclosure, the executing of the user charge-off operation comprises the following steps:

sorting the user posting details according to the failure time of the user posting details, and sequentially changing the use amount and the state of the user posting details based on the user posting details;

and asynchronously storing the user account-out details, subtracting 1 from the count value of the execution counter and sending account-out completion information to the process starting the user account-out operation.

According to the account data processing method provided by the disclosure, the method further comprises the following steps:

judging whether the count value of the execution counter is 0 or not at a second preset time;

if the count value of the execution counter is 0, judging whether the statistical time is the system time;

and if the statistical time is not the system time, updating the user account information and updating the state of the corresponding user posting detail to be overdue.

The present disclosure also provides an account data processing apparatus, including:

the account information module is used for acquiring corresponding user account information based on a balance inquiry request of the client; wherein the user account information comprises unexpired amount, namely, overdue amount and statistical time;

the balance inquiry module is used for acquiring the inquiry time of the balance inquiry request and comparing the inquiry time with the statistical time;

if the query time and the statistical time are the same day, returning the sum of the unexpired amount and the to-be-expired amount to the client;

if the time difference between the query time and the statistical time is smaller than or equal to a first preset threshold value, returning the unexpired money to the client;

and if the time difference between the query time and the statistical time is greater than the first preset threshold, returning system abnormal information to the client.

According to the account data processing device provided by the present disclosure, the device further comprises an account information updating module, configured to:

and executing an account balance expiration task based on a first preset time to update the user account information.

According to the account data processing device provided by the present disclosure, the user account information includes an execution counter, and the device further includes an account posting module configured to:

acquiring the posting detail of the user and corresponding posting enabling time and invalidation time;

updating the unexpired amount or the immediately expired amount based on the user posting details and the corresponding posting enabling time and the corresponding expiration time, and adding 1 to the count value of the execution counter;

and starting the posting operation of the user and waiting for posting completion information.

According to the account data processing device provided by the present disclosure, the account posting module is further configured to:

and asynchronously storing the user posting details, subtracting 1 from the count value of the execution counter and sending posting completion information to the process for starting the user posting operation.

According to the account data processing device provided by the present disclosure, the user account information includes an execution counter, and the device further includes an account charge-out module, configured to:

acquiring the user account statement;

updating the unexpired amount or the just-to-expire amount based on the user statement details, and adding 1 to the count value of the execution counter;

and starting the charge-out operation of the user and waiting for charge-out completion information. According to the account balance expiration solving device provided by the present disclosure, the account charge-out module is further configured to:

acquiring the incoming time of the user account statement and comparing the incoming time with the statistical time;

if the incoming time is the same as the statistical time, sequentially deducting the amount to be overdue and the amount which is not overdue;

if the time difference between the incoming time and the statistical time is smaller than or equal to a second preset threshold value, deducting the unexpired amount;

and if the time difference between the incoming time and the statistical time is greater than the second preset threshold, returning system abnormal information to the client.

According to the account data processing device provided by the present disclosure, the account charge-out module is further configured to:

sorting the user posting details according to the failure time of the user posting details, and sequentially changing the use amount and the state of the user posting details based on the user posting details;

and asynchronously storing the user account-out details, subtracting 1 from the count value of the execution counter and sending account-out completion information to the process starting the user account-out operation.

According to an account data processing apparatus provided by the present disclosure, the update account information module is further configured to:

judging whether the count value of the execution counter is 0 or not at a second preset time;

if the count value of the execution counter is 0, judging whether the statistical time is the system time;

and if the statistical time is not the system time, updating the user account information and updating the state of the corresponding user posting detail to be overdue.

The present disclosure also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the steps of the account data processing method according to any one of the above methods when executing the program.

The present disclosure also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the account data processing method as any one of the above.

According to the account data processing method and device, the electronic equipment and the storage medium, the account information including unexpired amount, the amount to be expired and the statistical time is acquired, the statistical time is compared with the query time to output the effective account balance, the account amount without delay in data processing is expired, and meanwhile, the account detail does not need to be summarized in real time in the query process, so that the query performance is improved.

Drawings

In order to more clearly illustrate the technical solutions of the present disclosure or the prior art, the drawings needed for the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present disclosure, and other drawings can be obtained by those skilled in the art without creative efforts.

FIG. 1 is one of the flow diagrams of an account data processing method provided by the present disclosure;

FIG. 2 is a second flowchart of an account data processing method provided by the present disclosure;

FIG. 3 is a third flowchart of an account data processing method provided by the present disclosure;

FIG. 4 is a fourth flowchart of an account data processing method provided by the present disclosure;

FIG. 5 is a fifth flowchart of an account data processing method provided by the present disclosure;

FIG. 6 is a schematic structural diagram of an account data processing apparatus provided by the present disclosure;

fig. 7 is a schematic structural diagram of an electronic device provided by the present disclosure.

Detailed Description

In order to make the objects, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be described clearly and completely with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are some, but not all, of the embodiments of the present disclosure. All other embodiments, which can be obtained by a person skilled in the art without making creative efforts based on the embodiments of the present disclosure, belong to the protection scope of the embodiments of the present disclosure.

The technical solutions provided by the embodiments of the present disclosure are described below with reference to fig. 1 to 7.

Fig. 1 is a schematic flowchart of an account data processing method provided in an embodiment of the present disclosure, and as shown in fig. 1, the method includes:

step 110, acquiring corresponding user account information based on a balance inquiry request of a client; the user account information comprises unexpired amount, namely, overdue amount and statistical time.

And step 120, acquiring the query time of the balance query request and comparing the query time with the statistical time.

Step 130, if the query time and the statistical time are the same day, returning the sum of the unexpired amount and the upcoming expired amount to the client.

And 140, if the time difference between the query time and the statistical time is less than or equal to a first preset threshold, returning the unexpired money to the client.

And 150, if the time difference between the query time and the statistical time is greater than the first preset threshold, returning system abnormal information to the client.

It should be noted that, the present disclosure adopts a design of no delay of the user account balance, and the setting includes the statistical time (year, month and day), the unexpired amount, i.e., the user account to be expired. The unexpired amount represents the account balance sum which cannot be expired after the counting time, namely the expired amount represents the account balance sum which is about to expire after the counting time, and the counting time represents the date of scanning account entry details of the expired user. For example, if the statistical time is 2021, 9, month and 5, the amount of expired money is the total amount of account entries with expiration time of 2021, 9, month and 6, and the amount of unexpired money is the total amount of account entries with expiration time of 2021, 9, month and 6.

Specifically, when the user balance inquiry operation is executed, whether a corresponding user account exists is judged firstly, and if yes, the account balance without delay overdue can be acquired based on the user account information. Assuming that the first preset threshold is one day and the statistical time is 9/5/2021 year, if the user executes balance inquiry operation on the same day, judging that the inquiry time and the statistical time are the same day, summarizing unexpired amount and amount to be expired, and returning the summarized amount as effective balance; when the user makes a balance inquiry request on 9/6/2021, the amount which is about to expire on the inquiry day is invalidated, so that the unexpired amount is returned as a valid balance; when the user inquires the account in 9, 10 and 2021, the latest statistical time of the user account information is still remained in 9, 5 and 2021 because the user account information is not updated in time, and the amount which is not expired in the current inquiry time in unexpired amount cannot be judged, so that system abnormal information is returned.

According to the account data processing method, the account information including unexpired amount, the amount to be expired and the statistical time is obtained, the statistical time is compared with the query time to output the effective account balance, the account amount which is processed without delay is expired, and meanwhile, the account detail does not need to be summarized in real time in the query process, so that the query performance is improved. Aiming at the service characteristic of 'more checking and less writing' of account operation, the method supports account balance cache inquiry and is more suitable for the service scene of internet marketing activities under high concurrency.

It should be noted that, in order to ensure timeliness of the user account information, an account balance expiration timing task needs to be executed, so that the account balance reaching the expiration time automatically expires, specifically, it is determined whether the statistical time of the user account is the current day of executing the expiration task, and if not, the user account information needs to be updated correspondingly according to the account entry details. For example, for account 1 with a statistical time of 2021 year 9 month 5 day, that is, with an expired amount of 500 yuan and an unexpired amount of 2000 yuan, the amounts are summarized according to the expiration time of account posting details, wherein the total amount of the unexpired amounts with the expiration time of 2021 year 9 month 7 day is 120 yuan, and the rest is the total amount with the expiration time after 2021 year 9 month 7 day. If the time for executing the overdue timing task is 2021, 9, 6, updating the user account information to update the upcoming overdue amount to 120 yuan and the unexpired amount to 1880 yuan, and updating the state of the corresponding account posting detail to be overdue.

The account balance expiration solving method provided by the disclosure sets the account balance expiration timing task to realize the timing expiration of the account balance, and sets sufficient execution time (currently 24 hours) for the timing task to cope with retry operation required by system abnormality, so that the stability of the system is improved. Compared with the solution that the balance of the scanning user account is overdue by the timing task in the prior art, the problem that the overdue delay time cannot be determined due to the fact that the operation time of the account scanning and the account accessing detail is prolonged along with the increase of the service volume is solved.

In order to solve the problem that in the prior art, when the user account is checked out or checked in, the user account details are required to be synchronously operated in real time, so that the performance and the throughput capacity of the whole system are influenced, a method for asynchronous operation of the account is provided. The synchronous operation means that a process waits until a return message is received if the request needs a period of time to return information during the execution of a certain request. Asynchronous operation means that the current process does not need to wait for information to be returned all the time, but continues to execute subsequent operation, no matter what state other processes are in, when information is returned, the current process is informed to process, and therefore program execution efficiency is improved.

Further, as shown in fig. 2, in an embodiment of the present disclosure, a specific flow of the posting asynchronous operation is as follows:

and step 210, acquiring the user posting detail and corresponding posting enabling time and invalidation time.

And step 220, updating the unexpired amount or the expired amount based on the user posting details and the corresponding posting enabling time and the expiration time, and adding 1 to the count value of the execution counter.

Step 230, starting the user posting operation and waiting for posting completion information.

And 240, asynchronously saving the user posting details, subtracting 1 from the count value of the execution counter, and sending posting completion information to the process for starting the user posting operation.

It should be noted that the user account information further includes an execution counter for monitoring the posting asynchronous operation process. Specifically, after the user account information is changed according to the account posting details and before the posting details operation is not executed, the count value of the execution counter is increased by 1 to indicate that the unprocessed asynchronous account posting details operation exists, then the user posting operation is started to wait for posting completion information, and other user account information updating operations are continuously executed. And when the account entry detail saving of the account entry detail operation of the user is finished, subtracting 1 from the count value of the current execution counter to enable the count value to be 0, indicating that no unprocessed asynchronous account entry detail operation exists, and returning finish information to the process for starting the account entry detail operation.

Further, as shown in fig. 3, in an embodiment of the present disclosure, a specific flow of the posting asynchronous operation is as follows:

and step 310, obtaining the user account statement.

Step 320, updating the unexpired amount or the just-to-expire amount based on the user account statement, and adding 1 to the count value of the execution counter.

Step 330, starting the user charge-off operation and waiting for charge-off completion information.

Step 340, sequencing the user entry details according to the failure time of the user entry details, and sequentially changing the use amount and the state of the user entry details based on the user exit details;

and 350, asynchronously saving the user account-out details, subtracting 1 from the count value of the execution counter, and sending account-out completion information to the process for starting the user account-out operation.

Specifically, after the user account information is changed according to the account statement, and before the account statement operation is not executed, the count value of the execution counter is increased by 1 to indicate that the unprocessed asynchronous account statement operation exists, then the user account statement operation is started to wait for the account statement completion information, and other user account information updating operations are continuously executed; when the user account statement operation is executed, sequencing the user account statement according to the failure time of the user account statement, sequentially changing the use amount and the state of the user account statement based on the user account statement, namely changing the state of partial account statement amount in the user account statement into used, updating the use amount of the account statement, and after the account statement is stored, subtracting 1 from the count value of the current execution counter to enable the count value to be 0, indicating that no unprocessed asynchronous account statement operation exists, and returning finish information to the process of starting the account statement operation. For the non-invalid user posting details, the posting operation from the earlier expiration time is needed to ensure more effective account balance.

As shown in fig. 4, step 320 specifically includes:

and step 410, acquiring the incoming time of the user account statement and comparing the incoming time with the statistical time.

And 420, if the incoming time is the same as the statistical time, sequentially deducting the amount to be expired and the amount not to be expired.

And 430, if the time difference between the incoming time and the statistical time is less than or equal to a second preset threshold, deducting the unexpired amount.

Step 440, if the time difference between the incoming time and the statistical time is greater than the second preset threshold, returning system abnormal information to the client.

Specifically, assume that the second preset threshold is one day, and the statistical time is 2021, 9 months and 5 days. If the user executes the charge-off operation on the same day, judging that the incoming time of the charge-off request is the same as the statistical time, indicating that the unexpired amount and the to-be-overdue amount in the current user account information are both effective, and sequentially deducting corresponding amounts according to the sequence of the to-be-overdue amount and the to-be-overdue amount so as to enable the accumulated deducted amount to reach the total charge-off amount; when the user performs the charge-out operation on the 6 th 9 th 2021, the amount which is about to expire on the charge-out day is invalidated, so the unexpired amount is deducted; when the user performs account charge-out operation in 9/10/2021, the latest statistical time of the user account information is still remained in 9/5/2021 because the user account information is not updated in time, and the current unexpired amount of unexpired amount cannot be judged, so that system abnormal information is returned.

It should be noted that, in order to ensure timeliness of the user account information, an account balance expiration timing task needs to be executed to automatically invalidate the account balance reaching the invalidation time, and the specific flow steps are shown in fig. 5:

step 510, judging whether the count value of the execution counter is 0 at a second preset time;

step 520, if the count value of the execution counter is 0, determining whether the statistical time is system time;

step 530, if the statistical time is not the system time, updating the user account information and updating the state of the corresponding user posting detail to be expired.

Specifically, in order to prevent an error caused by the fact that an account balance is overdue due to unprocessed account-in and account-out operations, when a user account balance overdue task is executed regularly, whether unprocessed account detail asynchronous operations exist or not needs to be judged, namely whether the count value of an execution counter is 0 or not needs to be judged, if unprocessed account detail asynchronous operations exist, the account balance overdue task needs to be ended, and the asynchronous operations are executed completely; if unprocessed asynchronous operation does not exist, further judging whether the statistical time of the user account is the current day of executing the overdue task, if not, correspondingly updating the user account information according to the account posting details. For example, for the account 2 with the statistical time of 2021 year 10 month 5 day, namely the expired amount of 1500 yuan and the unexpired amount of 4500 yuan, the amounts are summarized according to the failure time of account entry details, wherein the total amount of the unexpired amount with the failure time of 2021 year 10 month 7 day is 1200 yuan, and the rest is the total amount with the failure time after 2021 year 10 month 7 day. If the time for executing the overdue timing task is 2021, 10, 6, updating the user account information to update the upcoming overdue amount to 1200 yuan and the unexpired amount to 3300 yuan, and updating the state of the corresponding account posting detail to be overdue.

In summary, according to the account data processing method provided by the present disclosure, the user account information including the unexpired amount, the amount to be expired, and the statistical time is obtained, and the statistical time is compared with the query time to output the effective account balance, so that the account amount without delay of data processing is expired, and the detailed account entry and exit operation of the user account is asynchronously performed, so that the performance and throughput of the system are improved, and meanwhile, the task with the expired user account balance has sufficient execution time (currently 24 hours) to cope with the retry operation required by the system abnormality, so that the stability of the system is improved.

The following describes the account data processing apparatus provided by the present disclosure, and the account data processing apparatus described below and the account data processing method described above may be referred to in correspondence with each other.

Fig. 6 is a schematic structural diagram of an account data processing apparatus according to an embodiment of the present disclosure, as shown in fig. 6, including:

an account information module 610, configured to obtain, by a client, corresponding user account information based on a balance query request; wherein the user account information comprises unexpired amount, namely, overdue amount and statistical time;

a balance inquiry module 620, configured to obtain inquiry time of the balance inquiry request and compare the inquiry time with the statistical time;

if the query time and the statistical time are the same day, returning the sum of the unexpired amount and the to-be-expired amount to the client;

if the time difference between the query time and the statistical time is smaller than or equal to a first preset threshold value, returning the unexpired money to the client;

and if the time difference between the query time and the statistical time is greater than the first preset threshold, returning system abnormal information to the client.

According to the account data processing device, the account information including unexpired amount, the amount to be expired and the statistical time is acquired, the statistical time is compared with the query time to output the effective account balance, the account amount which is processed without delay is expired, and meanwhile, the account detail does not need to be summarized in real time in the query process, so that the query performance is improved.

According to the account data processing device provided by the present disclosure, the device further comprises an account information updating module, configured to:

and executing an account balance expiration task based on a first preset time to update the user account information.

According to the account data processing device provided by the present disclosure, the user account information includes an execution counter, and the device further includes an account posting module configured to:

acquiring the posting detail of the user and corresponding posting enabling time and invalidation time;

updating the unexpired amount or the immediately expired amount based on the user posting details and the corresponding posting enabling time and the corresponding expiration time, and adding 1 to the count value of the execution counter;

and starting the posting operation of the user and waiting for posting completion information.

According to the account data processing device provided by the present disclosure, the account posting module is further configured to:

and asynchronously storing the user posting details, subtracting 1 from the count value of the execution counter and sending posting completion information to the process for starting the user posting operation.

According to the account data processing device provided by the present disclosure, the user account information includes an execution counter, and the device further includes an account charge-out module, configured to:

acquiring the user account statement;

updating the unexpired amount or the just-to-expire amount based on the user statement details, and adding 1 to the count value of the execution counter;

and starting the charge-out operation of the user and waiting for charge-out completion information.

According to the account data processing device provided by the present disclosure, the account charge-out module is further configured to:

acquiring the incoming time of the user account statement and comparing the incoming time with the statistical time;

if the incoming time is the same as the statistical time, sequentially deducting the amount to be overdue and the amount which is not overdue;

if the time difference between the incoming time and the statistical time is smaller than or equal to a second preset threshold value, deducting the unexpired amount;

and if the time difference between the incoming time and the statistical time is greater than the second preset threshold, returning system abnormal information to the client.

According to the account data processing device provided by the present disclosure, the account charge-out module is further configured to:

sorting the user posting details according to the failure time of the user posting details, and sequentially changing the use amount and the state of the user posting details based on the user posting details;

and asynchronously storing the user account-out details, subtracting 1 from the count value of the execution counter and sending account-out completion information to the process starting the user account-out operation.

According to an account data processing apparatus provided by the present disclosure, the update account information module is further configured to:

judging whether the count value of the execution counter is 0 or not at a second preset time;

if the count value of the execution counter is 0, judging whether the statistical time is the system time;

and if the statistical time is not the system time, updating the user account information and updating the state of the corresponding user posting detail to be overdue.

Fig. 7 illustrates a physical structure diagram of an electronic device, and as shown in fig. 7, the electronic device may include: a processor (processor)710, a communication Interface (Communications Interface)720, a memory (memory)730, and a communication bus 740, wherein the processor 710, the communication Interface 720, and the memory 730 communicate with each other via the communication bus 740. Processor 710 may call logic instructions in memory 730 to perform an account data processing method comprising: acquiring corresponding user account information based on a balance inquiry request of a client; wherein the user account information comprises unexpired amount, namely, overdue amount and statistical time; acquiring the query time of the balance query request and comparing the query time with the statistical time; if the query time and the statistical time are the same day, returning the sum of the unexpired amount and the to-be-expired amount to the client; if the time difference between the query time and the statistical time is smaller than a first preset threshold value, returning the unexpired money to the client; and if the time difference between the query time and the statistical time is greater than the first preset threshold, returning system abnormal information to the client.

In addition, the logic instructions in the memory 730 can be implemented in the form of software functional units and stored in a computer readable storage medium when the software functional units are sold or used as independent products. Based on such understanding, the technical solutions of the embodiments of the present disclosure may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the methods described in the embodiments of the present disclosure. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.

In another aspect, the present disclosure also provides a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions, which when executed by a computer, the computer is capable of executing the account data processing method provided by the above embodiments, the method comprising: acquiring corresponding user account information based on a balance inquiry request of a client; wherein the user account information comprises unexpired amount, namely, overdue amount and statistical time; acquiring the query time of the balance query request and comparing the query time with the statistical time; if the query time and the statistical time are the same day, returning the sum of the unexpired amount and the to-be-expired amount to the client; if the time difference between the query time and the statistical time is smaller than or equal to a first preset threshold value, returning the unexpired money to the client; and if the time difference between the query time and the statistical time is greater than the first preset threshold, returning system abnormal information to the client.

In yet another aspect, the present disclosure also provides a non-transitory computer-readable storage medium having stored thereon a computer program, which when executed by a processor is implemented to perform the account data processing method provided in the above embodiments, the method including: acquiring corresponding user account information based on a balance inquiry request of a client; wherein the user account information comprises unexpired amount, namely, overdue amount and statistical time; acquiring the query time of the balance query request and comparing the query time with the statistical time; if the query time and the statistical time are the same day, returning the sum of the unexpired amount and the to-be-expired amount to the client; if the time difference between the query time and the statistical time is smaller than or equal to a first preset threshold value, returning the unexpired money to the client; and if the time difference between the query time and the statistical time is greater than the first preset threshold, returning system abnormal information to the client.

The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.

Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.

Finally, it should be noted that: the above examples are only intended to illustrate the technical solutions of the present disclosure, not to limit them; although the present disclosure has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present disclosure.

18页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:信息更新的方法、装置以及服务器

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!