CN108665654A - Cash register information synchronization method and cash register system - Google Patents

Cash register information synchronization method and cash register system Download PDF

Info

Publication number
CN108665654A
CN108665654A CN201810482233.8A CN201810482233A CN108665654A CN 108665654 A CN108665654 A CN 108665654A CN 201810482233 A CN201810482233 A CN 201810482233A CN 108665654 A CN108665654 A CN 108665654A
Authority
CN
China
Prior art keywords
cash register
cashier
operation information
sent
server
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
CN201810482233.8A
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.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN201810482233.8A priority Critical patent/CN108665654A/en
Publication of CN108665654A publication Critical patent/CN108665654A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07GREGISTERING THE RECEIPT OF CASH, VALUABLES, OR TOKENS
    • G07G1/00Cash registers
    • G07G1/12Cash registers electronically operated
    • G07G1/14Systems including one or more distant stations co-operating with a central processing unit
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/548Queue

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The invention discloses a kind of cash register information synchronization methods and cash register system, this method to include:Step S1:Server-side establishes corresponding first message queue to each cashier;Step S2:For each cashier, the local data base of itself is updated after receiving cash register operation information input by user, and cash register operation information input by user is sent to server-side;Step S3:Server-side update service client database after the cash register operation information for receiving cashier transmission, and the cash register operation information storage that cashier is sent is in each first message queue;Step S4:For each first message queue, cash register operation information therein is sent to corresponding cashier by server-side according to preset order;Step S5:The cash register operation information update local data base of itself that each cashier is sent according to server-side.The present invention can effectively reduce delay compared with prior art, realize the Fast synchronization of multiple databases.

Description

Cash register information synchronization method and cash register system
Technical field
The present invention relates to field of computer technology, and in particular to a kind of cash register information synchronization method and cash register system.
Background technology
With science and technology be constantly progressive and the rapid development of computer cause, using Computers and Communication technology as base The information system of plinth is in booming period.And significantly improved as economic civilization is horizontal, people are to quality of life And the requirement of working environment is also higher and higher.In order to facilitate managing a large amount of supermarket's commodity, the intelligentized realization of supermarket, supermarket Problem of management has also just put on schedule, and with the substantial increase of supermarket's commodity, management difficulty also becomes increasing, how excellent Changing the daily management of supermarket also just becomes a popular project.
In order to facilitate managing and improve shopping experience, existing megastore, the multiple cashiers of supermarket's generally use into Row cash register, and need to carry out data synchronization between different cashiers, the data synchronization technology mainly used at present is holding heartbeat Mode, performance is low, and delay is apparent, cannot meet application requirement.
Invention content
The purpose of the present invention is to provide a kind of cash register information synchronization method and cash register system, data can be reduced and synchronized and prolonged Late.
To achieve the above object, technical scheme of the present invention provides a kind of cash register information synchronization method, including:
Step S1:Server-side establishes corresponding first message queue to each cashier;
Step S2:For each cashier, according to the user after receiving cash register operation information input by user The cash register operation information update of the input local data base of itself, and the cash register operation information input by user is sent to institute State server-side;
Step S3:The receipts that the server-side is sent after the cash register operation information for receiving cashier transmission according to cashier Silver-colored operation information update service client database, and cash register operation information storage that cashier is sent described first is disappeared in each Cease queue;
Step S4:For first message queue described in each, the server-side is according to preset order by cash register therein Operation information is sent to corresponding cashier;
Step S5:The cash register operation information update local of itself that each described cashier is sent according to the server-side Database.
Further, the first message queue is RabbitMQ queues.
Further, in step s 2, each cashier uses following methods by cash register operation information input by user It is sent to the server-side:
The cash register operation information storage input by user that each cashier receives itself is in second itself established Message queue;
Each cashier sends the cash register operation information in the second message queue itself established according to preset order To the server-side.
Further, the second message queue is RabbitMQ queues.
To achieve the above object, technical scheme of the present invention additionally provides a kind of cash register system, including server-side and more A cashier;
Wherein, the server-side includes establishing module, the first update module, the first sending module and processing module;
The module of establishing to each cashier for establishing corresponding first message queue;
First update module is used to be sent according to cashier after the cash register operation information for receiving cashier transmission Cash register operation information update service client database;
The cash register operation information storage that the processing module is used to send cashier is in each first message team Row;
First sending module is used for for first message queue described in each, according to preset order by receipts therein Silver-colored operation information is sent to corresponding cashier;
Each described cashier includes the second update module, the second sending module and third update module;
Second update module is used to be inputted according to the user after receiving cash register operation information input by user Cash register operation information update cashier itself local data base;
Second sending module is used to the cash register operation information input by user being sent to the server-side;
The cash register operation information update cashier itself that the third update module is used to be sent according to the server-side Local data base.
Further, the first message queue is RabbitMQ queues.
Further, second sending module includes:
Processing unit, cash register operation information storage input by user for receiving cashier itself in cashier from The second message queue that body is established;
Transmission unit, the cash register operation in second message queue for establishing cashier itself according to preset order are believed Breath is sent to the server-side.
Further, the second message queue is RabbitMQ queues.
Cash register operation information input by user is sent to clothes by cash register information synchronization method provided by the invention, each cashier Business end, server-side will be received by establishing corresponding first message queue to each cashier using the first message queue Silver-colored operation information is sent to each cashier, to realize the synchronization of data, can effectively reduce delay compared with prior art, improves The performance that data synchronize, realizes the Fast synchronization of multiple databases.
Description of the drawings
Fig. 1 is a kind of flow chart for cash register information synchronization method that embodiment of the present invention provides.
Specific implementation mode
With reference to the accompanying drawings and examples, the specific implementation mode of the present invention is described in further detail.Implement below Example is not limited to the scope of the present invention for illustrating the present invention.
It is a kind of flow chart for cash register information synchronization method that embodiment of the present invention provides, this method referring to Fig. 1, Fig. 1 Including:
Step S1:Server-side establishes corresponding first message queue to each cashier;
For example, the first message queue can be RabbitMQ queues;
Step S2:For each cashier, according to the user after receiving cash register operation information input by user The cash register operation information update of the input local data base of itself, and the cash register operation information input by user is sent to institute State server-side;
For example, above-mentioned cash register operation information can be to operation informations such as the increases, deletion, modification of cash register information;
Step S3:The receipts that the server-side is sent after the cash register operation information for receiving cashier transmission according to cashier Silver-colored operation information update service client database, and cash register operation information storage that cashier is sent described first is disappeared in each Cease queue;
Step S4:For first message queue described in each, the server-side is according to preset order by cash register therein Operation information is sent to corresponding cashier;
For example, for each first message queue, server-side can be incited somebody to action according to the time for receiving cash register operation information Cash register operation information in first message queue is sent to cashier, i.e., the cash register operation information first received is first sent, and is followed by It is sent after the cash register operation information received;
In addition, when sending cash register operation information, server-side can also will send the cashier of the cash register operation information Identity information is sent to cashier, and whether the cash register operation information to make cashier may determine that receive is what itself sent Cash register operation information;
Wherein, for each first message queue, if server-side detection is when the preceding cash register operation letter sent to cashier Breath is sent successfully, then is removed the currently transmitted successful cash register operation information from the first message queue, if detection is sent The cash register operation information of the currently transmitted failure is then moved to the end of the first message queue by failure, is waited for and being retransmitted;
Step S5:The cash register operation information update local of itself that each described cashier is sent according to the server-side Database;
Specifically, each cashier is first determined whether to connect after receiving the cash register operation information of server-side transmission Whether the cash register operation information of receipts is the cash register operation information of itself transmission, if so, ignore the cash register operation information, if it is not, Data update is then carried out to the local data base of cashier itself according to the cash register operation information;
The cash register information synchronization method that embodiment of the present invention provides, each cashier is by cash register operation information input by user It is sent to server-side, server-side utilizes the first message by establishing corresponding first message queue to each cashier Cash register operation information is sent to each cashier by queue, to realize the synchronization of data, can effectively be reduced compared with prior art Delay improves the performance that data synchronize, realizes the Fast synchronization of multiple databases.
Preferably, in step s 2, each cashier may be used message queue and believe cash register operation input by user Breath is sent to server-side, i.e., cash register operation information input by user is sent to the clothes by each cashier using following methods Business end:
The cash register operation information storage input by user that each cashier receives itself is in second itself established Message queue, for example, the second message queue can be RabbitMQ queues;
Each cashier sends the cash register operation information in the second message queue itself established according to preset order To the server-side.
Cash register operation information input by user is sent to by the second message queue that each cashier is established using itself Server-side specifically for each cashier, updates itself first after receiving cash register operation information input by user Local data base, and store it in second message queue, wherein cashier inputs cash register operation information according to user Cash register operation information in first message queue is sent to cashier by the time, i.e., the cash register operation information that user first inputs first is sent out It send, is sent after the cash register operation information inputted after user;
It, will if cashier detection is sent successfully when the preceding cash register operation information sent to server-side in transmission process The currently transmitted successful cash register operation information is removed from the second message queue, if detection sends failure, this is current The cash register operation information for sending failure moves to the end of the second message queue, waits for and retransmitting.
The cash register information synchronization method that embodiment of the present invention provides carries out data synchronization, energy by using message queue It enough realizes low latency transmission data library object, and realizes Object Persistence, ensure the consistency of synchronous reliability and data, It is particularly suitable for the synchronization of multinode, mass data.
In addition, embodiment of the present invention additionally provides a kind of cash register system, including server-side and multiple cashiers;
Wherein, the server-side includes establishing module, the first update module, the first sending module and processing module;
The module of establishing to each cashier for establishing corresponding first message queue;
First update module is used to be sent according to cashier after the cash register operation information for receiving cashier transmission Cash register operation information update service client database;
The cash register operation information storage that the processing module is used to send cashier is in each first message team Row;
First sending module is used for for first message queue described in each, according to preset order by receipts therein Silver-colored operation information is sent to corresponding cashier;
Each described cashier includes the second update module, the second sending module and third update module;
Second update module is used to be inputted according to the user after receiving cash register operation information input by user Cash register operation information update cashier itself local data base;
Second sending module is used to the cash register operation information input by user being sent to the server-side;
The cash register operation information update cashier itself that the third update module is used to be sent according to the server-side Local data base.
For example, in embodiments of the present invention, the first message queue can be RabbitMQ queues.
Preferably, in embodiments of the present invention, second sending module includes:
Processing unit, cash register operation information storage input by user for receiving cashier itself in cashier from The second message queue that body is established;
Transmission unit, the cash register operation in second message queue for establishing cashier itself according to preset order are believed Breath is sent to the server-side.
For example, in embodiments of the present invention, the second message queue can be RabbitMQ queues.
Although above having used general explanation and specific embodiment, the present invention is described in detail, at this On the basis of invention, it can be made some modifications or improvements, this will be apparent to those skilled in the art.Therefore, These modifications or improvements without departing from theon the basis of the spirit of the present invention belong to the scope of protection of present invention.

Claims (8)

1. a kind of cash register information synchronization method, which is characterized in that including:
Step S1:Server-side establishes corresponding first message queue to each cashier;
Step S2:For each cashier, inputted according to the user after receiving cash register operation information input by user The cash register operation information update local data base of itself, and the cash register operation information input by user is sent to the clothes Business end;
Step S3:The server-side is grasped after the cash register operation information for receiving cashier transmission according to the cash register that cashier is sent Make information update service client database, and the cash register operation information storage that cashier is sent is in each first message team Row;
Step S4:For first message queue described in each, the server-side is according to preset order by cash register operation therein Information is sent to corresponding cashier;
Step S5:The cash register operation information update local data of itself that each described cashier is sent according to the server-side Library.
2. cash register information synchronization method according to claim 1, which is characterized in that the first message queue is RabbitMQ queues.
3. cash register information synchronization method according to claim 1, which is characterized in that in step s 2, each cashier Cash register operation information input by user is sent to the server-side using following methods:
The second message that the cash register operation information storage input by user that each cashier receives itself is established in itself Queue;
Cash register operation information in second message queue that itself is established is sent to institute by each cashier according to preset order State server-side.
4. cash register information synchronization method according to claim 3, which is characterized in that the second message queue is RabbitMQ queues.
5. a kind of cash register system, which is characterized in that including server-side and multiple cashiers;
Wherein, the server-side includes establishing module, the first update module, the first sending module and processing module;
The module of establishing to each cashier for establishing corresponding first message queue;
The receipts that first update module is used to be sent according to cashier after the cash register operation information for receiving cashier transmission Silver-colored operation information update service client database;
The cash register operation information storage that the processing module is used to send cashier is in each first message queue;
First sending module is used to, for first message queue described in each, grasp cash register therein according to preset order It is sent to corresponding cashier as information;
Each described cashier includes the second update module, the second sending module and third update module;
Second update module is used for after receiving cash register operation information input by user according to the receipts input by user The local data base of silver-colored operation information update cashier itself;
Second sending module is used to the cash register operation information input by user being sent to the server-side;
The local for the cash register operation information update cashier itself that the third update module is used to be sent according to the server-side Database.
6. cash register system according to claim 5, which is characterized in that the first message queue is RabbitMQ queues.
7. cash register system according to claim 5, which is characterized in that second sending module includes:
Processing unit, the cash register operation information storage input by user for receiving cashier itself are built in cashier itself Vertical second message queue;
Transmission unit, the cash register operation information in second message queue for establishing cashier itself according to preset order are sent out It send to the server-side.
8. cash register system according to claim 7, which is characterized in that the second message queue is RabbitMQ queues.
CN201810482233.8A 2018-05-18 2018-05-18 Cash register information synchronization method and cash register system Pending CN108665654A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810482233.8A CN108665654A (en) 2018-05-18 2018-05-18 Cash register information synchronization method and cash register system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810482233.8A CN108665654A (en) 2018-05-18 2018-05-18 Cash register information synchronization method and cash register system

Publications (1)

Publication Number Publication Date
CN108665654A true CN108665654A (en) 2018-10-16

Family

ID=63777110

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810482233.8A Pending CN108665654A (en) 2018-05-18 2018-05-18 Cash register information synchronization method and cash register system

Country Status (1)

Country Link
CN (1) CN108665654A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109754204A (en) * 2018-12-10 2019-05-14 任飞翔 Block synchronous method and device

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE2813079B2 (en) * 1978-03-25 1980-08-14 Standard Elektrik Lorenz Ag, 7000 Stuttgart High security multi-computer system
EP1251427A2 (en) * 2001-04-17 2002-10-23 Seiko Epson Corporation Control system
DE60221631T2 (en) * 2001-12-27 2008-05-21 Seiko Epson Corp. Method for initializing multiple devices and a control system for controlling multiple devices
CN101227428A (en) * 2008-01-30 2008-07-23 中兴通讯股份有限公司 Application server and remote control method thereof
CN101312411A (en) * 2007-05-22 2008-11-26 吕共欣 System and method for interface shopping
CN101763419A (en) * 2009-12-28 2010-06-30 山东大学 Method for synchronously updating remote rss data by local database
CN103268351A (en) * 2013-05-31 2013-08-28 网易(杭州)网络有限公司 Method and device for data synchronism
CN104331501A (en) * 2014-11-19 2015-02-04 广东花生信息科技有限公司 Data updating method for multi-platform
US20150058287A1 (en) * 2012-03-20 2015-02-26 Zte Corporation Method and device for synchronizing data
CN104580291A (en) * 2013-10-17 2015-04-29 陈冰 Platform data sharing system
CN107977835A (en) * 2016-10-21 2018-05-01 浙江银泰百货有限公司 A kind of intelligent cashier system and cash method

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE2813079B2 (en) * 1978-03-25 1980-08-14 Standard Elektrik Lorenz Ag, 7000 Stuttgart High security multi-computer system
EP1251427A2 (en) * 2001-04-17 2002-10-23 Seiko Epson Corporation Control system
DE60221631T2 (en) * 2001-12-27 2008-05-21 Seiko Epson Corp. Method for initializing multiple devices and a control system for controlling multiple devices
CN101312411A (en) * 2007-05-22 2008-11-26 吕共欣 System and method for interface shopping
CN101227428A (en) * 2008-01-30 2008-07-23 中兴通讯股份有限公司 Application server and remote control method thereof
CN101763419A (en) * 2009-12-28 2010-06-30 山东大学 Method for synchronously updating remote rss data by local database
US20150058287A1 (en) * 2012-03-20 2015-02-26 Zte Corporation Method and device for synchronizing data
CN103268351A (en) * 2013-05-31 2013-08-28 网易(杭州)网络有限公司 Method and device for data synchronism
CN104580291A (en) * 2013-10-17 2015-04-29 陈冰 Platform data sharing system
CN104331501A (en) * 2014-11-19 2015-02-04 广东花生信息科技有限公司 Data updating method for multi-platform
CN107977835A (en) * 2016-10-21 2018-05-01 浙江银泰百货有限公司 A kind of intelligent cashier system and cash method

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
(美)帕特里克·卡兹,凯文·瑞恩著;杨超译: "《三维数字地球引擎设计》", 30 November 2017 *
丁鲲: "分布式数据库数据同步技术研究", 《海军工程大学学报》 *
吴鹏强: "基于超高频射频识别的超市收银系统研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *
黄序鑫: "基于SOA的数据同步技术研究与实现", 《计算机工程与设计》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109754204A (en) * 2018-12-10 2019-05-14 任飞翔 Block synchronous method and device
CN109754204B (en) * 2018-12-10 2021-01-19 任飞翔 Block synchronization method and device

Similar Documents

Publication Publication Date Title
US10986057B2 (en) Message history display system and method
JP3762846B2 (en) Data processing apparatus and method for managing workload related to a group of servers
US9237189B2 (en) Zero-click sharing of application context across devices
US8478816B2 (en) Transferring application state across devices
CN100553236C (en) A kind of method and instantaneous communication system of recalling instant communication message
WO2009111492A4 (en) Data synchronization protocol
CN101103596A (en) Method and apparatus for efficiently managing 'messages sent' file and resending of messages from mobile wireless communication device
CN107122379A (en) Collect the Transaction Information associated with the data file being locally stored
CN107656937B (en) Method and device for realizing consistency of read-write data
US9565266B2 (en) Broker facilitated peer-to-peer publisher collaboration in a publish-subscription environment
CN109416644A (en) System and method for real-time migration of virtual machine
JP2018504670A (en) Message broker system with parallel persistence
CN102523109A (en) Resource state updating method, management client ends, and server
CN108255621A (en) A kind of MySQL incremental message analytic methods based on binlog
CN110377376A (en) Interface message method for refreshing, device, computer installation and readable storage medium storing program for executing
CN114327799B (en) Distributed transaction processing method and device, electronic equipment and storage medium
CN108665654A (en) Cash register information synchronization method and cash register system
CN102611638B (en) Text transmission method of instant messaging software and transmission system thereof
CN103338160A (en) Buffer queue-based polling service optimization system and optimization method
CN110362395A (en) Background program management method, device, computer equipment and storage medium
CN103530125B (en) A kind of data sharing method and system, the control unit of window
CN110445834A (en) A kind of method and system for solving propelling data and losing
CN113905090B (en) Message pushing method, device, server, electronic equipment and storage medium
CN114896960A (en) Document processing method, apparatus, computer device, readable storage medium and product
CN113626221A (en) Message enqueuing 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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20181016