CN109542983A - A kind of method of data synchronization, device, equipment and readable storage medium storing program for executing - Google Patents

A kind of method of data synchronization, device, equipment and readable storage medium storing program for executing Download PDF

Info

Publication number
CN109542983A
CN109542983A CN201811463455.1A CN201811463455A CN109542983A CN 109542983 A CN109542983 A CN 109542983A CN 201811463455 A CN201811463455 A CN 201811463455A CN 109542983 A CN109542983 A CN 109542983A
Authority
CN
China
Prior art keywords
switchtec
pcie
data
link
database
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.)
Withdrawn
Application number
CN201811463455.1A
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.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information 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 Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201811463455.1A priority Critical patent/CN109542983A/en
Publication of CN109542983A publication Critical patent/CN109542983A/en
Withdrawn legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/1658Data re-synchronization of a redundant component, or initial sync of replacement, additional or spare unit
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2201/00Indexing scheme relating to error detection, to error correction, and to monitoring
    • G06F2201/80Database-specific techniques

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a kind of method of data synchronization, comprising: when receiving the message for updating target data, according to information updating target data, obtains more new data;Detect the end main PCIE Switchtec and whether normal from the link between the end PCIE Switchtec;If so, more new data to be synchronized to the database from the end PCIE Switchtec by link.In order to make two physical equipment resource-sharings in dual redundant physical equipment, when main PCIE Switchtec end more new data, more new data is synchronized to the database from the end PCIE Switchtec, so that the end main PCIE Switchtec keeps data consistent with from the end PCIE Switchtec.Data synchronization unit, equipment and readable storage medium storing program for executing disclosed by the invention, equally have above-mentioned technique effect.

Description

A kind of method of data synchronization, device, equipment and readable storage medium storing program for executing
Technical field
The present invention relates to field of computer technology, more specifically to a kind of method of data synchronization, device, equipment and Readable storage medium storing program for executing.
Background technique
In dual redundant physical equipment, a physical equipment is main equipment, and control chip therein is main PCIE Switchtec;Another physical equipment is from equipment, and control chip therein is from PCIE Switchtec.If main equipment It goes wrong, replaces main equipment to continue to run various businesses from equipment.That is, when two physical equipments are identical, it can So that business is not interrupted.
Conventionally, as may be interlaced from the working hour of equipment and main equipment, always stop at one end Before service is provided, the synchronous working of data is done.That is: the current equipment for supporting service is changed to by main equipment from equipment When, just the data on main equipment are synchronized to from equipment, the problem of two end datas are updated not in time will so occur, i.e., from equipment With the resource in main equipment can not timely sharing, to keep the data from equipment and main equipment inconsistent.Meanwhile it also will affect industry The normal operation of business.
Therefore, so that two physical equipments in dual redundant physical equipment is accomplished resource-sharing, keep the consistent of data Property, it is those skilled in the art's problem to be solved.
Summary of the invention
The purpose of the present invention is to provide a kind of method of data synchronization, device, equipment and readable storage medium storing program for executing, so that double superfluous Two physical equipments in remaining physical equipment accomplish resource-sharing, keep the consistency of data.
To achieve the above object, the embodiment of the invention provides following technical solutions:
A kind of method of data synchronization, comprising:
When receiving the message for updating target data, according to target data described in the information updating, obtain updating number According to;
Detect the end main PCIE Switchtec and whether normal from the link between the end PCIE Switchtec;
If so, the more new data is synchronized to the data from the end PCIE Switchtec by the link Library.
It is wherein, described that the more new data is synchronized to by the database from the end PCIE Switchtec by the link, Include:
The more new data is sent to the database from the end PCIE Switchtec by the link synchronization.
It is wherein, described that the more new data is synchronized to by the database from the end PCIE Switchtec by the link, Include:
Pass through more new data described in the link asynchronous transmission to the database from the end PCIE Switchtec.
Wherein, the detection end main PCIE Switchtec and from the link between the end PCIE Switchtec whether just Often, comprising:
The end main PCIE Switchtec is detected according to preset detection cycle and from the chain between the end PCIE Switchtec Whether road is normal.
Wherein, described that the more new data is synchronized to by the data from the end PCIE Switchtec by the link Library, comprising:
There are when multilink before the end main PCIE Switchtec and the end from PCIE Switchtec, lead to It crosses the multilink and the more new data is synchronized to the database from the end PCIE Switchtec simultaneously.
A kind of data synchronization unit, comprising:
Update module, for when receive update target data message when, according to number of targets described in the information updating According to obtaining more new data;
Detection module, for detect the end main PCIE Switchtec and from the link between the end PCIE Switchtec whether Normally;
Synchronization module, for when the end main PCIE Switchtec and from the link between the end PCIE Switchtec it is normal When, the more new data is synchronized to by the database from the end PCIE Switchtec by the link.
Wherein, the synchronization module is specifically used for:
The more new data is sent to the database from the end PCIE Switchtec by the link synchronization.
Wherein, the synchronization module is specifically used for:
Pass through more new data described in the link asynchronous transmission to the database from the end PCIE Switchtec.
A kind of data synchronizer, comprising:
Memory, for storing computer program;
Processor realizes the step of method of data synchronization described in above-mentioned any one when for executing the computer program Suddenly.
A kind of readable storage medium storing program for executing is stored with computer program, the computer program quilt on the readable storage medium storing program for executing The step of processor realizes method of data synchronization described in above-mentioned any one when executing.
By above scheme it is found that a kind of method of data synchronization provided in an embodiment of the present invention, comprising: updated when receiving When the message of target data, according to target data described in the information updating, more new data is obtained;Detect main PCIE The end Switchtec and whether normal from the link between the end PCIE Switchtec;If so, described more by link general New data is synchronized to the database from the end PCIE Switchtec.
As it can be seen that in order to make two physical equipments in dual redundant physical equipment accomplish resource-sharing, as main PCIE When the more new data of the end Switchtec, more new data is synchronized to the database from the end PCIE Switchtec in time, so that main The end PCIE Switchtec keeps data consistent with from the end PCIE Switchtec.Such end main PCIE Switchtec and from The end PCIE Switchtec just maps each other, can be substituted for each other, and will not influence the normal operation of business.
Correspondingly, a kind of data synchronization unit, equipment and readable storage medium storing program for executing provided in an embodiment of the present invention, it is also the same to have There is above-mentioned technical effect.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 is a kind of method of data synchronization flow chart disclosed by the embodiments of the present invention;
Fig. 2 is a kind of data synchronization scheme schematic diagram disclosed by the embodiments of the present invention;
Fig. 3 is a kind of data synchronization unit schematic diagram disclosed by the embodiments of the present invention;
Fig. 4 is a kind of data synchronizer schematic diagram disclosed by the embodiments of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
The embodiment of the invention discloses a kind of method of data synchronization, device, equipment and readable storage medium storing program for executing, so that dual redundant Two physical equipments in physical equipment accomplish resource-sharing, keep the consistency of data.
Referring to Fig. 1, a kind of method of data synchronization provided in an embodiment of the present invention, comprising:
S101, when receive update target data message when, according to information updating target data, obtain more new data;
Specifically, the operation of more new data can be any one in increasing, delete, changing or combination.
S102, the detection end main PCIE Switchtec and whether normal from the link between the end PCIE Switchtec;If It is then to execute S103;If it is not, then executing S104;
S103, more new data is synchronized to database from the end PCIE Switchtec by link;
S104, it generates warning information and shows.
Specifically, including: the information such as abnormal bus title, the port name connected occur in the warning information.
Preferably, the data being synchronized to the more new data by the link from the end PCIE Switchtec Library, comprising: the more new data is sent to the database from the end PCIE Switchtec by the link synchronization.
Specifically, synchronous sending method are as follows: the end main PCIE Switchtec is sent the data to from PCIE Switchtec End, the message that return has been received by data from the end PCIE Switchtec are just released after the end main PCIE Switchtec receives the message Sending port is put, the reliability of so certifiable data transmission.
Preferably, the data being synchronized to the more new data by the link from the end PCIE Switchtec Library, comprising: pass through more new data described in the link asynchronous transmission to the database from the end PCIE Switchtec.
Specifically, asynchronous sending mode are as follows: the end main PCIE Switchtec is sent the data to from PCIE Switchtec End, does not return to the message for having been received by data from the end PCIE Switchtec, the end main PCIE Switchtec directly discharges transmitting terminal Mouthful, data transmission efficiency so can be improved.The end main PCIE Switchtec and from the end PCIE Switchtec pass through UART realize Data transmit-receive.
Wherein, the detection end main PCIE Switchtec and from the link between the end PCIE Switchtec whether just Often, comprising: detect the end main PCIE Switchtec according to preset detection cycle and from the chain between the end PCIE Switchtec Whether road is normal.The length of detection cycle can be adjusted flexibly according to actual needs.
Wherein, described that the more new data is synchronized to by the data from the end PCIE Switchtec by the link Library, comprising: there are when multilink before the end main PCIE Switchtec and the end from PCIE Switchtec, lead to It crosses the multilink and the more new data is synchronized to the database from the end PCIE Switchtec simultaneously.Wherein, main The end PCIE Switchtec is main equipment end, is from equipment end from the end PCIE Switchtec.
As it can be seen that present embodiments provide a kind of method of data synchronization, the method is in order to make in dual redundant physical equipment Two physical equipments accomplish resource-sharing, when main PCIE Switchtec end more new data, will more new data be synchronized in time Database from the end PCIE Switchtec so that the end main PCIE Switchtec and from the end PCIE Switchtec keep data Unanimously.It such end main PCIE Switchtec and just maps, can be substituted for each other each other from the end PCIE Switchtec.
Based on the above embodiment, it should be noted that in order to detect the end main PCIE Switchtec in time and from PCIE Whether the bus connected between the end Switchtec breaks down, and the end main PCIE Switchtec can be sent out according to the preset period Heartbeat is sent, such as: the heartbeat detection of transmission in every 3 seconds.When detecting bus failure, it is immediately generated corresponding warning information simultaneously It has been shown that, so as to the timely repair and maintenance of technical staff.
The embodiment of the invention discloses a kind of data synchronization schemes, and relative to a upper embodiment, the present embodiment is to technical side Case has made further instruction and optimization.
Referring to fig. 2, a kind of data synchronization scheme provided in an embodiment of the present invention, comprising: switchtec1 and Switchtec2, in which:
Switchtec1 and switchtec2 are provided with monitoring thread, for acquiring the state of sensor and psu, In, psu is shared physical bus.DB management module is used for synchrodata.
In the present embodiment, switchtec1 and switchtec2 mirror image each other, can by psu timely sharing data, To ensure, the data consistency of switchtec1 and switchtec2.
A kind of data synchronization unit provided in an embodiment of the present invention is introduced below, a kind of data described below are same Walking device can be cross-referenced with a kind of above-described method of data synchronization.
Referring to Fig. 3, a kind of data synchronization unit provided in an embodiment of the present invention, comprising:
Update module 301, for when receive update target data message when, according to target described in the information updating Data obtain more new data;
Detection module 302, for detecting the end main PCIE Switchtec and from the link between the end PCIE Switchtec It is whether normal;
Synchronization module 303, for when the end main PCIE Switchtec and from the link between the end PCIE Switchtec just The more new data is synchronized to the database from the end PCIE Switchtec by the link by Chang Shi.
Wherein, the synchronization module is specifically used for:
The more new data is sent to the database from the end PCIE Switchtec by the link synchronization.
Wherein, the synchronization module is specifically used for:
Pass through more new data described in the link asynchronous transmission to the database from the end PCIE Switchtec.
Wherein, the detection module is specifically used for:
The end main PCIE Switchtec is detected according to preset detection cycle and from the chain between the end PCIE Switchtec Whether road is normal.
Wherein, the synchronization module is specifically used for:
There are when multilink before the end main PCIE Switchtec and the end from PCIE Switchtec, lead to It crosses the multilink and the more new data is synchronized to the database from the end PCIE Switchtec simultaneously.
As it can be seen that present embodiments providing a kind of data synchronization unit, comprising: update module, detection module and synchronous mould Block.When receiving the message for updating target data, first as update module target data according to the information updating, obtain To more new data;Then detection module, which detects the end main PCIE Switchtec and from the link between the end PCIE Switchtec, is It is no normal;When the end main PCIE Switchtec and from the link between the end PCIE Switchtec it is normal when, synchronization module passes through The more new data is synchronized to the database from the end PCIE Switchtec by the link.Divide between such modules Work cooperation, Each performs its own functions, so that the end main PCIE Switchtec be made to keep data consistent with from the end PCIE Switchtec.
A kind of data synchronizer provided in an embodiment of the present invention is introduced below, a kind of data described below are same Walking equipment can be cross-referenced with a kind of above-described method of data synchronization and device.
Referring to fig. 4, a kind of data synchronizer provided in an embodiment of the present invention, comprising:
Memory 401, for storing computer program;
Processor 402 realizes the data side of synchronization described in above-mentioned any embodiment when for executing the computer program The step of method.
A kind of readable storage medium storing program for executing provided in an embodiment of the present invention is introduced below, one kind described below is readable to deposit Storage media can be cross-referenced with a kind of above-described method of data synchronization, device and equipment.
A kind of readable storage medium storing program for executing is stored with computer program, the computer program quilt on the readable storage medium storing program for executing The step of method of data synchronization as described in above-mentioned any embodiment is realized when processor executes.
Each embodiment in this specification is described in a progressive manner, the highlights of each of the examples are with other The difference of embodiment, the same or similar parts in each embodiment may refer to each other.
The foregoing description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, as defined herein General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, of the invention It is not intended to be limited to the embodiments shown herein, and is to fit to and the principles and novel features disclosed herein phase one The widest scope of cause.

Claims (10)

1. a kind of method of data synchronization characterized by comprising
When receiving the message for updating target data, according to target data described in the information updating, more new data is obtained;
Detect the end main PCIE Switchtec and whether normal from the link between the end PCIE Switchtec;
If so, the more new data is synchronized to the database from the end PCIE Switchtec by the link.
2. method of data synchronization according to claim 1, which is characterized in that it is described by the link by the update number According to the database being synchronized to from the end PCIE Switchtec, comprising:
The more new data is sent to the database from the end PCIE Switchtec by the link synchronization.
3. method of data synchronization according to claim 1, which is characterized in that it is described by the link by the update number According to the database being synchronized to from the end PCIE Switchtec, comprising:
Pass through more new data described in the link asynchronous transmission to the database from the end PCIE Switchtec.
4. method of data synchronization according to claim 1, which is characterized in that the detection end main PCIE Switchtec with It is whether normal from the link between the end PCIE Switchtec, comprising:
The end main PCIE Switchtec and described between the end PCIE Switchtec is detected according to preset detection cycle Link it is whether normal.
5. method of data synchronization according to any one of claims 1-4, which is characterized in that described to be incited somebody to action by the link The more new data is synchronized to the database from the end PCIE Switchtec, comprising:
There are when multilink before the end main PCIE Switchtec and the end from PCIE Switchtec, pass through institute It states multilink and the more new data is synchronized to the database from the end PCIE Switchtec simultaneously.
6. a kind of data synchronization unit characterized by comprising
Update module, for according to target data described in the information updating, obtaining when receiving the message for updating target data To more new data;
Detection module, for detect the end main PCIE Switchtec and from the link between the end PCIE Switchtec whether just Often;
Synchronization module, for when the end main PCIE Switchtec and from the link between the end PCIE Switchtec it is normal when, lead to It crosses the link and the more new data is synchronized to the database from the end PCIE Switchtec.
7. data synchronization unit according to claim 6, which is characterized in that the synchronization module is specifically used for:
The more new data is sent to the database from the end PCIE Switchtec by the link synchronization.
8. data synchronization unit according to claim 7, which is characterized in that the synchronization module is specifically used for:
Pass through more new data described in the link asynchronous transmission to the database from the end PCIE Switchtec.
9. a kind of data synchronizer characterized by comprising
Memory, for storing computer program;
Processor realizes the data side of synchronization as described in claim 1-5 any one when for executing the computer program The step of method.
10. a kind of readable storage medium storing program for executing, which is characterized in that be stored with computer program, the meter on the readable storage medium storing program for executing The step of method of data synchronization as described in claim 1-5 any one is realized when calculation machine program is executed by processor.
CN201811463455.1A 2018-12-03 2018-12-03 A kind of method of data synchronization, device, equipment and readable storage medium storing program for executing Withdrawn CN109542983A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811463455.1A CN109542983A (en) 2018-12-03 2018-12-03 A kind of method of data synchronization, device, equipment and readable storage medium storing program for executing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811463455.1A CN109542983A (en) 2018-12-03 2018-12-03 A kind of method of data synchronization, device, equipment and readable storage medium storing program for executing

Publications (1)

Publication Number Publication Date
CN109542983A true CN109542983A (en) 2019-03-29

Family

ID=65852648

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811463455.1A Withdrawn CN109542983A (en) 2018-12-03 2018-12-03 A kind of method of data synchronization, device, equipment and readable storage medium storing program for executing

Country Status (1)

Country Link
CN (1) CN109542983A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113434604A (en) * 2021-08-25 2021-09-24 西安热工研究院有限公司 Time sequence database synchronization method, system, equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113434604A (en) * 2021-08-25 2021-09-24 西安热工研究院有限公司 Time sequence database synchronization method, system, equipment and storage medium
CN113434604B (en) * 2021-08-25 2021-12-03 西安热工研究院有限公司 Time sequence database synchronization method, system, equipment and storage medium

Similar Documents

Publication Publication Date Title
US20170339005A1 (en) Method and Device for Processing Failure in at Least One Distributed Cluster, and System
CN102981931B (en) Backup method and device for virtual machine
CN110750480B (en) Dual-computer hot standby system
CN111124277B (en) Deep learning data set caching method, system, terminal and storage medium
CN102594858B (en) Mirror solution in cloud storage environment
CN105700510A (en) Error variance detection method of CAN communication system and the CAN communication system
CN104468521A (en) Online migration method, device and system
CN103440188B (en) The detection method of a kind of PCIE hardware fault and device
CN103425645A (en) Monitoring system and monitoring method for single point of failure of database cluster
CN104951395A (en) Debugging information processing method and device for embedded system
CN105554074A (en) NAS resource monitoring system and monitoring method based on RPC communication
CN108632106A (en) System for monitoring service equipment
CN110196780B (en) Method, device, storage medium and electronic device for determining server state
CN103246585A (en) Storage controller fault detecting method
CN110580235A (en) SAS expander communication method and device
CN103414739B (en) Use Cloud Server automatic monitored control system and the method for automatic drift
CN114064217B (en) OpenStack-based node virtual machine migration method and device
CN105550230B (en) The method for detecting and device of distributed memory system node failure
CN112199240A (en) Method for switching nodes during node failure and related equipment
CN109542983A (en) A kind of method of data synchronization, device, equipment and readable storage medium storing program for executing
CN109684130B (en) Method and device for backing up data of computer room
CN103581262A (en) Master-and-backup data synchronizing method, device and system
CN109582626B (en) Method, device and equipment for accessing bus and readable storage medium
CN111309515B (en) Disaster recovery control method, device and system
CN115729164B (en) Industrial communication system management method and device and industrial communication system

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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20190329