Method and system for posting back details of a summary

By generating a temporary table of bill details and using a message queue for aggregation and write-back, the problems of low settlement efficiency and poor real-time performance in existing technologies are solved, enabling real-time confirmation of bill detail settlement status and efficient aggregation and settlement.

CN116029709BActive Publication Date: 2026-06-05SHANGHAI ZHONGTONGJI NETWORK TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANGHAI ZHONGTONGJI NETWORK TECH CO LTD
Filing Date
2022-12-26
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

In existing technologies, settlement solutions cannot simultaneously achieve both efficient aggregated settlement and real-time confirmation of bill details and settlement status, resulting in problems such as low settlement efficiency or poor real-time performance.

Method used

By generating a temporary table of bill details, the summary key and version number are sent to the bill summary topic via a message queue for aggregation and summary, generating a bill summary table, and writing the summary information into the bill details after settlement, the settlement status of the bill details can be confirmed in real time.

Benefits of technology

It enables the rapid acquisition of bill summary tables during the settlement process, ensuring real-time confirmation of bill details and settlement status, thereby improving settlement efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116029709B_ABST
    Figure CN116029709B_ABST
Patent Text Reader

Abstract

The present application relates to a method and system for writing back the details of the summary settlement, and belongs to the technical field of summary settlement. When the details of the bill change, a bill details temporary table is generated, wherein the summary key and version number are stored in the bill details temporary table; the summary key and version number in the bill details temporary table are sent to the bill summary theme through the message queue, so that the details of the bill are aggregated and summarized to obtain the summary information of the bill summary table, and the settlement is carried out on the basis of the bill summary table; in the case of settlement completion, the current summary key and version number are sent to the bill writing back theme through the message queue, so that the summary information is written into the corresponding details of the bill. The problem that the current settlement scheme cannot simultaneously consider the summary settlement efficiency and the real-time confirmation of the settlement state of the bill details is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of summary settlement technology, specifically involving a method and system for writing back summary settlement details. Background Technology

[0002] Currently, some internet companies and express delivery companies have their own systems for settlement. Most of them choose to settle based on the bill details or aggregate the settlement objects according to a certain dimension and then settle based on the aggregated data.

[0003] Both settlement methods have their advantages and disadvantages: Settling based on bill details is accurate and the settlement status of bill details can be confirmed, but the workload is relatively large and the settlement efficiency is relatively low; Settling based on aggregated data is more efficient, but the real-time performance is poor and the settlement amount is inconsistent with the amount receivable. Although this shortcoming can be well compensated by making up the difference, the settlement status of bill details cannot be confirmed after settlement based on aggregated data. Summary of the Invention

[0004] Therefore, this application provides a method and system for summarizing and writing back settlement details, which helps to solve the problem that current settlement schemes cannot simultaneously achieve both the efficiency of summarizing and settling and the real-time confirmation of the settlement status of bill details.

[0005] To achieve the above objectives, this application adopts the following technical solution:

[0006] Firstly, this application provides a method for writing back summary settlement details, the method comprising:

[0007] When the details of a bill change, a temporary bill detail table is generated, which stores a summary key and a version number.

[0008] The summary key and version number in the temporary table of bill details are sent to the bill summary topic through a message queue so that the summary information obtained by aggregating and summarizing the details of the bill can generate a bill summary table, and settlement is performed based on the bill summary table.

[0009] Upon completion of the settlement, the current summary key and version number are sent to the bill write-back topic via a message queue so that the summary information is written into the details of the corresponding bill.

[0010] Furthermore, the step of generating a temporary bill detail table when the bill details change includes:

[0011] After the scheduled task is started, when the details of the bill change, the details of the bill are inserted into the summary key and version number to generate the temporary table of bill details.

[0012] Further, the step of sending the summary key and version number of the temporary table of bill details to the bill summary topic via a message queue, so that the summary information obtained by aggregating and summarizing the details of the bill can generate a bill summary table, includes:

[0013] The bill summary service uses the summary key to determine whether the bill is in the process of settlement. If the bill settlement is completed, the bill details and the version number of the bill details temporary table are inserted into the bill details temporary table. After the bill details and the version number of the bill details temporary table are inserted, the bill details temporary table is aggregated and summarized using the summary key to obtain summary information and generate the bill summary table.

[0014] Furthermore, after generating the bill summary table from the summary information obtained by aggregating and summarizing the details of the bill, the method further includes:

[0015] When the scheduled task is triggered, the version number of the current temporary bill detail table is scanned. If the aggregation is completed, the temporary bill detail tables with version numbers lower than the specified version number are deleted.

[0016] Further, the step of sending the current summary key and version number to the bill write-back topic via a message queue upon completion of the settlement includes:

[0017] After the settlement task is triggered, the summary key and version number of the current bill details temporary table are sent to the bill settlement topic through the message queue. The summary key is used to determine whether the bill details temporary table is in the process of settlement. If the settlement is completed, the summary key and version number are sent to the bill write-back topic through the message queue.

[0018] Furthermore, after determining whether the bill is in the process of settlement using the summary key through the consumption service of the bill summary topic, the method further includes:

[0019] If the bill is in the process of being settled, the summary key and version number of the temporary table of bill details are sent to the bill summary topic via a message queue.

[0020] Secondly, a system for writing back summary settlement details is provided, the system comprising:

[0021] The bill details module is used to generate a temporary bill details table when the details of the bill change. The temporary bill details table stores a summary key and a version number.

[0022] The bill summary module is used to send the summary key and version number in the bill details temporary table to the bill summary topic through a message queue, so that the summary information obtained by aggregating and summarizing the details of the bill can generate a bill summary table, and settlement can be performed based on the bill summary table.

[0023] The bill write-back module, upon completion of the settlement, sends the current summary key and version number to the bill write-back topic via a message queue, so that the summary information is written into the details of the corresponding bill.

[0024] The application employs the above technical solution and has at least the following beneficial effects:

[0025] This application generates a temporary bill detail table after changes to the bill details. Then, the summary key and version number of this temporary bill detail table are sent to a bill summary topic via a message queue. This allows the aggregated summary information to generate a bill summary table, enabling rapid bill summary processing. Settlement is then performed based on this summary table. After settlement, the summary key and version number of the current temporary bill detail table are sent to a bill write-back topic via a message queue, allowing the summary information to be written into the corresponding bill details. This provides the bill detail settlement status, enabling real-time confirmation of the bill detail settlement status and resolving the issue of simultaneously achieving efficient summary settlement and real-time confirmation of bill detail settlement status.

[0026] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description

[0027] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0028] Figure 1 This is a flowchart illustrating a method for writing back summary settlement details according to an exemplary embodiment;

[0029] Figure 2 This is a flowchart illustrating the generation of an invoice summary table according to an exemplary embodiment;

[0030] Figure 3 This is a flowchart illustrating a bill detail write-back according to an exemplary embodiment;

[0031] Figure 4This is a block diagram illustrating a summary settlement details write-back system according to an exemplary embodiment. Detailed Implementation

[0032] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be described in detail below. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other implementation methods obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0033] Please see Figure 1 , Figure 1 This is a flowchart illustrating a method for writing back summary settlement details according to an exemplary embodiment. The method includes the following steps:

[0034] S101. When the details of the bill change, a temporary table of bill details is generated, which stores the summary key and version number.

[0035] S102. Send the summary key and version number in the bill details temporary table to the bill summary topic through the message queue so that the summary information obtained by aggregating and summarizing the bill details can generate a bill summary table, and perform settlement based on the bill summary table.

[0036] S103. Upon completion of settlement, the current summary key and version number are sent to the bill write-back topic via a message queue so that the summary information is written into the details of the corresponding bill.

[0037] When bill details change, a temporary bill detail table is generated. Then, the summary key and version number of the temporary bill detail table are sent to the bill summary topic via a message queue. This allows the aggregated summary information to generate a bill summary table, thus quickly obtaining the bill summary table. Settlement is then performed based on the bill summary table. After settlement, the summary key and version number of the current temporary bill detail table are sent to the bill write-back topic via a message queue, so that the summary information is written into the corresponding bill details. This allows the bill detail settlement status to be obtained, enabling real-time confirmation of the bill detail settlement status.

[0038] Please see Figure 2 , Figure 2 This is a flowchart illustrating the generation of an invoice summary table according to an exemplary embodiment.

[0039] By monitoring changes in bill details, a temporary bill detail table is generated. This temporary bill detail table includes a summary key and a version number, with the timestamp serving as the version number. Whenever a bill detail changes, a new temporary bill detail table is generated, and the timestamp of the temporary bill detail table also changes accordingly. This reduces the time required for aggregation.

[0040] The summary key and version number from the temporary bill details table are sent to the bill summary topic via a message queue. The consumption service of the bill summary topic obtains the summary key from the message queue and then uses the summary key as a key to a distributed lock to determine whether the bill is in the process of settlement. If the bill settlement is complete, the bill details and timestamps from the bill details table are inserted in batches by multiple threads. After the bill details and timestamps from the bill details table are inserted, the summary information of the bill details is aggregated and summarized to generate the bill summary table. If the bill is in the process of settlement, the summary key and timestamp from the message queue are repeatedly sent to the bill summary topic until the bill settlement is complete. This process ensures that the bill summary topic receives the summary key and timestamp at all times during the bill settlement process, ensuring that no data is lost.

[0041] After the scheduled task is triggered, the current bill detail temporary table is scanned, and it is determined whether the bill detail temporary table is in the process of aggregation and summarization. If the bill detail temporary table has completed aggregation and summarization, all bill detail temporary tables with a version number lower than the current version number are deleted to ensure sufficient storage space; if it is in the process of aggregation and summarization, no processing is performed.

[0042] The specific time for setting a scheduled task can be 24 hours, or the duration of the scheduled task can be set according to specific needs.

[0043] Please see Figure 3 , Figure 3 This is a flowchart illustrating a bill detail write-back according to an exemplary embodiment.

[0044] Settlement is carried out based on the bill summary table. Once settlement is completed, the bill summary information is written back to the corresponding bill details.

[0045] Specifically, after the settlement task is triggered, the summary key and version number in the bill details temporary table are sent to the bill settlement topic via a message queue. The consumption service of the bill settlement topic obtains the summary key from the message queue, and then uses the summary key as the key of the distributed lock to determine whether the bill summary table is in the process of settlement. If it is in the process of settlement, no action is taken; if the settlement is completed, the summary key and version number in the bill details temporary table are sent to the bill write-back topic via a message queue.

[0046] Specifically, the settlement task can be triggered at fixed intervals or in real time to start the settlement process. A real-time trigger button can be set on the control panel.

[0047] The consumption service of the bill write-back topic obtains the summary key of the message queue, then queries the bill details based on the summary key and version number, and uses the corresponding temporary table of bill details as a reference to write the summary information of the bill summary table into the corresponding bill details, thereby obtaining the settlement status of the bill details.

[0048] The write-back status of the statement details is entered into the database. By summarizing and screening the statement details, timely warnings are issued for write-back anomalies, and compensation and warnings are provided.

[0049] Please see Figure 4 , Figure 4 This is a block diagram illustrating a summary settlement details write-back system according to an exemplary embodiment. The system 4 includes:

[0050] The bill details module 41 is used to generate a temporary bill details table when the details of the bill change. The temporary bill details table stores the summary key and version number.

[0051] The bill summary module 42 is used to send the summary key and version number in the bill details temporary table to the bill summary topic through the message queue, so that the summary information obtained by aggregating and summarizing the bill details can generate a bill summary table, and settlement can be performed based on the bill summary table.

[0052] The bill write-back module 43, upon completion of settlement, sends the current summary key and version number to the bill write-back topic via a message queue, so that the summary information is written into the details of the corresponding bill.

[0053] It is understood that the same or similar parts in the above embodiments can be referred to each other, and the contents not described in detail in some embodiments can be referred to the same or similar contents in other embodiments.

[0054] It should be noted that in the description of this application, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Furthermore, in the description of this application, unless otherwise stated, "multiple" or "more" means at least two.

[0055] It should be understood that when an element is referred to as "fixed to" or "set on" another element, it may be directly on the other element or may have an intervening element present at the same time; when an element is referred to as "connected to" another element, it may be directly connected to the other element or may have an intervening element present at the same time. In addition, the term "connected" as used herein may include wireless connections; the word "and / or" as used includes any unit and all combinations of one or more of the associated listed items.

[0056] Any process or method description in the flowchart or otherwise herein can be understood as: representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the function involved, as should be understood by those skilled in the art to which embodiments of this application pertain.

[0057] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0058] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.

[0059] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.

[0060] The storage media mentioned above can be read-only memory, disk, or optical disk, etc.

[0061] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0062] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.

Claims

1. A method for writing back summary settlement details, characterized in that, The method includes: When the details of a bill change, a temporary bill detail table is generated, which stores a summary key and a version number. The summary key and version number in the temporary table of bill details are sent to the bill summary topic through a message queue so that the summary information obtained by aggregating and summarizing the details of the bill can generate a bill summary table, and settlement is performed based on the bill summary table. Upon completion of the settlement, the current summary key and version number are sent to the bill write-back topic via a message queue, so that the summary information is written into the details of the corresponding bill. This includes: after the settlement task is triggered, the summary key and version number in the temporary table of bill details are sent to the bill settlement topic via a message queue. The consumption service of the bill settlement topic obtains the summary key from the message queue, and then uses the summary key as the key of the distributed lock to determine whether the bill summary table is in the process of settlement. If settlement is in progress, no action is taken; if settlement is complete, the summary key and version number in the temporary table of bill details are sent to the bill write-back topic via a message queue.

2. The method according to claim 1, characterized in that, When the details of a bill change, a temporary bill detail table is generated, including: After the scheduled task is started, when the details of the bill change, the details of the bill are inserted into the summary key and version number to generate the temporary table of bill details.

3. The method according to claim 2, characterized in that, The step of sending the summary key and version number of the temporary table of bill details to the bill summary topic via a message queue, so that the summary information obtained by aggregating and summarizing the details of the bill can generate a bill summary table, includes: The bill summary service uses the summary key to determine whether the bill is in the process of settlement. If the bill settlement is completed, the bill details and the version number of the bill details temporary table are inserted into the bill details temporary table. After the bill details and the version number of the bill details temporary table are inserted, the bill details temporary table is aggregated and summarized using the summary key to obtain summary information and generate the bill summary table.

4. The method according to claim 3, characterized in that, After generating the bill summary table from the summary information obtained by aggregating and summarizing the details of the bill, the method further includes: When the scheduled task is triggered, the version number of the current temporary bill detail table is scanned. If the aggregation is completed, the temporary bill detail tables with version numbers lower than the specified version number are deleted.

5. The method according to claim 3, characterized in that, After determining whether the bill is in the process of being settled using the summary key through the consumption service of the bill summary topic, the method further includes: If the bill is in the process of being settled, the summary key and version number of the temporary table of bill details are sent to the bill summary topic via a message queue.

6. A system for writing back summary settlement details, characterized in that, The system includes: The bill details module is used to generate a temporary bill details table when the details of the bill change. The temporary bill details table stores a summary key and a version number. The bill summary module is used to send the summary key and version number in the bill details temporary table to the bill summary topic through a message queue, so that the summary information obtained by aggregating and summarizing the details of the bill can generate a bill summary table, and settlement can be performed based on the bill summary table. The bill write-back module, upon completion of settlement, sends the current summary key and version number to the bill write-back topic via a message queue, so that the summary information is written into the details of the corresponding bill. Specifically, after the settlement task is triggered, the summary key and version number in the temporary table of bill details are sent to the bill settlement topic via a message queue. The consumption service of the bill settlement topic obtains the summary key from the message queue, and then uses the summary key as a key to a distributed lock to determine whether the bill summary table is in the process of settlement. If settlement is in progress, no action is taken; if settlement is complete, the summary key and version number in the temporary table of bill details are sent to the bill write-back topic via a message queue.