CN113435992A - Accounting method, device and equipment - Google Patents

Accounting method, device and equipment Download PDF

Info

Publication number
CN113435992A
CN113435992A CN202110832294.4A CN202110832294A CN113435992A CN 113435992 A CN113435992 A CN 113435992A CN 202110832294 A CN202110832294 A CN 202110832294A CN 113435992 A CN113435992 A CN 113435992A
Authority
CN
China
Prior art keywords
accounting
billing
database
request
instruction
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.)
Pending
Application number
CN202110832294.4A
Other languages
Chinese (zh)
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.)
Alipay Hangzhou Information Technology Co Ltd
Original Assignee
Alipay Hangzhou Information Technology 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 Alipay Hangzhou Information Technology Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to CN202110832294.4A priority Critical patent/CN113435992A/en
Publication of CN113435992A publication Critical patent/CN113435992A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/12Accounting
    • G06Q40/125Finance or payroll
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the specification discloses a billing method, a billing device and billing equipment. The method comprises the following steps: receiving a pending accounting request; converting the to-be-processed accounting request into an accounting instruction set, wherein the accounting instruction set is stored in a waiting queue; and serially executing the accounting instruction sets in the waiting queue and storing the accounting instruction sets based on accounting logic of the database.

Description

Accounting method, device and equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a billing method, device, and apparatus.
Background
The accounting system is used as a core system of the payment business, and the capability of the accounting system for concurrent accounting determines the ceiling of the payment of concurrent transactions. In the existing accounting system, the accounting efficiency is low, and accounting system performance bottleneck is easy to occur, thereby causing accounting failure. The problem of the accounting hotspot is taken as a difficulty of the accounting system, and the improvement of the performance of the accounting system is always restricted.
Therefore, a new accounting method is needed to solve the hot spot problem of the accounting system.
Disclosure of Invention
The embodiment of the specification provides a billing method, a billing device and billing equipment, which are used for solving the following technical problems: in the existing accounting system, the accounting efficiency is low, and accounting system performance bottleneck is easy to occur, thereby causing accounting failure.
In order to solve the above technical problem, the embodiments of the present specification are implemented as follows:
an embodiment of the present specification provides a billing method, including:
receiving a pending accounting request;
converting the to-be-processed accounting request into an accounting instruction set, wherein the accounting instruction set is stored in a waiting queue;
and serially executing the accounting instruction sets in the waiting queue and storing the accounting instruction sets based on accounting logic of the database.
An embodiment of the present specification further provides an accounting device, including:
the receiving module is used for receiving the accounting request to be processed;
the waiting module is used for converting the accounting request to be processed into an accounting instruction set, and the accounting instruction set is stored in a waiting queue;
and the accounting and storage module is used for serially executing and storing the accounting instruction set in the waiting queue based on the accounting logic of the database.
An embodiment of the present specification further provides an electronic device, including:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
receiving a pending accounting request;
converting the to-be-processed accounting request into an accounting instruction set, wherein the accounting instruction set is stored in a waiting queue;
and serially executing the accounting instruction sets in the waiting queue and storing the accounting instruction sets based on accounting logic of the database.
The embodiment of the specification provides an accounting method, which adopts a method of integrating accounting logic and storage to receive an accounting request to be processed; converting the to-be-processed accounting request into an accounting instruction set, wherein the accounting instruction set is stored in a waiting queue; based on the accounting logic of the database, the accounting instruction sets in the waiting queue are serially executed and stored, so that the problem of hot spots in the accounting process can be fundamentally solved, the network communication and disk IO cost in the accounting process is reduced, and the accounting performance is improved.
Drawings
In order to more clearly illustrate the embodiments of the present specification or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only some embodiments described in the present specification, and for those skilled in the art, other drawings can be obtained according to the drawings without any creative effort.
FIG. 1 is a schematic diagram of a billing method provided by embodiments of the present description;
FIG. 2 is a flow chart of a billing method provided by embodiments of the present description;
FIG. 3 is a schematic diagram of an accounting lock in the accounting method provided by the embodiments of the present description;
FIG. 4 is a block diagram of a database provided by an embodiment of the present description;
fig. 5 is a schematic diagram of a billing method provided in an embodiment of the present specification;
fig. 6 is a schematic diagram of an accounting device provided in an embodiment of the present specification.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the present specification, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any inventive step based on the embodiments of the present disclosure, shall fall within the scope of protection of the present application.
The standard accounting is used as an accounting means commonly used for accounting, and when accounting is performed each time, a database local transaction needs to be opened, and then resources of the account are locked, so that the accuracy of account balance updating in a concurrent scene is ensured. And carrying out account accounting after the local lock resources are acquired, wherein the account accounting mainly comprises balance change, transaction running water recording, account day and end information and the like, and finally releasing the account lock and submitting database transactions. According to the standard accounting method, during each accounting, related account number resources are required to be locked, only one thread can obtain an account lock at the same time, and accounting is performed, so that the accuracy of concurrent updating of the resources is guaranteed. Due to the fact that other threads need to wait in a queue in the accounting process, the accounting efficiency of the accounting system is greatly reduced under the condition that the number of the threads is large, the performance is bottleneck, and the account hotspot problem is easy to occur. The hot spot is that when the instantaneous concurrent accounting request amount of a single account in an accounting system is increased sharply and exceeds a certain threshold, the system has performance bottleneck to cause accounting failure, and the phenomenon becomes the hot spot. The account in which the hot spot phenomenon occurs becomes a hot spot account.
In order to solve the hotspot problem of accounting bookkeeping, bookkeeping modes such as buffering bookkeeping, summarizing bookkeeping, splitting multiple sub-households and the like are carried out.
The buffering bookkeeping does not change account balance in real time during bookkeeping, only records details, and then takes out the buffering details through asynchronous tasks to book accounts.
The summary bookkeeping is an optimization of the buffer bookkeeping, and is mainly characterized in that flow is hashed according to a payer, and obviously and uniformly distributed to a plurality of databases so as to reduce the performance pressure of a single database, and meanwhile, each database is detailed, summarized and combined, and finally sent to the database where a payee account is located for bookkeeping. Since the summary bookkeeping does not record details, the method is not suitable for the recording of the customer account.
The split sub-users are used more in the bank system, the single account hot spot pressure is shared by creating a plurality of hidden sub-users, and the scheme needs the capability of fund scheduling among the sub-users and the capability of sub-user screening and routing. Meanwhile, when the flow bursts, sub-users need to be added. Although the technology of the method is not high in realizability, continuous operation and maintenance are needed, and the implementation cost is huge.
Based on this, the embodiment of the present specification provides a new method for accounting, so as to fundamentally solve the problem of accounting hot spots. Fig. 1 is a schematic diagram of a billing method provided in an embodiment of the present specification to further understand the billing method provided in the embodiment of the present specification. As shown in fig. 1, the accounting system sinks the accounting logic in a packed manner to the storage layer of the database, which performs accounting operations. When the database executes the accounting operation, the disk log IO (Input/Output) is only executed once, and the accounting operation is executed according to the accounting logic. The embodiment of the specification integrates accounting logic and storage, so that network communication in the accounting process can be reduced, the IO cost of a disk is reduced, and the accounting performance is improved.
For a detailed understanding of the methods provided in the examples of this specification, reference will now be made to specific examples.
Fig. 2 is a flowchart of a billing method provided in an embodiment of the present specification. As shown in fig. 2, the method includes:
step S201: a pending billing request is received.
In an embodiment of the present specification, the pending billing request may be received by the database and the operations of the subsequent steps may be performed. The database may be a database in which account information, account details, and other data related to accounting are stored, and may be located on the server, or may be stored in the blockchain.
For convenience of description, the following description will use the database as the execution subject for processing the accounting request. Thus, in embodiments of the present specification, the database may receive pending billing requests.
In the embodiment of the present specification, the pending accounting request is an accounting request issued by an accounting system, where the accounting system is a system that implements accounting operations such as accounting. The pending accounting requests are generated during the execution of the service, and since one service may require the generation of multiple accounting requests during the execution of the service, different accounting requests may correspond to the same service. For example, if user a transfers 100 dollars to user B, the system executing the service needs to generate two accounting requests, which are 100 dollars deducted from the account of user a and 100 dollars added to the account of user B, respectively, and correspond to the same service. Therefore, in order to indicate the service corresponding to the accounting request, the accounting request carries a first identifier, and the first identifier is used for identifying the service corresponding to the accounting request. In a specific embodiment, the first identifier may be a service identifier corresponding to the accounting request or a running account number of the service.
Since the description is mainly used for solving the problem of the accounting hotspot, the description takes a scenario of a high-concurrency accounting request as an example. In this specification, the received pending accounting request includes accounting requests corresponding to a plurality of services.
Step S203: and converting the accounting request to be processed into an accounting instruction set, wherein the accounting instruction set is stored in a waiting queue.
In an embodiment of this specification, the converting the to-be-processed billing request into a billing instruction set specifically includes:
converting the to-be-processed accounting request into a corresponding accounting instruction based on a template engine preset by the database;
and forming the accounting instructions corresponding to the accounting requests into the accounting instruction set.
The template engine preset in the database can convert the accounting request into a corresponding accounting instruction, and the format of the accounting instruction is unified. In embodiments of the present specification, the template engine may be produced according to a type of billing operation corresponding to the billing request, the type of billing operation including a freeze operation, a thaw operation, an egress operation, and an ingress operation. The generation method of the template engine and the specific format of the template engine do not limit the present application.
In order to distinguish the service corresponding to the accounting instruction, in this embodiment of the present specification, the accounting instruction carries a second identifier, where the second identifier is used to identify the service corresponding to the accounting instruction. In a specific embodiment, the second identifier may be a service identifier corresponding to the accounting request or a serial account of the service, or may be another type of identifier. The second identifier may be the same as the first identifier or may be different from the first identifier.
As mentioned above, since there may be multiple billing requests for the same service, there may be multiple billing instructions for the same service.
The accounting command carries the identification for identifying the service corresponding to the accounting command, so the accounting command can be classified according to the second identification carried in the accounting command. In an embodiment of this specification, the forming, by the accounting instruction corresponding to the accounting request, the accounting instruction set specifically includes:
and according to a second identifier carried by the accounting instruction, the accounting instruction is formed into an accounting instruction set, and the accounting instruction set is a set of accounting instructions corresponding to the same service.
Therefore, the instructions in the accounting instruction set all belong to the instructions of the service requests corresponding to the same service. As mentioned above, there are multiple accounting instructions corresponding to the same service, and therefore, the accounting instruction set includes multiple accounting instructions.
As described above, the description is given by taking a scenario of a high-concurrency billing request as an example, and the billing instruction set is a set of billing instructions corresponding to the same service, so that in this description, the number of the billing instruction sets is plural.
In the embodiment of the present specification, after receiving the accounting request, the accounting system transmits the accounting request to the database, and the database converts the received accounting request into an accounting instruction, forms an accounting instruction set, and performs subsequent execution operations. By the operation mode, only one network interaction is needed between the accounting system and the database, namely only one IO operation is needed, and compared with the traditional multiple IO operations of standard accounting, the network cost is greatly reduced, and the network performance is improved.
Step S205: and serially executing the accounting instruction sets in the waiting queue and storing the accounting instruction sets based on accounting logic of the database.
In an embodiment of this specification, the serially executing and storing the accounting instruction sets in the waiting queue by the database-based accounting logic specifically includes:
and based on the accounting logic of the database, serially executing and storing the accounting instruction sets in the waiting queue according to a first-in first-out principle.
In this embodiment, the starting time of the accounting lock of the database is the time when the accounting request is received at a certain time, and the IO cost of the accounting lock is 0. In this specification, a time point at which the database receives the accounting request is referred to as a certain time. Multiple billing requests for multiple services may be received at a time. Since the accounting logic is pre-sunk into the database, the time when the accounting lock starts is the time when the accounting request is received from the database, while the network IO time from the accounting system to the database is not included in the accounting lock cost, so the network IO cost of the accounting lock is 0. To further understand the IO cost of the accounting lock, the following description will be made in conjunction with a specific schematic diagram. Fig. 3 is a schematic diagram of a billing lock in a billing method provided by an embodiment of the present specification. The real start time of the accounting lock is started from the lock account number, which is started when the accounting request is received at the database. And after the account number is locked in the database, carrying out accounting, and after accounting is finished, releasing the lock, thereby completing an accounting process.
To further understand the methods provided herein, the database is described further below. Fig. 4 is a block diagram of a database provided in an embodiment of the present disclosure. As shown in fig. 4, the database is used to convert the accounting request into an accounting command set, and after the accounting command set enters the waiting queue, the accounting command is executed in a serial manner. Specifically, after receiving the accounting requests, the database performs request conversion, converts each accounting request in the accounting requests into a corresponding accounting instruction set, and puts all the accounting instruction sets into a waiting queue. And when the accounting instruction is executed, acquiring an accounting instruction set from the waiting queue in a serial mode, and executing the accounting instruction. In the embodiment of the specification, a mode of serial execution from a waiting queue is adopted, so that the complex concurrency control logic of the database and the context switching between threads are reduced, and the accounting capability of the database is improved.
In the embodiment of the specification, the database takes one accounting request as one atomic process and records one disk log. The accounting logic comprises disk transaction logs, account balance change, account detail record and account change date and time. Fig. 5 is a schematic diagram of an accounting method provided in the embodiment of the present specification to further understand the accounting logic provided in the embodiment of the present specification. As shown in fig. 5, when the database executes the accounting instruction set in a serial manner, the adopted accounting logic is disk transaction log, account balance is changed, account details are recorded, and the account is changed at the end of the day. For each accounting instruction set, firstly updating a disk transaction log, and then sequentially changing the balance of an account, recording account details and changing the end of the account day.
By adopting the accounting method provided by the embodiment of the specification and a method of integrating accounting logic and storage, the problem of hot spots in the accounting process can be fundamentally solved, and the network communication and disk IO cost in the accounting process is reduced, so that the accounting performance is improved.
The above details a billing method, and accordingly, the present specification also provides a billing device, as shown in fig. 6. Fig. 6 is a schematic diagram of an accounting device provided in an embodiment of the present specification, where the accounting device includes:
the receiving module 601 is used for receiving the accounting request to be processed;
the waiting module 603 converts the to-be-processed accounting request into an accounting instruction set, and the accounting instruction set is stored in a waiting queue;
the accounting and storing module 605 serially executes and stores the accounting instruction set in the waiting queue based on the accounting logic of the database.
Further, the converting the to-be-processed billing request into a billing instruction set specifically includes:
the database converts the received accounting request into a corresponding accounting instruction;
the billing instructions form a set of billing instructions
Further, the converting the to-be-processed billing request into a billing instruction set specifically includes:
converting the to-be-processed accounting request into a corresponding accounting instruction based on a template engine preset by the database;
and forming the accounting instructions corresponding to the accounting requests into the accounting instruction set.
Further, the accounting request carries a first identifier, and the first identifier is used for identifying a service corresponding to the accounting request.
Further, the accounting instruction carries a second identifier, and the second identifier is used for identifying a service corresponding to the accounting instruction.
Further, the forming the accounting instruction corresponding to the accounting request into the accounting instruction set specifically includes:
and according to a second identifier carried by the accounting instruction, the accounting instruction is formed into an accounting instruction set, and the accounting instruction set is a set of accounting instructions corresponding to the same service.
Further, the database-based accounting logic serially executes and stores the accounting instruction set in the waiting queue, specifically including:
and based on the accounting logic of the database, serially executing and storing the accounting instruction sets in the waiting queue according to a first-in first-out principle.
Furthermore, the accounting logic comprises a disk transaction log, account balance changing, account details recording and account date changing.
Further, the billing logic is pre-sunk into the database.
Further, the starting time of the accounting lock of the database is the time when the accounting request is received by the database at a certain time, and the IO cost of the accounting lock is 0.
Further, the start time of the accounting lock is from the database lock account number;
after the account number is locked by the database, executing an accounting process;
and after accounting is finished, releasing the lock.
Further, the database takes one accounting request as one atomic processing and records one disk log.
Further, the database is used for converting the accounting request into a corresponding accounting instruction set, and after the accounting instruction set enters the waiting queue, the accounting instruction is executed in a serial mode.
An embodiment of the present specification further provides an electronic device, including:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
receiving a pending accounting request;
converting the to-be-processed accounting request into an accounting instruction set, wherein the accounting instruction set is stored in a waiting queue;
and serially executing the accounting instruction sets in the waiting queue and storing the accounting instruction sets based on accounting logic of the database.
Further, the converting the to-be-processed billing request into a billing instruction set specifically includes:
converting the to-be-processed accounting request into a corresponding accounting instruction based on a template engine preset by the database;
and forming the accounting instructions corresponding to the accounting requests into the accounting instruction set.
Further, the converting the to-be-processed billing request into a billing instruction set specifically includes:
the database converts the received accounting request into a corresponding accounting instruction;
the billing instructions form a set of billing instructions
Further, the converting the to-be-processed billing request into a billing instruction set specifically includes:
converting the to-be-processed accounting request into a corresponding accounting instruction based on a template engine preset by the database;
and forming the accounting instructions corresponding to the accounting requests into the accounting instruction set.
Further, the accounting request carries a first identifier, and the first identifier is used for identifying a service corresponding to the accounting request.
Further, the accounting instruction carries a second identifier, and the second identifier is used for identifying a service corresponding to the accounting instruction.
Further, the forming the accounting instruction corresponding to the accounting request into the accounting instruction set specifically includes:
and according to a second identifier carried by the accounting instruction, the accounting instruction is formed into an accounting instruction set, and the accounting instruction set is a set of accounting instructions corresponding to the same service.
Further, the database-based accounting logic serially executes and stores the accounting instruction set in the waiting queue, specifically including:
and based on the accounting logic of the database, serially executing and storing the accounting instruction sets in the waiting queue according to a first-in first-out principle.
Furthermore, the accounting logic comprises a disk transaction log, account balance changing, account details recording and account date changing.
Further, the billing logic is pre-sunk into the database.
Further, the starting time of the accounting lock of the database is the time when the accounting request is received by the database at a certain time, and the IO cost of the accounting lock is 0.
Further, the start time of the accounting lock is from the database lock account number;
after the account number is locked by the database, executing an accounting process;
and after accounting is finished, releasing the lock.
Further, the database takes one accounting request as one atomic processing and records one disk log.
Further, the database is used for converting the accounting request into a corresponding accounting instruction set, and after the accounting instruction set enters the waiting queue, the accounting instruction is executed in a serial mode.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the embodiments of the apparatus, the electronic device, and the nonvolatile computer storage medium, since they are substantially similar to the embodiments of the method, the description is simple, and the relevant points can be referred to the partial description of the embodiments of the method.
The apparatus, the electronic device, the nonvolatile computer storage medium and the method provided in the embodiments of the present description correspond to each other, and therefore, the apparatus, the electronic device, and the nonvolatile computer storage medium also have similar advantageous technical effects to the corresponding method.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually making an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as abel (advanced Boolean Expression Language), ahdl (alternate Hardware Description Language), traffic, pl (core universal Programming Language), HDCal (jhdware Description Language), lang, Lola, HDL, laspam, hardward Description Language (vhr Description Language), vhal (Hardware Description Language), and vhigh-Language, which are currently used in most common. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: the ARC625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the various elements may be implemented in the same one or more software and/or hardware implementations in implementing one or more embodiments of the present description.
As will be appreciated by one skilled in the art, the present specification embodiments may be provided as a method, system, or computer program product. Accordingly, embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present description may 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, and so forth) having computer-usable program code embodied therein.
The description has been presented with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the description. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may 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, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices, or any other non-transmission medium which can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
This description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only an example of the present specification, and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (15)

1. A billing method, the method comprising:
receiving a pending accounting request;
converting the to-be-processed accounting request into an accounting instruction set, wherein the accounting instruction set is stored in a waiting queue;
and serially executing the accounting instruction sets in the waiting queue and storing the accounting instruction sets based on accounting logic of the database.
2. The method according to claim 1, wherein converting the pending billing request into a billing instruction set specifically comprises:
the database converts the received accounting request into a corresponding accounting instruction;
the billing instructions constitute a set of billing instructions.
3. The method according to claim 1, wherein converting the pending billing request into a billing instruction set specifically comprises:
converting the to-be-processed accounting request into a corresponding accounting instruction based on a template engine preset by the database;
and forming the accounting instructions corresponding to the accounting requests into the accounting instruction set.
4. The method as claimed in claim 1, wherein the billing request carries a first identifier, and the first identifier is used for identifying a service corresponding to the billing request.
5. The method as claimed in claim 1, wherein the billing instruction carries a second identifier, and the second identifier is used for identifying a service corresponding to the billing instruction.
6. The method according to claim 5, wherein the step of forming the billing instruction corresponding to the billing request into the billing instruction set specifically comprises:
and according to a second identifier carried by the accounting instruction, the accounting instruction is formed into an accounting instruction set, and the accounting instruction set is a set of accounting instructions corresponding to the same service.
7. The method of claim 1, wherein the database-based accounting logic serially executes and stores the accounting instruction sets in the wait queue, and further comprising:
and based on the accounting logic of the database, serially executing and storing the accounting instruction sets in the waiting queue according to a first-in first-out principle.
8. The method of claim 1, wherein the billing logic comprises disk transaction logs, changing account balances, logging account details, and changing account deadlines.
9. The method of claim 1, wherein said billing logic is pre-sunk into said database.
10. The method of claim 1, wherein the starting time of the accounting lock of the database is the time when the accounting request is received by the database at a certain time, and the IO cost of the accounting lock is 0.
11. The method of claim 10, wherein the start time of the accounting lock is started from the database lock account number;
after the account number is locked by the database, executing an accounting process;
and after accounting is finished, releasing the lock.
12. The method of claim 1, wherein the database processes an accounting request as an atom and records a disk log.
13. The method of claim 1, wherein the database is configured to convert the billing request into a corresponding set of billing instructions, and wherein the set of billing instructions is executed serially after entering the wait queue.
14. An accounting device, the device comprising:
the receiving module is used for receiving the accounting request to be processed;
the waiting module is used for converting the accounting request to be processed into an accounting instruction set, and the accounting instruction set is stored in a waiting queue;
and the accounting and storage module is used for serially executing and storing the accounting instruction set in the waiting queue based on the accounting logic of the database.
15. An electronic device, comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
receiving a pending accounting request;
converting the to-be-processed accounting request into an accounting instruction set, wherein the accounting instruction set is stored in a waiting queue;
and serially executing the accounting instruction sets in the waiting queue and storing the accounting instruction sets based on accounting logic of the database.
CN202110832294.4A 2021-07-22 2021-07-22 Accounting method, device and equipment Pending CN113435992A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110832294.4A CN113435992A (en) 2021-07-22 2021-07-22 Accounting method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110832294.4A CN113435992A (en) 2021-07-22 2021-07-22 Accounting method, device and equipment

Publications (1)

Publication Number Publication Date
CN113435992A true CN113435992A (en) 2021-09-24

Family

ID=77761446

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110832294.4A Pending CN113435992A (en) 2021-07-22 2021-07-22 Accounting method, device and equipment

Country Status (1)

Country Link
CN (1) CN113435992A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111242754A (en) * 2018-11-13 2020-06-05 北京嘀嘀无限科技发展有限公司 Account data updating method and device and electronic equipment
CN111352753A (en) * 2020-04-26 2020-06-30 中国银行股份有限公司 Accounting processing method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111242754A (en) * 2018-11-13 2020-06-05 北京嘀嘀无限科技发展有限公司 Account data updating method and device and electronic equipment
CN111352753A (en) * 2020-04-26 2020-06-30 中国银行股份有限公司 Accounting processing method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
上海证券交易所, 上海人民出版社 *
刘微: "基于微服务的预付卡系统的研究与设计", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Similar Documents

Publication Publication Date Title
CN111756550B (en) Block chain consensus method and device
CN108615184B (en) Accounting method and device
CN110134668B (en) Data migration method, device and equipment applied to blockchain
CN110020542B (en) Data reading and writing method and device and electronic equipment
CN108599973B (en) Log association method, device and equipment
CN108628688B (en) Message processing method, device and equipment
TW201837754A (en) Data processing method and equipment based on blockchain
CN110008018A (en) A kind of batch tasks processing method, device and equipment
CN103914399A (en) Disk cache method and device in parallel computer system
CN107291720B (en) Method, system and computer cluster for realizing batch data processing
CN112529694B (en) Credit granting processing method, device, equipment and system
CN110389989B (en) Data processing method, device and equipment
CN112015739A (en) Data verification and data query method and device
CN112905365B (en) Data processing method, device, equipment and medium
CN111768303A (en) Transaction processing method, device, equipment and system
CN109376988B (en) Service data processing method and device
CN108346039B (en) Service processing method, device and equipment of Internet financial settlement system
CN111459573B (en) Method and device for starting intelligent contract execution environment
CN110276637B (en) Resource allocation method and device, and coupon allocation method and device
CN113435992A (en) Accounting method, device and equipment
CN110245115B (en) File processing method, engine and system
CN111459474B (en) Templated data processing method and device
CN109903165B (en) Model merging method and device
CN111967767A (en) Business risk identification method, device, equipment and medium
CN112579292A (en) Resource allocation method and device

Legal Events

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