CN101526958B - Method and system for synchronizing data between IPTV system modules - Google Patents

Method and system for synchronizing data between IPTV system modules Download PDF

Info

Publication number
CN101526958B
CN101526958B CN2009100817609A CN200910081760A CN101526958B CN 101526958 B CN101526958 B CN 101526958B CN 2009100817609 A CN2009100817609 A CN 2009100817609A CN 200910081760 A CN200910081760 A CN 200910081760A CN 101526958 B CN101526958 B CN 101526958B
Authority
CN
China
Prior art keywords
main control
control module
service processing
record
processing module
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.)
Expired - Fee Related
Application number
CN2009100817609A
Other languages
Chinese (zh)
Other versions
CN101526958A (en
Inventor
雷爱民
丁毅
朱红军
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN2009100817609A priority Critical patent/CN101526958B/en
Publication of CN101526958A publication Critical patent/CN101526958A/en
Application granted granted Critical
Publication of CN101526958B publication Critical patent/CN101526958B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present invention discloses a method for synchronizing data between IPTV system modules, wherein the method comprises the following steps: updating the record in a dynamic table by a master control module according to the changed dynamic data; transmitting synchronizing information to a service processing module; after the service processing module receives the synchronizing information, updating the record in the internal memory database of service processing module corresponding with the list name and record number carried in the synchronizing information according to operation style carried by the synthesizing information, or the operation style, field changing mark and changing content carried by the synthesizing information, and reverting the answering synchronizing information of master control module. The invention also discloses a system for synchronizing data between IPTV system modules, wherein the system comprises the master control module and the service processing module. The method and the system according to the invention can increase the real-time property of synchronizing and reduces the data volume needing synchronization.

Description

The method and system of data sync between a kind of IPTV system module
Technical field
The present invention relates to the data synchronization technology of memory database, relate in particular to the method and system of data sync between a kind of IPTV (IPTV) system module.
Background technology
The related data of IPTV system is divided into two types of static data and dynamic datas, and wherein, static data refers to the data that in system's running, do not change; Dynamic data refers to the data that in system's running, can change.The topological relation of backstage, main control module, Service Processing Module is as shown in Figure 1 in the IPTV system, and wherein, the backstage is generally PC, be used for configuration, the change of said static data, and the static data that will dispose or changed is synchronously to main control module; Main control module is used for the static data that receives synchronously to each Service Processing Module, and is used for system's dynamic data that changes in service so that control each Service Processing Module Business Processing being provided externally synchronously in real time synchronously to each Service Processing Module; Service Processing Module is responsible for managing business, and the static data of Service Processing Module and dynamic data are by the main control module synchronization gain.
Here, static data and dynamic data all are stored in the memory database of main control module or each Service Processing Module, that is: the data sync between said main control module and each Service Processing Module is the data sync between the memory database on it.
At present, the method for data synchronization of memory database commonly used is a step-out reflection method for synchronous, is specially: out-of-synchronization queue and timer are set in advance; When record changes, the recording mechanism of this record is put into out-of-synchronization queue, in the inspection out-of-synchronization queue whether record is arranged when arriving length of timer, if record is arranged, then this record is synchronized to the opposite end; Otherwise, do not carry out Synchronous Processing.The required data in synchronization amount of the method is bigger; And if adopt the method to realize that main control module and a plurality of Service Processing Module are synchronous, then need be for each Service Processing Module distributes an out-of-synchronization queue in main control module, so as mark whether need with data sync to this Service Processing Module and whether with data successfully synchronously to this Service Processing Module; That is: several Service Processing Modules are arranged in the system; Just need to distribute several out-of-synchronization queue, like this, can take bigger memory headroom; It is thus clear that the method is not suitable for main control module and a plurality of Service Processing Module is synchronous.
Summary of the invention
In view of this, main purpose of the present invention is to provide the method and system of data sync between a kind of IPTV system module, can improve real-time property of synchronizing, and reduces required data in synchronization amount.
For achieving the above object, technical scheme of the present invention is achieved in that
The method of data sync between a kind of IPTV system module, this method comprises:
Main control module is allocated the global data district in advance; Overall array is set, and said overall array comprises: the array that the keyword of table name, record, action type, field change the recorded content of mark, variation, be made up of module No. and by the corresponding relation of module No., sync mark and repeating transmission number of times;
When the record of the keyword correspondence that has the entrained table name of update inquiry information receive and record in the memory database of main control module; The renewal process of main control module is according to determined record; The table name that said update inquiry information is carried; The keyword of record; Action type; Field changes mark; And the module No. of online Service Processing Module is the corresponding member's assignment in the set overall array; And said sync mark is set respectively; Retransmit the initial value of number of times; Obtain the corresponding overall array of determined record, and be stored in said global data district;
Main control module upgrades the record of dynamic table in the self EMS memory database according to the dynamic data that changes, and sends synchronization message;
Receive the Service Processing Module of synchronization message, according to action type entrained in the synchronization message, table name that carries in the renewal synchronization message and the record in the pairing self EMS memory database of recording mechanism, and reply main control module acknowledge synchronization message;
Subscript and the consistent overall array of the entrained array index of acknowledge synchronization message that receives in the renewal process inquiry global data district of main control module, the value of the sync mark that the entrained module No. of the acknowledge synchronization message that receives in the said overall array is corresponding changes TRUE into; When the value of confirming all sync marks in the said overall array is TRUE, remove said overall array;
Main control module regularly travels through the global data district, if exist Service Processing Module that the synchronous regime of changing content is failure, and then synchronous again this changing content.
Further, the recording and sending synchronization message in the said main control module renewal dynamic table is specially:
After dynamic data changes; The business process of main control module is deleted, is inserted or revise the record in the dynamic table based on the dynamic data that changes; Upgrade the record in the dynamic table, and send the keyword of the table name that carries said dynamic table, recording mechanism, said record, the field of action type that said record is operated and said record changes the renewal process of update inquiry information to the main control module of mark;
The renewal process of main control module confirms that the entrained action type of the update inquiry information of receiving is to insert, revise or deletion; If insert or revise; Then the renewal process of main control module is judged the corresponding record of keyword that whether has entrained table name of the update inquiry information of receiving and record in the memory database of main control module; If exist; Field changes the changing content of mark institute corresponding element as this record in then will writing down, and sends synchronization message to the online Service Processing Module that carries said table name, recording mechanism, action type, field variation mark and changing content; If do not exist, then finish this synchronous flow process; If deletion, the renewal process of main control module is sent synchronization message to online Service Processing Module.
Further, main control module is provided with synchro timer when sending synchronization message to Service Processing Module; When synchro timer is overtime, during said timing traversal global data district, if the Service Processing Module that exists is failure to the synchronous regime of changing content, then again synchronously this changing content be:
The renewal process of A, main control module traversal global data district confirms in the global data district that whether existence value is the sync mark of FALSE in the overall array, if there is no, then removes this overall situation array, finishes this overtime simultaneously operating; If exist, then execution in step B;
B, confirm the threshold value of the value of the repeating transmission number of times that said sync mark is corresponding less than predefined repeating transmission number of times; Then judge the corresponding record of keyword that whether has included table name of this overall situation array and record in the memory database of main control module; If exist; Field changes the changing content of mark institute corresponding element as this record in then will writing down, and sends synchronization message to each online Service Processing Module, and the value of the repeating transmission number of times that said sync mark is corresponding adds 1; And the said synchro timer of resetting, finish this overtime simultaneous operation; If do not exist, then removing should overall situation array, finishes this overtime simultaneous operation.
Further, this method further comprises regularly synchronously, is specially:
Every at a distance from setting-up time, confirm that there is also not synchronous successful changing content in main control module in the synchronous changing content of Service Processing Module, Service Processing Module sends synchronization request message to main control module;
After main control module receives synchronization request message, with existing the dynamic table of synchronously not successful changing content to return back to Service Processing Module in the main control module memory database.
Further, said timing further comprises synchronously:
The local array that comprises variable module No., dynamic data version number and sync mark is set in advance; Said synchro timer is overtime, the renewal process of main control module traversal global data district, confirm that the existence value is the sync mark of FALSE in the overall array in the global data district after, this method further comprises:
Confirm that the value of the repeating transmission number of times that said sync mark is corresponding equals the threshold value of predefined repeating transmission number of times; Judge the corresponding record of keyword that whether has included table name of this overall situation array and record in the memory database of main control module; If exist; Then that the table name of said overall array is corresponding dynamic table is stamped the step-out mark, forms the dynamic table of stamping the step-out mark, gives the relevant variable of set local array with the value assignment that the dynamic data version number of sync mark and the value of retransmitting the pairing module No. of number of times, sync mark and main control module adds after 1; In the global data district, and remove should overall situation array with the local storage of array that obtains; If do not exist, then removing should overall situation array.
Further, said definite main control module exists also not synchronous successful changing content to comprise in the synchronous changing content of Service Processing Module:
A, Service Processing Module send the renewal process that the notification message of the module No. that carries this Service Processing Module and dynamic data version number is given main control module;
After b, active module renewal process receive said notification message; Whether the dynamic data version number that relatively comprises in the local array of the entrained module No. of notification message is identical with the entrained dynamic data of notification message version number; If it is identical; The value of sync mark in this part array is changed to TRUE, and the inquiry whether exist comprise the local array that sync mark is FALSE, if do not exist; Remove the step-out mark on the dynamic table, finish the synchronous flow process of this timing said Service Processing Module; If there is execution in step c; If inequality, do not change the value of sync mark in this part array, execution in step c;
C, send answer-notification message, carry the dynamic data version number in the local array of the module No. that comprises this Service Processing Module in this answer-notification message to Service Processing Module;
Whether the entrained dynamic data version number of the answer-notification message that d, Service Processing Module relatively receive and self dynamic versions of data be number consistent; If it is inconsistent; The value of the cogradient variable that then will be provided with in advance is changed to FALSE; And the self dynamic versions of data number is updated to the entrained dynamic data version number of answer-notification message, think that there is also successful changing content synchronously in main control module in the synchronous changing content of this Service Processing Module; If it is consistent; When then the value of cogradient variable is FALSE; Think that there is also not synchronous successful changing content in main control module in the synchronous changing content of this Service Processing Module; When the value of cogradient variable is TRUE, think that there is not also not synchronous successful changing content in main control module in the synchronous changing content of this Service Processing Module.
Further, saidly the dynamic table that has synchronously not successful changing content in the main control module memory database returned back to Service Processing Module comprise:
Service Processing Module sends synchronization request message to the renewal process of main control module; After the renewal process of main control module receives this synchronization request message, the dynamic table of stamping the step-out mark is sent to Service Processing Module; Service Processing Module receives said dynamic table, replaces corresponding dynamic table in this Service Processing Module memory database by received dynamic table, and the value of cogradient variable is changed to TRUE, sends synchronous success message to the renewal process of main control module.
Further, when main control module was restarted, this method comprised that further static data is synchronous, is specially:
Service Processing Module detects main control module restart after, send the static data synchronization request message to main control module;
After main control module receives the static data synchronization request message, send the static data syn ack message of carrying main control module static data version number to Service Processing Module;
After Service Processing Module received static data syn ack message, whether the static data version number of this Service Processing Module of comparison was consistent with the static data version number that static data syn ack message is carried, if consistent, finishes this Static Synchronous flow process; If inconsistent, then with static data synchronously to each Service Processing Module.
The present invention also provides data synchronization system between a kind of IPTV system module, and this system comprises:
Main control module; Be used to allocate in advance the global data district; Overall array is set; When the record of the keyword correspondence that has the entrained table name of update inquiry information receive and record in the memory database of main control module; According to determined record; The table name that said update inquiry information is carried; The keyword of record; Action type; Field changes mark; And the module No. of online Service Processing Module is the corresponding member's assignment in the set overall array; And said sync mark is set respectively; Retransmit the initial value of number of times; Obtain the corresponding overall array of determined record, and be stored in said global data district; Upgrade the record of dynamic table in the self EMS memory database according to the dynamic data that changes, and send synchronization message; Also be used for after receiving acknowledge synchronization message; Subscript and the consistent overall array of the entrained array index of acknowledge synchronization message that receives in the inquiry global data district, the value of the sync mark that the entrained module No. of the acknowledge synchronization message that receives in the said overall array is corresponding changes TRUE into; When the value of confirming all sync marks in the said overall array is TRUE, remove said overall array;
Service Processing Module is used for according to the entrained action type of synchronization message that receives, table name that carries in the renewal synchronization message and the record in the pairing self EMS memory database of recording mechanism, and reply main control module acknowledge synchronization message.
Further, said main control module comprises the business process unit and upgrades process unit; Wherein,
The business process unit is used for based on the dynamic data that changes the record of dynamic table being deleted, being inserted or revises, and upgrades the record in the dynamic table; And be used to send the keyword of the table name that carries this dynamic table, recording mechanism, this record, the field of action type that this record is operated and this record changes update inquiry information to the renewal process of mark;
Upgrade process unit; Be used to confirm that the entrained action type of the update inquiry information that receives is to insert, revise or deletion; During for insertion or modification; Confirm to exist in the memory database of main control module the record of the keyword correspondence of the entrained table name of update inquiry information that receives and record; And field changes the changing content of mark institute corresponding element as this record in will writing down, and sends synchronization message to the online Service Processing Module that carries said table name, recording mechanism, action type, field variation mark and changing content; During for deletion, send synchronization message to online Service Processing Module.
The method and system of data sync between IPTV system module provided by the present invention; After system's operation causes dynamic data to change; Promptly upgrade the record in the dynamic table, concurrent dynamic data sync, thus improved real-time property of synchronizing; And only synchronous changing content has reduced required data in synchronization amount.The present invention also has following advantage and characteristics:
1) main control module is by pre-assigned global data district; The relevant information of record and each Service Processing Module are to the synchronous regime of this changing content under the storage change content; And timing travels through the global data district; It is synchronous that the changing content of synchronization failure is initiated dynamic data again; To improve, avoid taking place the inconsistent situation of dynamic data between main control module and each Service Processing Module with the synchronous probability of changing content success to Service Processing Module;
2) after the renewal process of main control module receives update inquiry information; Judge the corresponding record of keyword that whether has entrained table name of this update inquiry information and record in the memory database of main control module; If there is no; It is subsynchronous to finish this; Like this, avoided the deleted record that comprises changing content before receiving update inquiry information is carried out synchronously;
3) overall array is set to the structure array; Make main control module only need distribute a global data district to get final product the synchronous regime of each Service Processing Module of corresponding stored; And all successes synchronously during the corresponding changing content of certain overall array or the value of retransmitting number of times when equaling the threshold value of predefined repeating transmission number of times of each online Service Processing Module; Promptly remove this overall situation array; Make do not need will be bigger memory headroom as the global data district, significantly reduced the dynamic data required memory headroom that takies synchronously;
4) every at a distance from setting-up time, confirm that there is also not synchronous successful changing content in main control module in the synchronous changing content of Service Processing Module, carry out timing simultaneous operation, guarantee that further dynamic data is consistent between main control module and each Service Processing Module;
When 5) main control module is restarted; Carry out static data simultaneous operation; If make and in the main control module restarting process, to have changed static data, can be in time with the static data after the change synchronously to each Service Processing Module, guarantee that the static data of main control module and each Service Processing Module is consistent.
Description of drawings
Fig. 1 is the topological relation sketch map of backstage, main control module, Service Processing Module in the IPTV system;
Fig. 2 realizes the synchronous schematic flow sheet of dynamic data for the method that adopts data sync between IPTV system module of the present invention.
Embodiment
Basic thought of the present invention is: after system's operation causes dynamic data to change; Promptly according to the dynamic data after changing; Dynamic table to the main control module memory database is deleted, the operation of insertion or amendment record; Upgrade the record in the dynamic table, concurrent dynamic data sync improved real-time property of synchronizing; And synchronous changing content is only compared with the record under the synchronous changing content and have been reduced required data in synchronization amount; Wherein, said dynamic table is used to store dynamic data; Said changing content is meant the element that has upgraded in the record.
Realization of the present invention system is the IPTV system, comprises backstage, main control module, Service Processing Module, and wherein, main control module comprises business process, renewal process.
Adopt the method for data sync between IPTV system module of the present invention to realize that the synchronous flow process of dynamic data is as shown in Figure 2, may further comprise the steps:
Step 201: after system's operation caused dynamic data to change, main control module upgraded the record in the dynamic table in the self EMS memory database according to the dynamic data that changes, and sent synchronization message to Service Processing Module; The said system of the embodiment of the invention is the IPTV system.
Wherein, upgrade the record in the dynamic table, send synchronization message to Service Processing Module and be specially:
After system's operation causes dynamic data to change; The business process of main control module is deleted, is inserted or revise the record in the dynamic table based on the dynamic data that changes; Upgrade the record in the dynamic table, and send the keyword of the table name that carries said dynamic table, recording mechanism, said record, the field of action type that said record is operated and said record changes the renewal process of update inquiry information to the main control module of mark;
Wherein, said action type comprises deletion, inserts or revises three types; Said field changes the field that mark is used for indicating the element place that record upgraded; When action type was deletion, said field variation was labeled as sky;
The renewal process of main control module confirms that the entrained action type of the update inquiry information of receiving is to insert, revise or deletion; If insert or revise; Then the renewal process of main control module is judged the corresponding record of keyword that whether has entrained table name of the update inquiry information of receiving and record in the memory database of main control module; If exist; Field changes the changing content of mark institute corresponding element as this record in then will writing down, and sends synchronization message to the online Service Processing Module that carries said table name, recording mechanism, action type, field variation mark and changing content; If do not exist, then finish this synchronous flow process; If deletion, the renewal process of main control module is sent synchronization message to online Service Processing Module, and this synchronization message is carried entrained table name, recording mechanism, the action type of update inquiry information that receives.
Here, when action type is insertion or modification, after the renewal process of main control module receives update inquiry information; Judge the corresponding record of keyword that whether has entrained table name of this update inquiry information and record in the memory database of main control module,, finish that this is subsynchronous if do not exist; Like this, when when main control module upgrades the record in the dynamic table, system's operation causes having deleted this intrarecord dynamic data; Promptly; Main control module just can carry out deletion action to this record immediately, and subsynchronous under promptly initiating, when deleting the respective record in each Service Processing Module memory database; Can omit this subsynchronous in, with changing content synchronously to the flow process of each Service Processing Module; And action type is when deletion, and synchronization message is only carried table name, recording mechanism, action type, can reduce the synchronous required data quantity transmitted of dynamic data between main control module and Service Processing Module.
Step 202: the Service Processing Module of receiving synchronization message; According to action type entrained in the synchronization message or the entrained action type of synchronization message, field variation mark and changing content; Upgrade table name that synchronization message carries and recording mechanism the record in the corresponding self EMS memory database; And reply main control module acknowledge synchronization message, finish this synchronous flow process.
Wherein, if the entrained action type of synchronization message is deletion, the table name that Service Processing Module deletion synchronization message is carried and recording mechanism the record in this Service Processing Module of correspondence memory database; If the entrained action type of synchronization message is for inserting; The field that Service Processing Module carries according to synchronization message changes mark, and recording mechanism and changing content that synchronization message is carried insert the dynamic table in pairing Service Processing Module memory database of the entrained table name of synchronization message; If the entrained action type of synchronization message is for revising; Service Processing Module confirms that table name, recording mechanism and field that synchronization message carries change the element in mark institute this Service Processing Module of correspondence memory database, and the changing content that is carried by synchronization message covers determined element.
The embodiment of the invention also can comprise overtime simultaneous operation, and concrete steps are following:
Steps A 1, the relevant information that writes down under the changing content and each Service Processing Module are stored to said global data district to the synchronous regime of this changing content; Be specially:
Overall array is set; Said overall array is the structure array, and included member is: the keyword of table name, record, action type, field change the recorded content of mark, variation, the array of being made up of module No. and the array of being made up of the corresponding relation of module No., sync mark and repeating transmission number of times;
Wherein, the keyword of table name, record, action type, field change the relevant information that writes down under the corresponding changing content of recorded content of mark, variation; Each Service Processing Module that the array of being made up of module No. is corresponding online; Corresponding each Service Processing Module of array of sync mark and the corresponding relation composition of retransmitting number of times is to the synchronous regime of this changing content;
Here; With overall array define is the structure array; Make an overall array can comprise relevant information and online each Service Processing Module of record under the said changing content synchronous regime to this changing content; Like this, main control module only need distribute a global data district to get final product the synchronous regime of corresponding each Service Processing Module.
Accordingly; When having the record of keyword correspondence of the entrained table name of update inquiry information receive and record in the memory database of main control module; The module No. that the renewal process of main control module changes mark and online Service Processing Module according to keyword, action type, the field of determined record, table name that said update inquiry information is carried, record is the corresponding member's assignment in the set overall array; And and said sync mark be set respectively, retransmit the initial value of number of times; Obtain the corresponding overall array of determined record, and be stored in said global data district; Here, the initial value of said sync mark is set to FALSE, and the initial value of said repeating transmission number of times is set to 0;
After the said answer main control module response message; The subscript overall array consistent in the renewal process inquiry global data district of main control module with the entrained array index of the response message that receives, the value of the sync mark that the entrained module No. of the response message that receives in this overall situation array is corresponding changes TRUE into; The value of confirming all sync marks in this overall situation array is TRUE, and removing should overall situation array;
Here, confirm that the value of all sync marks in this overall situation array is TRUE, removing should overall situation array; That is, all successes synchronously during the corresponding changing content of certain overall array of each online Service Processing Module, promptly removing should overall situation array; In time discharge the memory headroom in shared global data district; Make that the quantity of overall array of the required storage in global data district is few, therefore, do not need will be bigger memory headroom as the global data district; The general memory headroom that only needs hundreds of K has significantly reduced the dynamic data required memory headroom that takies synchronously.
Step B1, timing travel through the global data district, if exist for the synchronous regime of the Service Processing Module of failure to changing content, then synchronous again this changing content is to this Service Processing Module; Be specially:
Do not have synchro timer on the main control module, when then sending synchronization message to Service Processing Module, synchro timer is set;
Accordingly, when synchro timer was overtime, this method further comprised:
The renewal process of step a1, main control module traversal global data district confirms in the global data district that whether existence value is the sync mark of FALSE in the overall array, if do not exist, and execution in step b1; If there is execution in step c1;
Step b1, removing should overall situation array, finishes this overtime simultaneous operation;
Step c1, confirm the threshold value of the value of the repeating transmission number of times that said sync mark is corresponding less than predefined repeating transmission number of times; Then judge the corresponding record of keyword that whether has included table name of this overall situation array and record in the memory database of main control module; If exist; Field changes the changing content of mark institute corresponding element as this record in then will writing down, and sends synchronization message to each online Service Processing Module, and the value of the repeating transmission number of times that said sync mark is corresponding adds 1; And the said synchro timer of resetting, finish this overtime simultaneous operation; If do not exist, then removing should overall situation array, finishes this overtime simultaneous operation;
Wherein, said synchronization message is carried the included table name of this overall situation array, action type, field and is changed mark, institute and confirm the recording mechanism and the said changing content that write down.
Here; When not having synchro timer on the main control module; When sending synchronization message to Service Processing Module; Synchro timer just is set; And after synchro timer is set; After synchro timer is overtime; If there be not the sync mark of value in the global data district in the overall array for FALSE; Promptly; The global data district does not have overall array, or the overall array in global data district is not reseted timer all can remove the time; When main control module sends synchronization message to Service Processing Module once more, just reset synchro timer; If in the global data district in the overall array existence value be the sync mark of FALSE, reset synchro timer.
The embodiment of the invention also can comprise regularly simultaneous operation, and concrete steps are following:
Steps A 2, setting in advance comprise the local array of variable module No., dynamic data version number and sync mark;
Step B2, said synchro timer are overtime, the renewal process traversal global data district of main control module, confirm that the existence value is the sync mark of FALSE in the overall array in the global data district after, further comprise:
Confirm that the value of the repeating transmission number of times that said sync mark is corresponding equals the threshold value of predefined repeating transmission number of times; Then judge the corresponding record of keyword that whether has included table name of this overall situation array and record in the memory database of main control module; If exist; Then that the table name of said overall array is corresponding dynamic table is stamped the step-out mark; The dynamic table of step-out mark is stamped in formation, and this dynamic table of stamping the step-out mark is the not dynamic table of synchronously successful changing content of existence, and the dynamic data version number of sync mark and the value of retransmitting the pairing module No. of number of times, sync mark and main control module is added value assignment after 1 to the relevant variable of set local array; In the global data district, and remove should overall situation array with the local storage of array that obtains; If do not exist, then removing should overall situation array.
Here, the threshold value of said predefined repeating transmission number of times is 3; When the value of retransmitting number of times equaled the threshold value of predefined repeating transmission number of times, promptly removing should overall situation array, in time discharged the memory headroom in shared global data district, make do not need will be bigger memory headroom as the global data district.
Step C2, every at a distance from setting-up time confirms that there is also not synchronous successful changing content in main control module in the synchronous changing content of Service Processing Module, and Service Processing Module sends synchronization request message to main control module;
Wherein, said setting-up time is 20 seconds, and the present invention is through overtime simultaneous operation; Basically can guarantee with changing content success that synchronously to each Service Processing Module regularly the probability that takes place of simultaneous operation is minimum, if take place; Can will respond the time delay setting-up time 20 seconds of user's request, it is generally acknowledged that the user can accept and 20 seconds the incident of time delay that the response user asks take place once in a while, therefore; Think when setting-up time is 20 seconds, do not influence the synchronous in real time of dynamic data.
After step D2, main control module receive synchronization request message, with existing the dynamic table of synchronously not successful changing content to return back to Service Processing Module in the main control module memory database.
A2, Service Processing Module send the renewal process that the notification message of the module No. that carries this Service Processing Module and dynamic data version number is given main control module;
After b2, active module renewal process receive said notification message; Whether the dynamic data version number that relatively comprises in the local array of the entrained module No. of notification message is identical with the entrained dynamic data of notification message version number; If it is identical; The value of sync mark in this part array is changed to TRUE, and the inquiry whether exist comprise the local array that sync mark is FALSE, if do not exist; Remove the step-out mark on the dynamic table, finish the synchronous flow process of this timing said Service Processing Module; If there is execution in step c2; If inequality, do not change the value of sync mark in this part array, execution in step c2;
C2, send answer-notification message, carry the dynamic data version number in the local array of the module No. that comprises this Service Processing Module in this answer-notification message to Service Processing Module;
Whether the entrained dynamic data version number of the answer-notification message that d2, Service Processing Module relatively receive and self dynamic versions of data be number consistent; If it is inconsistent; The value of the cogradient variable that then will be provided with in advance is changed to FALSE; And the self dynamic versions of data number is updated to the entrained dynamic data version number of answer-notification message, think that main control module exists also successful changing content synchronously, execution in step e2 in the synchronous changing content of this Service Processing Module; If consistent, when then the value of cogradient variable is FALSE, think that main control module exists also not synchronous successful changing content, execution in step e2 in the synchronous changing content of this Service Processing Module; When the value of cogradient variable is TRUE, think that there is not also not synchronous successful changing content in main control module in the synchronous changing content of this Service Processing Module, finish this regularly simultaneous operation.
Step e2, Service Processing Module send synchronization request message to the renewal process of main control module; After the renewal process of main control module receives this synchronization request message, the dynamic table of stamping the step-out mark is sent to Service Processing Module; Service Processing Module receives said dynamic table; By corresponding dynamic table in received this Service Processing Module of dynamic table replacement memory database; And the value of cogradient variable is changed to TRUE, and send synchronous success message to the renewal process of main control module, finish this regularly simultaneous operation.
When main control module was restarted, the embodiment of the invention also can comprise static data simultaneous operation, and concrete steps are following:
Steps A 3, Service Processing Module detect main control module restart finish after, send the static data synchronization request message to main control module;
After step B3, main control module receive the static data synchronization request message, send the static data syn ack message of carrying main control module static data version number to Service Processing Module;
After step C3, Service Processing Module receive static data syn ack message; Whether the static data version number of this Service Processing Module of comparison is consistent with the static data version number that static data syn ack message is carried; If consistent, finish this Static Synchronous flow process; If inconsistent, execution in step D.
Step D3, with static data synchronously to each Service Processing Module, be specially:
A3, Service Processing Module send to main control module and obtain data configuration message;
Here, configuration information failure timer and overtime retransmission timer can also be set, the timing length of configuration information failure timer is greater than overtime retransmission timer; When if overtime retransmission timer is overtime, do not receive the configuration response message yet, then retransmit and obtain data configuration message; If during configuration information failure timer expiry, do not receive the configuration response message yet, think then that main control module does not start or with the main control module communication abnormality, finish this static data simultaneous operation.
After b3, main control module receive and obtain data configuration message, reply the configuration response message that Service Processing Module carries the static data version number of main control module.
After c3, Service Processing Module receive the configuration response message; According to disposing the static data version number that response message is carried; Upgrade the static data version number of this Service Processing Module, and reply main control module and carry the data synchronization request message that this business module is wanted synchronous table name.
After d3, main control module received data synchronization request message, the pairing static table of table name that data synchronization request message is carried sent to Service Processing Module.
The said static table that e3, Service Processing Module will receive is loaded in the memory database of this Service Processing Module, and replys main control module data sync success message, finishes this static data simultaneous operation.
For realizing such scheme, the structure of data synchronization system comprises between embodiment of the invention IPTV system module:
Main control module is used for the record according to the dynamic data renewal self EMS memory database dynamic table that changes; And be used to send synchronization message to Service Processing Module;
Service Processing Module is used for according to the entrained action type of synchronization message that receives, table name that carries in the renewal synchronization message and the record in the pairing self EMS memory database of recording mechanism, and reply main control module acknowledge synchronization message.
Wherein, said main control module comprises the business process unit and upgrades process unit; Wherein,
The business process unit is used for based on the dynamic data that changes the record of dynamic table being deleted, being inserted or revises, and upgrades the record in the dynamic table; And be used to send the keyword of the table name that carries this dynamic table, recording mechanism, this record, the field of action type that this record is operated and this record changes update inquiry information to the renewal process of mark;
Upgrade process unit; Be used to confirm that the entrained action type of the update inquiry information that receives is to insert, revise or deletion; During for insertion or modification; Confirm to exist in the memory database of main control module the record of the keyword correspondence of the entrained table name of update inquiry information that receives and record; And field changes the changing content of mark institute corresponding element as this record in will writing down, and sends synchronization message to the online Service Processing Module that carries said table name, recording mechanism, action type, field variation mark and changing content; During for deletion, send synchronization message to online Service Processing Module.
The above is merely preferred embodiment of the present invention, is not to be used to limit protection scope of the present invention.

