CN117240478B - POS machine data transmission method and system - Google Patents

POS machine data transmission method and system Download PDF

Info

Publication number
CN117240478B
CN117240478B CN202311504155.4A CN202311504155A CN117240478B CN 117240478 B CN117240478 B CN 117240478B CN 202311504155 A CN202311504155 A CN 202311504155A CN 117240478 B CN117240478 B CN 117240478B
Authority
CN
China
Prior art keywords
data
pos
pos machine
remote server
hash value
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.)
Active
Application number
CN202311504155.4A
Other languages
Chinese (zh)
Other versions
CN117240478A (en
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.)
Shenzhen Hezongfu Technology Co ltd
Original Assignee
Shenzhen Hezongfu 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 Shenzhen Hezongfu Technology Co ltd filed Critical Shenzhen Hezongfu Technology Co ltd
Priority to CN202311504155.4A priority Critical patent/CN117240478B/en
Publication of CN117240478A publication Critical patent/CN117240478A/en
Application granted granted Critical
Publication of CN117240478B publication Critical patent/CN117240478B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a POS machine data transmission method and a POS machine data transmission system, which relate to the field of POS machines, wherein the method comprises the following steps: the remote server splits the update data into a plurality of segments and calculates a hash value; the data segments are independently sent to different POS machines in the area, and all hash values are sent to all the POS machines; the POS machine shares a data segment in the local area network and verifies the integrity of the data segment by using the hash value; if the hash value is checked successfully, integrating the data segment into complete updated data and updating; and triggering retransmission and verification when the hashes are not matched. The system comprises: the system comprises a remote server, a plurality of POS machines and a local area network communication module. The server has the functions of data splitting, hash value calculation and distribution. The POS machine is provided with data verification, integration and exception handling functions. The invention provides a more efficient, reliable and safe mechanism for the remote downloading of the POS machine.

Description

POS machine data transmission method and system
Technical Field
The invention relates to the field of POS (point of sale) machines, in particular to a POS machine data transmission method and system.
Background
In modern commercial environments, POS is a critical device for merchants to conduct sales transactions. With the development of technology, the software of the POS machine needs to be updated frequently to ensure its function, security and compatibility with the backend system. However, in the update process, the conventional update method may suffer from the following problems:
safety problem: downloading data directly from a remote server may be exposed to network attacks, such as man-in-the-middle attacks, where the data may be stolen or tampered with during transmission.
Transmission rate problem: the POS machines are gathered in the same area, such as a mall, and when a plurality of POS machines update at the same time, network congestion can be caused to influence the updating speed.
For these problems, there is a need for a safer and more efficient remote download method, particularly in a mall or shopping mall, that can be optimized using the centralization of the POS and the high speed of the lan.
Disclosure of Invention
The invention aims to provide a POS machine data transmission method and system for solving the problems in the background art.
In order to achieve the above purpose, the invention adopts the following technical scheme:
a POS machine data transmission method comprises the following steps:
s1: the remote server splits the data to be updated into N data segments, wherein corresponding hash values are calculated for each data segment respectively;
s2: the remote server sends N data segments to N different POS machines in the same area respectively, and each POS machine receives one data segment; the remote server simultaneously sends the hash value corresponding to each data segment to N POS machines in the same area, and each POS machine receives the hash value corresponding to all the data segments;
s3: each POS machine initiates a data segment exchange request in the local area network, wherein each POS machine shares the received data segment with other POS machines and receives the data segments of other POS machines at the same time;
s4: after each POS machine receives the data segments transmitted by other POS machines, the hash values of the corresponding data segments obtained from the remote server are utilized for verification, if all the POS machines find that the hash values of all the data segments including the data segments received directly from the remote server pass through verification, each POS machine integrates all the data segments into complete update data and updates the complete update data;
if any POS machine verifies that the data segment received from the remote server or the data segment transmitted from other POS machines is not matched with the corresponding hash value, the POS machine reports the POS machine identification corresponding to the data segment with the unmatched hash value to the remote server, and the step S5 is carried out;
s5: after receiving the report, the remote server sends the data segment and all hash values to the POS machine corresponding to the POS machine identifier again, and the POS machine covers the original data with the received new data segment and all hash values;
s6: and repeating the steps S4 and S5 until all the POS machines pass the hash value verification of all the data segments.
In some embodiments, the method further comprises step S7: after each POS machine finishes updating, the POS machine identification which finishes updating is informed to a remote server.
In some embodiments, the same area is within the same mall or the same shopping mall.
In some embodiments, the hash value is calculated using MD5, SHA-1, SHA-256, or SHA-512 algorithms.
In some embodiments, each POS machine has a unique identity certificate, and when the POS machine initiates a data exchange request, mutual authentication is performed through a TLS/SSL secure transmission protocol, and only the POS machine with authenticated identity can participate in the data exchange.
The invention also discloses a data transmission system for the POS machine, which comprises:
a. remote server: for managing and providing update data;
b. a plurality of POS machines: different POS machines in the same area are used for receiving and processing the update data;
c. a local area network communication module: the system is used for communication among a plurality of POS machines so as to realize exchange and sharing of data segments;
wherein, still include in the remote server:
a1. and a data splitting module: splitting data to be updated into a plurality of data segments;
a2. the hash value calculation module: for calculating a corresponding hash value for each data segment, respectively;
a3. the data distribution module is responsible for distributing a plurality of data segments to different POS machines in the same area, and simultaneously sending the hash value of each data segment to all the POS machines;
wherein, still be provided with in every POS machine:
b1. and a data verification module: for verifying whether the hash value of the data segment from the other POS machine is correct;
b2. and a data integration module: for integrating the validated data segments into complete update data;
b3. reporting and repairing module: and the POS machine identification corresponding to the data segment which is used for reporting the unverified passing is sent to the remote server, and the retransmission and verification of the data are triggered.
In some embodiments, an update notification module is further disposed in the POS machine, and is configured to notify, after each POS machine completes updating, the remote server of the POS machine identifier that completes updating.
In some embodiments, the same area is within the same mall or the same shopping mall.
In some embodiments, the hash value is calculated using MD5, SHA-1, SHA-256, or SHA-512, among other algorithms.
In some embodiments, each POS machine has a unique identity certificate, and when the POS machine initiates a data exchange request, mutual authentication is performed through a TLS/SSL secure transmission protocol, and only the POS machine with authenticated identity can participate in the data exchange.
In summary, the core of the technical scheme of the invention is that a method of segmented data exchange and hash value verification and a parallel transmission mode are adopted to finish remote downloading among a plurality of POS machines in the same area (like a mall or shopping center). The advantages are that: the data to be updated is split into a plurality of data segments and distributed to a plurality of POS machines in the same area, and then the data segments are exchanged among the POS machines in the local area network, so that the data transmission efficiency is remarkably improved, and a remote server does not need to send complete data to each POS machine, thereby reducing the network bandwidth requirement and improving the updating speed. Each data segment is verified along with the hash value, and as the hash value is distributed in all POS machines, each data segment can be ensured not to be tampered before data integration. In addition, when the POS machine performs data exchange request, only the POS machine with authenticated identity is allowed to participate in data exchange through TLS/SSL mutual authentication, so that the security of the system is enhanced. Meanwhile, the self-repairing capability of the system, such as automatically reporting and retransmitting data when the verification of the hash value of the data segment fails, remarkably improves the reliability of the system. Every time the POS machine finishes updating, the identification of the POS machine is notified to a remote server, so that the server can know the updating state of each POS machine in real time, and convenience is brought to management and monitoring. In particular, the present invention is particularly designed for features of POS machines, which are typically distributed in the same area, such as the same mall or shopping mall, and therefore are particularly efficient in using the method and system of the present invention.
Drawings
FIG. 1 is a schematic flow chart of the method of the present invention.
Detailed Description
The following describes specific embodiments of the present invention with reference to the drawings.
A general flow chart of the invention is shown in fig. 1. The invention relates to a POS machine data transmission method, which comprises the following steps:
s1: the remote server splits the data to be updated into N data segments, wherein corresponding hash values are calculated for each data segment respectively;
s2: the remote server respectively sends the data segments to N different POS machines in the same area, so that each POS machine is ensured to only receive one data segment; the remote server simultaneously sends the hash value corresponding to each data segment to different POS machines in the same area, so that each POS machine is ensured to receive the hash values corresponding to all the data segments;
s3: each POS machine initiates a data segment exchange request in the local area network, wherein each POS machine shares the received data segment with other POS machines and receives the data segments of other POS machines at the same time;
s4: after each POS receives the data segment transmitted by other POS, verifying by using the hash value of the corresponding data segment obtained from the remote server, if all POS find that the hash value of all the data segments including the data segment received directly from the remote server passes (the hash value verification passing here means that the same hash algorithm is used to calculate the hash value for one data segment, if the hash value is the same as the hash value received from the remote server, it indicates that the data segment has not been tampered, i.e. the hash value verification passes), then each POS integrates all the data segments into complete update data and updates by using the complete update data;
if any POS machine verifies that the data segment received from the remote server or the data segment transmitted from other POS machines is not matched with the corresponding hash value, the POS machine reports the POS machine identification corresponding to the data segment with the unmatched hash value to the remote server, and the step S5 is carried out;
s5: after receiving the report, the remote server sends the data segment and all hash values to the POS machine corresponding to the POS machine identifier again, and the POS machine covers the original data with the received new data segment and all hash values;
s6: and repeating the steps S4 and S5 until all the POS machines pass the hash value verification of all the data segments.
In the above steps, the number of split data segments is the same as the number of received POS machines, each POS machine receives one data segment, but each POS machine receives hash values of all N data segments. Therefore, the number N of POS machines with smooth network in a market can be determined, and then the process that the POS machines need to be split into N data segments is confirmed to be carried out. Or the number N of the split data segments can be confirmed in advance, and then the POS machine with the corresponding number N is selected to receive the data.
In some embodiments, the method further comprises step S7: after each POS machine finishes updating, the POS machine identification which finishes updating is informed to a remote server.
In some embodiments, the same area is within the same mall or the same shopping mall.
In some embodiments, the hash value is calculated using MD5, SHA-1, SHA-256, or SHA-512 algorithms. The same hash algorithm can be adopted on the remote server and the POS machine in advance, or the type of the hash value calculation algorithm can be simultaneously transmitted to the POS machine by the remote server when data are transmitted, so that the POS machine knows what hash value calculation algorithm is adopted.
In some embodiments, each POS machine has a unique identity certificate, and when the POS machine initiates a data exchange request, mutual authentication is performed through a TLS/SSL secure transmission protocol, and only the POS machine with authenticated identity can participate in the data exchange.
The invention also discloses a data transmission system for the POS machine, which comprises:
a. remote server: for managing and providing update data;
b. a plurality of POS machines: different POS machines in the same area are used for receiving and processing the update data;
c. a local area network communication module: the system is used for communication among a plurality of POS machines so as to realize exchange and sharing of data segments; wherein, still include in the remote server:
a1. and a data splitting module: splitting data to be updated into a plurality of data segments;
a2. the hash value calculation module: for calculating a corresponding hash value for each data segment, respectively;
a3. the data distribution module is responsible for distributing a plurality of data segments to different POS machines in the same area, and simultaneously sending the hash value of each data segment to all the POS machines;
wherein, still be provided with in every POS machine:
b1. and a data verification module: for verifying whether the hash value of the data segment from the other POS machine is correct;
b2. and a data integration module: for integrating the validated data segments into complete update data;
b3. reporting and repairing module: and the POS machine identification corresponding to the data segment which is used for reporting the unverified passing is sent to the remote server, and the retransmission and verification of the data are triggered.
In some embodiments, an update notification module is further disposed in the POS machine, and is configured to notify, after each POS machine completes updating, the remote server of the POS machine identifier that completes updating.
In some embodiments, the same area is within the same mall or the same shopping mall.
In some embodiments, the hash value is calculated using MD5, SHA-1, SHA-256, or SHA-512 algorithms.
In some embodiments, each POS machine has a unique identity certificate, and when the POS machine initiates a data exchange request, mutual authentication is performed through a TLS/SSL secure transmission protocol, and only the POS machine with authenticated identity can participate in the data exchange.
The foregoing is only a preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art, who is within the scope of the present invention, should be covered by the protection scope of the present invention by making equivalents and modifications to the technical solution and the inventive concept thereof.

Claims (8)

1. The POS machine data transmission method is characterized by comprising the following steps:
s1: the remote server splits the data to be updated into N data segments, wherein corresponding hash values are calculated for each data segment respectively;
s2: the remote server sends N data segments to N different POS machines in the same area respectively, and each POS machine receives one data segment; the remote server simultaneously sends the hash value corresponding to each data segment to N POS machines in the same area, and each POS machine receives the hash value corresponding to all the data segments; the same area is in the same market or the same shopping center;
s3: each POS machine initiates a data segment exchange request in the local area network, wherein each POS machine shares the received data segment with other POS machines and receives the data segments of other POS machines at the same time;
s4: after each POS machine receives the data segments transmitted by other POS machines, the hash values of the corresponding data segments obtained from the remote server are utilized for verification, if all the POS machines find that the hash values of all the data segments including the data segments received directly from the remote server pass through verification, each POS machine integrates all the data segments into complete update data and updates the complete update data;
if any POS machine verifies that the data segment received from the remote server or the data segment transmitted from other POS machines is not matched with the corresponding hash value, the POS machine reports the POS machine identification corresponding to the data segment with the unmatched hash value to the remote server, and the step S5 is carried out;
s5: after receiving the report, the remote server sends the data segment and all hash values to the POS machine corresponding to the POS machine identifier again, and the POS machine covers the original data with the received new data segment and all hash values;
s6: and repeating the steps S4 and S5 until all the POS machines pass the hash value verification of all the data segments.
2. The POS data transmission method according to claim 1, further comprising step S7: after each POS machine finishes updating, the POS machine identification which finishes updating is informed to a remote server.
3. The POS data transmission method of claim 1, wherein the hash value is calculated using an MD5, SHA-1, SHA-256 or SHA-512 algorithm.
4. The POS data transmission method of claim 1, wherein each POS has a unique identity certificate, and when the POS initiates a data exchange request, two-way authentication is performed by TLS/SSL secure transmission protocol, and only POS with authenticated identity can participate in data exchange.
5. A data transmission system for a POS machine for implementing the method of claim 1, comprising:
a. remote server: for managing and providing update data;
b. a plurality of POS machines: different POS machines in the same area are used for receiving and processing the update data;
c. a local area network communication module: the system is used for communication among a plurality of POS machines so as to realize exchange and sharing of data segments;
wherein, still include in the remote server:
a1. and a data splitting module: splitting data to be updated into a plurality of data segments;
a2. the hash value calculation module: for calculating a corresponding hash value for each data segment, respectively;
a3. the data distribution module is responsible for distributing a plurality of data segments to different POS machines in the same area, and simultaneously sending the hash value of each data segment to all the POS machines; the same area is in the same market or the same shopping center;
wherein, still be provided with in every POS machine:
b1. and a data verification module: for verifying whether the hash value of the data segment from the other POS machine is correct;
b2. and a data integration module: for integrating the validated data segments into complete update data;
b3. reporting and repairing module: and the POS machine identification corresponding to the data segment which is used for reporting the unverified passing is sent to the remote server, and the retransmission and verification of the data are triggered.
6. The data transmission system for POS machine according to claim 5, wherein an update notification module is further provided in the POS machine, for notifying the remote server of the updated POS machine identifier after each POS machine completes the update.
7. The data transmission system for a POS of claim 5, wherein the hash value is calculated using an MD5, SHA-1, SHA-256 or SHA-512 algorithm.
8. The data transmission system for POS of claim 5, wherein each POS has a unique identity certificate, and when the POS initiates a data exchange request, two-way authentication is performed via TLS/SSL secure transmission protocol, and only POS with authenticated identity can participate in the data exchange.
CN202311504155.4A 2023-11-13 2023-11-13 POS machine data transmission method and system Active CN117240478B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311504155.4A CN117240478B (en) 2023-11-13 2023-11-13 POS machine data transmission method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311504155.4A CN117240478B (en) 2023-11-13 2023-11-13 POS machine data transmission method and system

Publications (2)

Publication Number Publication Date
CN117240478A CN117240478A (en) 2023-12-15
CN117240478B true CN117240478B (en) 2024-02-13

Family

ID=89082911

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311504155.4A Active CN117240478B (en) 2023-11-13 2023-11-13 POS machine data transmission method and system

Country Status (1)

Country Link
CN (1) CN117240478B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101179389A (en) * 2006-11-07 2008-05-14 朗迅科技公司 Peer-to-peer file download system of IMS network
CN104283933A (en) * 2013-07-12 2015-01-14 腾讯科技(深圳)有限公司 Data downloading method, client-side and system
CN104933085A (en) * 2015-05-08 2015-09-23 小米科技有限责任公司 Electronic book update method, terminal and server
CN110134424A (en) * 2019-05-16 2019-08-16 上海东软载波微电子有限公司 Firmware upgrade method and system, server, smart machine, readable storage medium storing program for executing
CN110149373A (en) * 2019-04-28 2019-08-20 平安科技(深圳)有限公司 Date storage method, device, medium and server based on point to point network
CN110741399A (en) * 2017-04-28 2020-01-31 爱普多斯公司 System and method for point of sale data synchronization
WO2020178763A1 (en) * 2019-03-04 2020-09-10 Innoviti Payment Solutions Private Limited System and method of updating terminal device
CN111866099A (en) * 2020-07-07 2020-10-30 锐捷网络股份有限公司 Method, device, system, equipment and storage medium for downloading mirror image file
CN115268976A (en) * 2022-07-28 2022-11-01 合肥城市云数据中心股份有限公司 Automatic upgrading method and system for multi-data center collection Agent version

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101179389A (en) * 2006-11-07 2008-05-14 朗迅科技公司 Peer-to-peer file download system of IMS network
CN104283933A (en) * 2013-07-12 2015-01-14 腾讯科技(深圳)有限公司 Data downloading method, client-side and system
CN104933085A (en) * 2015-05-08 2015-09-23 小米科技有限责任公司 Electronic book update method, terminal and server
CN110741399A (en) * 2017-04-28 2020-01-31 爱普多斯公司 System and method for point of sale data synchronization
WO2020178763A1 (en) * 2019-03-04 2020-09-10 Innoviti Payment Solutions Private Limited System and method of updating terminal device
CN110149373A (en) * 2019-04-28 2019-08-20 平安科技(深圳)有限公司 Date storage method, device, medium and server based on point to point network
CN110134424A (en) * 2019-05-16 2019-08-16 上海东软载波微电子有限公司 Firmware upgrade method and system, server, smart machine, readable storage medium storing program for executing
CN111866099A (en) * 2020-07-07 2020-10-30 锐捷网络股份有限公司 Method, device, system, equipment and storage medium for downloading mirror image file
CN115268976A (en) * 2022-07-28 2022-11-01 合肥城市云数据中心股份有限公司 Automatic upgrading method and system for multi-data center collection Agent version

Also Published As

Publication number Publication date
CN117240478A (en) 2023-12-15

Similar Documents

Publication Publication Date Title
CN112446785A (en) Cross-chain transaction method, system, device, equipment and storage medium
CN110958110B (en) Block chain private data management method and system based on zero knowledge proof
EP3659060B1 (en) Consensus protocol for permissioned ledgers
CN110930153B (en) Block chain privacy data management method and system based on hidden third party account
CN113676452B (en) Replay attack resisting method and system based on one-time key
US20210218745A1 (en) Method and system for controlling the release of a resource
CN111582845A (en) Cross-chain transaction method and device of block chain and electronic equipment
CN112581233A (en) Method, device, equipment and computer-readable storage medium for order offline operation
CN114268490B (en) Equipment authentication method, internet of things system, server and storage medium
CN116323304B (en) Identification method for an electric vehicle charging station
CN110941840A (en) Data processing method, system and terminal
CN117240478B (en) POS machine data transmission method and system
WO2024012318A1 (en) Device access method and system and non-volatile computer storage medium
CN111190754A (en) Block chain event notification method and block chain system
CN112465516B (en) Block chain network-based device management method, related device and storage medium
CN112487470B (en) Information verification method, device, terminal equipment and computer readable storage medium
CN114820179A (en) Block chain signature checking method and related equipment
CN113438212A (en) Block chain node-based communication security management method and block chain security system
CN112513908A (en) Digital asset transfer system
WO2020232200A1 (en) Method for managing data reflecting a transaction
CN117040929B (en) Access processing method, device, equipment, medium and program product
CN115082069B (en) Cross-chain data acquisition method and device based on intelligent contract scheduling
CN117056131B (en) Data processing method based on block chain network and related equipment
CN111626735B (en) Data interaction system, method and module
CN116188011A (en) Transaction method, device, equipment and storage medium for preventing node from being wrongly generated by blockchain

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
GR01 Patent grant
GR01 Patent grant