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

Active Publication Date: 2021-10-15
FUJIAN BOSS SOFTWARE
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The method of synchronizing by extracting data at the end of the day is relatively simple. By combining certain business rules, the data is incrementally synchronized to the query database; however, the real-time performance of synchroniz

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Data double-writing-based bill synchronization method and terminal
  • Data double-writing-based bill synchronization method and terminal
  • Data double-writing-based bill synchronization method and terminal

Examples

Experimental program
Comparison scheme
Effect test

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...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a data double-writing-based bill synchronization method and a terminal. Comprising the steps of receiving a bill write-in request; if a new bill needs to be added, writing the bill into a first account checking table, and asynchronously writing the bill into a main table; and if the bill needs to be changed, writing the bill into the second reconciliation table, and asynchronously writing the bill into the change table, therefore, the bills are stored in the reconciliation table and the query library table every time the bills are written, and the bills are buffered by using the proxy component before being written into the query library, so that the load of the query library is effectively reduced; Judging whether a difference set exists between the first reconciliation table and the main table or not, and inserting missing data into the main table; judging whether a difference set exists between the second reconciliation table and the change table or not, inserting missing data into the change table, merging the change table with the inserted data into the main table, and therefore the integrity and accuracy of the query library data are guaranteed. Therefore, through the data double-writing and automatic account checking method, the newly added business data can be queried in real time relatively, and the query efficiency and the real-time performance of bill synchronization are improved.

Description

technical field [0001] The invention relates to the technical field of databases, in particular to a bill synchronization method and terminal based on data double writing. Background technique [0002] At present, in order to realize the synchronization of bills, two synchronization methods are usually adopted: [0003] One is to parse and extract the binlog of the database, and synchronize the concerned data to the query library. However, binlog analysis is relatively complicated, and the cost of analyzing and extracting data is high, and the binlog formats of different databases are different, resulting in the inability to unify the product design; the databases involved in the non-tax electronic bill system mainly include Oracle, Mysql, HBase, etc., query The library can be of the same type as the production library, and there are other columnar databases, such as ClickHouse, DorisDB, TiDb, etc. Therefore, in terms of technology selection, it is impossible to provide gen...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F16/27G06F16/22G06F16/23G06F16/245
CPCG06F16/27G06F16/2365G06F16/2282G06F16/245
Inventor 陈庸凯刘盈黄荣明王航宇
Owner FUJIAN BOSS SOFTWARE
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products