CN115277673B - Method for distributing files in batches by virtue of verifiable differences - Google Patents

Method for distributing files in batches by virtue of verifiable differences Download PDF

Info

Publication number
CN115277673B
CN115277673B CN202210843406.0A CN202210843406A CN115277673B CN 115277673 B CN115277673 B CN 115277673B CN 202210843406 A CN202210843406 A CN 202210843406A CN 115277673 B CN115277673 B CN 115277673B
Authority
CN
China
Prior art keywords
client
file
server
files
file list
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
CN202210843406.0A
Other languages
Chinese (zh)
Other versions
CN115277673A (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.)
Casco Signal Ltd
Original Assignee
Casco Signal 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 Casco Signal Ltd filed Critical Casco Signal Ltd
Priority to CN202210843406.0A priority Critical patent/CN115277673B/en
Publication of CN115277673A publication Critical patent/CN115277673A/en
Application granted granted Critical
Publication of CN115277673B publication Critical patent/CN115277673B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/004Arrangements for detecting or preventing errors in the information received by using forward error control
    • H04L1/0056Systems characterized by the type of code used
    • H04L1/0061Error detection codes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/04Protocols for data compression, e.g. ROHC

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method for verifying difference batch distribution files, which is characterized in that a control end synchronously controls a client and a server to realize batch distribution of the difference files, and specifically comprises the following steps: comparing the differences of the files, and identifying whether the file list of the client and the file list of the server have differences or not; the method comprises the steps of replacing files in batches, compressing and transmitting server-side differential files to a client after recognizing that the client and a server-side file list are different, and replacing files in a designated path of the client; and backing up the file, compressing and transmitting the file of the client to the server, and backing up the file to the server. The invention can compare, replace and backup the large batch files of the multi-node terminal, effectively reduce the consumption of system resources and improve the rapidness and the integrity of batch file transmission.

Description

Method for distributing files in batches by virtue of verifiable differences
Technical Field
The invention relates to the field of verification and distribution of data files, in particular to a method for distributing files in batches by using verifiable differences.
Background
The existing application software has huge modules and increasingly customized requirements, a large amount of configuration data files are needed for supporting and using the software, the configuration data files of various software are huge in quantity and complex in association relation, the range of modification files is wide during upgrading and replacement, and online replacement time is compact and tasks are heavy.
For a long time, replacing and backing up key data files mainly depends on an operation mode of manually copying the files; the operation efficiency and the finishing quality cannot be guaranteed; when the system equipment fails and the software configuration data file needs to be recovered, some tools are needed to help system maintenance personnel recover the data in time, so that the normal operation of the equipment is ensured.
Based on the above problems, a control method capable of automatically checking file differences and realizing batch distribution of data files is needed.
Disclosure of Invention
The invention aims to provide a method for distributing files in batches by checking differences, which realizes the difference comparison, batch replacement and backup of key data during software upgrading and replacement.
In order to achieve the above purpose, the present invention provides a method for verifying difference batch distribution of files, which synchronously controls a client and a server through a control terminal, and realizes batch distribution of difference files, and specifically includes: comparing the differences of the files, and identifying whether the file list of the client and the file list of the server have differences or not; the method comprises the steps of replacing files in batches, compressing and transmitting server-side differential files to a client after recognizing that the client and a server-side file list are different, and replacing files in a designated path of the client; and backing up the file, compressing and transmitting the file of the client to the server, and backing up the file to the server.
The control end, a plurality of clients and the server end form a local area network: the control end is respectively connected with each client and each server through a local area network, and the server is connected with each client through the local area network; the control terminal can display the file difference comparison, batch distribution and backup conditions under the corresponding catalogues of the client terminal and the server terminal in real time.
Specifically, the control end sends a file operation control instruction to a designated client and/or a server, the client and/or the server feeds back an operation result to the control end after finishing file operation, and the control end performs synchronous control according to the feedback result.
Before the difference comparison, batch replacement and backup of the files are carried out, the following steps are carried out: according to the client selected by the user, the control end acquires a file list under a specified path of a specified client; the control end obtains a file list under a specified path of the server end.
Further, the step of obtaining, by the control end, the file list under the specified path of the specified client according to the client selected by the user specifically includes the following steps: the control end sends a file list acquisition instruction to the appointed client; the client judges whether a file path exists or not: if yes, the client feeds back a file list under the appointed path to the control end; if not, ending.
Further, the step of the control end obtaining the file list under the specified path of the server end specifically includes the following steps: the control end sends an instruction for acquiring a file list to the server; the server side judges whether a file path exists or not: if yes, the server feeds back a file list under the appointed path to the control end; if not, ending.
The difference comparison of the files comprises the following steps: the control end compares the obtained file list under the client specified path with the file list under the server specified path; and displaying a comparison result of the file list under the specified path of the client and the file list under the specified path of the server on a control terminal interface.
The batch replacement of the file comprises the following steps: the control end compares the obtained file list under the client specified path with the file list under the server specified path; judging whether the names and the sizes of the file list under the specified path of the client and the file list under the specified path of the server are the same; if the file states are the same, setting the file states under the appointed path of the client as reserved; if the difference files are different, the difference files under the appointed path of the client are replaced in batches.
Further, the batch replacement of the files in the specified path of the client specifically includes: the control end sends a differential file compressing and packaging instruction of the server to the server, and the server compresses and packages differential files which are different from the differential files in the appointed path of the client to form a first file compressing package and transmits the first file compressing package to the appointed path of the client; and the client receives the first file compression packet, decompresses the first file compression packet and then replaces the corresponding file in the appointed path of the client.
The file backup comprises the following steps: the control end sends an instruction for compressing and packaging all files of the client to the client, and the client compresses and packages all files under a specified path to form a second file compression package and transmits the second file compression package to the server under the specified path; and the server receives the second file compression packet transmitted by the client and decompresses and backs up the second file compression packet.
Specifically, a CRC-32 checking algorithm is adopted to compare a file list under a specified path of a client with a file list under a specified path of a server, so that the method has a safety checking function.
Specifically, the ZIP algorithm is adopted to compress and pack the file.
Specifically, the control terminal may operate a plurality of clients simultaneously.
Compared with the prior art, the invention has the following beneficial effects:
1. the invention adopts CRC-32 checking algorithm to compare files, has the function of safety checking, and realizes the function of safe and reliable data file replacement and backup.
2. According to the invention, the ZIP algorithm is adopted to compress and transmit the files, so that the consumption of system resources is reduced, and the rapidness and the integrity of batch file transmission are improved.
3. The invention can realize the comparison, replacement and backup operation of a large number of files for the multi-node terminal, can save a large number of manpower and material resources, has strong practicability and wide application range, and is easy to popularize.
Drawings
FIG. 1 is a schematic diagram of the connection of software functional modules according to the present invention;
FIG. 2 is a schematic diagram of a software functional module structure according to the present invention;
FIG. 3 is a data flow chart of the file comparison operation module of the present invention;
FIG. 4 is a data flow chart of the file replacement operation module according to the present invention;
FIG. 5 is a data flow diagram of a file backup operation module according to the present invention.
Detailed Description
The technical content, constructional features, achieved objects and effects of the present invention will be described in detail through preferred embodiments with reference to the accompanying drawings.
It should be noted that, the drawings are in very simplified form and all use non-precise proportions, which are only used for the purpose of conveniently and clearly assisting in describing the embodiments of the present invention, and are not intended to limit the implementation conditions of the present invention, so that the present invention has no technical significance, and any modification of structure, change of proportion or adjustment of size, without affecting the efficacy and achievement of the present invention, should still fall within the scope covered by the technical content disclosed by the present invention.
It is noted that in the present invention, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.
The invention provides a method for distributing files in batches by a verifiable difference, which adopts a client/server (C/S) mode, as shown in figure 1, a control end, a plurality of clients and a server are established into a local network, wherein the control end is respectively connected with each client and each server through the local network, so that synchronous control of each client and each server is realized, and the conditions of comparison, batch distribution and backup of difference data files under the corresponding directory of each client and the server are displayed in real time; the server is connected with each client through a local area network; clients may define multiple users, each client independent of the other.
Specifically, as shown in fig. 2, the control end realizes the deployment of the control end program through the control PC, the client realizes the deployment of the client program through a plurality of client PCs and a plurality of client servers, and the server realizes the deployment of the server program through the file server. The client and the server support multi-platform operation such as Windows, linux.
Specifically, the control end sends a file operation control instruction to the client and/or the server, and the client and/or the server immediately feeds back an operation result to the control end after finishing file operation; the control end carries out synchronous control judgment according to the feedback result, further transmits a file operation control instruction to the server end and/or the client end, and the server end and/or the client end carries out corresponding file operation according to the file operation control instruction.
The method adopts CRC-32 algorithm to compare data files, identifies the difference between the files of the client and the server, and then adopts ZIP algorithm to compress the files for transmission and backup, wherein CRC (Cyclic Redundancy Check, cyclic redundancy check code) is an error control method for comparing transmission data; the ZIP algorithm is a file format for data compression and document storage.
The method comprises the operations of comparing, replacing and backing up a large number of files, and specifically comprises the following steps:
s1, identifying the file difference between a client and a server, as shown in FIG. 3, specifically comprises the following steps:
s101, according to a client selected by a user, a control end sends a command for acquiring a file list to a specified client, requests to acquire the file list under a specified path of the client, and then executes step S102;
s102, the client receives an instruction for acquiring a file list, judges whether the file path exists, if yes, the client feeds back the file list under the appointed path to the control end and executes the step S103, if no, the step S107 is executed;
s103, the control end sends a command for acquiring a file list to the server end, the command is required to acquire the file list under the appointed path of the server end, and then the step S104 is executed;
s104, the server receives the instruction of acquiring the file list, judges whether the file path exists, if yes, the server feeds back the file list under the appointed path to the control end and executes the step S105, if no, the step S107 is executed;
s105, the control end compares the obtained file list under the client specified path with the file list under the server specified path through a CRC-32 algorithm;
s106, displaying a comparison result of the file list under the client specified path and the file list under the server specified path on a control end interface;
s107, ending.
S2, replacing the difference file to a client specified path, as shown in FIG. 4, specifically including:
s201, according to a client selected by a user, a control end sends a command for acquiring a file list to a specified client, requests to acquire the file list under a specified path of the client, and then executes step S202;
s202, the client receives an instruction for acquiring a file list, judges whether the file path exists, if yes, the client feeds back the file list under the appointed path to the control end and executes the step S203, if no, the step S209 is executed;
s203, the control end sends a command for acquiring a file list to the server end, requests to acquire the file list under the appointed path of the server end, and then executes step S204;
s204, the server receives the instruction of acquiring the file list, judges whether the file path exists, if yes, the server feeds back the file list under the appointed path to the control end and executes the step S205, if no, the step S209 is executed;
s205, the control end compares the obtained file list under the client specified path with the file list under the server specified path through a CRC-32 algorithm, and then executes step S206;
s206, the control end judges whether the names and the sizes of the file list under the client specified path are the same as those of the file list under the server specified path, if so, the file state of the client is set to be reserved, step S209 is executed, and if not, step S207 is executed;
s207, the control end sends a command for compressing and packaging the differential file of the server to the server, the server receives the command, compresses and packages the differential file which is different from the differential file which is present in the client in the specified path of the server through a ZIP algorithm, and forms a first file compression packet to be transmitted to the client in the specified path;
s208, the client receives the first file compression packet transmitted by the server, decompresses the first file compression packet, and then replaces the corresponding file in the appointed path of the client;
s209, ending.
S3, backing up the client file to the server, as shown in FIG. 5, specifically including:
s301, according to a client selected by a user, a control end sends a command for acquiring a file list to a specified client, requests to acquire the file list under a specified path of the client, and then executes step S302;
s302, the client receives an instruction for acquiring a file list, judges whether the file path exists, if yes, the client feeds back the file list under the appointed path to the control end and executes step S303, if no, step S307 is executed;
s303, the control end sends a command for acquiring a file list to the server end, acquires the file list under the appointed path of the server end, and then executes step S304;
s304, the server receives the instruction of acquiring the file list, judges whether the file path exists, if yes, the server feeds back the file list under the appointed path to the control end and executes the step S305, if no, the step S307 is executed;
s305, the control end sends an instruction for compressing and packaging all files of the client to the client, the client receives the instruction, compresses and packages all files under a specified path through a ZIP algorithm to form a second file compressed package, transmits the second file compressed package to the server under the specified path, and then executes step S306;
s306, the server receives a second file compression packet transmitted by the client and decompresses and backs up the second file compression packet;
s307, ending.
Specifically, the control end may operate multiple clients simultaneously, and multiple users may be defined.
In summary, compared with the prior art, the method for distributing files in batches with the verifiable difference can realize the distribution of files in batches while verifying the file difference, can compare, replace and back up the files in batches of the multi-node terminal, effectively reduces the consumption of system resources, and improves the rapidness and the completeness of the transmission of the files in batches.
While the present invention has been described in detail through the foregoing description of the preferred embodiment, it should be understood that the foregoing description is not to be considered as limiting the invention. Many modifications and substitutions of the present invention will become apparent to those of ordinary skill in the art upon reading the foregoing. Accordingly, the scope of the invention should be limited only by the attached claims.

Claims (6)

1. The method for distributing files in batches by using the verifiable difference is characterized in that a control end synchronously controls a client and a server to realize the distribution of the files in batches, and the method specifically comprises the following steps:
comparing the differences of the files, and identifying whether the file list of the client and the file list of the server have differences or not;
the method comprises the steps of replacing files in batches, compressing and transmitting server-side differential files to a client after recognizing that the client and a server-side file list are different, and replacing files in a designated path of the client;
file backup, namely compressing and transmitting the client files to a server, and backing up the client files to the server;
the control end, a plurality of clients and the server end form a local area network:
the control end is respectively connected with each client and each server through a local area network, and the server is connected with each client through the local area network;
the control terminal can display the file difference comparison, batch distribution and backup conditions under the corresponding catalogues of the client terminal and the server terminal in real time;
the control end sends a file operation control instruction to the appointed client end and/or the service end, the client end and/or the service end feeds back an operation result to the control end after finishing file operation, and the control end performs synchronous control according to the feedback result;
the difference comparison of the files comprises the following steps:
the control end compares the obtained file list under the client specified path with the file list under the server specified path;
displaying a comparison result of the file list under the specified path of the client and the file list under the specified path of the server on a control terminal interface;
the batch replacement of the file comprises the following steps:
the control end compares the obtained file list under the client specified path with the file list under the server specified path;
judging whether the names and the sizes of the file list under the specified path of the client and the file list under the specified path of the server are the same;
if the file states are the same, setting the file states under the appointed path of the client as reserved;
if the difference files are different, carrying out batch replacement on the difference files under the appointed path of the client;
the batch replacement of the files under the specified path of the client specifically comprises the following steps:
the control end sends a differential file compressing and packaging instruction of the server to the server, and the server compresses and packages differential files which are different from the differential files in the appointed path of the client to form a first file compressing package and transmits the first file compressing package to the appointed path of the client;
the client receives the first file compression packet, decompresses the first file compression packet and then replaces the corresponding file in the appointed path of the client;
the CRC-32 checking algorithm is adopted to compare the file list under the specified path of the client with the file list under the specified path of the server, so that the method has a safety checking function;
the control end can operate a plurality of clients simultaneously.
2. The method for verifiable differential bulk distribution of files of claim 1, wherein prior to differential comparison, bulk replacement, backup of the files, the steps of:
according to the client selected by the user, the control end acquires a file list under a specified path of a specified client;
the control end obtains a file list under a specified path of the server end.
3. The method for distributing files in batches according to the verifiable difference of claim 2, wherein the control terminal obtains the file list under the specified path of the specified client terminal according to the client terminal selected by the user, and the method specifically comprises the following steps:
the control end sends a file list acquisition instruction to the appointed client;
the client judges whether a file path exists or not: if yes, the client feeds back a file list under the appointed path to the control end; if not, ending.
4. The method for distributing files in batches according to claim 2, wherein the control end obtains a file list under a specified path of the server end, and the method specifically comprises the following steps:
the control end sends an instruction for acquiring a file list to the server;
the server side judges whether a file path exists or not: if yes, the server feeds back a file list under the appointed path to the control end; if not, ending.
5. The method for verifiable differential bulk distribution of files of claim 2, wherein the file backup comprises the steps of:
the control end sends an instruction for compressing and packaging all files of the client to the client, and the client compresses and packages all files under a specified path to form a second file compression package and transmits the second file compression package to the server under the specified path;
and the server receives the second file compression packet transmitted by the client and decompresses and backs up the second file compression packet.
6. The method for verifiable differential bulk distribution of files of claim 1 or 5, wherein the files are packed in a compressed manner using a ZIP algorithm.
CN202210843406.0A 2022-07-18 2022-07-18 Method for distributing files in batches by virtue of verifiable differences Active CN115277673B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210843406.0A CN115277673B (en) 2022-07-18 2022-07-18 Method for distributing files in batches by virtue of verifiable differences

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210843406.0A CN115277673B (en) 2022-07-18 2022-07-18 Method for distributing files in batches by virtue of verifiable differences

