CN102411612A - Method and system for synchronizing information - Google Patents

Method and system for synchronizing information Download PDF

Info

Publication number
CN102411612A
CN102411612A CN2011103300057A CN201110330005A CN102411612A CN 102411612 A CN102411612 A CN 102411612A CN 2011103300057 A CN2011103300057 A CN 2011103300057A CN 201110330005 A CN201110330005 A CN 201110330005A CN 102411612 A CN102411612 A CN 102411612A
Authority
CN
China
Prior art keywords
session information
store file
log store
database
thread
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
CN2011103300057A
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 Codyy Network Technology Co Ltd
Original Assignee
Suzhou Codyy Network 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 Codyy Network Technology Co Ltd filed Critical Suzhou Codyy Network Technology Co Ltd
Priority to CN2011103300057A priority Critical patent/CN102411612A/en
Publication of CN102411612A publication Critical patent/CN102411612A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention provides a method and a system for synchronizing information. The method comprises the following steps that: the session thread in the main database records information in the log storage files; the pushing thread sends the session information in the log storage file to the database and the session information is stored in the relay log storage files from the database. More than two SQL threads from the database read the session information from the relay log storage files.

Description

A kind of information synchronization method and system
Technical field
The invention belongs to database technical field, relate in particular to a kind of information synchronization method and system.
Background technology
Growing along with social informatization, database technology is by widespread use more and more.In daily data transmission applications; Data sync one of the means that are absolutely necessary; Present main flow mode is the database leader follower replication; This kind method is stable, efficient is higher, but has the slow and lower problem of cpu busy percentage of synchronous speed, and main cause is that database transfer efficiency in synchronizing process is not high.
Summary of the invention
The present invention provides a kind of information synchronization method and system to address the above problem.
The present invention provides a kind of information synchronization method, may further comprise the steps.Threads of conversation is recorded to session information in the log store file in the MDL, and the propelling movement thread is sent to the session information in the log store file from database and by said and from database said session information is stored to the relaying log store file.From the SQL thread of database, from said relaying log store file, read said session information more than two.
The present invention provides a kind of information synchronization system, comprises pen recorder, pusher, memory storage, reading device.Pen recorder is used for threads of conversation session information is recorded to the log store file.Pusher is connected with pen recorder, is used for the session information of log store file is sent to memory storage.Memory storage is connected with pusher, is used for said session information is stored to relaying log store file.Reading device is connected with memory storage, is used for reading said session information from said relaying log store file.
Compared to prior art, according to information synchronization method provided by the invention and system,, realizes a plurality ofly visiting from the storehouse to same relaying log store file-sharing from improving the angle of cpu busy percentage, improved the speed of information synchronization.
Description of drawings
Accompanying drawing described herein is used to provide further understanding of the present invention, constitutes the application's a part, and illustrative examples of the present invention and explanation thereof are used to explain the present invention, do not constitute improper qualification of the present invention.In the accompanying drawings:
The process flow diagram of the information synchronization method that provides for preferred embodiment according to the present invention shown in Figure 1;
The synoptic diagram of the information synchronization system that provides for preferred embodiment according to the present invention shown in Figure 2.
Embodiment
Hereinafter will and combine embodiment to specify the present invention with reference to accompanying drawing.Need to prove that under the situation of not conflicting, embodiment and the characteristic among the embodiment among the application can make up each other.
The process flow diagram of the information synchronization method that provides for preferred embodiment according to the present invention shown in Figure 1, as shown in Figure 1, the information synchronization method that preferred embodiment of the present invention provides comprises step 101~102.
Step 101: threads of conversation is recorded to session information in the log store file in the MDL, and the propelling movement thread is sent to the session information in the log store file from database and by said and from database said session information is stored to the relaying log store file.
Particularly, after threads of conversation is recorded to session information in the log store file in the MDL, pushes thread and read treating push conversation information and being sent to of storing in the log store file from database.MDL push thread read and push treat push conversation information after, delete the session information that this had pushed.Certainly, MDL also can not deleted the session information that had pushed in the log store file, and this present invention is not made qualification.
Send said session information to behind the input and output thread of database when pushing thread; The input and output thread receives this session information; And the session information that receives stored in the relaying log store file, supply local SQL thread and other to read from the SQL thread on the database.
Step 102: from the SQL thread of database, from said relaying log store file, read said session information more than two.
Particularly, from database, comprising more than two: link to each other with MDL link to each other from database from database, with said other from database.When link to each other with MDL from database with after the session information stores is to the relaying log store file; Local SQL thread and other the SQL thread from the database that links to each other from database with said read the session information of storing in the relaying log store file.
More than two from the SQL thread of database, from relaying log store file, read session information after, what link to each other with MDL deletes this session information from database from relaying log store file.Certainly, what link to each other with MDL also can not delete the session information that had read the relaying log store file from database, and this present invention is not made qualification.
The synoptic diagram of the information synchronization system that provides for preferred embodiment according to the present invention shown in Figure 2, as shown in Figure 2, information synchronization system comprises pen recorder 201, pusher 202, memory storage 203, reading device 204 and reading device 205.Wherein, pen recorder 201, pusher 202 are arranged in MDL, memory storage 203, reading device 204 be arranged in link to each other with MDL from database 1, reading device 205 be arranged in link to each other from database 1 from database 2.
In present embodiment, pen recorder 201 is used for threads of conversation session information is recorded to the log store file; Pusher 202 is connected with pen recorder 201, is used for the session information of log store file is sent to memory storage; Memory storage 203 is connected with pusher 202, is used for said session information is stored to relaying log store file; Reading device 204 and reading device 205 are connected with memory storage 203, are used for reading said session information from said relaying log store file.
Wherein, the propelling movement thread in the pusher 202 is sent to the input and output thread in the memory storage 203 with the session information in the log store file, and the input and output thread in the memory storage 203 is stored to said session information in the relaying log store file.SQL thread in reading device 204 and the reading device 205 reads said session information from said relaying log store file.
Information synchronization system as shown in Figure 2 can also comprise delete device A, delete device B, and delete device A is arranged in MDL, delete device B be arranged in link to each other with MDL from database 1.Wherein:
Delete device A is connected with pen recorder 201, pusher 202 respectively; After pusher 202 is sent to memory storage 203 with the session information in the log store file, the session information that has been sent out in the log store file of delete device A deletion record device 201.Certainly, delete device A also can be provided with, and this present invention is not made qualification.
Delete device B is connected with memory storage 203, reading device 204 and reading device 205 respectively; SQL thread in reading device 204 and the reading device 205; After from the relaying log store file of memory storage 203, reading session information, the said session information that has been read in the delete device B deletion memory storage 203.Certainly, delete device B also can be provided with, and this present invention is not made qualification.
In sum,,, realizes a plurality ofly visiting, improved the speed of information synchronization from the storehouse to same relaying log store file-sharing from improving the angle of cpu busy percentage according to information synchronization method provided by the invention and system.
The above is merely the preferred embodiments of the present invention, is not limited to the present invention, and for a person skilled in the art, the present invention can have various changes and variation.All within spirit of the present invention and principle, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (10)

1. an information synchronization method is characterized in that, may further comprise the steps:
Threads of conversation is recorded to session information in the log store file in the MDL, and the propelling movement thread is sent to the session information in the log store file from database and by said and from database said session information is stored to the relaying log store file;
From the SQL thread of database, from said relaying log store file, read said session information more than two.
2. method according to claim 1 is characterized in that, the propelling movement thread is sent to the session information in the log store file from database and by said and from database with the process that said session information is stored to the relaying log store file is:
Push thread the session information in the log store file is sent to the input and output thread from database, said input and output thread is stored to said session information in the relaying log store file.
3. method according to claim 1 is characterized in that, pushes thread in the MDL and reads the push conversation information of treating in the log store file and be sent to behind database, and MDL is with the session information deletion that has been pushed in the log store file.
4. method according to claim 1 is characterized in that, more than two from the SQL thread of database, from said relaying log store file, read said session information after, delete the said session information that has been read in the said relaying log store file.
5. an information synchronization system is characterized in that, comprising: pen recorder, pusher, memory storage, reading device,
Pen recorder is used for threads of conversation session information is recorded to the log store file;
Pusher is connected with pen recorder, is used for the session information of log store file is sent to memory storage;
Memory storage is connected with pusher, is used for said session information is stored to relaying log store file;
Reading device is connected with memory storage, is used for reading said session information from said relaying log store file.
6. system according to claim 5 is characterized in that pen recorder, pusher are arranged in the MDL; Memory storage, reading device are arranged at from database.
7. system according to claim 5 is characterized in that, the propelling movement thread in the pusher is sent to the input and output thread in the memory storage with the session information in the log store file.
8. system according to claim 7 is characterized in that, the input and output thread in the memory storage is stored to said session information in the relaying log store file.
9. system according to claim 8 is characterized in that, the SQL thread in the reading device reads said session information from said relaying log store file.
10. system according to claim 5; It is characterized in that; Also comprise delete device, said delete device links to each other with reading device, memory storage respectively, the SQL thread in the reading device; After from said relaying log store file, reading said session information, said delete device is deleted the said session information that has been read in the said memory storage.
CN2011103300057A 2011-10-27 2011-10-27 Method and system for synchronizing information Pending CN102411612A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2011103300057A CN102411612A (en) 2011-10-27 2011-10-27 Method and system for synchronizing information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2011103300057A CN102411612A (en) 2011-10-27 2011-10-27 Method and system for synchronizing information

Publications (1)

Publication Number Publication Date
CN102411612A true CN102411612A (en) 2012-04-11

Family

ID=45913683

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011103300057A Pending CN102411612A (en) 2011-10-27 2011-10-27 Method and system for synchronizing information

Country Status (1)

Country Link
CN (1) CN102411612A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103593257A (en) * 2012-08-15 2014-02-19 阿里巴巴集团控股有限公司 Data backup method and device
CN103631831A (en) * 2012-08-29 2014-03-12 阿里巴巴集团控股有限公司 Data backup method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1489052A (en) * 2002-10-11 2004-04-14 鸿富锦精密工业(深圳)有限公司 Multi-node file syn chronizing system and method
CN1725186A (en) * 2004-07-23 2006-01-25 中兴通讯股份有限公司 Multiple data base data syne method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1489052A (en) * 2002-10-11 2004-04-14 鸿富锦精密工业(深圳)有限公司 Multi-node file syn chronizing system and method
CN1725186A (en) * 2004-07-23 2006-01-25 中兴通讯股份有限公司 Multiple data base data syne method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103593257A (en) * 2012-08-15 2014-02-19 阿里巴巴集团控股有限公司 Data backup method and device
CN103631831A (en) * 2012-08-29 2014-03-12 阿里巴巴集团控股有限公司 Data backup method and device
CN103631831B (en) * 2012-08-29 2016-12-21 阿里巴巴集团控股有限公司 A kind of data back up method and device

Similar Documents

Publication Publication Date Title
CN101917396B (en) Real-time repetition removal and transmission method for data in network file system
CN103294710B (en) A kind of data access method and device
CN104932841B (en) Economizing type data de-duplication method in a kind of cloud storage system
CN102768662B (en) A kind of method and apparatus Loaded Image
CN102035881A (en) Data caching method of cloud storage system
CN102411637A (en) Metadata management method of distributed file system
CN102906751A (en) Method and device for data storage and data query
CN102833298A (en) Distributed repeated data deleting system and processing method thereof
CN104123237A (en) Hierarchical storage method and system for massive small files
CN104243528A (en) Method and system for synchronously copying contents among multiple terminal devices
CN103377100B (en) A kind of data back up method, network node and system
CN102467572A (en) Data block inquiring method for supporting data de-duplication program
CN104657366A (en) Method and device for writing mass logs in database and log disaster-tolerant system
CN103595797A (en) Caching method for distributed storage system
CN103207916B (en) The method and apparatus of metadata processing
CN103514258A (en) Centralized recording, preprocessing and replaying method based on offline cache file operation
CN102411612A (en) Method and system for synchronizing information
CN105488108A (en) High-speed parallel storage method and apparatus for multiple video files
CN101621535B (en) Network communication method and device of real-time monitoring system
CN104298747A (en) Storage method and retrieval method of massive images
CN107562810A (en) Video big data is classified storage method
CN102385624B (en) DFS (distributed file system)-oriented log data organization method
CN102402585B (en) Information transmission method, system and mobile terminal
CN104391802A (en) Streamline pool metadata node refreshing consistency protecting method
CN103281383B (en) A kind of time sequence information recording method of Based on Distributed data source

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20120411