[go: up one dir, main page]

CN108256839B - Numerical resource rollback method, device, server and storage medium - Google Patents

Numerical resource rollback method, device, server and storage medium Download PDF

Info

Publication number
CN108256839B
CN108256839B CN201710629161.0A CN201710629161A CN108256839B CN 108256839 B CN108256839 B CN 108256839B CN 201710629161 A CN201710629161 A CN 201710629161A CN 108256839 B CN108256839 B CN 108256839B
Authority
CN
China
Prior art keywords
resource
numerical
batch number
receipt
batch
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
CN201710629161.0A
Other languages
Chinese (zh)
Other versions
CN108256839A (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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201710629161.0A priority Critical patent/CN108256839B/en
Priority to PCT/CN2018/082480 priority patent/WO2019019697A1/en
Publication of CN108256839A publication Critical patent/CN108256839A/en
Application granted granted Critical
Publication of CN108256839B publication Critical patent/CN108256839B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/25Integrating or interfacing systems involving database management systems
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/08Payment architectures
    • G06Q20/085Payment architectures involving remote charge determination or related payment systems
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/08Insurance

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • General Engineering & Computer Science (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Development Economics (AREA)
  • Technology Law (AREA)
  • Data Mining & Analysis (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to a numerical resource rollback method, a numerical resource rollback device, a server and a storage medium. The method comprises the following steps: receiving a numerical resource rollback request; acquiring a backspacing batch number according to the numerical resource backspacing request; analyzing the batch number, and determining a receipt number matched with the batch number in a database; and returning the value resource from the first account to the second account according to the receipt number. The numerical resource backspacing method, the numerical resource backspacing device, the server and the storage medium can backspace multiple numerical resources simultaneously according to batches, reduce backspace time and effectively improve numerical resource backspace efficiency.

Description

Numerical resource rollback method, device, server and storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method, an apparatus, a server, and a storage medium for numeric resource rollback.
Background
Some numerical value resources are issued through banks, users can collect the numerical value resources in different places, for example, the users can collect survival funds in different places, and the survival funds refer to the amount, the mode and the time limit of money paid to the policy beneficiary by an insurance company according to the amount, the mode and the time limit agreed by the insurance contract. The numerical value resources picked up in different places are transferred through different places, and the different places usually do not belong to the establishment to which the company hooked with the numerical value resources belongs, so that only the receipt number of the numerical value resource transfer is recorded in the database. When the numerical resource is received wrongly and the received numerical resource needs to be returned, only one stroke can be returned according to the receipt number. Each rollback of a numerical resource requires that the next numerical resource can be rolled back after the business is rolled back. If dozens of numerical resources need to be backed, a large amount of time needs to be wasted, and the efficiency of backing the numerical resources is low.
Disclosure of Invention
The embodiment of the invention provides a numerical resource rollback method, a numerical resource rollback device, a server and a storage medium, which can simultaneously rollback a plurality of numerical resources according to batches, reduce rollback time and effectively improve numerical resource rollback efficiency.
A numerical resource rollback method comprises the following steps:
receiving a numerical resource rollback request;
acquiring a backspacing batch number according to the numerical resource backspacing request;
analyzing the batch number, and determining a receipt number matched with the batch number in a database;
and returning the value resource from the first account to the second account according to the receipt number.
In one embodiment, said parsing said lot number to determine a receipt number in a database that matches said lot number comprises:
analyzing the batch number to obtain an analysis result;
inquiring a database corresponding to the batch number according to the analysis result, and obtaining a data table corresponding to the batch number in the database;
a receipt number is determined from the data table that matches the batch number.
In one embodiment, the parsing the batch number to obtain a parsing result includes:
analyzing the batch number to obtain a department number and a serial number of the batch number;
the querying a database corresponding to the batch number according to the analysis result and obtaining a data table corresponding to the batch number in the database includes:
querying a database corresponding to the department number;
reading a serial number value interval corresponding to each data table in the database;
and comparing the serial number with each read serial number value interval one by one, and acquiring a data table corresponding to the serial number value interval in which the serial number is positioned.
In one embodiment, the data table comprises a numerical resource actual transfer table;
the rollback of a value resource from a first account to a second account according to the receipt number comprises:
acquiring a first transfer record of the receipt number matched with the batch number in the numerical resource actual transfer table;
determining the transfer state of each receipt number one by one according to the first transfer record;
counting the total resource limit corresponding to the transferred receipt number;
and extracting the numerical resource matched with the total resource limit from the first account, and returning to the second account.
In one embodiment, the data table further comprises a numerical resource plan transfer table;
after the numerical resource matched with the total resource limit is extracted from the first account and returned to the second account, the method further comprises the following steps:
generating a backspacing record corresponding to the receipt number of which the transfer state is transferred in the numerical value resource actual transfer table;
acquiring a second transfer record of the receipt number matched with the batch number in the numerical resource planning transfer table;
and setting the valid mark position of the receipt number corresponding to the rollback record in the second transfer record as invalid, generating a corresponding record to be transferred, and setting the receipt number of the record to be transferred as null.
A numerical resource rollback apparatus, comprising:
a receiving module, configured to receive a numerical resource rollback request;
the batch number obtaining module is used for obtaining a backspacing batch number according to the numerical resource backspacing request;
the determining module is used for analyzing the batch number and determining a receipt number matched with the batch number in a database;
and the backspacing module is used for backspacing the numerical resource from the first account to the second account according to the receipt number.
In one embodiment, the determining module includes:
the analysis unit is used for analyzing the batch number to obtain an analysis result;
the query unit is used for querying a database corresponding to the batch number according to the analysis result and obtaining a data table corresponding to the batch number in the database;
a determining unit, configured to determine a receipt number matching the batch number from the data table;
the analysis unit is also used for analyzing the batch number to obtain a department number and a serial number of the batch number;
the query unit comprises:
a database query subunit, configured to query a database corresponding to the department number;
the reading subunit is used for reading the serial number value intervals corresponding to the data tables in the database;
and the comparison subunit is used for comparing the serial number with each read serial number value interval one by one and acquiring a data table corresponding to the serial number value interval in which the serial number is positioned.
In one embodiment, the data table comprises a numerical resource actual transfer table and a numerical resource planned transfer table;
the rollback module comprises:
a record obtaining unit, configured to obtain a first transfer record of the receipt number that matches the batch number in the value resource actual transfer table;
the state determining unit is used for determining the transfer state of each receipt number one by one according to the first transfer record;
the statistical unit is used for counting the total resource limit corresponding to the transferred receipt number in the transfer state;
the backspacing unit is used for extracting the numerical resource matched with the total resource limit from the first account and backspacing the numerical resource to the second account;
the device further comprises:
a first generating module, configured to generate a rollback record corresponding to the receipt number whose transfer status is transferred in the numerical resource actual transfer table;
the record acquisition module is used for acquiring a second transfer record of the receipt number matched with the batch number in the numerical resource plan transfer table;
and the second generation module is used for setting the valid mark position of the receipt number corresponding to the rollback record in the second transfer record as invalid, generating a corresponding record to be transferred, and setting the receipt number of the record to be transferred as null.
A server comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method as described above when executing the program.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method as set forth above.
According to the numerical resource backspacing method, the numerical resource backspacing device, the server and the storage medium, the numerical resource backspacing request is received, the backspacing batch number is obtained according to the numerical resource backspacing request, each receipt number matched with the batch number is determined, the numerical resource is backspacing from the first account to the second account according to each receipt number matched with the batch number, a plurality of numerical resources can be backspacing simultaneously according to batches, the backspacing time is reduced, and the numerical resource backspacing efficiency is effectively improved.
Drawings
FIG. 1 is a block diagram of a server in one embodiment;
FIG. 2 is a flowchart illustrating a numerical resource rollback method according to an embodiment;
FIG. 3 is a flow diagram illustrating the determination of a receipt number that matches a lot number in one embodiment;
FIG. 4 is a schematic view of a process for querying a database and a data table corresponding to a lot number;
FIG. 5 is a flow diagram illustrating numeric resource rollback in one embodiment;
FIG. 6 is a flow diagram illustrating an embodiment of altering numerical resource plan transfer table data based on a rollback record;
FIG. 7 is a block diagram of an apparatus for numeric resource rollback in one embodiment;
FIG. 8 is a block diagram of a determination module in one embodiment;
FIG. 9 is a block diagram of a query unit in one embodiment;
FIG. 10 is a block diagram of a fallback module in one embodiment;
fig. 11 is a block diagram of a numerical resource rollback apparatus in another embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
It will be understood that, as used herein, the terms "first," "second," and the like may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish one element from another. For example, a first client may be referred to as a second client, and similarly, a second client may be referred to as a first client, without departing from the scope of the present invention. Both the first client and the second client are clients, but they are not the same client.
FIG. 1 is a block diagram of a server in one embodiment. As shown in fig. 1, the server includes a processor, a non-volatile storage medium, an internal memory, and a network interface connected through a system bus. Wherein the non-volatile storage medium of the server stores an operating system, a database, and computer-executable instructions. The database stores a data table, and the data table stores information such as records of numerical value resource transfer of each batch. The computer-executable instructions are used for implementing a numerical resource rollback method applicable to a server provided in the embodiment of the application. The processor of the server is used for providing calculation and control capacity and supporting the operation of the whole server. The internal memory of the server provides a cached execution environment for the operating system and computer-executable instructions in the non-volatile storage medium. The network interface of the server is used for communicating with other computer devices according to the data, such as receiving a numerical resource rollback request and the like. The server may be implemented as a stand-alone server or as a server cluster consisting of a plurality of servers. Those skilled in the art will appreciate that the architecture shown in fig. 1 is a block diagram of only a portion of the architecture associated with the subject application, and does not constitute a limitation on the servers to which the subject application applies, and in particular that a server may include more or fewer components than shown, or combine certain components, or have a different arrangement of components.
As shown in fig. 2, in one embodiment, a method for backing off a numerical resource is provided, which includes the following steps:
step S210, receiving a numerical resource rollback request.
When the user needs to back the numerical resource, the numerical resource back-off operation can be performed through the terminal, and the numerical resource back-off refers to returning the numerical resource to the state before the transfer. When the numerical resource transfer is wrong, for example, the quota of the numerical resource transfer is wrong, the user can trigger a numerical resource rollback button on a numerical resource rollback page of the terminal to perform numerical resource rollback operation, or send information to a mechanism for transferring the numerical resource to perform the numerical resource rollback operation, and the terminal sends a numerical resource rollback request to the server according to the received numerical resource rollback operation.
Step S220, obtaining the batch number of the rollback according to the numerical resource rollback request.
In this embodiment, the numerical resource has a corresponding batch number when being transferred, the numerical resource belonging to the same batch number can be transferred for multiple times, one batch number can include one or more receipt numbers, and each receipt number belonging to the same batch number can respectively correspond to the numerical resource transferred at different time points under the corresponding batch number. The server receives a numerical value resource rollback request sent by the terminal, and can acquire a batch number corresponding to the numerical value resource needing to be rolled back from the numerical value resource rollback request.
In step S230, the lot number is parsed and the receipt number matching the lot number is determined in the database.
In one embodiment, the batch number may be generated according to a certain setting condition, wherein the setting condition is defined by the number of digits of the batch number and the meaning represented by each character in the batch number, wherein the characters may include numbers, letters, symbols, or the like. For example, the setting condition may specify that the batch number is 16 digits in total, where the first digit of the batch number is a letter for indicating the category corresponding to the numerical resource, such as the categories of life insurance, pension insurance, and the like; the second to fifth digits of the batch number are numbers used for representing related department numbers, such as the department A of Guangdong Shenzhen city, the department B of Guangdong Guangzhou city and the like; the last 11 bits of the batch number are numbers for representing the sequence corresponding to the batch number, but the invention is not limited thereto, and the batch number may be in other composition formats. The server analyzes the batch number, divides the batch number according to set conditions, firstly queries a corresponding database according to the divided batch number, finds a corresponding data table in the database, and then determines each receipt number matched with the batch number from the data table, wherein the number of the receipt numbers matched with the batch number may be one or more, and is determined by the number of times of transferring numerical value resources under the batch number.
Step S240, returning the value resource from the first account to the second account according to the receipt number.
After determining all the receipt numbers matched with the batch number, the server can rollback the numerical resource corresponding to each receipt number from a first account to a second account at one time, wherein the first account refers to an object for receiving the numerical resource during the numerical resource transfer, the second account is an object for executing the numerical resource transfer operation, for example, the numerical resource is transferred from an insurance company account to a user's personal account, and when the rollback is performed, the numerical resource is rolled back from the user's personal account to the insurance company account, wherein the user's personal account is the first account, and the insurance company account is the second account.
In an embodiment, the user may also only rollback the numerical resource of a single receipt number in a certain batch number, after receiving the numerical resource rollback request, the server may obtain the batch number and the receipt number according to the numerical resource rollback request, and the server queries a corresponding numerical resource transfer record stored in a data table of the database according to the batch number and the receipt number, and backs the numerical resource from the first account to the second account according to the numerical resource transfer record.
According to the numerical resource backspacing method, the numerical resource backspacing request is received, the backspacing batch number is obtained according to the numerical resource backspacing request, each receipt number matched with the batch number is determined, the numerical resource is backspacing from the first account to the second account according to each receipt number matched with the batch number, a plurality of numerical resources can be backspacing simultaneously according to batches, the backspacing time is reduced, and the numerical resource backspacing efficiency is effectively improved.
As shown in FIG. 3, in one embodiment, the step S230 of parsing the lot number to determine a receipt number in the database that matches the lot number includes the steps of:
step S302, analyzing the batch number to obtain an analysis result.
The server can analyze the batch number, divide the batch number according to set conditions to obtain a department number and a serial number contained in the batch number, and search a receipt number matched with the batch number according to the department number and the serial number. For example, the batch number is "E260100000227727", and the server analyzes the batch number, and divides the batch number according to the set conditions to obtain "E", "2601" and "0000227727", wherein "E" represents that the type corresponding to the numerical resource is life insurance; the numbers 2601 at the second to fifth digits represent related department numbers, which represent the life insurance department in Shenzhen city of Guangdong province; the last 11 digits are the serial number.
Step S304, a database corresponding to the batch number is inquired according to the analysis result, and a data table corresponding to the batch number is obtained in the database.
The server can firstly inquire the corresponding database according to the divided batch number, search the corresponding data table in the database, and then determine each receipt number matched with the batch number from the data table.
As shown in fig. 4, in an embodiment, the step S304 queries a database corresponding to the batch number according to the parsing result, and obtains a data table corresponding to the batch number from the database, including the following steps:
in step S402, a database corresponding to the department number is queried.
In this embodiment, a plurality of databases may be included, each database may correspond to one or more departments, and the database stores transfer information of numerical resources of the relevant department. The server can query the database corresponding to the department number contained in the batch number according to the pre-established corresponding relationship between the database and the department number.
Step S404, reading the serial number value interval corresponding to each data table in the database.
Each database can store data tables, each data table can respectively correspond to different serial number value intervals, and the data tables store the numerical resource transfer records of the batch numbers in the corresponding serial number value intervals. For example, the a data table in the a database corresponds to a serial number value interval [0,100000], and the numerical resource transfer records including the batch number with the serial number between 0 and 100000 are all stored in the a data table.
Step S406, comparing the serial number with each read serial number value interval one by one, and acquiring a data table corresponding to the serial number value interval where the serial number is located.
After the server inquires a database corresponding to department numbers contained in the batch numbers, serial number value intervals corresponding to all data tables in the corresponding database can be read, the serial numbers contained in the batch numbers are compared with the read serial number value intervals one by one, the serial number value interval where the serial number is located is determined, and accordingly the data table corresponding to the determined serial number value interval is obtained, and numerical resource transfer records of all receipt numbers matched with the batch numbers are stored in the data table. For example, if the serial number included in the batch number "E260100000227727" is "00000227727" and falls into the serial number value interval [200000, 300000], all receipt numbers matching the batch number "E260100000227727" and the associated value resource transfer records can be obtained from the data table with the serial number value interval [200000, 300000 ].
In step S306, a receipt number matching the lot number is determined from the data table.
In this embodiment, the batch number may be analyzed, the corresponding database may be found according to the department number obtained by the analysis, the data table corresponding to the batch number in the database may be determined according to the serial number, and the receipt number matching the batch number may be obtained in the corresponding data table, which may improve the query speed of the receipt number, thereby effectively improving the numerical resource rollback efficiency.
As shown in FIG. 5, in one embodiment, step S240 of backing a value resource from a first account to a second account according to a receipt number includes the following steps:
step S502, a first transfer record of the receipt number matched with the batch number is obtained in the numerical resource actual transfer table.
The data tables in the database may include a numerical resource planned transfer table and a numerical resource actual transfer table, where records to be transferred of the numerical resources and corresponding transfer information are stored in the numerical resource planned transfer table, and actual transfer information of the numerical resources is stored in the numerical resource actual transfer table. For example, when an insurance company needs to transfer a numerical resource to a personal account of a user, a to-be-transferred record of the numerical resource can be generated in a numerical resource plan transfer table, a server transfers the numerical resource according to the to-be-transferred record, allocates a transferred batch number, generates a corresponding actual transfer record in a numerical resource actual transfer table, transfers the numerical resource under one batch number for multiple times, can allocate a unique receipt number for transferring the numerical resource each time, and updates a corresponding transfer state in the numerical resource actual transfer table after each numerical resource transfer is successful.
The server can obtain a first transfer record of the receipt number matched with the batch number in the actual transfer table of the numerical resource, wherein the first transfer record stores the actual transfer information of each receipt number under the batch number, and can comprise the information of the batch number, the receipt number, the transfer state, the transfer limit, the object for receiving the numerical resource and the like. The first transfer record obtained from the value resource actual transfer table may be as shown in table 1.
TABLE 1
Batch number Receipt number Transfer limit Receiving an account Transferring states
E260100000227727 123456 1000 X Has been transferred to
E260100000227727 234567 1500 X Has been transferred to
E260100000227727 345678 1000 X Has been transferred to
E260100000227727 456789 1000 X Is not transferred
When the server transfers the numerical resource of the batch, the allocated batch number is "E260100000227727", and the transfer is performed by dividing into 4 times, each time of numerical resource transfer can correspond to a unique receipt number, as can be seen from table 1, the value resource of the first 3 times of the batch is transferred, and the value resource of the 4 th time is not transferred.
Step S504, confirm the transfer state of each receipt number one by one according to the first transfer record.
After the server obtains the first transfer record of the receipt number matched with the batch number from the actual value resource transfer table, the server can determine whether the transfer state of each receipt number in the first transfer record is transferred or not, and count the total resource limit corresponding to the receipt number of which the transfer state is transferred. For example, as shown in table 1, if the number of receipts matched with the lot number "E260100000227727" is 4, the transfer status of the first 3 receipts is transferred, and the transfer status of the 4 th receipt is not transferred, the total resource amount of the receipt with the transferred status is 3500.
Step S506, the total resource limit corresponding to the transferred receipt number is counted.
Step S508, the numerical resource matched with the total resource limit is extracted from the first account and returned to the second account.
The server can extract the numerical resource matched with the counted total resource limit from the first account, return to the second account and uniformly return the numerical resources of the receipt numbers in the same batch.
In this embodiment, the first transfer record of the receipt number matched with the batch number can be obtained from the actual transfer table of the numerical resource, and the numerical resources of a plurality of receipt numbers in the same batch are backed up uniformly according to the first transfer record, so that the back-up time is reduced, and the back-up efficiency of the numerical resources is effectively improved.
As shown in fig. 6, in one embodiment, after the step S508 extracts the numerical resource matching the total resource amount from the first account and returns to the second account, the method further includes the following steps:
in step S602, a rollback record corresponding to the receipt number whose transfer status is transferred is generated in the actual transfer table of the numerical resource.
After the server extracts the numerical resource of the first account and returns to the second account, when the returning success information is received, a returning record can be generated in the actual transfer table of the numerical resource, the returning record and the receipt number for returning operation have a one-to-one correspondence, and the returning record can include information such as batch number, receipt number, returning amount, returning account, returning time and the like. The server performs rollback according to the first transfer record of table 1, and generates a rollback record in the numeric resource actual transfer table as shown in table 2.
TABLE 2
Batch number Receipt number Line back Rollback account Back off time
E260100000227727 123456 1000 Y 2017-7-1
E260100000227727 234567 1500 Y 2017-7-1
E260100000227727 345678 1000 Y 2017-7-1
In step S604, a second transfer record of the receipt number matching the lot number is obtained in the numerical resource scheduling transfer table.
The server can obtain a second transfer record of the receipt number matched with the batch number in the numerical resource schedule, wherein the second transfer record stores information to be transferred of the numerical resource related to the batch number and can comprise the batch number, the receipt number, a transfer limit, a valid flag bit and the like, wherein the valid flag bit is used for indicating whether the transfer record of the receipt number is valid, if the transfer record is valid, the transfer is not needed, and if the transfer record is invalid, the transfer is needed. The second transfer record obtained in the numerical resource schedule may be as shown in table 3.
TABLE 3
Batch number Receipt number Should transfer the amount Receiving an account Valid flag bit
E260100000227727 123456 1200 X 1
E260100000227727 234567 1500 X 1
E260100000227727 345678 1200 X 1
E260100000227727 456789 1000 X 0
The valid flag bit is 1 to indicate valid, and the valid flag bit is 0 to indicate invalid, but the present invention is not limited thereto, and other characters may be used to indicate this. As can be seen from table 3, the credit to be transferred of the receipt numbers "123456" and "345678" under the lot number "E260100000227727" is 1200, and the credit to be transferred in table 1 is 1000, which indicates that the credit to be transferred of the numerical resource is wrong, and the user can perform the numerical resource rollback operation through the terminal.
Step S608, the valid flag position of the receipt number corresponding to the rollback record in the second transfer record is invalidated, and a corresponding record to be transferred is generated, and the receipt number of the record to be transferred is set to be null.
The server may invalidate valid flag positions for corresponding receipt numbers in the second transfer record based on the rollback record generated in the numeric resource actual transfer table, e.g., invalidate valid flag positions for receipt numbers "123456", "234567", "345678" in table 3 based on the rollback record of table 2. The server may generate corresponding records to be transferred at the same time, the records to be transferred may only include the batch number, the quota to be transferred, and the like, and the batch number in the records to be transferred may be set to be null, wherein the quota to be transferred may be the total resource quota for which the valid flag bit in the second transfer record is set to be invalid, for example, the quota to be transferred for generating the record to be transferred corresponding to table 3 is 4900, which is the sum of the returned receipts with numbers "123456", "234567", "345678", and the un-transferred receipt number with "456789".
When the server transfers the numerical value resource again according to the record to be transferred, the distributed batch number can be filled in the record to be transferred in the numerical value resource schedule, and the information of the receipt number, the effective zone bit of the receipt number and the like can be updated at the same time.
In this embodiment, the data in the numerical resource schedule can be returned to the place before the numerical resource is transferred according to the rollback record, so that the consistency of the data is ensured, the numerical resource is conveniently transferred again, errors generated by factor value resource rollback are reduced, and the numerical resource rollback efficiency is effectively improved.
As shown in fig. 7, in one embodiment, a numerical resource rollback apparatus 700 is provided, which includes a receiving module 710, a batch number obtaining module 720, a determining module 730, and a rollback module 740.
A receiving module 710, configured to receive a numerical resource rollback request.
The batch number obtaining module 720 is configured to obtain a returned batch number according to the numerical resource return request.
The determining module 730 is used for parsing the batch number and determining the receipt number matched with the batch number in the database.
A rollback module 740 configured to rollback the value resource from the first account to the second account based on the receipt number.
The numerical resource backspacing device receives the numerical resource backspacing request, acquires the backspacing batch number according to the numerical resource backspacing request, determines each receipt number matched with the batch number, and backspaces the numerical resource from the first account to the second account according to each receipt number matched with the batch number, so that a plurality of numerical resources can be backspaced simultaneously according to batches, the backspacing time is reduced, and the numerical resource backspacing efficiency is effectively improved.
As shown in fig. 8, in one embodiment, determination module 730 includes a parsing unit 732, a querying unit 734, and a determination unit 736.
The analyzing unit 732 is configured to analyze the lot number to obtain an analysis result.
In one embodiment, the parsing unit 732 is further configured to parse the batch number to obtain a department number and a serial number of the batch number.
The query unit 734 is configured to query the database corresponding to the batch number according to the analysis result, and obtain a data table corresponding to the batch number in the database.
As shown in FIG. 9, in one embodiment, query unit 734 includes database query subunit 902, read subunit 904, and compare subunit 906.
And a database query subunit 902, configured to query a database corresponding to the department number.
The reading subunit 904 is configured to read a serial number value interval corresponding to each data table in the database.
And the comparison sub-unit 906 is configured to compare the serial number with each read serial number value interval one by one, and obtain a data table corresponding to the serial number value interval where the serial number is located.
A determining unit 736 for determining the receipt number matching the lot number from the data table.
In this embodiment, the batch number may be analyzed, the corresponding database may be found according to the department number obtained by the analysis, the data table corresponding to the batch number in the database may be determined according to the serial number, and the receipt number matching the batch number may be obtained in the corresponding data table, which may improve the query speed of the receipt number, thereby effectively improving the numerical resource rollback efficiency.
In one embodiment, the data tables include a numerical resource actual transfer table and a numerical resource projected transfer table. As shown in fig. 10, the rollback module 740 includes a record obtaining unit 742, a state determining unit 744, a counting unit 746, and a rollback unit 748.
A record obtaining unit 742 is configured to obtain a first transfer record of the receipt number matching the batch number in the numerical resource actual transfer table.
A status determination unit 744 for determining the transfer status of each receipt number one by one according to the first transfer record.
The counting unit 746 is used for counting the total resource amount corresponding to the transferred receipt number.
The rollback unit 748 is configured to retrieve the numerical resource matching the total resource amount from the first account and rollback to the second account.
In this embodiment, the first transfer record of the receipt number matched with the batch number can be obtained from the actual transfer table of the numerical resource, and the numerical resources of a plurality of receipt numbers in the same batch are backed up uniformly according to the first transfer record, so that the back-up time is reduced, and the back-up efficiency of the numerical resources is effectively improved.
As shown in fig. 11, in an embodiment, the numerical resource rollback apparatus 700 further includes a first generation module, a record acquisition module, and a second generation module in addition to the receiving module 710, the batch number acquisition module 720, the determination module 730, and the rollback module 740.
A first generating module 750, configured to generate a rollback record corresponding to the receipt number whose transfer status is transferred in the numerical resource actual transfer table.
A record obtaining module 760 for obtaining a second transfer record of the receipt number matching the batch number in the numerical resource plan transfer table.
A second generating module 770, configured to set the valid flag position of the receipt number corresponding to the rollback record in the second transfer record to invalid, generate a corresponding record to be transferred, and set the receipt number of the record to be transferred to null.
In this embodiment, the data in the numerical resource schedule can be returned to the place before the numerical resource is transferred according to the rollback record, so that the consistency of the data is ensured, the numerical resource is conveniently transferred again, errors generated by factor value resource rollback are reduced, and the numerical resource rollback efficiency is effectively improved.
In one embodiment, a server is provided, which includes a memory, a processor and a computer program stored in the memory and executable on the processor, and the processor executes the program to implement the numerical resource rollback method.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which, when being executed by a processor, implements the numerical resource rollback method described above.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A numerical resource rollback method comprises the following steps:
receiving a numerical resource rollback request;
acquiring a returned batch number according to the numerical resource returning request, wherein the batch number is generated according to a set condition, and the set condition is appointed with the bit number of the batch number and the meaning represented by each character in the batch number;
analyzing the batch number, segmenting the batch number according to the set conditions to obtain a department number and a serial number contained in the batch number, inquiring a corresponding database according to the department number in the segmented batch number, finding a corresponding data table in the database according to a serial number numerical interval where the serial number is located, and determining a plurality of receipt numbers matched with the batch number from the data table;
and returning the value resource from the first account to the second account at one time according to a plurality of receipt numbers.
2. The method of claim 1, wherein said parsing said lot number to determine a receipt number in a database that matches said lot number comprises:
analyzing the batch number to obtain an analysis result;
inquiring a database corresponding to the batch number according to the analysis result, and obtaining a data table corresponding to the batch number in the database;
a receipt number is determined from the data table that matches the batch number.
3. The method of claim 2, wherein said resolving the lot number to obtain a resolved result comprises:
analyzing the batch number to obtain a department number and a serial number of the batch number;
the querying a database corresponding to the batch number according to the analysis result and obtaining a data table corresponding to the batch number in the database includes:
querying a database corresponding to the department number;
reading a serial number value interval corresponding to each data table in the database;
and comparing the serial number with each read serial number value interval one by one, and acquiring a data table corresponding to the serial number value interval in which the serial number is positioned.
4. The method of claim 2, wherein the data table comprises a numerical resource real transfer table;
the rollback of a value resource from a first account to a second account according to the receipt number comprises:
acquiring a first transfer record of the receipt number matched with the batch number in the numerical resource actual transfer table;
determining the transfer state of each receipt number one by one according to the first transfer record;
counting the total resource limit corresponding to the transferred receipt number;
and extracting the numerical resource matched with the total resource limit from the first account, and returning to the second account.
5. The method of claim 4, wherein the data table further comprises a numerical resource plan transfer table;
after the numerical resource matched with the total resource limit is extracted from the first account and returned to the second account, the method further comprises the following steps:
generating a backspacing record corresponding to the receipt number of which the transfer state is transferred in the numerical value resource actual transfer table;
acquiring a second transfer record of the receipt number matched with the batch number in the numerical resource planning transfer table;
and setting the valid mark position of the receipt number corresponding to the rollback record in the second transfer record as invalid, generating a corresponding record to be transferred, and setting the receipt number of the record to be transferred as null.
6. A numerical resource rollback apparatus, comprising:
a receiving module, configured to receive a numerical resource rollback request;
a batch number obtaining module, configured to obtain a batch number to be backed according to the numerical resource back-off request, where the batch number is generated according to a set condition, and the set condition is agreed with the number of bits of the batch number and a meaning represented by each character in the batch number;
the determining module is used for analyzing the batch number, segmenting the batch number according to the set conditions to obtain a department number and a serial number contained in the batch number, and inquiring a corresponding database according to the department number in the segmented batch number; searching a corresponding data table in the database according to the numerical interval of the serial number where the serial number is located; determining from the data table a plurality of receipt numbers that match the batch number;
and the backspacing module is used for backspacing the numerical resource from the first account to the second account at one time according to the receipt numbers.
7. The apparatus of claim 6, wherein the determining module comprises:
the analysis unit is used for analyzing the batch number to obtain an analysis result;
the query unit is used for querying a database corresponding to the batch number according to the analysis result and obtaining a data table corresponding to the batch number in the database;
a determining unit, configured to determine a receipt number matching the batch number from the data table;
the analysis unit is also used for analyzing the batch number to obtain a department number and a serial number of the batch number;
the query unit comprises:
a database query subunit, configured to query a database corresponding to the department number;
the reading subunit is used for reading the serial number value intervals corresponding to the data tables in the database;
and the comparison subunit is used for comparing the serial number with each read serial number value interval one by one and acquiring a data table corresponding to the serial number value interval in which the serial number is positioned.
8. The apparatus of claim 7, wherein the data tables include a numerical resource real transfer table and a numerical resource plan transfer table;
the rollback module comprises:
a record obtaining unit, configured to obtain a first transfer record of the receipt number that matches the batch number in the value resource actual transfer table;
the state determining unit is used for determining the transfer state of each receipt number one by one according to the first transfer record;
the statistical unit is used for counting the total resource limit corresponding to the transferred receipt number in the transfer state;
the backspacing unit is used for extracting the numerical resource matched with the total resource limit from the first account and backspacing the numerical resource to the second account;
the device further comprises:
a first generating module, configured to generate a rollback record corresponding to the receipt number whose transfer status is transferred in the numerical resource actual transfer table;
the record acquisition module is used for acquiring a second transfer record of the receipt number matched with the batch number in the numerical resource plan transfer table;
and the second generation module is used for setting the valid mark position of the receipt number corresponding to the rollback record in the second transfer record as invalid, generating a corresponding record to be transferred, and setting the receipt number of the record to be transferred as null.
9. A server comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor when executing the program implementing the method of any one of claims 1 to 5.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1 to 5.
CN201710629161.0A 2017-07-28 2017-07-28 Numerical resource rollback method, device, server and storage medium Active CN108256839B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201710629161.0A CN108256839B (en) 2017-07-28 2017-07-28 Numerical resource rollback method, device, server and storage medium
PCT/CN2018/082480 WO2019019697A1 (en) 2017-07-28 2018-04-10 Numerical resource return method and apparatus, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710629161.0A CN108256839B (en) 2017-07-28 2017-07-28 Numerical resource rollback method, device, server and storage medium

Publications (2)

Publication Number Publication Date
CN108256839A CN108256839A (en) 2018-07-06
CN108256839B true CN108256839B (en) 2020-11-24

Family

ID=62722197

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710629161.0A Active CN108256839B (en) 2017-07-28 2017-07-28 Numerical resource rollback method, device, server and storage medium

Country Status (2)

Country Link
CN (1) CN108256839B (en)
WO (1) WO2019019697A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111192036B (en) * 2019-08-01 2023-06-20 腾讯科技(深圳)有限公司 Account resource updating method and device, computer equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103578029A (en) * 2012-07-31 2014-02-12 Ncr公司 Currency tracking
CN104036595A (en) * 2013-03-08 2014-09-10 乐金信世股份有限公司 Financial automation apparatus, method and system for receiving and refunding fees

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150019277A1 (en) * 2012-10-02 2015-01-15 DRW Legal Lumping Enterprises, Inc. Method and system for automating lumping services management

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103578029A (en) * 2012-07-31 2014-02-12 Ncr公司 Currency tracking
CN104036595A (en) * 2013-03-08 2014-09-10 乐金信世股份有限公司 Financial automation apparatus, method and system for receiving and refunding fees

Also Published As

Publication number Publication date
WO2019019697A1 (en) 2019-01-31
CN108256839A (en) 2018-07-06

Similar Documents

Publication Publication Date Title
CN110008257B (en) Data processing method, device, system, computer equipment and storage medium
CN112612827B (en) Database paging query method and device, computer equipment and storage medium
CN102402605B (en) Mixed distribution model for search engine indexing
CN105827706B (en) Message pushing device and method
CN111078657A (en) Service log query method, system, medium and equipment of distributed system
CN114022188A (en) Target crowd circling method, device, equipment and storage medium
CN112750027A (en) Batch business processing method and device, computer equipment and storage medium
CN106933836A (en) A kind of date storage method and system based on point table
CN112328688B (en) Data storage method, device, computer equipment and storage medium
CN114265740A (en) Error information processing method, device, device and storage medium
CN111899822A (en) Medical institution database construction method, query method, device, equipment and medium
CN107748739B (en) Short message text template extraction method and related device
CN101452556A (en) Customer information processing system and method
CN108256839B (en) Numerical resource rollback method, device, server and storage medium
CN110543471A (en) Ticket code generation method and server
CN111311329B (en) Tag data acquisition method, device, equipment and readable storage medium
CN113849477A (en) Sign-in management method, device, electronic device and storage medium
CN115017176B (en) Multi-node data retrieval method, device and computer storage medium
CN113704268B (en) Data processing method, device, storage medium and equipment
CN111046077A (en) Data acquisition method and device, storage medium and terminal
CN115293685A (en) Logistics order state tracking method, device, equipment and storage medium
CN113901037A (en) Data management method, device and storage medium
CN110619275A (en) Information pushing method and device, computer equipment and storage medium
CN114971532B (en) Enterprise portrait establishing and managing method and system
CN111131393B (en) User activity data statistical method, electronic device and storage medium

Legal Events

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