A multi-thread based bulk discounting of instruments method and system

By using multi-threading and caching technologies to process batch discounting and splitting of massive amounts of data, the problem of existing systems being unable to handle multiple invoices and massive amounts of data has been solved, thereby improving system stability and response speed and meeting customers' funding needs.

CN116503150BActive Publication Date: 2026-11-06CHINA CONSTRUCTION BANK +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310408185.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-17
Publication Date
2026-11-06
Estimated Expiration
2043-04-17

AI Technical Summary

Technical Problem

The existing system cannot support batch discounting and splitting of multiple invoices, and its slow response and inability to handle massive amounts of data limit the development of customers' businesses.

Method used

Employing multithreading and caching technologies, the system distributes data to multiple threads for processing via the Map interface of a hash table, enabling batch discounting and splitting of massive amounts of data. This ensures concurrency safety and system stability and reliability.

Benefits of technology

It improved system processing speed and stability, met customer funding needs, enhanced customer experience and satisfaction, and enabled rapid processing of massive amounts of data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116503150B_ABST
    Figure CN116503150B_ABST
Patent Text Reader

Abstract

This invention relates to a multi-threaded batch discounting method and system for bills, comprising: scanning batch discounting tasks, starting four threads, and querying data requiring batch discounting; performing modulo operation on the data requiring batch discounting based on the encoding dimension, matching it using a Map interface based on a hash table, and distributing the data requiring batch discounting to the four threads for sub-processing; querying the status of bills in the database based on the data information requiring batch discounting; if the bill status is in the pooling state, calculating the end range of the sub-bill based on the sub-bill start range and the discount amount; querying the custody table to see if the sub-processing has been completed based on the bill number and sub-bill range; if the processing is complete, returning the processed bills; if the processing is not complete, remotely calling the bill management center's interface to query the bill status based on the bill number and sub-bill range. The method and system of this invention can achieve batch discounting and splitting of massive amounts of data through multi-threaded tasks and caching, accelerating processing speed while ensuring security and reliability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of financial data technology, and in particular to a method and system for batch discounting bills based on multi-threading. Background Technology

[0002] The existing system's discounting functionality is limited, failing to support the discounting or splitting of multiple bills, limiting it to discounting only to banks. Furthermore, the system's slow response time causes significant inconvenience for customers. It also cannot handle massive amounts of data, cannot unpack bills, and does not support batch discounting. As customers' businesses diversify and data volumes increase, the existing system and technology are no longer sufficient to support their business growth. Summary of the Invention

[0003] To address the shortcomings of existing technologies, this invention proposes a batch discounting bill method and system based on multithreading. It utilizes multithreading and caching technologies to achieve batch discounting and splitting of massive amounts of data. At the same time, the system is stable and reliable, with secure concurrency and flexible discounting, which can greatly meet customers' funding needs. From a system perspective, this solution processes data very quickly, greatly improving the customer experience.

[0004] To achieve the above objectives, the technical solution adopted by the present invention includes:

[0005] A method for implementing bulk discounted bills, characterized by comprising:

[0006] Scan the batch discounting task, start four threads, and query the data that needs to be discounted in batches;

[0007] The data that needs to be discounted in batches is moduloed by the encoding dimension and matched with the Map interface implementation based on the hash table. The data that needs to be discounted in batches is then divided into four threads for processing.

[0008] Query the status of bills in the database based on the data information that needs to be discounted in batches;

[0009] If the bill status is in the pool, the end range of the sub-bill is calculated based on the start range of the sub-bill and the discount amount;

[0010] The system checks whether the sub-package processing has been completed in the custody table based on the ticket number and sub-ticket range. If not, it remotely calls the interface of the bill management center to query the bill status based on the ticket number and sub-ticket range. If the bill status is "unprocessed," it calculates the end range of the current bill using the end range of the sub-tickets of the previous bill as the start range of the current bill's sub-tickets, and performs discount unpacking processing. After the unpacking processing is completed, it requests the bill center interface to update the data status of this bill in the batch discount order table to "awaiting reverse adjustment." After the bill center completes the processing, it returns a processing completion notification.

[0011] Update the sub-ticket end range and the amount of the bill in the custody table.

[0012] Furthermore, the method also includes: obtaining basic discounting information; the basic discounting information includes: discounting party customer information, discounting amount, discount recipient information, discounting method, and the time point of batch discounting.