Claims (10)

1. the method for data sync between an IPTV system module is characterized in that this method comprises:
Main control module is allocated the global data district in advance; Overall array is set, and said overall array comprises: the array that the keyword of table name, record, action type, field change the recorded content of mark, variation, be made up of module No. and by the corresponding relation of module No., sync mark and repeating transmission number of times;
When the record of the keyword correspondence that has the entrained table name of update inquiry information receive and record in the memory database of main control module; The renewal process of main control module is according to determined record; The table name that said update inquiry information is carried; The keyword of record; Action type; Field changes mark; And the module No. of online Service Processing Module is the corresponding member's assignment in the set overall array; And said sync mark is set respectively; Retransmit the initial value of number of times; Obtain the corresponding overall array of determined record, and be stored in said global data district;
Main control module upgrades the record of dynamic table in the self EMS memory database according to the dynamic data that changes, and sends synchronization message;
Receive the Service Processing Module of synchronization message, according to action type entrained in the synchronization message, table name that carries in the renewal synchronization message and the record in the pairing self EMS memory database of recording mechanism, and reply main control module acknowledge synchronization message;
Subscript and the consistent overall array of the entrained array index of acknowledge synchronization message that receives in the renewal process inquiry global data district of main control module, the value of the sync mark that the entrained module No. of the acknowledge synchronization message that receives in the said overall array is corresponding changes TRUE into; When the value of confirming all sync marks in the said overall array is TRUE, remove said overall array;
Main control module regularly travels through the global data district, if exist Service Processing Module that the synchronous regime of changing content is failure, and then synchronous again this changing content.
2. the method for data sync is characterized in that between IPTV system module according to claim 1, and the recording and sending synchronization message that said main control module upgrades in the dynamic table is specially:
After dynamic data changes; The business process of main control module is deleted, is inserted or revise the record in the dynamic table based on the dynamic data that changes; Upgrade the record in the dynamic table, and send the keyword of the table name that carries said dynamic table, recording mechanism, said record, the field of action type that said record is operated and said record changes the renewal process of update inquiry information to the main control module of mark;
The renewal process of main control module confirms that the entrained action type of the update inquiry information of receiving is to insert, revise or deletion; If insert or revise; Then the renewal process of main control module is judged the corresponding record of keyword that whether has entrained table name of the update inquiry information of receiving and record in the memory database of main control module; If exist; Field changes the changing content of mark institute corresponding element as this record in then will writing down, and sends synchronization message to the online Service Processing Module that carries said table name, recording mechanism, action type, field variation mark and changing content; If do not exist, then finish this synchronous flow process; If deletion, the renewal process of main control module is sent synchronization message to online Service Processing Module.
3. the method for data sync is characterized in that between IPTV system module according to claim 1, and main control module is provided with synchro timer when sending synchronization message to Service Processing Module; When synchro timer is overtime, during said timing traversal global data district, if the Service Processing Module that exists is failure to the synchronous regime of changing content, then again synchronously this changing content be:
The renewal process of A, main control module traversal global data district confirms in the global data district that whether existence value is the sync mark of FALSE in the overall array, if there is no, then removes this overall situation array, finishes this overtime simultaneously operating; If exist, then execution in step B;
B, confirm the threshold value of the value of the repeating transmission number of times that said sync mark is corresponding less than predefined repeating transmission number of times; Then judge the corresponding record of keyword that whether has included table name of this overall situation array and record in the memory database of main control module; If exist; Field changes the changing content of mark institute corresponding element as this record in then will writing down, and sends synchronization message to each online Service Processing Module, and the value of the repeating transmission number of times that said sync mark is corresponding adds 1; And the said synchro timer of resetting, finish this overtime simultaneous operation; If do not exist, then removing should overall situation array, finishes this overtime simultaneous operation.
4. the method for data sync is characterized in that between IPTV system module according to claim 3, and this method further comprises regularly synchronously, is specially:
Every at a distance from setting-up time, confirm that there is also not synchronous successful changing content in main control module in the synchronous changing content of Service Processing Module, Service Processing Module sends synchronization request message to main control module;
After main control module receives synchronization request message, with existing the dynamic table of synchronously not successful changing content to return back to Service Processing Module in the main control module memory database.
5. the method for data sync is characterized in that between IPTV system module according to claim 4, and said timing further comprises synchronously:
The local array that comprises variable module No., dynamic data version number and sync mark is set in advance; Said synchro timer is overtime, the renewal process of main control module traversal global data district, confirm that the existence value is the sync mark of FALSE in the overall array in the global data district after, this method further comprises:
Confirm that the value of the repeating transmission number of times that said sync mark is corresponding equals the threshold value of predefined repeating transmission number of times; Judge the corresponding record of keyword that whether has included table name of this overall situation array and record in the memory database of main control module; If exist; Then that the table name of said overall array is corresponding dynamic table is stamped the step-out mark, forms the dynamic table of stamping the step-out mark, gives the relevant variable of set local array with the value assignment that the dynamic data version number of sync mark and the value of retransmitting the pairing module No. of number of times, sync mark and main control module adds after 1; In the global data district, and remove should overall situation array with the local storage of array that obtains; If do not exist, then removing should overall situation array.
6. the method for data sync is characterized in that between IPTV system module according to claim 5, and said definite main control module exists also not synchronous successful changing content to comprise in the synchronous changing content of Service Processing Module:
A, Service Processing Module send the renewal process that the notification message of the module No. that carries this Service Processing Module and dynamic data version number is given main control module;
After b, active module renewal process receive said notification message; Whether the dynamic data version number that relatively comprises in the local array of the entrained module No. of notification message is identical with the entrained dynamic data of notification message version number; If it is identical; The value of sync mark in this part array is changed to TRUE, and the inquiry whether exist comprise the local array that sync mark is FALSE, if do not exist; Remove the step-out mark on the dynamic table, finish the synchronous flow process of this timing said Service Processing Module; If there is execution in step c; If inequality, do not change the value of sync mark in this part array, execution in step c;
C, send answer-notification message, carry the dynamic data version number in the local array of the module No. that comprises this Service Processing Module in this answer-notification message to Service Processing Module;
Whether the entrained dynamic data version number of the answer-notification message that d, Service Processing Module relatively receive and self dynamic versions of data be number consistent; If it is inconsistent; The value of the cogradient variable that then will be provided with in advance is changed to FALSE; And the self dynamic versions of data number is updated to the entrained dynamic data version number of answer-notification message, think that there is also successful changing content synchronously in main control module in the synchronous changing content of this Service Processing Module; If it is consistent; When then the value of cogradient variable is FALSE; Think that there is also not synchronous successful changing content in main control module in the synchronous changing content of this Service Processing Module; When the value of cogradient variable is TRUE, think that there is not also not synchronous successful changing content in main control module in the synchronous changing content of this Service Processing Module.
7. the method for data sync is characterized in that between IPTV system module according to claim 6, saidly the dynamic table that has synchronously not successful changing content in the main control module memory database is returned back to Service Processing Module comprises:
Service Processing Module sends synchronization request message to the renewal process of main control module; After the renewal process of main control module receives this synchronization request message, the dynamic table of stamping the step-out mark is sent to Service Processing Module; Service Processing Module receives said dynamic table, replaces corresponding dynamic table in this Service Processing Module memory database by received dynamic table, and the value of cogradient variable is changed to TRUE, sends synchronous success message to the renewal process of main control module.
8. the method for data sync is characterized in that between IPTV system module according to claim 1, and when main control module was restarted, this method comprised that further static data is synchronous, is specially:
Service Processing Module detects main control module restart after, send the static data synchronization request message to main control module;
After main control module receives the static data synchronization request message, send the static data syn ack message of carrying main control module static data version number to Service Processing Module;
After Service Processing Module received static data syn ack message, whether the static data version number of this Service Processing Module of comparison was consistent with the static data version number that static data syn ack message is carried, if consistent, finishes this Static Synchronous flow process; If inconsistent, then with static data synchronously to each Service Processing Module.
9. data synchronization system between an IPTV system module is characterized in that this system comprises:
Main control module; Be used to allocate in advance the global data district; Overall array is set; When the record of the keyword correspondence that has the entrained table name of update inquiry information receive and record in the memory database of main control module; According to determined record; The table name that said update inquiry information is carried; The keyword of record; Action type; Field changes mark; And the module No. of online Service Processing Module is the corresponding member's assignment in the set overall array; And said sync mark is set respectively; Retransmit the initial value of number of times; Obtain the corresponding overall array of determined record, and be stored in said global data district; Upgrade the record of dynamic table in the self EMS memory database according to the dynamic data that changes, and send synchronization message; Also be used for after receiving acknowledge synchronization message; Subscript and the consistent overall array of the entrained array index of acknowledge synchronization message that receives in the inquiry global data district, the value of the sync mark that the entrained module No. of the acknowledge synchronization message that receives in the said overall array is corresponding changes TRUE into; When the value of confirming all sync marks in the said overall array is TRUE, remove said overall array;
Service Processing Module is used for according to the entrained action type of synchronization message that receives, table name that carries in the renewal synchronization message and the record in the pairing self EMS memory database of recording mechanism, and reply main control module acknowledge synchronization message.
10. data synchronization system between IPTV system module according to claim 9 is characterized in that, said main control module comprises the business process unit and upgrades process unit; Wherein,
The business process unit is used for based on the dynamic data that changes the record of dynamic table being deleted, being inserted or revises, and upgrades the record in the dynamic table; And be used to send the keyword of the table name that carries this dynamic table, recording mechanism, this record, the field of action type that this record is operated and this record changes update inquiry information to the renewal process of mark;
Upgrade process unit; Be used to confirm that the entrained action type of the update inquiry information that receives is to insert, revise or deletion; During for insertion or modification; Confirm to exist in the memory database of main control module the record of the keyword correspondence of the entrained table name of update inquiry information that receives and record; And field changes the changing content of mark institute corresponding element as this record in will writing down, and sends synchronization message to the online Service Processing Module that carries said table name, recording mechanism, action type, field variation mark and changing content; During for deletion, send synchronization message to online Service Processing Module.
CN2009100817609A 2009-04-09 2009-04-09 Method and system for synchronizing data between IPTV system modules Expired - Fee Related CN101526958B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009100817609A CN101526958B (en) 2009-04-09 2009-04-09 Method and system for synchronizing data between IPTV system modules

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009100817609A CN101526958B (en) 2009-04-09 2009-04-09 Method and system for synchronizing data between IPTV system modules

Publications (2)

Publication Number Publication Date
CN101526958A CN101526958A (en) 2009-09-09
CN101526958B true CN101526958B (en) 2012-07-04

Family

ID=41094824

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009100817609A Expired - Fee Related CN101526958B (en) 2009-04-09 2009-04-09 Method and system for synchronizing data between IPTV system modules

Country Status (1)

Country Link
CN (1) CN101526958B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102104546B (en) * 2011-02-23 2015-06-10 中兴通讯股份有限公司 Synchronization method and system of forwarding table
CN102495849B (en) * 2011-11-18 2017-07-14 南京中兴新软件有限责任公司 The method and device of distributed system data syn-chronization
CN103914467B (en) * 2012-12-31 2017-07-14 鼎捷软件股份有限公司 Data variation labelling apparatus
CN106789862B (en) * 2016-04-25 2021-05-07 新华三技术有限公司 Data synchronization method and device
CN108063735B (en) * 2017-12-22 2021-10-19 新华三技术有限公司 VNF cluster distribution method and device
CN109446271B (en) * 2018-10-31 2023-02-14 创新先进技术有限公司 Data synchronization method, device, equipment and medium
CN110543469B (en) * 2019-08-28 2020-09-11 贝壳找房(北京)科技有限公司 Database version management method and server
CN111309707B (en) * 2020-01-23 2022-04-29 阿里巴巴集团控股有限公司 Data processing method and device, electronic equipment and computer readable storage medium
CN111563010B (en) * 2020-04-16 2023-07-28 深圳震有科技股份有限公司 Data synchronization method, system and storage medium based on dual-computer redundancy system
CN112905700B (en) * 2021-02-23 2023-03-31 杭州网易云音乐科技有限公司 Data synchronization method, device and equipment
CN114722050B (en) * 2022-06-10 2022-09-30 辰星(天津)自动化设备有限公司 Data synchronization method of robot system and robot system
CN117648202B (en) * 2024-01-30 2024-05-14 深圳市纷享互联科技有限责任公司 Heterogeneous system data synchronization process endless loop detection method, system and medium

Also Published As

Publication number Publication date
CN101526958A (en) 2009-09-09

Similar Documents

Publication Publication Date Title
CN101526958B (en) Method and system for synchronizing data between IPTV system modules
CN1925495B (en) Method and apparatus for synchronizing EPG information between server and client
CN103875229B (en) asynchronous replication method, device and system
CN101227379B (en) Method and system for implementation of data synchronization
CN101110706A (en) Configuration data synchronization method
CN103095769B (en) Across method of data synchronization and the system of machine room
CN107888657A (en) Low latency distributed memory system
CN101188566B (en) A method and system for data buffering and synchronization under cluster environment
CN101808137B (en) Data transmission method, device and system
CN112988883B (en) Database data synchronization method and device and storage medium
CN101706817B (en) Distributed file system and garbage data cleaning method thereof
CN101390092A (en) Conflict resolution in highly available network element
CN103152423A (en) Cloud storage system and data access method thereof
CN103905397A (en) Data synchronization method and system
CN104462568A (en) Data reconciliation method, device and system
CN102143194A (en) Data synchronization method and system, immediate data node and terminal data node
CN111221469B (en) Method, device and system for synchronizing cache data
CN108563771B (en) Block chain-based large file management system and method
CN111274257B (en) Real-time synchronization method and system based on data
CN102411598A (en) Method and system for realizing data consistency
CN101446972A (en) Method and system for dynamic data synchronization
CN100581165C (en) Client system and service system data synchronizing method and system
CN104750738A (en) Data information updating method, data node, management node and system
CN102024040A (en) Database synchronization method, device and system
CN106850724A (en) Data push method 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
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20170822

Address after: 157000, 29 East Ming Street, Aimin District, Heilongjiang, Mudanjiang

Patentee after: Yang Bin

Address before: 518057 Nanshan District Guangdong high tech Industrial Park, South Road, science and technology, ZTE building, Ministry of Justice

Patentee before: ZTE Corporation

TR01 Transfer of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20120704

Termination date: 20180409

CF01 Termination of patent right due to non-payment of annual fee