CN104702684B - A kind of method of data synchronization and device - Google Patents

A kind of method of data synchronization and device Download PDF

Info

Publication number
CN104702684B
CN104702684B CN201510103621.7A CN201510103621A CN104702684B CN 104702684 B CN104702684 B CN 104702684B CN 201510103621 A CN201510103621 A CN 201510103621A CN 104702684 B CN104702684 B CN 104702684B
Authority
CN
China
Prior art keywords
session
information
equipment
stand
session information
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
CN201510103621.7A
Other languages
Chinese (zh)
Other versions
CN104702684A (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.)
New H3C Technologies Co Ltd
Original Assignee
New H3C Technologies 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 New H3C Technologies Co Ltd filed Critical New H3C Technologies Co Ltd
Priority to CN201510103621.7A priority Critical patent/CN104702684B/en
Publication of CN104702684A publication Critical patent/CN104702684A/en
Application granted granted Critical
Publication of CN104702684B publication Critical patent/CN104702684B/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/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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

The present invention provides a kind of method of data synchronization, this method comprises: when the corresponding session information change of conversation type, the host apparatus will need location information of the session information to be changed in the corresponding session information of the conversation type of storage, and the session information after change is sent to stand-by equipment, so that the stand-by equipment updates the session information of change according to the location information and session information received in the session information for the session being locally stored.Based on same inventive concept, the application also proposes a kind of data synchronization unit, can reduce synchronous data volume, to improve equipment performance.

Description