[0013] Furthermore, the method of obtaining basic discount information includes: uploading the batch discount basic information in Excel format.

[0014] Furthermore, the data information requiring bulk discounting includes: ticket number and sub-ticket range; the sub-ticket range includes: sub-ticket start range and sub-ticket end range.

[0015] Furthermore, the custody table is used to store discounted bills and includes: bill number, sub-bill range, and bill amount.

[0016] Furthermore, after the bill center completes the processing, the return of the processing completion notification also includes: updating the data status of this bill in the batch discounting order table to "completed".

[0017] Furthermore, the step of querying the custody table based on the ticket number and sub-ticket range to see if the subcontracting process has been completed also includes: if the process is completed, returning the completed tickets.

[0018] Furthermore, the step of remotely calling the interface of the bill management center to query the bill status based on the bill number and sub-bill range if the processing is not completed also includes: if the bill status is processed, querying the bill information based on the bill number and the start range of the sub-bill to obtain the end range of the sub-bill.

[0019] This invention also relates to an implementation system based on bulk discounted bills, characterized in that it includes:

[0020] The task scanning module is used to scan batch discounting tasks. It starts four threads to query the data that needs to be discounted in batches.

[0021] The interface matching module is used to perform modulo operation on the data that needs to be discounted in batches, based on the encoding dimension, and match it with the Map interface implementation based on the hash table. The data that needs to be discounted in batches is then divided into four threads for processing.

[0022] The status query module is used to query the status of bills in the database based on the data information that needs to be discounted in batches;

[0023] The calculation module is used to calculate the end range of the sub-bill based on the start range of the sub-bill and the discount amount if the bill status is in the pooling state.

[0024] The subcontracting module is used to query whether the custody table has completed subcontracting processing based on the ticket number and sub-ticket range. If not, it remotely calls the interface of the bill management center to query the bill status based on the ticket number and sub-ticket range. If the bill status is unprocessed, it calculates the end range of the current bill using the end range of the sub-tickets of the previous bill as the start range of the sub-tickets of the current bill, and performs discount unpacking processing. After the unpacking processing is completed, it requests the bill center interface to update the data status of this bill in the batch discounting order table to "awaiting reverse adjustment". After the bill center completes the processing, it returns a processing completion notification.

[0025] The update module is used to update the sub-ticket end range and the ticket amount of the bills in the custody table.

[0026] Furthermore, it also includes:

[0027] The basic information acquisition module is used to acquire basic discount information; the basic information of batch discounting includes: discounting party customer information, discount amount, discount recipient information, discounting method, and batch discounting time.

[0028] The present invention also relates to a computer-readable storage medium, characterized in that the storage medium stores a computer program, which, when executed by a processor, implements the above-described implementation method based on batch discount bills.

[0029] The present invention also relates to an electronic device, characterized in that it includes a processor and a memory;

[0030] The memory is used to store the hash table-based Map interface, the escrow table, and the batch discount order table;

[0031] The processor is used to execute the above-mentioned implementation method based on batch discount bills by calling the Map interface based on hash table, the custody table, and the batch discount bill table.

[0032] This invention also relates to a computer program product, comprising a computer program and / or instructions, characterized in that, when executed by a processor, the computer program and / or instructions implement the steps of the above-described implementation method based on batch discount bills.

[0033] The beneficial effects of this invention are as follows:

[0034] The multi-threaded batch discounting bill method and system described in this invention utilizes multi-threading and caching technologies to achieve batch discounting and splitting of massive amounts of data, and also includes compensation processing for abnormal situations. Multi-threading accelerates system processing speed while ensuring safety and reliability. Simultaneously, the system offers concurrency security and flexible discounting, greatly meeting customers' funding needs, satisfying their demands for speed in processing massive amounts of data, and ensuring system stability and data reliability and security. From a system perspective, this solution processes data very quickly, significantly improving customer experience and satisfaction, and effectively meeting customers' funding needs. Attached Figure Description

[0035] Figure 1 This is a schematic diagram of the implementation method of the present invention based on batch discount bills.

[0036] Figure 2 This is a schematic diagram of the system structure for implementing the present invention based on batch discount bills. Detailed Implementation

[0037] To better understand the content of this invention, it will be described in detail with reference to the accompanying drawings and embodiments.

[0038] Bill discounting is the discounting of accounts receivable and payable bills, a way for companies to raise funds. Before the maturity date of an accounts receivable bill, a company endorses the bill and submits it to a bank for discounting. The bank pays the company the remaining amount after deducting interest calculated at the discount rate from the discount date to the maturity date from the maturity value of the bill. This is called accounts receivable bill discounting. The formulas for calculating the interest and the proceeds from accounts receivable bill discounting are as follows:

[0039] Discount interest = Maturity value of the bill × Discount rate × Discount period

[0040] Actual amount received = Maturity value of the bill - Discount interest

[0041] Before the drawer redeems the discounted bill to the bank, the discounted bill receivable is a contingent liability of the company. When a company issues its own bill and discounts it at a bank, the bank pays the company the face value of the bill minus the discount interest; this is called bill payable discounting. The calculation of the discount and the actual amount received for bill payable discounting is similar to that for bill receivable discounting. A "Bill Payable Discount" account should be established to account for the discount on bill payable discounting; it is a deductible account from "Bill Payable". The discount on bill payable discounting should be amortized over time and transferred to interest expense.

[0042] Based on customer needs, a multi-threaded solution for batch discounting and splitting has been implemented. This not only improves the system's processing efficiency but also enables automatic splitting and discounting of bills, allowing for rapid response to customer needs, enhancing customer experience, and providing financing convenience for enterprises.

[0043] The first aspect of this invention relates to a method for implementing bulk discounted bills, the steps of which are as follows: Figure 1 The method shown includes:

[0044] Obtain basic discounting information; the basic discounting information includes: discounting party customer information, discounting amount, discount recipient information, discounting method, and the time point of batch discounting.

[0045] The method of obtaining basic discount information includes uploading the batch discount information in Excel format.

[0046] When a customer performs bulk discounting, the first thing that needs to be done is some basic information about the bulk discounting, including: the discounting party's customer information, the discounting amount, the information of the party being discounted, the discounting method, and the timing of the bulk discounting.

[0047] Customers upload bulk discounting information to the system in Excel format.

[0048] Multithreading refers to the technique of implementing concurrent execution of multiple threads through software or hardware. Computers with multithreading capabilities can execute more than one thread at a time due to hardware support, thereby improving overall processing performance. Systems with this capability include symmetric multiprocessors, multi-core processors, and chip-level multiprocessor or simultaneous multithreaded processors. Within a program, these independently running program segments are called "threads," and the concept of programming using them is called "multithreaded processing."

[0049] After the system detects a batch discounting task, it first starts four threads to query the data that needs batch discounting. This data is then modulo-divided by its ID, and placed into a HashMap. The threads then distribute the data to the four threads to determine whether batch discounting is necessary.

[0050] HashMap is a powerful utility in the JDK, mapping various objects to enable fast key-value pairing and retrieval. HashMap declares the Map, Cloneable, and Serializable interfaces and inherits from the AbstractMap class. Its Iterator is primarily implemented by its inner class HashIterator and several other iterator classes, inheriting from the Entry inner class of Map.Entry.

[0051] The implementation of the hash table-based Map interface provides all optional mapping operations and allows null values ​​and null keys. (The HashMap class is largely the same as Hashtable, except for being unsynchronized and allowing null values.) This class does not guarantee the order of the mappings, and in particular, it does not guarantee that the order will remain constant. This implementation assumes that the hash function distributes elements appropriately across the buckets, providing stable performance for basic operations (get and put). The time required to iterate over a collection view is proportional to the "capacity" of the HashMap instance (the number of buckets) and its size (the number of key-value mappings). Therefore, if iteration performance is important, do not set the initial capacity too high (or the load factor too low).

[0052] A HashMap instance has two parameters that affect its performance: initial capacity and load factor. Capacity is the number of buckets in the hash table, and initial capacity is simply the capacity of the hash table at creation. Load factor is a measure of how full the hash table can be before its capacity automatically increases. When the number of entries in the hash table exceeds the product of the load factor and the current capacity, a rehash operation (i.e., rebuilding the internal data structure) is performed, resulting in the hash table having approximately twice the number of buckets. In the Java programming language, the default load factor is 0.75, and the default number of hash table cells is 101.

[0053] Scan the batch discounting task, start four threads, and query the data that needs to be discounted in batches;

[0054] The data that needs to be discounted in batches is moduloed by the encoding dimension and matched with the Map interface implementation based on the hash table. The data that needs to be discounted in batches is then divided into four threads for processing.

[0055] The data information that needs to be discounted in batches includes: ticket number and sub-ticket range; the sub-ticket range includes: sub-ticket start range and sub-ticket end range.

[0056] Query the status of bills in the database based on the data information that needs to be discounted in batches;

[0057] If the status is "into pool," the ending range of the sub-bill is calculated based on its starting range and discount amount. Then, based on the bill number and the actual sub-bill range, the system checks the custody table (the table storing discounted bills) to see if the sub-bill processing has been completed. If completed, the system returns a direct completion message, and the system will process the subsequent discount data. If not completed, the system remotely calls the bill management center's interface to query the status of the bill based on the bill number and sub-bill range.

[0058] If the bill status is in the pooling state, the end range of the sub-bill is calculated based on the start range of the sub-bill and the discount amount;

[0059] Check whether the custody table has been processed by sub-tickets based on ticket number and sub-ticket range;

[0060] The custody table is used to store discounted bills, including: bill number, sub-bill range, and bill amount; if the processing is complete, the processed bills are returned.

[0061] If the bill status has been processed, first, query the bill information based on the bill number and the sub-bill start range to obtain the sub-bill end range. Use the sub-bill end range of the previous bill as the sub-bill start range for this bill to calculate the sub-bill end range. Then, perform discounting unpacking. After unpacking, request the bill center interface, and simultaneously update the data status of this batch discounting order table to "awaiting reverse adjustment." After the bill center completes processing, it will send a processing completion notification. Upon receiving this notification, the order data status will be updated to "completed." The original bill information in the custody table will be split in two, updating the original sub-bill end range and bill amount, and adding a new discounted bill data entry to the database.

[0062] If the process is not completed, the ticket status will be queried remotely by calling the interface of the ticket management center based on the ticket number and sub-ticket range.

[0063] If the bill status is "processed", then query the bill information based on the bill number and the start range of the sub-bill to obtain the end range of the sub-bill;

[0064] The end range of this bill is calculated by taking the end range of the sub-bill of the previous bill as the start range of the sub-bill of this bill, and then the discounting and unpacking process is performed.

[0065] After the unpacking process is completed, request the bill center interface to update the data status of this bill in the batch discounting order table to "waiting for reversal".

[0066] Once the bill center completes the processing, it will return a processing completion notification; the data status of this bill in the batch discounting order table will be updated to "completed".

[0067] Update the sub-ticket end range and the amount of the bill in the custody table.

[0068] Another aspect of the present invention relates to an implementation system based on bulk discounted bills, the structure of which is as follows: Figure 2 As shown, it includes:

[0069] A system for implementing bulk discounted bills, characterized in that it includes:

[0070] The task scanning module is used to scan batch discounting tasks. It starts four threads to query the data that needs to be discounted in batches.

[0071] The interface matching module is used to perform modulo operation on the data that needs to be discounted in batches, based on the encoding dimension, and match it with the Map interface implementation based on the hash table. The data that needs to be discounted in batches is then divided into four threads for processing.

[0072] The status query module is used to query the status of bills in the database based on the data information that needs to be discounted in batches;

[0073] The calculation module is used to calculate the end range of the sub-bill based on the start range of the sub-bill and the discount amount if the bill status is in the pooling state.

[0074] The subcontracting module is used to query the custody table to see if the subcontracting process has been completed based on the ticket number and sub-ticket range. If the process is complete, it returns the completed ticket. If the process is incomplete, it remotely calls the ticket management center's interface to query the ticket status based on the ticket number and sub-ticket range. If the ticket status is "processed," it queries the ticket information based on the ticket number and sub-ticket start range to obtain the sub-ticket end range. If the ticket status is "unprocessed," it calculates the end range of the current ticket using the sub-ticket end range of the previous ticket as the sub-ticket start range and performs discount unpacking. After the unpacking process is completed, it requests the ticket center interface to update the data status of this ticket in the batch discount order table to "awaiting reverse adjustment." After the ticket center completes the processing, it returns a processing completion notification.

[0075] The update module is used to update the sub-ticket end range and the ticket amount of the bills in the custody table.

[0076] Also includes:

[0077] The basic information acquisition module is used to acquire basic discount information; the basic information of batch discounting includes: discounting party customer information, discount amount, discount recipient information, discounting method, and batch discounting time.

[0078] The system based on batch discount bills described in this invention can also be built using the J2EE language and MVC framework. The database is an Oracle database. The system automatically registers tasks, automatically calculates internal fund pricing, internal entrusted loans, other interest and payment calculations, and information reports, providing enterprises with services such as fund pricing and group-style entrusted loan accounting.

[0079] From a system perspective, it can meet customers' requirements for speed, system stability, and data reliability and security in processing massive amounts of data; it can handle batch data discounting and unpacking; and it can utilize multi-threaded caching technology to process massive amounts of data, including compensation for abnormal situations.

[0080] By using this system, the aforementioned computational processing methods can be executed and the corresponding technical effects can be achieved.

[0081] The present invention discloses a batch discounting bill method and system based on multi-threading. It uses multi-threading and caching technology to realize batch discounting and splitting of massive data. At the same time, the system is stable and reliable, with secure concurrency and flexible discounting, which can greatly meet customers' funding needs. From the system level, the solution processes very quickly and greatly improves the customer experience.

[0082] Embodiments of the present invention also provide a computer-readable storage medium capable of implementing all the steps of the methods in the above embodiments, wherein the computer-readable storage medium stores a computer program that, when executed by a processor, implements all the steps of the methods in the above embodiments.

[0083] Embodiments of the present invention also provide an electronic device for executing the above-described method. As an implementation device for the method, the electronic device has at least a processor and a memory. In particular, the memory stores the data and related computer programs required to execute the method, such as a hash table-based Map interface, a custodian table, and a batch discounting order table. The processor calls the data and programs in the memory to execute all the steps of the method and obtain the corresponding technical effect.

[0084] Preferably, the electronic device may include a bus architecture, which may include any number of interconnected buses and bridges. The bus will include various circuits linked together by one or more processors and memories. The bus may also link together various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. The bus interface provides an interface between the bus and the receiver and transmitter. The receiver and transmitter may be the same element, i.e., a transceiver, providing a unit for communicating with various other systems over a transmission medium. The processor is responsible for managing the bus and general processing, while the memory may be used to store data used by the processor during operation.

[0085] Additionally, the electronic device may further include a communication module, an input unit, an audio processor, a display, a power supply, and other components. The processor (or controller, operating control) used may include a microprocessor or other processor device and / or logic device, which receives input and controls the operation of various components of the electronic device. The memory may be one or more of a buffer, flash memory, hard drive, removable media, volatile memory, non-volatile memory, or other suitable devices, which can store the aforementioned data information, and may also store programs for executing the information. The processor can execute the program stored in the memory to achieve information storage or processing, etc. The input unit is used to provide input to the processor, for example, it can be a button or touch input device. The power supply is used to provide power to the electronic device. The display is used to display images and text, for example, it can be an LCD display. The communication module is a transmitter / receiver that transmits and receives signals via an antenna. The communication module (transmitter / receiver) is coupled to the processor to provide input signals and receive output signals, which can be the same as in conventional mobile communication terminals. Based on different communication technologies, multiple communication modules can be incorporated into the same electronic device, such as cellular network modules, Bluetooth modules, and / or wireless LAN modules. The communication module (transmitter / receiver) is also coupled to a speaker and microphone via an audio processor to provide audio output through the speaker and receive audio input from the microphone, thereby enabling typical telecommunications functions. The audio processor can include any suitable buffer, decoder, amplifier, etc. Furthermore, the audio processor is coupled to a central processing unit, enabling on-device recording via the microphone and on-device playback of stored sound via the speaker.

[0086] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0087] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A system that specifies functions in one or more boxes.

[0088] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including an instruction set implemented in a process. Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0089] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the functions specified in one or more boxes. Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the invention.

[0090] The above description is merely a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for batch discounting bills based on multithreading, characterized in that, include: Scan the batch discounting task, start four threads, and query the data that needs to be discounted in batches; The data that needs to be discounted in batches is moduloed by the encoding dimension, matched with the Map interface implementation based on the hash table, and the data that needs to be discounted in batches is divided into four threads for processing. Query the status of bills in the database based on the data information that needs to be discounted in batches; If the bill status is in the pool, the end range of the sub-bill is calculated based on the start range of the sub-bill and the discount amount; The system checks whether the sub-package processing has been completed in the custody table based on the ticket number and sub-ticket range. If not, it remotely calls the interface of the bill management center to query the bill status based on the ticket number and sub-ticket range. If the bill status is "unprocessed," it calculates the end range of the current bill using the end range of the sub-tickets of the previous bill as the start range of the current bill's sub-tickets, and performs discount unpacking processing. After the unpacking processing is completed, it requests the bill center interface to update the data status of this bill in the batch discount order table to "awaiting reverse adjustment." After the bill center completes the processing, it returns a processing completion notification. Update the sub-ticket end range and the amount of the bill in the custody table.

2. The method as described in claim 1, characterized in that, The method further includes: obtaining basic discounting information; the basic discounting information includes: discounting party customer information, discounting amount, discount recipient information, discounting method, and the time point of batch discounting.

3. The method as described in claim 2, characterized in that, The method for obtaining basic discount information includes uploading the batch discount information in Excel format.

4. The method as described in claim 1, characterized in that, The data information that needs to be discounted in batches includes: ticket number and sub-ticket range; the sub-ticket range includes: sub-ticket start range and sub-ticket end range.

5. The method as described in claim 1, characterized in that, The custody list is used to store discounted bills and includes: bill number, sub-bill range, and bill amount.

6. The method as described in claim 1, characterized in that, After the bill center completes its processing, it returns a processing completion notification, which also includes updating the data status of this bill in the batch discounting order table to "completed".

7. The method as described in claim 1, characterized in that, The step of querying the custody table based on the ticket number and sub-ticket range to see if the subcontracting process has been completed also includes: if the process is completed, returning the completed tickets.

8. The method as described in claim 1, characterized in that, If the process is not completed, the method of remotely calling the interface of the bill management center to query the bill status based on the bill number and sub-bill range also includes: if the bill status is processed, querying the bill information based on the bill number and the sub-bill start range to obtain the sub-bill end range.

9. A system for implementing batch discount bills, characterized in that, include: The task scanning module is used to scan batch discounting tasks. It starts four threads to query the data that needs to be discounted in batches. The interface matching module is used to perform modulo operation on the data that needs to be discounted in batches, based on the encoding dimension, and match the Map interface implementation based on the hash table. The data that needs to be discounted in batches is then divided into four threads for processing. The status query module is used to query the status of bills in the database based on the data information that needs to be discounted in batches; The calculation module is used to calculate the end range of the sub-bill based on the start range of the sub-bill and the discount amount if the bill status is in the pooling state. The subcontracting module is used to query whether the custody table has completed subcontracting processing based on the ticket number and sub-ticket range. If not, it remotely calls the interface of the bill management center to query the bill status based on the ticket number and sub-ticket range. If the bill status is unprocessed, it calculates the end range of the current bill using the end range of the sub-ticket of the previous bill as the start range of the sub-ticket, and performs discount unpacking processing. After the unpacking processing is completed, it requests the bill center interface to update the data status of this bill in the batch discount order table to "awaiting reverse adjustment". After the bill center completes the processing, it returns a processing completion notification. The update module is used to update the sub-ticket end range and the ticket amount of the bills in the custody table.

10. The system as described in claim 9, characterized in that, Also includes: The basic information acquisition module is used to acquire basic information about discounting. The basic information for bulk discounting includes: discounting party customer information, discounting amount, discount recipient information, discounting method, and the time point of bulk discounting.

11. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the multi-threaded batch discounting bill method according to any one of claims 1 to 8.

12. An electronic device, characterized in that, Including processor and memory; The memory is used to store the hash table-based Map interface, the escrow table, and the batch discount order table; The processor is configured to execute the multi-threaded batch discount bill method according to any one of claims 1 to 8 by calling the hash table-based Map interface, the custodian table, and the batch discount bill table.

13. A computer program product comprising a computer program and / or instructions, characterized in that, When the computer program and / or instructions are executed by a processor, they implement the steps of the multi-threaded batch discounting bill method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Bill data operation method and device and computer readable storage medium

    CN114066595A

  • Discount application method and device for commercial drafts

    CN115578179A