CN110069462A - Batch image file consistency checking method and system between a kind of different server - Google Patents

Batch image file consistency checking method and system between a kind of different server Download PDF

Info

Publication number
CN110069462A
CN110069462A CN201910287342.9A CN201910287342A CN110069462A CN 110069462 A CN110069462 A CN 110069462A CN 201910287342 A CN201910287342 A CN 201910287342A CN 110069462 A CN110069462 A CN 110069462A
Authority
CN
China
Prior art keywords
consistency
image file
content
file
detection
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
CN201910287342.9A
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.)
Suzhou Wave Intelligent Technology Co Ltd
Original Assignee
Suzhou Wave Intelligent 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 Suzhou Wave Intelligent Technology Co Ltd filed Critical Suzhou Wave Intelligent Technology Co Ltd
Priority to CN201910287342.9A priority Critical patent/CN110069462A/en
Publication of CN110069462A publication Critical patent/CN110069462A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/178Techniques for file synchronisation in file systems
    • 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/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes

Abstract

The present invention relates to server technology field, batch image file consistency checking method and system between a kind of different server are provided, method includes: calling and runs pre-set consistency verification script;The file destination content in consistency detection object and the source file destination content in comparison basis object are read in control respectively;After the completion of reading, control will be compared from the file destination content read in the consistency detection object with the source file destination content in the comparison basis object, judge whether the two is consistent;When consistent, determine that the verification of image file consistency passes through;When there is inconsistency, determine that the verification of image file consistency does not pass through, to realize the consistency detection of batch image file between the different servers, ensure the integrality and accuracy of rom image file used, improve production efficiency and product quality.

Description

Batch image file consistency checking method and system between a kind of different server
Technical field
The invention belongs to batch image file consistency between server technology field more particularly to a kind of different server Checking method and system.
Background technique
Real-time synchronization is carried out to server using inotify and rsync by sersync, wherein inotify is for monitoring File system event, rsync are now widely used synchronized algorithms, its advantage is that only the part different to file is grasped Make, so its advantage, which is substantially exceeded, carries out mirror image synchronization using the mode of mounting file system.
But this technology is there are certain failure probability, when image file consistency is there are when problem, needing to do over again again, Production efficiency and product quality are reduced, such as K1 workshop occurred as soon as once because BIOS ROM file mistake causes batch to be done over again Problem.
Summary of the invention
For the defects in the prior art, the present invention provides batch image file consistency between a kind of different server Checking method, it is intended to solve the problems, such as in the prior art when image file consistency there are when, need to do over again again, reduce production effect The problem of rate and product quality.
The technical solution provided by the present invention is: batch image file consistency verification side between a kind of different server Method, the method includes the following steps:
It calls and runs pre-set consistency verification script;
The file destination content in consistency detection object and the source target in comparison basis object are read in control respectively File content;
After the completion of reading, control is by the file destination content read from the consistency detection object compared with described Source file destination content in fundamental objects is compared, and judges whether the two is consistent;
When judgement is out of, file destination content and the comparison basis object that read in the consistency detection object When source file destination content is consistent, determine that the verification of image file consistency passes through;
Source in the file destination content and the comparison basis object for determining to read in the consistency detection object When file destination content is inconsistent, determine that the verification of image file consistency does not pass through.
As an improvement scheme, the method also includes following step:
Consistency verification script is preset, the consistency verification script includes to compare to execute order, and the comparison is held Line command includes that partial image file content comparison order and whole image file contents are compared and ordered.
As an improvement scheme, it is described when read after the completion of, control will be read from the consistency detection object File destination content the step of being compared with the source file destination content in the comparison basis object specifically include it is following Step:
Judge current consistency detection type whether be whole image files consistency detection;
When determining consistency detection of the type of current consistency detection for whole image files, then calls and execute institute It states whole image file contents and compares order;
When determining consistency detection of the type of current consistency detection for partial image file, then calls and execute institute It states partial image file content and compares order.
As an improvement scheme, when determine image file consistency verification pass through when, detection display screen on utilize Display is marked in green;
When determining that the verification of image file consistency does not pass through, display is marked using red on detection display screen.
Another object of the present invention is to provide batch image file consistency check system between a kind of different server, The system comprises:
Script calling module, for calling pre-set consistency verification script;
Script running module checks script for running the pre-set consistency that the script calling module calls;
File content read module, for controlling the file destination content and ratio that are read in consistency detection object respectively Compared with the source file destination content in fundamental objects;
Contrast judgement module, for controlling the target that will be read from the consistency detection object after the completion of reading File content is compared with the source file destination content in the comparison basis object, judges whether the two is consistent;
First determination module, for when determine the file destination content that is read from the consistency detection object with it is described When source file destination content in comparison basis object is consistent, determine that the verification of image file consistency passes through;
Second determination module, for when the file destination content and the ratio for determining to read in the consistency detection object When inconsistent compared with source file destination content in fundamental objects, determine that the verification of image file consistency does not pass through.
As an improvement scheme, the system also includes:
Script presets module, for presetting consistency verification script, consistency verification script include than Compared with order is executed, the relatively execution order compares order and whole image file contents comprising partial image file content and compares Order.
As an improvement scheme, the contrast judgement module specifically includes:
Judgment module, for judge current consistency detection type whether be whole image files consistency detection;
First compares order operation module, for being the one of whole image files when the type for determining current consistency detection When the detection of cause property, then calls and execute whole image file content comparison orders;
Second compares order operation module, for being the one of partial image file when the type for determining current consistency detection When the detection of cause property, then calls and execute the partial image file content comparison order.
As an improvement scheme, the system also includes:
First color mark module, for when determine image file consistency verification pass through when, detection display screen on benefit Display is marked with green;
Second color mark module is used for when determining that the verification of image file consistency does not pass through, on detection display screen Display is marked using red.
In embodiments of the present invention, it calls and runs pre-set consistency verification script;Control is read consistent respectively File destination content in property test object and the source file destination content in comparison basis object;After the completion of reading, control System will be from the source file destination in the file destination content that reads in the consistency detection object and the comparison basis object Content is compared, and judges whether the two is consistent;When consistent, determine that the verification of image file consistency passes through;When there is inconsistency, Determine that the verification of image file consistency does not pass through, to realize the consistency inspection of batch image file between the different servers It surveys, ensures the integrality and accuracy of rom image file used, improve production efficiency and product quality.
Detailed description of the invention
It, below will be to specific in order to illustrate more clearly of the specific embodiment of the invention or technical solution in the prior art Embodiment or attached drawing needed to be used in the description of the prior art are briefly described.In all the appended drawings, similar element Or part is generally identified by similar appended drawing reference.In attached drawing, each element or part might not be drawn according to actual ratio.
Fig. 1 is the implementation process of batch image file consistency checking method between different server provided by the invention Figure;
Fig. 2 is the structural block diagram of batch image file consistency check system between different server provided by the invention.
Specific embodiment
It is described in detail below in conjunction with embodiment of the attached drawing to technical solution of the present invention.Following embodiment is only used for Clearly illustrate of the invention, technical solution, therefore be only used as example, and cannot be used as a limitation and limit protection model of the invention It encloses.
Fig. 1 is the implementation process of batch image file consistency checking method between different server provided by the invention Figure, specifically include the following steps:
In step s101, it calls and runs pre-set consistency verification script.
In step s 102, the file destination content and comparison basis pair in consistency detection object are read in control respectively As interior source file destination content.
In step s 103, after the completion of reading, the file destination that will be read from the consistency detection object is controlled Content is compared with the source file destination content in the comparison basis object, judges whether the two is consistent, is to execute step Rapid S104, it is no to then follow the steps S105.
In step S104, when the file destination content that judgement is read from the consistency detection object is compared with described When source file destination content in fundamental objects is consistent, determine that the verification of image file consistency passes through.
In step s105, when determining the file destination content read in the consistency detection object base compared with described When source file destination content in plinth object is inconsistent, determine that the verification of image file consistency does not pass through.
In embodiments of the present invention, following step is also needed to be implemented before executing above-mentioned steps S101:
Consistency verification script m05_k1.sh is preset, the consistency verification script includes to compare to execute order, institute It states to compare to execute to order to compare to order comprising partial image file content and compares order with whole image file contents, wherein k1 is Consistency detection object, m05 are basic comparison other.
Wherein, consistency verification script is shell script, is based under Linux system, that is, with all kinds of orders It is placed in advance in into a file, the convenient program file disposably executed, mainly that is that administrator is facilitated to set It sets or management.
In embodiments of the present invention, described after the completion of reading, control will be read from the consistency detection object The step of file destination content is compared with the source file destination content in the comparison basis object specifically includes following steps It is rapid:
(1) judge current consistency detection type whether be whole image files consistency detection;
(2) it when determining consistency detection of the type of current consistency detection for whole image files, then calls and holds Row whole image file contents compare order;
(3) it when determining consistency detection of the type of current consistency detection for partial image file, then calls and holds The row partial image file content compares order.
It needs to classify to the process for executing consistency detection, judgement is the detection to partial image file MD5 code Or the detection of whole image files, in case brush mistake ROM, causes adverse consequences.
In embodiments of the present invention, in comparison process, comparison result is understood to be intuitive, can be arranged as follows:
When determining that the verification of image file consistency passes through, display is marked using green on detection display screen;
When determining that the verification of image file consistency does not pass through, display is marked using red on detection display screen.
Therefore, when there is the anomalous content of red-label, need to check the mirror in confirmation consistency detection object in time Whether picture file is abnormal, and timely updates, in case brush mistake ROM causes adverse consequences, naturally it is also possible to other modes are used, herein It repeats no more.
Fig. 2 shows the structural frames of batch image file consistency check system between different server provided by the invention Figure, for ease of description, only gives part related to the embodiment of the present invention in figure.
Batch image file consistency check system includes: between different server
Script calling module 11, for calling pre-set consistency verification script;
Script running module 12 checks foot for running the pre-set consistency that the script calling module calls This;
File content read module 13, for control respectively read consistency detection object in file destination content and Source file destination content in comparison basis object;
Contrast judgement module 14, for controlling the mesh that will be read from the consistency detection object after the completion of reading Mark file content is compared with the source file destination content in the comparison basis object, judges whether the two is consistent;
First determination module 15, for when the file destination content and institute for determining to read from the consistency detection object State source file destination content in comparison basis object it is consistent when, determine that the verification of image file consistency passes through;
Second determination module 16, for when the file destination content for determining to read in the consistency detection object with it is described When source file destination content in comparison basis object is inconsistent, determine that the verification of image file consistency does not pass through.
In embodiment, the system also includes:
Script presets module 17, and for presetting consistency verification script, the consistency verification script includes Compare and execute order, described relatively execute is ordered comprising partial image file content comparison order and whole image file content ratio To order.
In embodiments of the present invention, the contrast judgement module 14 specifically includes:
Judgment module 18, for judge current consistency detection type whether be whole image files consistency inspection It surveys;
First compares order operation module 19, for being whole image files when the type for determining current consistency detection When consistency detection, then calls and execute whole image file content comparison orders;
Second compares order operation module 20, for being partial image file when the type for determining current consistency detection When consistency detection, then calls and execute the partial image file content comparison order.
In embodiments of the present invention, the system also includes:
First color mark module 21, for when determine image file consistency verification pass through when, detection display screen on Display is marked using green;
Second color mark module 22, for detecting display screen when determining that the verification of image file consistency does not pass through It is upper that display is marked using red.
Wherein, the function of above-mentioned modules is as recorded in above method embodiment, and details are not described herein.
In embodiments of the present invention, it calls and runs pre-set consistency verification script;Control is read consistent respectively File destination content in property test object and the source file destination content in comparison basis object;After the completion of reading, control System will be from the source file destination in the file destination content that reads in the consistency detection object and the comparison basis object Content is compared, and judges whether the two is consistent;When consistent, determine that the verification of image file consistency passes through;When there is inconsistency, Determine that the verification of image file consistency does not pass through, to realize the consistency inspection of batch image file between the different servers It surveys, ensures the integrality and accuracy of rom image file used, improve production efficiency and product quality.
The above embodiments are only used to illustrate the technical solution of the present invention., rather than its limitations;Although referring to aforementioned each reality Applying example, invention is explained in detail, those skilled in the art should understand that: it still can be to aforementioned each Technical solution documented by embodiment is modified, or equivalent substitution of some or all of the technical features;And These are modified or replaceed, the range for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution, It should all cover within the scope of the claims and the description of the invention.

Claims (8)

1. batch image file consistency checking method between a kind of different server, which is characterized in that the method includes under State step:
It calls and runs pre-set consistency verification script;
The file destination content in consistency detection object and the source file destination in comparison basis object are read in control respectively Content;
After the completion of reading, the file destination content and the comparison basis that will be read from the consistency detection object are controlled Source file destination content in object is compared, and judges whether the two is consistent;
When determining from the source mesh in the file destination content that is read in the consistency detection object and the comparison basis object When mark file content is consistent, determine that the verification of image file consistency passes through;
Source target in the file destination content and the comparison basis object for determining to read in the consistency detection object When file content is inconsistent, determine that the verification of image file consistency does not pass through.
2. batch image file consistency checking method between different server according to claim 1, which is characterized in that The method also includes following step:
Consistency verification script is preset, the consistency verification script includes to compare to execute order, described relatively to execute life It enables comparing to order comprising partial image file content and compares order with whole image file contents.
3. batch image file consistency checking method between different server according to claim 2, which is characterized in that File destination content and the comparison basis that after the completion of reading, control will be read from the consistency detection object The step of source file destination content in object is compared specifically include the following steps:
Judge current consistency detection type whether be whole image files consistency detection;
When determining consistency detection of the type of current consistency detection for whole image files, then calls and execute described complete Portion's image file content compares order;
When determining consistency detection of the type of current consistency detection for partial image file, then calls and execute the portion Image file content is divided to compare order.
4. batch image file consistency checking method between different server according to claim 3, which is characterized in that When determining that the verification of image file consistency passes through, display is marked using green on detection display screen;
When determining that the verification of image file consistency does not pass through, display is marked using red on detection display screen.
5. batch image file consistency check system between a kind of different server, which is characterized in that the system comprises:
Script calling module, for calling pre-set consistency verification script;
Script running module checks script for running the pre-set consistency that the script calling module calls;
File content read module, for controlling the file destination content in reading consistency detection object respectively and comparing base Source file destination content in plinth object;
Contrast judgement module, for controlling the file destination that will be read from the consistency detection object after the completion of reading Content is compared with the source file destination content in the comparison basis object, judges whether the two is consistent;
First determination module, the file destination content for reading from the consistency detection object when judgement is compared with described When source file destination content in fundamental objects is consistent, determine that the verification of image file consistency passes through;
Second determination module determines the file destination content read in the consistency detection object base compared with described for working as When source file destination content in plinth object is inconsistent, determine that the verification of image file consistency does not pass through.
6. batch image file consistency check system between different server according to claim 5, which is characterized in that The system also includes:
Script presets module, and for presetting consistency verification script, the consistency verification script includes to compare to hold Line command, the relatively execution order compare order and whole image file contents comprising partial image file content and compare life It enables.
7. batch image file consistency check system between different server according to claim 6, which is characterized in that The contrast judgement module specifically includes:
Judgment module, for judge current consistency detection type whether be whole image files consistency detection;
First compares order operation module, for being the consistency of whole image files when the type for determining current consistency detection When detection, then calls and execute whole image file content comparison orders;
Second compares order operation module, for being the consistency of partial image file when the type for determining current consistency detection When detection, then calls and execute the partial image file content comparison order.
8. batch image file consistency check system between different server according to claim 7, which is characterized in that The system also includes:
First color mark module, for being utilized on detection display screen green when determining that the verification of image file consistency passes through Display is marked in color;
Second color mark module, for being utilized on detection display screen when determining that the verification of image file consistency does not pass through Display is marked in red.
CN201910287342.9A 2019-04-11 2019-04-11 Batch image file consistency checking method and system between a kind of different server Pending CN110069462A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910287342.9A CN110069462A (en) 2019-04-11 2019-04-11 Batch image file consistency checking method and system between a kind of different server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910287342.9A CN110069462A (en) 2019-04-11 2019-04-11 Batch image file consistency checking method and system between a kind of different server

Publications (1)

Publication Number Publication Date
CN110069462A true CN110069462A (en) 2019-07-30

Family

ID=67367347

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910287342.9A Pending CN110069462A (en) 2019-04-11 2019-04-11 Batch image file consistency checking method and system between a kind of different server

Country Status (1)

Country Link
CN (1) CN110069462A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111414612A (en) * 2020-06-05 2020-07-14 腾讯科技(深圳)有限公司 Security protection method and device for operating system mirror image and electronic equipment
CN112612939A (en) * 2020-12-18 2021-04-06 山东中创软件工程股份有限公司 Crawler deployment method, system, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105447046A (en) * 2014-09-02 2016-03-30 阿里巴巴集团控股有限公司 Distributed system data consistency processing method, device and system
CN106972980A (en) * 2017-02-24 2017-07-21 山东中创软件商用中间件股份有限公司 The consistency verification method and device of a kind of application server cluster
US20170220627A1 (en) * 2016-02-01 2017-08-03 International Business Machines Corporation Verifying data consistency
CN108573016A (en) * 2017-12-25 2018-09-25 北京金山云网络技术有限公司 A kind of data consistent check method, apparatus, equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105447046A (en) * 2014-09-02 2016-03-30 阿里巴巴集团控股有限公司 Distributed system data consistency processing method, device and system
US20170220627A1 (en) * 2016-02-01 2017-08-03 International Business Machines Corporation Verifying data consistency
CN106972980A (en) * 2017-02-24 2017-07-21 山东中创软件商用中间件股份有限公司 The consistency verification method and device of a kind of application server cluster
CN108573016A (en) * 2017-12-25 2018-09-25 北京金山云网络技术有限公司 A kind of data consistent check method, apparatus, equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JUNJIE: "Shell脚本实现线上服务器之间对比文件是否一致", 《HTTPS://WWW.JB51.NET/ARTICLE/59060.HTM》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111414612A (en) * 2020-06-05 2020-07-14 腾讯科技(深圳)有限公司 Security protection method and device for operating system mirror image and electronic equipment
CN112612939A (en) * 2020-12-18 2021-04-06 山东中创软件工程股份有限公司 Crawler deployment method, system, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN108312456B (en) Injection molding machine product process quality monitoring system and monitoring method
US20190164270A1 (en) System and method for combined automatic and manual inspection
CN102479113B (en) Abnormal self-adapting processing method and system
CN110069462A (en) Batch image file consistency checking method and system between a kind of different server
CN104123219A (en) Method and device for testing software
WO2019137345A1 (en) Method and apparatus for establishing communication connection with tire pressure monitoring system, and electronic device
CN102789405A (en) Automated testing method and system for mainboard
CN114638779A (en) Textile quality inspection system, method and device, computer equipment and storage medium
CN110750272A (en) Data burning method for camera equipment, burning equipment and storage medium
CN113724240A (en) Refrigerator caster detection method, system and device based on visual identification
CN113626227A (en) Abnormal log information reporting method, intelligent terminal and storage medium
CN111898872A (en) Power grid fault diagnosis method based on micro-service architecture and storage medium
CN116309470A (en) Lamp bead plane fault monitoring method and device, computer equipment and storage medium
CN110489289A (en) A kind of method for testing hard disk and system
US20220349097A1 (en) Circular knitting machine for prompting knitting machine status instantaneously based on cloth surface status of fabric
CN108197025A (en) A kind of gauge pressure test system and gauge pressure test method
CN114462879A (en) Electronic equipment quality control method and device
WO2021243724A1 (en) Image processing method, electronic device, vehicle traveling data recorder, and server
CN103645977A (en) Automatic debugging system and method for electronic products
CN111736893A (en) Software package version verification method and related device
CN117313019B (en) Data anomaly detection method based on deep reinforcement learning
CN107797915B (en) Fault repairing method, device and system
CN114070809B (en) Data migration method, equipment and storage medium
CN110532151A (en) A kind of automatic operation method of monitoring instrument, device, equipment and storage medium
CN112685266B (en) Fault detection method, device, system, equipment and medium

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: 20190730