A kind of method of data synchronization and device
Technical field
The present invention relates to field of communication technology, in particular to a kind of method of data synchronization and device.
Background technique
In current networking application, requirement of the user to network reliability is higher and higher, how to guarantee user service data Interrupted transmission, become a problem urgently to be solved.Under the network environment of traditional single gateway, once there is chain Road, node failure, the business of all users can all interrupt, and the time of business recovery can not also determine.
Virtual service redundancy protocol (Virtual Service Redundancy Protocol, VSRP), by improving net The reliability of network improves the stability of customer service;In the case where network failure, stand-by equipment being capable of rapid pipe connecting Customer service, so that user's perception continues to use Internet resources less than the failure of network.
There are two equipment in multi-computer back-up group, one is called host apparatus, and another is called stand-by equipment.Host apparatus is Business provides support, forwarding service flow, and can send after reaching flow threshold sometime or centainly to stand-by equipment Service backup information;Stand-by equipment is spare to set after host apparatus breaks down except the service backup information for receiving host apparatus It is standby to be converted into host apparatus, continue forwarding service flow, interrupt business will not.
Currently, multi-computer back-up function is mainly used in broadband remote access servers (Broadband Remote Access Server, BRAS) in networking, multi-computer back-up is carried out to the BRAS equipment in Network Convergence Layer, host apparatus and stand-by equipment are real When interactive user BRAS authentication information, charge information and customer account management information, thus ensure that BRAS system run without interruption, Improve reliability.
It include various types of information, such as session essential information, AAA attribute information etc. by BRAS online session. When using multi-computer back-up networking, the message that session needs to back up is very more, a session about Backup Data of 2KB.Mesh The session specification requirement of preceding BRAS is in 32K.When close to full specification, whole Backup Datas, about 64M.Work as a large number of users It is upper offline, or when the certain attributes of change, even based on transmission control protocol (Transmission Control Protocol, TCP) The VSRP backup path connect can be very busy, causes the information of host apparatus and stand-by equipment that cannot accomplish real-time synchronization, even Influence equipment performance.
Summary of the invention
In view of this, the application provides a kind of method of data synchronization and device, with big, the equipment performance that solves the synchronous amount of data Low problem.
In order to solve the above technical problems, the technical solution of the application is achieved in that
A kind of method of data synchronization, this method comprises:
Host apparatus configures storage organization for each conversation type, and being sent to stand-by equipment is directed to the stand-by equipment Each conversation type stores corresponding storage organization;Storage organization for the configuration of any conversation type is that the conversation type is corresponding Each session information is arranged by preset order, and distributes particular memory length for each session information, for any session information Particular memory length is to store the maximum length of the session information;
When the corresponding session of any conversation type is online, which should according to the storage organization storage being locally configured The corresponding session information of conversation type, and the session information is sent to the stand-by equipment according to the storage organization, with The stand-by equipment is set to store the session information according to the corresponding storage organization of the conversation type being locally stored;
When the corresponding session information change of the conversation type, which will need session information to be changed storing The corresponding session information of the conversation type in location information, and change session information be sent to the stand-by equipment, So that the stand-by equipment according to the location information and session information received the session being locally stored session information The middle session information for updating change.
A kind of data synchronization unit, which is characterized in that the device includes: configuration unit and processing transmission unit;
The configuration unit, for configuring storage organization for each conversation type;For depositing for any conversation type configuration Storage structure is to arrange the corresponding each session information of the conversation type by preset order, and deposit for the distribution of each session information is specific Length is stored up, the particular memory length for any session information is to store the maximum length of the session information;
The processing transmission unit is sent to for the storage organization by the configuration unit for the configuration of each conversation type Stand-by equipment makes the stand-by equipment store corresponding storage organization for each conversation type;When the corresponding session of any conversation type When online, the corresponding session information of the conversation type is stored according to the storage organization being locally configured, and according to the storage organization The session information is sent to the stand-by equipment, so that the stand-by equipment is corresponding according to the conversation type being locally stored Storage organization store the session information;When the corresponding session information change of the conversation type, session to be changed will be needed Location information of the information in the corresponding session information of the conversation type of storage, and change session information be sent to it is described Stand-by equipment, so that the stand-by equipment is according to the location information and session information received in the session being locally stored The session information of change is updated in session information.
As can be seen from the above technical solution, by configuring fixed storage organization for each conversation type in the application, When host apparatus is needed to stand-by equipment simultaneous session information, only by fixed data structure and the position letter of session information is changed The session information of the synchronous change of breath, can reduce synchronous data volume, to improve equipment performance.
Detailed description of the invention
Fig. 1 is the synchronous flow diagram of data in the embodiment of the present application;
Fig. 2 is the apparatus structure schematic diagram for being applied to above-mentioned technology in the embodiment of the present application.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and examples, Technical solution of the present invention is described in detail.
A kind of method of data synchronization is provided in the embodiment of the present application, it is primary applied on the host apparatus in BRAS networking Equipment configures storage organization according to the corresponding session information situation of each conversation type, for each conversation type.For any session The storage organization of type configuration is to arrange the corresponding each session information of the conversation type by preset order, and believe for each session Breath distribution particular memory length, the particular memory length for any session information are to store the maximum length of the session information.
The corresponding session information of session for any conversation type includes: session essential information, attribute information, charging letter Breath etc., wherein attribute information includes: user VPN attribute information, DHCP attribute information, user-profile attribute information etc.;Meter Charge information includes: to have used flow, residual flow, on-line time, remaining line duration, entered and left traffic messages number, go out inbound traffics Byte number etc..
In specific implementation, each session information can be arranged according to practical situations preset order, such as by essential information, The sequence arrangement of attribute information, charge information also presses preset order configuration for each information in attribute information and charge information, By taking attribute information as an example, arranged by the sequence of user VPN attribute information, DHCP attribute information, user-profile attribute information, The row for each information for including to the sequence and attribute information of each session information and charge information etc. in the application specific embodiment Column sequence is not limited.
Host apparatus configures storage organization for each conversation type, and is sent to stand-by equipment so that the stand-by equipment needle Corresponding storage organization is stored to each conversation type;
Conversation type in BRAS networking includes: IPoE, PPPoE, Portal etc.;Various conversation types essential information, Different from attribute information number and type, charge information, thus the particular memory for the configuration of each session information of configuration Length can be adaptively adjusted as the case may be.
A kind of session of conversation type usually exists multiple, that is, has multiple users to initiate sessions, host apparatus is in order to one Different sessions are distinguished in a conversation type, distribute session call number for each session.
The session call number of distribution can be calculated by the information of the session uniquely determined and be obtained, such as the IP according to session Location and VLAN mark determine, the specific implementation of distribution session call number is not intended to limit in the embodiment of the present application.
The storage organization of configuration is sent to spare by host apparatus after locally for each conversation type configuration storage organization Equipment so that stand-by equipment stores the storage organization received, and for receive after Backup Data by Backup Data according to The storage organization of storage is stored.
A TCP data channel, every TCP data are established for every kind of conversation type between host apparatus and stand-by equipment Channel is for transmitting a kind of corresponding relevant information of conversation type.Assuming that there are IPoE and PPPoE two types on host apparatus 2 TCP data channels are then established in session.
After establishing completion for a certain conversation establishing TCP data tunnel, by local depositing for the conversation establishing Storage structure carrying is sent to stand-by equipment in TCP message.The TCP message for sending storage organization uses negotiation request type mark Know.
Below for for conversation type IPoE, description host apparatus sends to stand-by equipment and deposits for what IPoE was configured The process of storage structure.
Referring to table 1, table 1 is that type of backup is the content negotiated the TCP message of request and include in the embodiment of the present application.
Table 1
Due to using TCP transmission, the heading in table 1 includes Ethernet header, IP and TCP header;Type of backup is to negotiate to ask It asks, backup length is that conversation type arrives the total length of charge information, i.e., the corresponding content of type of backup includes conversation type to counting All information between charge information;Conversation type is IPoE, and length of session is the total length that session indexes charge information, i.e., can The corresponding content of call type includes that session indexes information all between charge information;Session index, only distributes particular memory Length does not carry the occurrence of session index in storage organization;Essential information is included in IPoE session and matches for essential information The preset length set;Attribute information and charge information are processed similarly with essential information, if some information is in the conversation class It is not present under type, then distributing preset length is 0.
The type of backup that stand-by equipment receives host apparatus transmission is when negotiating the TCP message of request, to be somebody's turn to do according to receiving The channel of TCP message determines the targeted conversation type of the information carried in the TCP message;And it is deposited for determining conversation type The storage organization carried in the TCP message is stored up, the storage organization of storage is the same as the storage organization configured on host apparatus.
After stand-by equipment stores associated storage structure, sending type of backup to host apparatus is to negotiate the TCP report of response Text.Referring to table 2, table 2 is that type of backup is the content negotiated the TCP message of response and include in the embodiment of the present application.
Table 2
Stand-by equipment to host apparatus send type of backup be negotiate response TCP message when, do not need carry store Structurally interrelated information only gives host apparatus one response.Therefore, the type of backup in table 2 is to negotiate the TCP report of request Only type of backup and the difference in table 1, the information of other field identifications are all the same for relevant information in text.
In specific implementation, in negotiations process, if preset time is then, host apparatus does not receive stand-by equipment also When the negotiation response message of transmission, message of negotiation request is sent to stand-by equipment again, until receiving negotiation response message, or When transmission message of negotiation request reaches preset times, terminate to negotiate process.
After being also possible to host apparatus to stand-by equipment transmission storage organization, default stand-by equipment is received and is stored, no The response of stand-by equipment is needed, whether the application replys stand-by equipment, and how long interior response determines that stand-by equipment is It is no to receive and normal storage and with no restrictions;Even in specific implementation, it can directly be configured with primary on stand-by equipment Identical storage organization can also in equipment.
It is the synchronous flow diagram of data in the embodiment of the present application referring to Fig. 1, Fig. 1.Specific steps are as follows:
Step 101, when the corresponding session of any conversation type is online, host apparatus is according to the storage organization being locally configured The corresponding session information of the conversation type is stored, and the session information is sent to stand-by equipment according to the storage organization, So that the stand-by equipment stores the session information according to the corresponding storage organization of the conversation type being locally stored.
Host apparatus stores the corresponding session information of the conversation type according to the storage organization being locally configured in this step, When specific implementation, the call number of the session is first determined according to session information, and according to local depositing for conversation type storage Storage structure stores corresponding session information, i.e., first stores session call number, the essential information for storing session information again, attribute information With charge information etc..For the session, specific deposited if some session information without content, also needs to apply that the session information is corresponding The memory space user of length is stored up, the information only stored is sky.
After host apparatus stores session information, the session information is sent to the stand-by equipment, so that described Stand-by equipment stores the session information according to the corresponding storage organization of the conversation type being locally stored.In specific implementation, Since session is online, the session information backed up will be needed to carry in the TCP message that type of backup is addition through the session The corresponding TCP data channel of conversation type is sent to stand-by equipment, so that stand-by equipment knows how to handle by type of backup The TCP message received.
Referring to table 3, table 3 is the content that the TCP message that the type of backup that host apparatus is sent is addition includes.
Table 3
For heading with the heading in table 2, type of backup is addition in table 3, indexes corresponding session for a session The data backup carried out when online.Associated session letter is carried in TCP message according to preconfigured sequence and data structure Breath, in the absence of some session information, with 0 filling.
Stand-by equipment by TCP data channel reception arrive TCP message when, by reception TCP message TCP data channel it is true Surely conversation type corresponding to the TCP message received adds further according to the type of backup of the TCP message received, determines master Data backup is carried out since session is online with equipment, it is determined that the local session index with the presence or absence of the session is corresponding standby Part data, if it is present being indexed using the session that the session information that the TCP message received carries updates the session corresponding Session information;Otherwise, the meeting in TCP message received according to the corresponding storage organization storage of the conversation type being locally stored Talk about information, the i.e. session information of the index respective session of storage session for the first time.
Stand-by equipment can be stored in the form of list item, can also be stored with data block format when storing session information, When the application implements, the concrete form of storage is not limited.Below by taking entry format stores as an example, stand-by equipment is described in detail The detailed process of the session information carried in the TCP message that storage type of backup is addition:
Stand-by equipment obtains the end position of backup session chained list on stand-by equipment (if first backup session, then just Beginningization related data structures and chained list, it will words are used as first backup session data of chained list), according to individual session length value Shen Please memory, and backup session chained list end position is articulated to, then by the meeting of the entire session carried in the TCP message received Information is talked about, directly filling copies in the memory newly applied, to generate corresponding backup session list item.
Step 102, when the corresponding session information change of the conversation type, which will need session to be changed to believe Cease location information in the corresponding session information of the conversation type of storage, and change session information be sent to it is described standby With equipment so that the stand-by equipment according to the location information and session information received the session being locally stored meeting The session information of change is updated in words information.
When the corresponding session information change of conversation type, such as the user in attribute information, charge information or attribute information One or several attribute information variations such as VPN attribute information find the corresponding meeting of storage according to the call number of the session in local The session information of words, and the session information for needing to update is updated.
In an embodiment of the present invention, for host apparatus by after local session information update, determining needs session to be changed Location information of the information in the session information of storage, in specific implementation, any meeting of the corresponding session of any conversation type The location information of information is talked about, can be the position offset of the session information to corresponding first session information of the session;If Session call number is distributed for the session, then the location information of the session information, can be indexed for the session information to respective session Number position offset, or remain as the position offset of corresponding first session information of the session.
By taking location information is the session information to the position offset of respective session call number as an example:
Assuming that the session information of change is first attribute information in attribute information, then for first attribute letter Breath, offset are the sum of length shared by session index shared length and essential information.
Host apparatus, which determines, needs the corresponding conversation type of Backup Data to be changed and session index and each session information The location information of the session information of the opposite corresponding storage of session index, and the session information updated is needed to carry in type of backup Stand-by equipment to be sent to by the corresponding TCP data channel of the conversation type, so that stand-by equipment in the TCP message of update When receiving the TCP message, know that the session information change due to respective session needs Backup Data, to be located accordingly Reason.
For being arranged in most preceding user's VPN attribute information change in attribute information, detailed description host apparatus is to standby The TCP message sent with equipment.
Referring to table 4, table 4 is that the type of backup that host apparatus is sent is the content that the TCP message updated includes.
Table 4
For heading with table 1 to the heading in table 3, type of backup is filled with update in table 4, and session index is filled with, and is The call number of the session distribution of session information change, location information of the offset for realizing the attribute information of change, attribute letter Breath is filled with the VPN attribute information after change, and offset is that VPN attribute information indexes in stored session information to session Offset.
It can be seen that only the session information of change is sent to spare when the application is embodied in session information change Equipment is updated, without all sending all session informations of the session including the session information not changed It conversates the update of information to stand-by equipment, therefore, simultaneous pressure is not in data backup for technical solution provided by the present application Greatly, equipment performance is influenced smaller.
Stand-by equipment by TCP data channel reception arrive TCP message when, determine the TCP message type of backup be update When, determine the local corresponding session information of session call number that whether there is and carry in the TCP message, if it is present according to The respective session information that the updating location information that the TCP message carries is locally stored;Otherwise, which is abandoned.
The determination in the session information for the session being locally stored is corresponding according to the location information received for stand-by equipment The initial position of session information, and update corresponding session from the initial position using the session information of the change received and believe Breath.The detailed process that stand-by equipment updates session information can be such that the session on the backup session chained list for extracting stand-by equipment The conversation start position and offset addition, are then calculated and need to update by initial position (session indexes first character section) Session information initial position to be modified, the session information updated storage using the corresponding session information of the offset.
It should be understood that in step 101 when session is online on stand-by equipment corresponding session information storage, meeting The filling copy procedure of words information can be regarded as session information and change from scratch, the meeting being also referred in step 102 Operation when information change is talked about, whole session informations are updated.
When the corresponding session of the conversation type is offline, host apparatus is by the corresponding charge information of the session in session information In location information and the charge information be sent to the stand-by equipment so that the stand-by equipment is according to receiving Location information and charge information update charge information in the session information for the session being locally stored.
Detailed process is as follows:
When host apparatus determines that session is offline, while locally carrying out relevant treatment, backup class is sent to stand-by equipment Type is the TCP message deleted, so that stand-by equipment knows that the session is offline, carries out relevant treatment.
Host apparatus is the charge information carried in session information in the TCP message deleted in the type of backup of transmission, with And the corresponding location information of charge information, it does not need to carry other session informations.
Host apparatus determines the corresponding conversation type of offline session and session index, is that the TCP deleted is reported by type of backup Text is sent by the determining corresponding TCP data channel of conversation type.
Referring to table 5, table 5 is that the type of backup that host apparatus is sent is the content that the TCP message deleted includes.
Table 5
For heading in table 5 with table 1 to the heading in table 4, type of backup is to delete, and session index is offline session pair The session index answered, offset are the offset that charge information to session indexes in the corresponding session information of the session.
When stand-by equipment receives the TCP message, conversation type is determined according to the TCP data channel for receiving the TCP message, Determine that the TCP message is the deletion message of the offline transmission of session according to type of backup, it is determined that local to whether there is the session rope The corresponding session information of session call number in drawing, if it is present the location information (offset) carried according to the TCP message Update charge information;Otherwise, which is abandoned.
Specific implementation can be such that (the session index the of the conversation start position on the backup session table for extracting stand-by equipment One byte), then the conversation start position and offset addition are calculated to the start bit to be modified for needing to modify data It sets, thus by being stored on the length covering stand-by equipment of session information initial position to be modified and session information in TCP message The corresponding charge information of the session.
What is all enumerated in the TCP message of, session information change online above with respect to session and the offline transmission of session is one Session indexes corresponding session information, when needing multiple sessions for same type session to carry out data backup, Ke Yi The multiple sessions carried in one TCP message index corresponding session information, index stand-by equipment for each session corresponding Session information is handled respectively.In practical applications, session attribute information, such as VPN, user-profile attribute information, For 32 bytes.When the variation of only 1 attribute information, in addition 1 offset, using 2 bytes, 34 byte in total, compared to Complete length of session about 2K, saves 2048-34=2014 byte.If 2 attributes change simultaneously, in addition 2 offsets, always Totally 66 bytes save 2048-66=1982 byte compared to complete length of session about 2K.
Charge information often uses content: having used flow, residual flow, on-line time, remaining line duration, has gone out inbound traffics report Literary number, out inbound traffics byte number etc..Outflow message number, inbound traffics message number, outflow byte number, inbound traffics byte number, The variables such as residual flow, session duration use 8 bytes respectively, totally 48 byte;In addition 6 offsets, totally 12 byte, 60 word in total Section saves 2048-60=1988 byte compared to complete length of session about 2K.
When session is offline, charge information is only carried, can equally save 1988 bytes.Session specification is 32K, net in equipment Whole user offline is frequent in network.Therefore it can subtract at least part of synchrodata flow.
Wherein, charge information is periodic synchronous, and data synchronize very frequently, therefore, it is considerable to save byte number.And Session specification is 32K in equipment, when full specification is online, only considers the synchronization of charge information, a metering period can be saved 32K*2K=64M synchrodata flow.
Therefore, technical solution provided by the present application can greatly mitigate facility load, route burden.So as to pass through A small amount of synchronous flow completes synchronous demand.The problems such as avoiding the obstruction and message loss under big flow.
By fixed data structure on stand-by equipment in the embodiment of the present application, associated session letter is updated according to offset Breath accelerates the speed of data update.
Based on same inventive concept, the application also proposes a kind of data synchronization unit.Referring to fig. 2, Fig. 2 is that the application is real Apply the apparatus structure schematic diagram for being applied to above-mentioned technology in example.The device includes: configuration unit 201 and processing transmission unit 202;
Configuration unit 201, for configuring storage organization for each conversation type;For the storage of any conversation type configuration Structure is to arrange the corresponding each session information of the conversation type by preset order, and distribute particular memory for each session information Length, the particular memory length for any session information are to store the maximum length of the session information;
Transmission unit 202 is handled, it is standby for configuration unit 201 to be sent to for the storage organization of each conversation type configuration The stand-by equipment is set to store corresponding storage organization for each conversation type with equipment;When in the corresponding session of any conversation type When line, the corresponding session information of the conversation type is stored according to the storage organization being locally configured, and will according to the storage organization The session information is sent to the stand-by equipment, so that the stand-by equipment is corresponding according to the conversation type being locally stored Storage organization stores the session information;When the corresponding session information change of the conversation type, session to be changed will be needed to believe Cease location information in the corresponding session information of the conversation type of storage, and change session information be sent to it is described standby With equipment so that the stand-by equipment according to the location information and session information received the session being locally stored meeting The session information of change is updated in words information.
Preferably,
Transmission unit 202 is handled, is further used for when the corresponding session of the conversation type is offline, the session is corresponding Location information and the charge information of the charge information in session information are sent to the stand-by equipment, so that described standby Charging is updated in the session information for the session being locally stored according to the location information and charge information that receive with equipment Information.
Preferably,
Configuration unit 201 is further used for establishing transmission control protocol TCP with stand-by equipment respectively for each conversation type Data channel;
Transmission unit 202 is handled, is further used for for the storage organization of each conversation type or session information being sent to spare It when equipment, carries in TCP message, the TCP data channel hair established respectively by the corresponding conversation type of configuration unit 201 It send, so that the stand-by equipment knows storage organization or the corresponding conversation type of session information in the TCP message.
Preferably,
The location information of any session information of the corresponding session of any conversation type, for the session information to the session pair The position offset for first session information answered.
Preferably,
Handle transmission unit 202, be further used for when for the corresponding session of any conversation type there are it is multiple when, according to The corresponding session information of the session is session distribution session call number, and corresponding sending the session to the stand-by equipment When session information, the session call number for session distribution is carried, so that the stand-by equipment knows that the host apparatus is sent The corresponding session of session information.
Preferably,
Session call number is distributed if session, then the location information of any session information of the session, for the session information To the position offset of the corresponding session call number of the session.
The unit of above-described embodiment can integrate in one, can also be deployed separately;It can be merged into a unit, it can also To be further split into multiple subelements.
In conclusion the application is by the storage organization fixed for the configuration of each conversation type, host apparatus need to When stand-by equipment simultaneous session information, only pass through the meeting of fixed data structure and the location information synchronizing change for changing session information Information is talked about, synchronous data volume can be reduced, to improve equipment performance.
Stand-by equipment updates related session information by fixed data structure, according to offset, accelerates data update Speed.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all in essence of the invention Within mind and principle, any modification, equivalent substitution, improvement and etc. done be should be included within the scope of the present invention.

Claims (12)

1. a kind of method of data synchronization, which is characterized in that this method comprises:
Host apparatus configures storage organization for each conversation type, and being sent to stand-by equipment makes the stand-by equipment for each meeting Call type stores corresponding storage organization;Storage organization for the configuration of any conversation type is by the corresponding each meeting of the conversation type It talks about information to arrange by preset order, and distributes particular memory length for each session information, for the specific of any session information Memory length is the maximum length for storing the session information;
When the corresponding session of any conversation type is online, which stores the session according to the storage organization being locally configured The corresponding session information of type, and the session information is sent to the stand-by equipment according to the storage organization, so that institute It states stand-by equipment and the session information is stored according to the corresponding storage organization of the conversation type being locally stored;
When the corresponding session information change of the conversation type, which will need session information to be changed being somebody's turn to do in storage Location information in the corresponding session information of conversation type, and the session information of change are sent to the stand-by equipment, so that The stand-by equipment according to the location information and session information received in the session information for the session being locally stored more The session information newly changed.
2. the method according to claim 1, wherein the method further includes:
When the corresponding session of the conversation type is offline, the host apparatus is by the corresponding charge information of the session in session information Location information and the charge information be sent to the stand-by equipment so that the stand-by equipment is according to the position received Confidence breath and charge information update charge information in the session information for the session being locally stored.
3. method according to claim 1 or 2, which is characterized in that the method further includes: host apparatus is for each Conversation type establishes transmission control protocol TCP data channel with stand-by equipment respectively;
When the storage organization of each conversation type or session information are sent to stand-by equipment by host apparatus, carry in TCP message, It is sent by the TCP data channel that the corresponding conversation type is established, is deposited so that the stand-by equipment is known in the TCP message respectively Storage structure or the corresponding conversation type of session information.
4. method according to claim 1 or 2, which is characterized in that
The location information of any session information of the corresponding session of any conversation type, it is corresponding to the session for the session information The position offset of first session information.
5. method according to claim 1 or 2, which is characterized in that
When for the corresponding session of any conversation type there are it is multiple when, according to the corresponding session information of the session be the session divide With session call number, and when sending the corresponding session information of the session to the stand-by equipment, carry as session distribution Session call number, so that the stand-by equipment knows the corresponding session of session information that the host apparatus is sent.
6. according to the method described in claim 5, it is characterized in that,
Session call number is distributed if session, then the location information of any session information of the session arrives this for the session information The position offset of the corresponding session call number of session.
7. a kind of data synchronization unit, which is characterized in that the device includes: configuration unit and processing transmission unit;
The configuration unit, for configuring storage organization for each conversation type;For the storage knot of any conversation type configuration Structure is by the corresponding each session information of the conversation type by preset order arrangement, and long for each session information distribution particular memory Degree, the particular memory length for any session information are to store the maximum length of the session information;
The processing transmission unit, it is spare for the configuration unit to be sent to for the storage organization of each conversation type configuration Equipment makes the stand-by equipment store corresponding storage organization for each conversation type;When the corresponding session of any conversation type is online When, the corresponding session information of the conversation type is stored according to the storage organization being locally configured, and according to the storage organization by institute It states session information and is sent to the stand-by equipment, so that the stand-by equipment is deposited according to the conversation type being locally stored is corresponding Storage structure stores the session information;When the corresponding session information change of the conversation type, session information to be changed will be needed Location information in the corresponding session information of the conversation type of storage, and change session information be sent to it is described spare Equipment so that the stand-by equipment according to the location information and session information received the session being locally stored session The session information of change is updated in information.
8. device according to claim 7, which is characterized in that
The processing transmission unit is further used for when the corresponding session of the conversation type is offline, by the corresponding meter of the session Location information and the charge information of the charge information in session information are sent to the stand-by equipment, so that described spare Equipment updates charging letter according to the location information and charge information received in the session information for the session being locally stored Breath.
9. device according to claim 7 or 8, which is characterized in that
The configuration unit is further used for establishing transmission control protocol TCP number with stand-by equipment respectively for each conversation type According to channel;
The processing transmission unit is further used for the storage organization of each conversation type or session information being sent to stand-by equipment When, it carries in TCP message, is sent respectively by the TCP data channel that the configuration unit corresponds to conversation type foundation, with The stand-by equipment is set to know storage organization or the corresponding conversation type of session information in the TCP message.
10. device according to claim 7 or 8, which is characterized in that
The location information of any session information of the corresponding session of any conversation type, it is corresponding to the session for the session information The position offset of first session information.
11. device according to claim 7 or 8, which is characterized in that
The processing transmission unit, be further used for when for the corresponding session of any conversation type there are it is multiple when, according to this The corresponding session information of session is that the session distributes session call number, and is sending the corresponding meeting of the session to the stand-by equipment When talking about information, the session call number for session distribution is carried, so that the stand-by equipment knows what the host apparatus was sent The corresponding session of session information.
12. device according to claim 11, which is characterized in that
Session call number is distributed if session, then the location information of any session information of the session arrives this for the session information The position offset of the corresponding session call number of session.
CN201510103621.7A 2015-03-10 2015-03-10 A kind of method of data synchronization and device Active CN104702684B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510103621.7A CN104702684B (en) 2015-03-10 2015-03-10 A kind of method of data synchronization and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510103621.7A CN104702684B (en) 2015-03-10 2015-03-10 A kind of method of data synchronization and device

Publications (2)

Publication Number Publication Date
CN104702684A CN104702684A (en) 2015-06-10
CN104702684B true CN104702684B (en) 2019-01-08

Family

ID=53349442

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510103621.7A Active CN104702684B (en) 2015-03-10 2015-03-10 A kind of method of data synchronization and device

Country Status (1)

Country Link
CN (1) CN104702684B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105591810B (en) * 2015-10-22 2019-04-12 新华三技术有限公司 Backup messages sending method and equipment
CN106169999A (en) * 2016-07-27 2016-11-30 杭州迪普科技有限公司 The method and device of session backup
CN109413118B (en) * 2017-08-15 2022-05-10 东软集团股份有限公司 Method, device, storage medium and program product for realizing session synchronization
CN111107166B (en) * 2019-12-31 2022-05-17 奇安信科技集团股份有限公司 Session synchronization method, device, electronic equipment and medium
CN113992475B (en) * 2021-09-23 2023-12-26 新华三信息安全技术有限公司 Tunnel establishment method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101217405A (en) * 2008-01-15 2008-07-09 华为技术有限公司 SGSN backup method and communication system, communication device
CN102510408A (en) * 2011-11-30 2012-06-20 武汉烽火网络有限责任公司 Method for realizing TCP (transmission control protocol) application main and standby changeover
CN102769626A (en) * 2012-07-26 2012-11-07 北京神州绿盟信息安全科技股份有限公司 Method, device and system for session information synchronization
CN103544217A (en) * 2013-09-26 2014-01-29 福建省闽保信息技术股份有限公司 Data storage system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8009556B2 (en) * 2003-10-17 2011-08-30 Ip Infusion, Inc. System and method for providing redundant routing capabilities for a network node

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101217405A (en) * 2008-01-15 2008-07-09 华为技术有限公司 SGSN backup method and communication system, communication device
CN102510408A (en) * 2011-11-30 2012-06-20 武汉烽火网络有限责任公司 Method for realizing TCP (transmission control protocol) application main and standby changeover
CN102769626A (en) * 2012-07-26 2012-11-07 北京神州绿盟信息安全科技股份有限公司 Method, device and system for session information synchronization
CN103544217A (en) * 2013-09-26 2014-01-29 福建省闽保信息技术股份有限公司 Data storage system

Also Published As

Publication number Publication date
CN104702684A (en) 2015-06-10

Similar Documents

Publication Publication Date Title
CN104702684B (en) A kind of method of data synchronization and device
CN110401588B (en) Method and system for realizing VPC (virtual private network) peer-to-peer connection in public cloud platform based on openstack
CN106533883B (en) A kind of method for building up, the apparatus and system of network special line
CN104954281B (en) Communication means, system, resource pool management system, interchanger and control device
WO2017137008A1 (en) Virtual network apparatus, and related method
CN101039309B (en) Link sharing service apparatus and communication method thereof
CN113596191A (en) Data processing method, network element equipment and readable storage medium
CN103200120B (en) Message forwarding method under a kind of direct routing mode and the network equipment
CN103856358B (en) Ethernet port VLAN (virtual local area network) configuration system and method of EOC (Ethernet over coax) equipment
CN106936683B (en) A kind of method and device for realizing tunnel configuration
CN108964961A (en) A kind of method, apparatus and system of management transmission network slice
CN110113675B (en) N2N-NRM video sharing system and method
TW201234183A (en) Access control method, access control apparatus, and access control program
CN107547352A (en) Document sending method, apparatus and system
CN108989424A (en) A kind of method and system remotely controlled
EP2966899B1 (en) Hqos control method, rsg, and hqos control system
CN105591879B (en) Data transmission method and device
CN109600436A (en) A kind of distribution iscsi service implementing method, system and relevant apparatus
US11973824B2 (en) Method for data transmission of audio and video in end-to-end system
CN107465582B (en) Data sending method, device and system, physical home gateway and access node
CN115987871B (en) MQTT-based topological relation preservation method, device and medium
CN110661651A (en) SDN controller data management method, system, device and readable storage medium
CN102142997B (en) Method for managing remote branches and management server
CN105991629B (en) TCP connection method for building up and device
CN107360041A (en) A kind of network management and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No.

Applicant after: Xinhua three Technology Co., Ltd.

Address before: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No.

Applicant before: Huasan Communication Technology Co., Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant