CN101505300A - System for data synchronization between server and terminal on the basis of Linux and synchronization method thereof - Google Patents

System for data synchronization between server and terminal on the basis of Linux and synchronization method thereof Download PDF

Info

Publication number
CN101505300A
CN101505300A CNA200910037896XA CN200910037896A CN101505300A CN 101505300 A CN101505300 A CN 101505300A CN A200910037896X A CNA200910037896X A CN A200910037896XA CN 200910037896 A CN200910037896 A CN 200910037896A CN 101505300 A CN101505300 A CN 101505300A
Authority
CN
China
Prior art keywords
terminal
server
data
memory module
module
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.)
Granted
Application number
CNA200910037896XA
Other languages
Chinese (zh)
Other versions
CN101505300B (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.)
Yuu Niebank (Beijing) Technology Co., Ltd.
Original Assignee
张昊
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 张昊 filed Critical 张昊
Priority to CN200910037896XA priority Critical patent/CN101505300B/en
Publication of CN101505300A publication Critical patent/CN101505300A/en
Application granted granted Critical
Publication of CN101505300B publication Critical patent/CN101505300B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a data synchronizing system and a data synchronizing method between a server and a terminal under a linux operating system. The data synchronizing system comprises the server and a plurality of terminals connected with the server, wherein the terminals send data synchronizing instructions to the server by calling a timing execution module, and the server achieves authentication for the terminals through an authentication module after receiving the synchronizing instructions and transmits data in a first storage module to the terminals according to the instructions. The data synchronizing system and the data synchronizing method can reduce large amount of storage space occupied by the data, improve the data synchronizing rate, and avoid the probability of generating error codes as far as possible when a file is used.

Description

Data synchronous system and method for synchronous thereof based on server under the Linux and terminal room
Technical field
The present invention relates to data backup, transmission and storage art, particularly at data synchronous system and the method for synchronous thereof between clothes server and the terminal under the linux operating system.
Background technology
At present, the utilization of file transfer great majority is file transfer protocol (FTP) (File Transfer Protocol abbreviates FTP as) and bit stream agreement (BitTorrent abbreviates BT as).File Transfer Protocol needs 2 ports, and a port is as the control connection port, is used for sending instruction to server and waiting for server response; Another port is a data transmission port, is used for setting up data transmission channel.The transmission principle of File Transfer Protocol is: at first the user end to server end sends connection request, and server is accepted connection, sets up a command link; When needs transmitted data, client sent order to server by the control connection port, and last, server sends connection request to client, sets up a data link and transmits data.BT host-host protocol principle: by point-to-point transmission means client and server is coupled together, client also provides upload service when downloading, reach the purpose of sharing fast.Thus, existing data-transmission mode in use all will produce corresponding tabulation earlier, and need judge file path accurately, so this mutual transfer mode is easy to generate confusion, and along with the number clients purpose increases, data constantly increase in server, cause taking a lot of disk spaces.In addition, the machine of client also can make the continuous increase of data because of transmission each time, finally causes disk space more and more littler.
Summary of the invention
The objective of the invention is to overcome the deficiencies in the prior art, provide a kind of based on data synchronous system between server and the terminal and method for synchronous thereof under the linux operating system.
In order to realize the foregoing invention purpose, the technical scheme of employing is as follows:
A kind of based on the data synchronous system between server under the Linux and the terminal, comprise server and a plurality of terminals that are attached thereto, described terminal comprises teledata synchronization module and connected the 3rd memory module, Executive Module regularly; Described server comprises authentication module and connected a plurality of first memory module and second memory module, creates hard link between first memory module and second memory module, makes data in first memory module point to data in second memory module; Described terminal is sent the data sync instruction by calling regularly Executive Module to server, and server is realized authentication to terminal by authentication module after receiving synchronic command, and according to this instruction the data in first memory module is sent to terminal.
Described teledata synchronization module has server ip address, terminal iidentification, port information and authentication password.
Described authentication module has the terminal MAC Address.
Deposit all complete data files in described second memory module, first memory module is deposited one or more data files of taking over from the second memory module chain.
The present invention is also a kind of based on the method for data synchronization between server under the Linux and the terminal, may further comprise the steps:
1, server is the step of terminal distribution first memory module.
Server is one of each terminal distribution corresponding sign of terminal therewith, and generates the first thesaurus module corresponding with the terminal MAC Address according to the MAC Address of each terminal.
2, create the step of hard link between first memory module of server and second memory module.
Described first memory module is obtained the data link by hard link from the second memory module, and generates corresponding tabulation and hard link file.
3, terminal to server sends the step of data sync order.
The teledata synchronization module finds specified server and sends the data sync order to it according to server ip address, terminal iidentification catalogue, port information and authentication password.Simultaneously, can also be by calling regularly fill order, make the teledata synchronization module at times send the data sync order to given server.
4, server transmits the step of data to terminal.
1) judges whether terminal iidentification is corresponding with the terminal MAC Address in the authentication module, in this way, change step 2); Otherwise, abandon link;
2) judge whether the terminal authentication password is correct, in this way, change step 3); Otherwise, break link;
3) judge whether the 3rd memory module of above-mentioned terminal and the file directory in first memory module and sign change, and in this way, change step 4), otherwise, break link;
4) according to the link of the variation that is stored in the tabulation in first memory module and data, with three memory module of synchronous transmission on second memory module of data from server on the above-mentioned terminal.
The present invention has following beneficial effect compared to existing technology:
The present invention combines teledata synchronously and is applied in the file synchronization transmission with hard link, server designated directory file is the link form, first memory module of i.e. appointment is the link of a transfer in fact, the data of its substantial synchronization are to download synchrodata from second memory module, can avoid each terminal in corresponding file in the server, all to deposit a real file like this, thus, both can reduce a large amount of memory space of data occupancy, also can improve the speed of data sync.In addition, can also use up a spot of avoid file make a mistake in use the sign indicating number probability.Therefore, the present invention has realized the uniformity of data file in transmission course, the specific aim when data file is selected to transmit, and can realize data sync transmission service safely.
Description of drawings
Fig. 1 is a principle of the invention structure chart;
Fig. 2 is a principle of the invention flow chart;
Fig. 3 links schematic diagram for the present invention.
Embodiment
Below in conjunction with accompanying drawing the present invention is described in detail.
As shown in Figure 1, a plurality of terminals that the present invention includes server and be attached thereto are between the two by Internet connection.
Terminal of the present invention comprises that the teledata synchronization module has server ip address, terminal iidentification, port information and authentication password.Described port is 873,8730 communication port.It can be by the file between the fast synchronous multiple host of LAN/WAN.Can the arrange in pairs or groups pattern of telefile copy, encryption software bag and virtual drive of teledata synchronization module.
Terminal is called regularly Executive Module, and the remote synchronization module is carried out once at set intervals.
Server then comprises authentication module and connected a plurality of first memory module and second memory module, creates hard link between first memory module and second memory module, makes data in first memory module point to data in second memory module.Be to deposit all complete data files in described second memory module, first memory module is deposited one or more data files of taking over from the second memory module chain.
Hard link can be ordered with 1n by the following method and be set up.
As:
For " existingfile " creates hard link, file is called " newfile ".
Or, " directory " in the catalogue, be that the All Files that comprises in " existingfile-list " is created a hard link of the same name.No matter whether " newfile " exists optional [options]-f commonly used, all creates link.If-n " newfile " exist, just do not create link.
As shown in Figure 3, hard link is a pointer, points to file inode, and system does not redistribute node for it.
Attention is before creating link, and the number of links that file1 shows is 1, creates the link back:
(1) number of links of file1 and filelhard all becomes 2;
(2) file1 is the same with filelhard at inode number;
(3) file1 also is the same with the file size that filelhard shows.
This shows, carried out the operating result of 1n order: file1 and filelhard are two names of same file, they have same inode number and file attribute, set up the hard link of file f ilel, on current directory, set up a new pointer for the file inode of file1 exactly.
As shown in Figure 2, method of data synchronization of the present invention may further comprise the steps:
1, server is the step of terminal distribution first memory module.
When a terminal occurring, server can be automatically for this reason terminal on server, add a corresponding sign of terminal therewith.And, generating first memory module with terminal or the name of its MAC Address, just produce one and terminal corresponding point at server this moment, and each terminal all produces corresponding identification accordingly.
2, create the step of hard link between first memory module of server and second memory module.
It is the keyed jointing of some tabulations and data file that described first memory module exists, these contents are all obtained from the second memory module by hard link, when placing an order toward this terminal, the data that server meeting root a tree name is placed an order, first memory module to this terminal produces corresponding configuration file and hard link file, and the media file of corresponding renewal can be saved in second memory module.
3, terminal to server sends the step of data sync order.
The teledata synchronization module finds specified server and sends the data sync order to it according to server ip address, terminal iidentification catalogue, port information and authentication password.Simultaneously, can also be by calling regularly fill order, make the teledata synchronization module at times send the data sync order to given server.
4, server transmits the step of data to terminal.
1) opens one 873 service channel when server, wait for client end response.Judge whether terminal iidentification is corresponding with the terminal MAC Address in the authentication module, in this way, change step 2); Otherwise, abandon link;
2) judge whether the terminal authentication password is correct, in this way, change step 3); Otherwise, break link;
3) judge whether the 3rd memory module of above-mentioned terminal and the file directory in first memory module and sign change, and in this way, change step 4), otherwise, break link;
4) according to the link of the variation that is stored in the tabulation in first memory module and data, with three memory module of synchronous transmission on second memory module of data from server on the above-mentioned terminal.
File in the catalogue of terminal when file produces change, all can produce new content synchronously because of carrying out teledata each time, and old content is directly deleted.All upgrade each time, so just reduced the use amount of disk space as much as possible, avoided overabundance of data, redundancy because of the renewal of server directory.

Claims (10)

1, a kind of based on the data synchronous system between server under the Linux and the terminal, comprise server and a plurality of terminals that are attached thereto, it is characterized in that,
Described terminal comprises teledata synchronization module and the 3rd memory module that is connected with the teledata synchronization module, Executive Module regularly;
Described server comprises authentication module and a plurality of first memory modules and second memory module that are connected with authentication module, between first memory module and second memory module, create hard link, make data in first memory module point to data in second memory module;
Described terminal is sent the data sync instruction by calling regularly Executive Module to server, and server is realized authentication to terminal by authentication module after receiving synchronic command, and according to this instruction the data in first memory module is sent to terminal.
2, according to claim 1ly it is characterized in that based on the data synchronous system between server under the Linux and the terminal described teledata synchronization module also is provided with server ip address, terminal iidentification, port information and authentication password.
3, according to claim 2ly it is characterized in that based on the data synchronous system between server under the Linux and the terminal described authentication module has the terminal MAC Address.
4, according to claim 3 based on the data synchronous system between server under the Linux and the terminal, it is characterized in that, deposit all complete data files in described second memory module, first memory module is deposited one or more data files of taking over from the second memory module chain.
5, utilize a kind of it is characterized in that of system's realization according to claim 1, may further comprise the steps based on the method for data synchronization between server under the Linux and the terminal:
1) server is the step of terminal distribution first memory module;
2) step of establishment hard link between first memory module of server and second memory module;
3) terminal to server sends the step of data sync order;
4) server transmits the step of data to terminal.
6, according to claim 5 based on the method for data synchronization between server under the Linux and the terminal, it is characterized in that, in the described step 1), server is one of each terminal distribution corresponding sign of terminal therewith, and generates the first thesaurus module corresponding with the terminal MAC Address according to the MAC Address of each terminal.
7, according to claim 6 based on the method for data synchronization between server under the Linux and the terminal, it is characterized in that, described step 2) in, described first memory module is obtained the data link by hard link from the second memory module, and generates corresponding tabulation and hard link file.
8, according to claim 7 based on the method for data synchronization between server under the Linux and the terminal, it is characterized in that, in the described step 3), the teledata synchronization module finds specified server and sends the data sync order to it according to server ip address, terminal iidentification catalogue, port information and authentication password.
9, according to claim 8 based on the method for data synchronization between server under the Linux and the terminal, it is characterized in that also comprising, by calling regularly fill order, make the teledata synchronization module at times send the data sync order to given server.
10, according to Claim 8 or 9 describedly it is characterized in that, in the described step 4), further comprising the steps of based on the method for data synchronization between server under the Linux and the terminal:
1) judges whether terminal iidentification is corresponding with the terminal MAC Address in the authentication module, in this way, change step 2); Otherwise, abandon link;
2) judge whether the terminal authentication password is correct, in this way, change step 3); Otherwise, break link;
3) judge whether the 3rd memory module of above-mentioned terminal and the file directory in first memory module and sign change, and in this way, change step 4), otherwise, break link;
4) according to the link of the variation that is stored in the tabulation in first memory module and data, with three memory module of synchronous transmission on second memory module of data from server on the above-mentioned terminal.
CN200910037896XA 2009-03-13 2009-03-13 System for data synchronization between server and terminal on the basis of Linux and synchronization method thereof Expired - Fee Related CN101505300B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200910037896XA CN101505300B (en) 2009-03-13 2009-03-13 System for data synchronization between server and terminal on the basis of Linux and synchronization method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200910037896XA CN101505300B (en) 2009-03-13 2009-03-13 System for data synchronization between server and terminal on the basis of Linux and synchronization method thereof

Publications (2)

Publication Number Publication Date
CN101505300A true CN101505300A (en) 2009-08-12
CN101505300B CN101505300B (en) 2013-05-22

Family

ID=40977367

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200910037896XA Expired - Fee Related CN101505300B (en) 2009-03-13 2009-03-13 System for data synchronization between server and terminal on the basis of Linux and synchronization method thereof

Country Status (1)

Country Link
CN (1) CN101505300B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101969636A (en) * 2009-12-31 2011-02-09 优视科技有限公司 Bookmark management system for mobile communication user terminal and application method thereof
CN101969449B (en) * 2009-12-31 2013-03-20 优视科技有限公司 Automatic filling system for mobile communication equipment terminal browser and application method thereof
CN103116585A (en) * 2011-11-16 2013-05-22 联想(北京)有限公司 Method for webpage synchronization and synchronization device
CN104980455A (en) * 2014-04-02 2015-10-14 腾讯科技(深圳)有限公司 Multi-terminal data synchronization method based on cloud storage, device and system thereof
CN103116585B (en) * 2011-11-16 2016-12-14 联想(北京)有限公司 A kind of method of synchronizing web pages and synchronizer
CN106559429A (en) * 2016-11-28 2017-04-05 北京铭铭鑫软件有限公司 An a kind of key based on linux system is changed planes method
CN107861995A (en) * 2017-10-18 2018-03-30 福建中金在线信息科技有限公司 Linux server code real-time synchronization method and device
CN112612413A (en) * 2020-12-04 2021-04-06 海光信息技术股份有限公司 Version management file caching method, device and system and related equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9549025B2 (en) * 2006-05-09 2017-01-17 International Business Machines Corporation Protocol optimization for client and server synchronization
CN101344852A (en) * 2008-09-02 2009-01-14 华为技术有限公司 Method, device and system for allocating WINDOWS enterprise edition operating system

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101969636A (en) * 2009-12-31 2011-02-09 优视科技有限公司 Bookmark management system for mobile communication user terminal and application method thereof
CN101969449B (en) * 2009-12-31 2013-03-20 优视科技有限公司 Automatic filling system for mobile communication equipment terminal browser and application method thereof
CN101969636B (en) * 2009-12-31 2013-10-30 优视科技有限公司 Bookmark management system for mobile communication user terminal and application method thereof
CN103116585A (en) * 2011-11-16 2013-05-22 联想(北京)有限公司 Method for webpage synchronization and synchronization device
CN103116585B (en) * 2011-11-16 2016-12-14 联想(北京)有限公司 A kind of method of synchronizing web pages and synchronizer
CN104980455A (en) * 2014-04-02 2015-10-14 腾讯科技(深圳)有限公司 Multi-terminal data synchronization method based on cloud storage, device and system thereof
CN104980455B (en) * 2014-04-02 2019-02-05 腾讯科技(深圳)有限公司 A kind of multiple terminals method of data synchronization based on cloud storage, device and system
CN106559429A (en) * 2016-11-28 2017-04-05 北京铭铭鑫软件有限公司 An a kind of key based on linux system is changed planes method
CN107861995A (en) * 2017-10-18 2018-03-30 福建中金在线信息科技有限公司 Linux server code real-time synchronization method and device
CN112612413A (en) * 2020-12-04 2021-04-06 海光信息技术股份有限公司 Version management file caching method, device and system and related equipment

Also Published As

Publication number Publication date
CN101505300B (en) 2013-05-22

Similar Documents

Publication Publication Date Title
CN101505300B (en) System for data synchronization between server and terminal on the basis of Linux and synchronization method thereof
CN103108262B (en) The method of optical network unit configuration file upgrading in GPON system
US20150215400A1 (en) File Upload Method And System
CN104080020A (en) Method and device for automatically issuing ONU device configuration
CN104025552A (en) Synchronization of traffic multiplexing in link aggregation
CN101039310B (en) Link sharing service apparatus and communication method thereof
JP2016502370A (en) Method and apparatus for matching flow tables and switch
WO2012083643A1 (en) Method and system for upgrading software versions of network elements with distributed centralized scheduling
CN101917439A (en) Data transmission method and equipment
CN101951325A (en) Network terminal configuration system based on automatic discovery and configuration method thereof
CN106412064A (en) Remote upgrade method of power utilization information acquisition terminal
CN102457391B (en) Equipment unified management method for Ethernet passive optical network and Ethernet over coax (EPON+EoC) two-way cable access network
WO2013185713A2 (en) Industrial control system and management device
WO2013170818A2 (en) Error code conversion method and system, pppoe server and mobile terminal
CN108616455A (en) A kind of route synchronization method of single machine pile system
WO2004105316A1 (en) Method and device for configuring data in communication device
CN110401651A (en) A kind of distributed type assemblies node monitoring method, apparatus and system
CN103209185B (en) A kind of transmitting message at optical interface and device
CN102546669B (en) Data transmission method and device
CN102437966A (en) Layer-3 switching system and method based on layer-2 DHCP (Dynamic Host Configuration Protocol) SNOOPING
CN202334600U (en) Cloud storage accelerator and cloud storage system
CN102868557B (en) Method for realizing configuration synchronization between network manager and xPON (x-passive optical network) device
CN115549983B (en) Safety authentication device and method for IPv6 network transmission equipment based on time synchronization
CN101335610B (en) ARP synchronization method in high-side Ethernet network switch
CN114006910B (en) Information synchronization method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
ASS Succession or assignment of patent right

Owner name: YOUNI BANKE (BEIJING) TECHNOLOGY CO., LTD.

Free format text: FORMER OWNER: ZHANG HAO

Effective date: 20130902

C41 Transfer of patent application or patent right or utility model
COR Change of bibliographic data

Free format text: CORRECT: ADDRESS; FROM: 467000 PINGDINGSHAN, HENAN PROVINCE TO: 100028 CHAOYANG, BEIJING

TR01 Transfer of patent right

Effective date of registration: 20130902

Address after: 100028 Beijing city Chaoyang District Taiyanggong Road No. 12 building Guancheng A block 10 layer

Patentee after: Yuu Niebank (Beijing) Technology Co., Ltd.

Address before: 467000, No. 3, building 3, building 6, South Road, 4 East Road, Weidong District, Pingdingshan, Henan

Patentee before: Zhang Hao

CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20130522

Termination date: 20200313

CF01 Termination of patent right due to non-payment of annual fee