CN113723940B - Account data processing method and device, electronic equipment and storage medium - Google Patents

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

Info

Publication number
CN113723940B
CN113723940B CN202111021892.XA CN202111021892A CN113723940B CN 113723940 B CN113723940 B CN 113723940B CN 202111021892 A CN202111021892 A CN 202111021892A CN 113723940 B CN113723940 B CN 113723940B
Authority
CN
China
Prior art keywords
time
account
amount
user account
unexpired
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111021892.XA
Other languages
Chinese (zh)
Other versions
CN113723940A (en
Inventor
冯鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jingdong Technology Holding Co Ltd
Original Assignee
Jingdong Technology Holding Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jingdong Technology Holding Co Ltd filed Critical Jingdong Technology Holding Co Ltd
Priority to CN202111021892.XA priority Critical patent/CN113723940B/en
Publication of CN113723940A publication Critical patent/CN113723940A/en
Application granted granted Critical
Publication of CN113723940B publication Critical patent/CN113723940B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/04Payment circuits
    • G06Q20/06Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme
    • G06Q20/065Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme using e-cash
    • G06Q20/0652Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme using e-cash e-cash with decreasing value according to a parameter, e.g. time
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2462Approximate or statistical queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/08Payment architectures
    • G06Q20/10Payment architectures specially adapted for electronic funds transfer [EFT] systems; specially adapted for home banking systems
    • G06Q20/102Bill distribution or payments

Abstract

The disclosure provides an account data processing method, an account data processing device, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring corresponding user account information based on the balance inquiry request of the client; the user account information comprises unexpired amount, namely overdue amount and statistical time; acquiring the inquiry time of the balance inquiry request and comparing the inquiry time with the statistical time; if the inquiry time and the statistical time are the same day, returning the sum of the unexpired amount and the instant 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 unexpired amount to the client; if the time difference between the query time and the statistical time is larger than a first preset threshold value, system abnormality information is returned to the client. According to the method and the device, the account amount without delay for data processing is expired, and meanwhile, account details do not need to be summarized in real time in the query process, so that the query performance is improved.

Description

Account data processing method and device, electronic equipment and storage medium
Technical Field
The disclosure relates to the field of computer technology, and in particular, to a method and a device for processing account data, electronic equipment and a storage medium.
Background
In the internet marketing activities, user account balances expire under specified conditions (such as overtime, abnormal activity termination and the like) to form common business demands, and currently, two common solutions of scanning user account balances for batch expiration and real-time filtering account balances are adopted for account summary.
The timed task scans that the balance of the user account is out of date in batches, and the problem of expiration delay of data processing mainly exists. The timed task expiration job belongs to a batch processing operation, the whole job processing needs a period of time, and the balance which is expired in the user account is 'available for viewing' before the user account operation is completed after the expiration time. The real-time filtering account details summarize account balances then presents a significant performance bottleneck. When a user inquires the balance of an account, the account entering details of the user are required to be operated in real time, and when the account entering details of the user are more or the operation is frequent, the data processing process brings great pressure to the database, so that the performance and throughput capacity of the whole system are affected.
Disclosure of Invention
The disclosure provides an account data processing method, which is used for solving 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 disclosure provides an account data processing method, comprising the following steps:
acquiring corresponding user account information based on the balance inquiry request of the client; wherein the user account information comprises unexpired amount, namely overdue amount and statistical time;
acquiring the inquiry time of the balance inquiry request and comparing the inquiry time with the statistical time;
if the inquiry time and the statistical time are the same day, the client returns the sum of the unexpired amount and the upcoming 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 amount to the client;
and if the time difference between the query time and the statistical time is greater than the first preset threshold value, returning system abnormality 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 user account entry details and corresponding account entry enabling time and failure time;
updating the unexpired amount or the about-to-expire amount based on the user account details and the corresponding account enabling time and expiration time, and adding 1 to the count value of the execution counter;
and starting the user account entering operation and waiting for account entering completion information.
According to the account data processing method provided by the disclosure, executing the user posting operation includes:
and asynchronously storing the user account details, subtracting 1 from the count value of the execution counter, and sending account completion information to a process for starting user account 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 a user account list;
updating the unexpired amount or the upcoming expiration amount based on the user billing details and incrementing the count value of the execution counter by 1;
and starting the user account-out operation and waiting for account-out completion information.
According to the account data processing method provided by the disclosure, the updating the unexpired amount or the about to expire amount based on the user account details includes:
acquiring the incoming time of the user account details and comparing the incoming time with the statistical time;
if the input time and the statistical time are the same day, deducting the upcoming expiration amount and the unexpired amount in sequence;
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 input time and the statistical time is larger than the second preset threshold value, returning system abnormality information to the client.
According to the account data processing method provided by the disclosure, executing the user account-out operation includes:
sorting the user account details according to the expiration time of the user account details, and sequentially changing the use amount and the state of the user account details based on the user account details;
and asynchronously storing the user account details, subtracting 1 from the count value of the execution counter, and sending account completion information to a process for starting user account 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 in a second preset time;
if the count value of the execution counter is 0, judging whether the statistical time is the system time or not;
and if the statistical time is not the system time, updating the user account information and updating the state of the corresponding user account details to be out of date.
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 the 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 inquiry time of the balance inquiry request and comparing the inquiry time with the statistic time;
if the inquiry time and the statistical time are the same day, returning the sum of the unexpired amount and the upcoming 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 amount to the client;
and if the time difference between the query time and the statistical time is greater than the first preset threshold value, returning system abnormality information to the client.
According to the account data processing device provided by the disclosure, the device further comprises an account information updating module for:
and executing an account balance expiration task based on a first preset time to update the user account information.
According to an account data processing apparatus provided by the present disclosure, the user account information includes an execution counter, and the apparatus further includes an account posting module for:
acquiring user account entry details and corresponding account entry enabling time and failure time;
updating the unexpired amount or the about-to-expire amount based on the user account details and the corresponding account enabling time and expiration time, and adding 1 to the count value of the execution counter;
and starting the user account entering operation and waiting for account entering completion information.
According to the account data processing device provided by the disclosure, the account billing module is further used for:
and asynchronously storing the user account details, subtracting 1 from the count value of the execution counter, and sending account completion information to a process for starting user account operation.
According to an account data processing apparatus provided in the present disclosure, the user account information includes an execution counter, and the apparatus further includes an account billing module for:
acquiring a user account list;
updating the unexpired amount or the upcoming expiration amount based on the user billing details and incrementing the count value of the execution counter by 1;
and starting the user account-out operation and waiting for account-out completion information. According to the account balance expiration solving device provided by the disclosure, the account billing module is further used for:
acquiring the incoming time of the user account details and comparing the incoming time with the statistical time;
if the input time and the statistical time are the same day, deducting the upcoming expiration amount and the unexpired amount in sequence;
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 input time and the statistical time is larger than the second preset threshold value, returning system abnormality information to the client.
According to the account data processing device provided by the disclosure, the account issuing module is further used for:
sorting the user account details according to the expiration time of the user account details, and sequentially changing the use amount and the state of the user account details based on the user account details;
and asynchronously storing the user account details, subtracting 1 from the count value of the execution counter, and sending account completion information to a process for starting user account operation.
According to the account data processing device provided by the disclosure, the account information updating module is further used for:
judging whether the count value of the execution counter is 0 or not in a second preset time;
if the count value of the execution counter is 0, judging whether the statistical time is the system time or not;
and if the statistical time is not the system time, updating the user account information and updating the state of the corresponding user account details to be out of date.
The present disclosure also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of any one of the account data processing methods described above 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 described in any of the above.
According to the account data processing method, the account data processing device, the electronic equipment and the storage medium, the account information including the unexpired amount, the about-to-expire amount and the statistical time is obtained, the statistical time is compared with the query time to output the effective account balance, the unexpired account amount of data processing is achieved, meanwhile, real-time summarizing operation on account details is not needed in the query process, and accordingly query performance is improved.
Drawings
In order to more clearly illustrate the present disclosure or the prior art solutions, a brief description will be given below of the drawings that are needed in the embodiments or prior art descriptions, it being apparent that the drawings in the following description are some embodiments of the present disclosure and that other drawings may be obtained from these drawings without inventive effort to a person of ordinary skill in the art.
FIG. 1 is one of the flow diagrams of the account data processing method provided by the present disclosure;
FIG. 2 is a second flow chart of the account data processing method provided by the present disclosure;
FIG. 3 is a third flow chart of the account data processing method provided by the present disclosure;
FIG. 4 is a flow chart of an account data processing method provided by the present disclosure;
FIG. 5 is a fifth flow chart of the account data processing method provided by the present disclosure;
FIG. 6 is a schematic 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
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present disclosure more apparent, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present disclosure, and it is apparent that the described embodiments are some embodiments, but not all embodiments of the present disclosure. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the disclosed embodiments, are within the scope of the disclosed embodiments.
The following describes the technical solutions provided by the embodiments of the present disclosure with reference to fig. 1 to 7.
Fig. 1 is a flow chart of an account data processing method according to an embodiment of the disclosure, as shown in fig. 1, the method includes:
step 110, acquiring corresponding user account information based on a balance inquiry request of a client; wherein the user account information includes an unexpired amount, an instant expiration amount and a statistical time.
Step 120, obtaining the inquiry time of the balance inquiry request and comparing the inquiry time with the statistical time.
And 130, if the inquiry 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 smaller than or equal to a first preset threshold value, returning the unexpired amount 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 abnormality information to the client.
It should be noted that, the present disclosure adopts a design that the balance of the user account has no delay, and the settings include the statistical time (year, month and day), the unexpired amount, and the user account that will expire amount. The unexpired amount represents the account balance total which cannot be expired after the statistical time, namely the expired amount represents the account balance total which is about to be expired after the statistical time, and the statistical time represents the date of scanning the account details of the expired user. For example, if the statistical time is 2021, 9 and 5 days, the upcoming expiration amount is the sum of account billing details of the expiration time at 2021, 9 and 6 days, and the unexpired amount is the sum of account billing details of the expiration time after 2021, 9 and 6 days.
Specifically, when the user balance inquiry operation is executed, whether a corresponding user account exists or not is firstly judged, and if so, the delay-free expired account balance can be obtained based on the user account information. Assuming that the first preset threshold value is one day, the statistical time is 2021, 9 months and 5 days, if the user executes balance inquiry operation on the same day, judging that the inquiry time and the statistical time are the same day, and returning the unexpired amount and the about-to-expire amount as effective balances after summarizing; when the user makes a balance inquiry request at the 9 th month 6 of 2021, the upcoming expiration amount in the balance inquiry request is already spent on the inquiry day, so the unspent amount is returned as the effective balance; when the user performs account inquiry on the day 10 of 9 in 2021, because the account information of the user is not updated in time, the last statistical time of the account information still stays on the day 5 of 9 in 2021, and the unexpired amount still unexpired in the current inquiry time cannot be judged, so that the abnormal information of the system is returned.
According to the account data processing method, the account information comprising the unexpired amount, the about-to-expire amount and the statistical time is obtained, the statistical time is compared with the query time to output the effective account balance, the expiration of the account amount without delay in data processing is achieved, and meanwhile real-time summarizing operation on account details is not needed in the query process, so that the query performance is improved. Aiming at the business characteristics of 'more searching and less writing' of account operation, the account balance caching query is supported, and the method is more suitable for the business scene of the Internet marketing activities under high concurrency.
It should be noted that, in order to ensure timeliness of user account information, an account balance expiration timing task needs to be executed so as to automatically expire the account balance reaching the expiration time, specifically, whether the statistical time of the user account is the current day of executing the expiration task is judged, if not, the user account information needs to be updated correspondingly according to the account billing details. For example, for account 1 with a statistical time of 2021, 9 and 5 days, i.e. an expired amount of 500 yuan and an unexpired amount of 2000 yuan, the amounts are summarized according to the expiration time of the account billing details, wherein the sum of the unexpired amounts with the expiration time of 2021, 9 and 7 days is 120 yuan, and the rest is the sum of the unexpired amounts with the expiration time of 2021, 9 and 7 days. If the time to perform the expiration timing task is 2021, 9 and 6 days, updating the user account information updates the about-to-be-expired amount to 120 yuan, the unexpired amount to 1880 yuan, and the state of the corresponding account billing details is updated to be expired.
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 (24 hours currently) 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 common solution of the prior art that the balance of the regular task scanning user account is outdated in batches, the problem that the expiration delay time cannot be determined due to the fact that the operation time of the scanning account entering and exiting details is prolonged along with the increase of the traffic is avoided.
In order to solve the problem that in the prior art, when user accounts are checked out or checked in, synchronous operation is required to be carried out on user account details in real time, so that the performance and throughput capacity of the whole system are affected, the method for checking out and checking in asynchronous operation is provided. Where a synchronization operation refers to a process that, during execution of a request, if the request takes a period of time to return information, the current process waits until the return information is received and then continues to execute. Asynchronous operation means that the current process does not need to wait for the return information all the time, but continues to execute the subsequent operation, no matter what state other processes are in, when information returns, the current process is informed to process, so that the efficiency of program execution 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:
step 210, obtaining user account details and corresponding account enabling time and failure time.
Step 220, updating the unexpired amount or the about-to-expire amount based on the user account details and the corresponding account enabling time and expiration time, and adding 1 to the count value of the execution counter.
Step 230, starting the user account entry operation and waiting for account entry completion information.
Step 240, asynchronously storing the user account details, subtracting 1 from the count value of the execution counter, and sending account completion information to a process for starting user account operation.
It should be noted that the user account information further includes an execution counter for monitoring the process of the posting asynchronous operation. Specifically, after user account information is changed according to account billing details, before billing details are executed, the count value of the execution counter is increased by 1 to indicate that unprocessed asynchronous account billing details exist, then the user billing operation is started to wait for billing completion information, and other user account information updating operations are continuously executed. When the saving accounting details of the user accounting details operation are finished, the count value of the current execution counter is reduced by 1, so that the count value is 0, the fact that the unprocessed asynchronous account accounting details operation does not exist is indicated, and the finishing information is returned to the process of starting the accounting details operation.
Further, as shown in fig. 3, in an embodiment of the present disclosure, a specific flow of the accounting asynchronous operation is as follows:
step 310, obtaining a user account list.
Step 320, updating the unexpired amount or the upcoming expiration amount based on the user billing details, and incrementing the execution counter by 1.
Step 330, the user checkout operation is started, and the checkout completion information is waited.
Step 340, sorting the user account details according to the failure time of the user account details, and sequentially changing the use amount and the state of the user account details based on the user account details;
step 350, asynchronously storing the user account details, subtracting 1 from the count value of the execution counter, and sending account completion information to a process for starting user account operation.
Specifically, after user account information is changed according to the account billing details, before billing details are executed, the count value of the execution counter is increased by 1 to indicate that unprocessed asynchronous account billing details exist, then the user billing operation is started to wait for billing completion information, and other user account information updating operations are continuously executed; when user account-out details are executed, sorting the user account-out details according to the failure time of the user account-out details, sequentially changing the use amount and the state of the user account-out details based on the user account-out details, namely changing the state of part of account-out amount in the user account-out details into used state, updating the use amount of the account-out details at the same time, and subtracting 1 from the count value of a current execution counter after the account-out details are stored, so that the count value is 0, indicating that the unprocessed asynchronous account-out details are not existed, and returning the completion information to the process for starting the account-out details. Wherein, for the user posting details that are not spent, the posting operation needs to be performed from the earlier expiration time to ensure more valid account balances.
As shown in fig. 4, step 320 specifically includes:
step 410, obtaining the incoming time of the user account details and comparing with the statistical time.
Step 420, if the incoming time and the statistical time are the same day, deducting the upcoming expiration amount and the unexpired amount in sequence.
Step 430, deducting the unexpired amount if the time difference between the incoming time and the statistical time is less than or equal to a second preset threshold.
Step 440, if the time difference between the incoming time and the statistical time is greater than the second preset threshold, returning system exception information to the client.
Specifically, assuming that the second preset threshold is one day, the statistical time is 2021, 9 months and 5 days. If the user executes the account-out operation on the same day, judging that the incoming time and the statistical time of the account-out request are the same day, and indicating that the unexpired amount and the about-to-expire amount in the current user account information are both effective, and sequentially deducting the corresponding amounts according to the order of the about-to-expire amount and the about-to-expire amount to enable the accumulated deducted amount to reach the account-out total; when the user performs the billing operation at 2021, 9 and 6, the upcoming expiration amount is already spent on the billing day, so the unexpired amount is deducted; when the user performs account billing operation on the day of 9 and 10 of 2021, since the account information of the user is not updated in time, the last statistical time of the account information remains on the day of 5 of 9 of 2021, and the unexpired amount of the unexpired amount still cannot be judged, so that abnormal information of the system 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, so that the account balance reaching the expiration time is automatically expired, 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 a system time;
and step 530, if the statistical time is not the system time, updating the user account information and updating the state of the corresponding user account details to be expired.
Specifically, in order to prevent the account balance from being expired, an unprocessed account-out operation exists, so that the balance is expired to generate errors, when the user account balance expiration task is executed regularly, whether unprocessed account detail asynchronous operation exists or not is firstly needed to be judged, namely whether the count value of an execution counter is 0 or not is judged, if the unprocessed account detail asynchronous operation exists, the account balance expiration task is needed to be ended, and the execution of the asynchronous operation is waited for; if the unprocessed asynchronous operation does not exist, whether the statistical time of the user account is the current day of executing the overdue task is further judged, and if not, the user account information is required to be correspondingly updated according to the account billing details. For example, for account 2 with a statistical time of 2021, 10 months and 5 days, i.e. an expiration amount of 1500 yuan and an unexpired amount of 4500 yuan, account billing details are used for sum up, wherein sum up of the unexpired amount with the expiration time of 2021, 10 months and 7 days is 1200 yuan, and the rest is sum up of the unexpired amount with the expiration time of 2021, 10 months and 7 days later. If the time for executing the expiration timing task is 2021, 10 and 6 days, updating the user account information updates the about-to-be-expired amount to 1200 yuan, the unexpired amount to 3300 yuan, and simultaneously updating the state of the corresponding account billing details to be expired.
In summary, according to the account data processing method provided by the disclosure, by acquiring the user account information including the unexpired amount, the about-to-expire amount and the statistical time, comparing the statistical time with the query time to output the effective account balance, the delay-free expiration of the account amount in data processing is realized, and the account entering and exiting detailed operation of the user account is asynchronously executed, so that the performance and throughput of the system are improved, and meanwhile, the user account balance expiration timing task 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 account data processing device provided by the present disclosure is described below, and the account data processing device described below and the account data processing method described above may be referred to correspondingly to 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:
the account information module 610 is configured to obtain corresponding user account information based on the balance query request of the client; wherein the user account information comprises unexpired amount, namely overdue amount and statistical time;
a balance inquiry module 620, configured to obtain an inquiry time of the balance inquiry request and compare the inquiry time with the statistics time;
if the inquiry time and the statistical time are the same day, returning the sum of the unexpired amount and the upcoming 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 amount to the client;
and if the time difference between the query time and the statistical time is greater than the first preset threshold value, returning system abnormality information to the client.
According to the account data processing device, the account information comprising the unexpired amount, the about-to-expire amount and the statistical time is obtained, the statistical time is compared with the query time to output the effective account balance, the expiration of the account amount without delay in data processing is achieved, and meanwhile, real-time summarizing operation on account details is not needed in the query process, so that the query performance is improved.
According to the account data processing device provided by the disclosure, the device further comprises an account information updating module for:
and executing an account balance expiration task based on a first preset time to update the user account information.
According to an account data processing apparatus provided by the present disclosure, the user account information includes an execution counter, and the apparatus further includes an account posting module for:
acquiring user account entry details and corresponding account entry enabling time and failure time;
updating the unexpired amount or the about-to-expire amount based on the user account details and the corresponding account enabling time and expiration time, and adding 1 to the count value of the execution counter;
and starting the user account entering operation and waiting for account entering completion information.
According to the account data processing device provided by the disclosure, the account billing module is further used for:
and asynchronously storing the user account details, subtracting 1 from the count value of the execution counter, and sending account completion information to a process for starting user account operation.
According to an account data processing apparatus provided in the present disclosure, the user account information includes an execution counter, and the apparatus further includes an account billing module for:
acquiring a user account list;
updating the unexpired amount or the upcoming expiration amount based on the user billing details and incrementing the count value of the execution counter by 1;
and starting the user account-out operation and waiting for account-out completion information.
According to the account data processing device provided by the disclosure, the account issuing module is further used for:
acquiring the incoming time of the user account details and comparing the incoming time with the statistical time;
if the input time and the statistical time are the same day, deducting the upcoming expiration amount and the unexpired amount in sequence;
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 input time and the statistical time is larger than the second preset threshold value, returning system abnormality information to the client.
According to the account data processing device provided by the disclosure, the account issuing module is further used for:
sorting the user account details according to the expiration time of the user account details, and sequentially changing the use amount and the state of the user account details based on the user account details;
and asynchronously storing the user account details, subtracting 1 from the count value of the execution counter, and sending account completion information to a process for starting user account operation.
According to the account data processing device provided by the disclosure, the account information updating module is further used for:
judging whether the count value of the execution counter is 0 or not in a second preset time;
if the count value of the execution counter is 0, judging whether the statistical time is the system time or not;
and if the statistical time is not the system time, updating the user account information and updating the state of the corresponding user account details to be out of date.
Fig. 7 illustrates a physical schematic diagram of an electronic device, as shown in fig. 7, which may include: processor 710, communication interface (Communications Interface) 720, memory 730, and communication bus 740, wherein processor 710, communication interface 720, memory 730 communicate with each other via communication bus 740. Processor 710 may invoke logic instructions in memory 730 to perform an account data processing method comprising: acquiring corresponding user account information based on the balance inquiry request of the client; wherein the user account information comprises unexpired amount, namely overdue amount and statistical time; acquiring the inquiry time of the balance inquiry request and comparing the inquiry time with the statistical time; if the inquiry time and the statistical time are the same day, returning the sum of the unexpired amount and the upcoming 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 amount to the client; and if the time difference between the query time and the statistical time is greater than the first preset threshold value, returning system abnormality information to the client.
Further, the logic instructions in the memory 730 described above may be implemented in the form of software functional units and may be stored in a computer readable storage medium when sold or used as a stand alone product. Based on such understanding, the technical solutions of the embodiments of the present disclosure may be essentially or, what contributes to the prior art, or part of the technical solutions, may be embodied in the form of a software product stored in a storage medium, including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform 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, random Access Memory), a magnetic disk, or an optical disk, or 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, are capable of performing the account data processing method provided by the above embodiments, the method comprising: acquiring corresponding user account information based on the balance inquiry request of the client; wherein the user account information comprises unexpired amount, namely overdue amount and statistical time; acquiring the inquiry time of the balance inquiry request and comparing the inquiry time with the statistical time; if the inquiry time and the statistical time are the same day, returning the sum of the unexpired amount and the upcoming 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 amount to the client; and if the time difference between the query time and the statistical time is greater than the first preset threshold value, returning system abnormality 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 by the above embodiments, the method comprising: acquiring corresponding user account information based on the balance inquiry request of the client; wherein the user account information comprises unexpired amount, namely overdue amount and statistical time; acquiring the inquiry time of the balance inquiry request and comparing the inquiry time with the statistical time; if the inquiry time and the statistical time are the same day, returning the sum of the unexpired amount and the upcoming 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 amount to the client; and if the time difference between the query time and the statistical time is greater than the first preset threshold value, returning system abnormality information to the client.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are merely for illustrating the technical solution of the present disclosure, and are not limiting thereof; 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 scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present disclosure.

Claims (11)

1. A method for processing account data, comprising:
acquiring corresponding user account information based on the balance inquiry request of the client; wherein the user account information comprises unexpired amount, namely overdue amount and statistical time;
acquiring the inquiry time of the balance inquiry request and comparing the inquiry time with the statistical time;
if the inquiry time and the statistical time are the same day, returning the sum of the unexpired amount and the upcoming 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 amount to the client;
and if the time difference between the query time and the statistical time is greater than the first preset threshold value, returning system abnormality information to the client.
2. The account data processing method of claim 1, wherein the method further comprises:
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 includes an execution counter, the method further comprising:
acquiring user account entry details and corresponding account entry enabling time and failure time;
updating the unexpired amount or the about-to-expire amount based on the user account details and the corresponding account enabling time and expiration time, and adding 1 to the count value of the execution counter;
and starting the user account entering operation and waiting for account entering completion information.
4. The account data processing method of claim 3, wherein performing the user posting operation comprises:
and asynchronously storing the user account details, subtracting 1 from the count value of the execution counter, and sending account completion information to a process for starting user account operation.
5. The account data processing method of claim 1, wherein the user account information includes an execution counter, the method further comprising:
acquiring a user account list;
updating the unexpired amount or the upcoming expiration amount based on the user billing details and incrementing the count value of the execution counter by 1;
and starting the user account-out operation and waiting for account-out completion information.
6. The account data processing method of claim 5, wherein the updating the unexpired or upcoming expiration amount based on the user billing details comprises:
acquiring the incoming time of the user account details and comparing the incoming time with the statistical time;
if the input time and the statistical time are the same day, deducting the upcoming expiration amount and the unexpired amount in sequence;
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 input time and the statistical time is larger than the second preset threshold value, returning system abnormality information to the client.
7. The account data processing method of claim 5, wherein performing the user posting operation comprises:
sorting the user account details according to the expiration time of the user account details, and sequentially changing the use amount and the state of the user account details based on the user account details;
and asynchronously storing the user account details, subtracting 1 from the count value of the execution counter, and sending account completion information to a process for starting user account operation.
8. The account data processing method according to claim 4 or 7, characterized in that the method further comprises:
judging whether the count value of the execution counter is 0 or not in a second preset time;
if the count value of the execution counter is 0, judging whether the statistical time is the system time or not;
and if the statistical time is not the system time, updating the user account information and updating the state of the corresponding user account details to be out of date.
9. An account data processing apparatus, comprising:
the account information module is used for acquiring corresponding user account information based on the 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 inquiry time of the balance inquiry request and comparing the inquiry time with the statistic time;
if the inquiry time and the statistical time are the same day, returning the sum of the unexpired amount and the upcoming 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 amount to the client;
and if the time difference between the query time and the statistical time is greater than the first preset threshold value, returning system abnormality 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, wherein the processor implements the steps of the account data processing method of any one of claims 1 to 8 when the program is executed.
11. A non-transitory computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when executed by a processor, implements the steps of the account data processing method of any of claims 1 to 8.
CN202111021892.XA 2021-09-01 2021-09-01 Account data processing method and device, electronic equipment and storage medium Active CN113723940B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111021892.XA CN113723940B (en) 2021-09-01 2021-09-01 Account data processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111021892.XA CN113723940B (en) 2021-09-01 2021-09-01 Account data processing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113723940A CN113723940A (en) 2021-11-30
CN113723940B true CN113723940B (en) 2023-11-03

Family

ID=78680633

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111021892.XA Active CN113723940B (en) 2021-09-01 2021-09-01 Account data processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113723940B (en)

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002056182A (en) * 2000-08-10 2002-02-20 Hachijuni Bank Ltd System and method for antedated completion processing
JP2004070684A (en) * 2002-08-07 2004-03-04 Fujitsu Ltd Method and device for reporting deposit account information
JP2005070935A (en) * 2003-08-21 2005-03-17 Nec System Technologies Ltd Estimated account balance reference system, estimated account balance reference method, and program therefor
US7117172B1 (en) * 1999-03-11 2006-10-03 Corecard Software, Inc. Methods and systems for managing financial accounts
CN102833717A (en) * 2011-06-15 2012-12-19 中兴通讯股份有限公司 Control method of user account and service control point
CN103413217A (en) * 2013-08-30 2013-11-27 国家电网公司 Control method and control device for prepayment system
CN109214902A (en) * 2018-07-27 2019-01-15 阿里巴巴集团控股有限公司 A kind of user account assets settlement method and device
CN109325728A (en) * 2018-08-14 2019-02-12 平安普惠企业管理有限公司 A kind of debt data processing method and terminal device based on user data resource
CN109409958A (en) * 2018-10-29 2019-03-01 四川长虹电器股份有限公司 Integrate the method that balance of points is quickly updated in expired system
CN110009484A (en) * 2019-03-12 2019-07-12 平安普惠企业管理有限公司 Business data processing method, equipment, server and computer readable storage medium
CN110163742A (en) * 2019-04-22 2019-08-23 阿里巴巴集团控股有限公司 A kind of account resource data determines method and system
CN110322355A (en) * 2019-04-18 2019-10-11 上海汉得信息技术股份有限公司 A kind of method and apparatus that financing limit calculates
CN111144889A (en) * 2019-12-25 2020-05-12 万翼科技有限公司 Block chain-based integral settlement method and block chain accounting system
CN112073486A (en) * 2020-08-28 2020-12-11 北京金山云网络技术有限公司 Resource transfer method and device, storage medium and electronic device
CN112100204A (en) * 2020-09-18 2020-12-18 广州华多网络科技有限公司 Virtual resource regulation and control method and device, computer equipment and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8532623B2 (en) * 2006-07-17 2013-09-10 Motorola Mobility Llc Methods and devices for automatic display of prepay information
US20140012746A1 (en) * 2012-07-06 2014-01-09 Bank Of America Corporation Bill payment management
CN104751335B (en) * 2013-12-31 2017-07-21 腾讯科技(深圳)有限公司 Method for processing business, device and terminal
US20190188657A1 (en) * 2017-12-19 2019-06-20 Mastercard International Incorporated Method and system for outside guarantees for a blockchain transaction
CN111782872B (en) * 2020-06-30 2023-08-08 北京百度网讯科技有限公司 Query method, query device, electronic equipment and storage medium

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7117172B1 (en) * 1999-03-11 2006-10-03 Corecard Software, Inc. Methods and systems for managing financial accounts
JP2002056182A (en) * 2000-08-10 2002-02-20 Hachijuni Bank Ltd System and method for antedated completion processing
JP2004070684A (en) * 2002-08-07 2004-03-04 Fujitsu Ltd Method and device for reporting deposit account information
JP2005070935A (en) * 2003-08-21 2005-03-17 Nec System Technologies Ltd Estimated account balance reference system, estimated account balance reference method, and program therefor
CN102833717A (en) * 2011-06-15 2012-12-19 中兴通讯股份有限公司 Control method of user account and service control point
CN103413217A (en) * 2013-08-30 2013-11-27 国家电网公司 Control method and control device for prepayment system
CN109214902A (en) * 2018-07-27 2019-01-15 阿里巴巴集团控股有限公司 A kind of user account assets settlement method and device
CN109325728A (en) * 2018-08-14 2019-02-12 平安普惠企业管理有限公司 A kind of debt data processing method and terminal device based on user data resource
CN109409958A (en) * 2018-10-29 2019-03-01 四川长虹电器股份有限公司 Integrate the method that balance of points is quickly updated in expired system
CN110009484A (en) * 2019-03-12 2019-07-12 平安普惠企业管理有限公司 Business data processing method, equipment, server and computer readable storage medium
CN110322355A (en) * 2019-04-18 2019-10-11 上海汉得信息技术股份有限公司 A kind of method and apparatus that financing limit calculates
CN110163742A (en) * 2019-04-22 2019-08-23 阿里巴巴集团控股有限公司 A kind of account resource data determines method and system
CN111144889A (en) * 2019-12-25 2020-05-12 万翼科技有限公司 Block chain-based integral settlement method and block chain accounting system
CN112073486A (en) * 2020-08-28 2020-12-11 北京金山云网络技术有限公司 Resource transfer method and device, storage medium and electronic device
CN112100204A (en) * 2020-09-18 2020-12-18 广州华多网络科技有限公司 Virtual resource regulation and control method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN113723940A (en) 2021-11-30

Similar Documents

Publication Publication Date Title
CN101599151A (en) A kind of system and method for self-adaptively selecting bank card for payment
CN107945002B (en) Automatic account checking method, system and storage device
CN113112344B (en) Service processing method, device, storage medium and computer program product
CN113723940B (en) Account data processing method and device, electronic equipment and storage medium
CN112862578B (en) Account checking method and device
CN114202334A (en) Method and system suitable for asynchronously updating balance of hotspot account in batch
CN112685208B (en) Batch processing method, device, equipment and storage medium
CN111210045B (en) Shutdown instruction sending optimization method
CN110659971A (en) Transaction data processing method and device
CN111400283B (en) Data processing method, system, electronic equipment and storage medium
CN111259032A (en) Service processing method and device
CN114138308A (en) Gray scale distribution system, method and medium
CN112650568A (en) Merchant netting difference settlement method, system, computer equipment and storage medium
CN111897839A (en) Data processing method and system
CN114969077A (en) Service data processing method and device
CN110716948A (en) Double-lock control method and medium based on data periodic processing
CN115293866A (en) Accounting method and device, electronic equipment and storage medium
CN111768293B (en) Transaction information processing method, device, equipment and storage medium
CN114997988A (en) Intelligent fund deduction method and device suitable for multiple scenes
CN114998019A (en) Transaction processing method and device, electronic equipment and readable storage medium
CN113806379A (en) Pricing method, device and equipment based on threshold optimistic lock and computer medium
CN115760408A (en) Transaction data processing method and device and accounting server
CN114372838A (en) Method and device for acquiring synchronous entry invoices
CN114255120A (en) Updating method of collection-promoting data and related device
CN116521666A (en) Data table processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant