Data double-writing-based bill synchronization method and terminal
A technology for synchronizing terminals and bills, applied in the database field, can solve problems such as high synchronization cost, low real-time performance, and query bottlenecks in production databases, and achieve the effects of ensuring integrity and accuracy, reducing load, and reducing pressure
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0074] Please refer to figure 1 , Figure 3 to Figure 6 , a bill synchronization method based on data double-writing, including steps:
[0075] S1. Receive a note writing request, obtain the request type of the note writing request, if the request type is a new note, write the note into the first reconciliation table, and simultaneously buffer the note to the proxy component and write it If the request type is to change the bill, the bill is written into the second reconciliation table, and at the same time, the bill is asynchronously buffered to the agent component and then written into the query database change table.
[0076] Specifically, please refer to image 3 , when adding a new bill, write the bill into the bill reconciliation table in the same transaction, record the bill primary key FID, billing date FDATE and business type FTYPE, etc., when adding a new bill, FTYPE=0, used to insert the query database failure Record for reconciliation.
[0077] Wherein, the sim...
Embodiment 2
[0098] The difference between this embodiment and Embodiment 1 is that it further defines how to write bills into the reconciliation table, specifically:
[0099] Establishing a first sub-table and a second sub-table in the reconciliation table, and performing modulo 2 routing on the bill according to the corresponding date;
[0100] When the date is an odd date, the first sub-watch is an active watch, and when the date is an even-numbered date, the second sub-watch is an active watch.
[0101] In this embodiment, for example, when the date is January 1, the date modulo 2 is equal to 1. At this time, the bill reconciliation table 1 is the current active sub-table, and the reconciliation data will be written into this table; the date after the date cut is On January 2, the date modulo 2 is equal to 0. At this time, the bill reconciliation table 0 is the current active sub-table, while the bill reconciliation table 1 is the non-current active sub-table. No data will be written i...
Embodiment 3
[0103] Please refer to figure 2 , a bill synchronization terminal based on data double-writing, comprising a memory, a processor, and a computer program stored on the memory and operable on the processor, and the first embodiment or the first embodiment is implemented when the processor executes the computer program Various steps of a bill synchronization method based on data double-writing in the second embodiment.
[0104] In summary, the present invention provides a bill synchronization method and terminal based on data double-writing, which receives a bill write request, and if a new bill needs to be added, writes the bill into the first reconciliation table, and simultaneously writes the bill into the proxy component asynchronously Then enter the main table of the query library. If you need to change the bill, write the bill into the second reconciliation table. At the same time, write the agent component asynchronously and then enter the query database change table. The...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com