Publications (2)

Publication Number Publication Date
CN115277673A CN115277673A (en) 2022-11-01
CN115277673B true CN115277673B (en) 2024-03-12

Family

ID=83767898

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210843406.0A Active CN115277673B (en) 2022-07-18 2022-07-18 Method for distributing files in batches by virtue of verifiable differences

Country Status (1)

Country Link
CN (1) CN115277673B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108874590A (en) * 2018-06-16 2018-11-23 武汉商启网络信息有限公司 A kind of system of cloud host automated back-up and recovery
CN109901952A (en) * 2019-03-06 2019-06-18 山东申启信息技术有限公司 A kind of data back up method, system and server
CN110297808A (en) * 2019-05-20 2019-10-01 平安科技(深圳)有限公司 File modification method, apparatus, computer equipment and the storage medium of container application
CN110532236A (en) * 2019-08-21 2019-12-03 广联达科技股份有限公司 Increment updating method, system and the medium of compressed file
CN110807011A (en) * 2019-09-11 2020-02-18 广州极汇信息科技有限公司 File synchronization method, electronic device, storage medium and system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5821186B2 (en) * 2010-07-07 2015-11-24 株式会社リコー Image information input system, image information input device, image information input method, image information input program, and recording medium
JP5723472B1 (en) * 2014-08-07 2015-05-27 廣幸 田中 Data link generation device, data link generation method, data link structure, and electronic file

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108874590A (en) * 2018-06-16 2018-11-23 武汉商启网络信息有限公司 A kind of system of cloud host automated back-up and recovery
CN109901952A (en) * 2019-03-06 2019-06-18 山东申启信息技术有限公司 A kind of data back up method, system and server
CN110297808A (en) * 2019-05-20 2019-10-01 平安科技(深圳)有限公司 File modification method, apparatus, computer equipment and the storage medium of container application
CN110532236A (en) * 2019-08-21 2019-12-03 广联达科技股份有限公司 Increment updating method, system and the medium of compressed file
CN110807011A (en) * 2019-09-11 2020-02-18 广州极汇信息科技有限公司 File synchronization method, electronic device, storage medium and system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
《云环境下文件同步研究与应用》;石鸿超;《信息科技》(第2018年第12期);全文 *
Sanghyun Yoo ; Yonjoong Ryou ; Kyung Tae Kim ; Hee Yong Youn.《Block Replacement Based on Access Locality with Solid State Drive》.《2015 5th International Conference on IT Convergence and Security (ICITCS)》.2015,全文. *

Also Published As

Publication number Publication date
CN115277673A (en) 2022-11-01

Similar Documents

Publication Publication Date Title
US6108697A (en) One-to-many disk imaging transfer over a network
CN101409614B (en) Data synchronization method, system and equipment
EP1548595B1 (en) Method of monitoring status information of remote storage and storage subsystem
CN102546730B (en) Data processing method, Apparatus and system
EP2492808A1 (en) System and method for extending business systems to a mobile workforce
CN101640692A (en) Method and system for file download service
CN104539690B (en) A kind of Server remote method of data synchronization detected based on feedback mechanism and MD5 codes
US20160253245A1 (en) System, method and program product for backing up data
CA2398838A1 (en) Method and system for updating an archive of a computer file
CN109413496B (en) Fault self-detection method and system
CN104301382A (en) Cloud data backup and recovery method
CN101094026A (en) Method for synchronizing, transmitting mass data, and inputting mass data to database
AU2001241956A1 (en) Method and system for updating an archive of a computer file
CN101442688A (en) Method and system for updating intelligent network platform, controller and intelligent network platform equipment
CN105554114A (en) Data synchronization method and data synchronization firmware platform
CN108347095B (en) Simulation test method and system for background monitoring system of transformer substation
US20090307235A1 (en) Data copy system and method for multi-platform disaster recovery
CN107526657A (en) A kind of Online Database Backup method and system
CN108228465A (en) A kind of Software function test method and device
CN115277673B (en) Method for distributing files in batches by virtue of verifiable differences
CN102571777A (en) Data acquisition device and data acquisition method
CN105677885A (en) Receiving and sending device and method and synchronizing system for achieving shipping industry data synchronization
CN106033377B (en) Data disaster tolerance method and Disaster Recovery Service
CN107168748A (en) A kind of method that multinomial upgrading task is realized by a upgrade file bag
CN111767166A (en) Data backup 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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40074117

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant