WO2013060132A1 - 数据同步方法及装置 - Google Patents

数据同步方法及装置 Download PDF

Info

Publication number
WO2013060132A1
WO2013060132A1 PCT/CN2012/074775 CN2012074775W WO2013060132A1 WO 2013060132 A1 WO2013060132 A1 WO 2013060132A1 CN 2012074775 W CN2012074775 W CN 2012074775W WO 2013060132 A1 WO2013060132 A1 WO 2013060132A1
Authority
WO
WIPO (PCT)
Prior art keywords
synchronization
data
synchronization task
synchronized
task
Prior art date
Application number
PCT/CN2012/074775
Other languages
English (en)
French (fr)
Inventor
牛国扬
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2013060132A1 publication Critical patent/WO2013060132A1/zh

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

Definitions

  • the present invention relates to the field of communications, and in particular, to a data synchronization method and apparatus.
  • Related technology relates to the field of communications, and in particular, to a data synchronization method and apparatus.
  • Data synchronization refers to data transmission between application systems, thereby realizing information synchronization and information sharing between systems, and maintaining information integrity and uniformity.
  • OSC Online Billing System
  • the management platform needs to charge the OSC billing system when maintaining "mobile phone user information”. Synchronize data with the Bill billing system to ensure consistent data.
  • Data synchronization is implemented through various data transmission interfaces, such as Web Service, FTP (File Transfer Protocol), USB (Universal Serial BUS), and so on.
  • a complete telecom value-added service solution often includes multiple systems, such as the current popular service SDP (Service Delivery Platform) solution, including the OSC billing system and Bill.
  • SDP Service Delivery Platform
  • CRM customer relationship management system
  • each system needs to achieve information sharing and information consistency through data synchronization.
  • the telecom value-added service solutions at various sites do not have the same data to be synchronized. For example, Jiangsu Telecom, Guangzhou Telecom, and Argentina Telecom have different data to be synchronized. If each site implements a type of data synchronization, the workload is too large. The reason is not that the telecom value-added service has too many personality requirements, but lacks a common data synchronization plan and lacks a comprehensive data synchronization solution.
  • An object of the embodiments of the present invention is to provide a data synchronization method and apparatus for implementing data Complex, customized data synchronization in the synchronization method.
  • An embodiment of the present invention provides a data synchronization method, where the foregoing method includes:
  • the data type and the device to be synchronized to the device are generated in advance to generate a data and device relationship table
  • the foregoing method generates the device configuration table by generating the data and the device relationship table by using the data type and the device to be synchronized to the device;
  • the above data and device relationship table includes a data type field and a device name field;
  • the above device table includes a device name field and a configuration information field.
  • the following steps are performed: generating a synchronization task according to an index index of the data to be synchronized, a synchronization type, and a device name of the found device;
  • the above synchronization task and its status identifier and number of synchronizations are inserted into the synchronization task table of the system.
  • the above synchronization types include adding, modifying, and deleting.
  • the step of synchronizing the data to the corresponding device is specifically:
  • the status identifier of the above synchronization task is updated according to the synchronization result.
  • the step of updating the status identifier of the synchronization task according to the synchronization result is specifically: When the synchronization result is successful, the status identifier of the synchronization task is modified to be successful; when the synchronization result is a failure, it is determined whether the synchronization number of the synchronization task is greater than 0; if yes, the synchronization number of the synchronization task is decreased by 1 ; Otherwise, the status ID of the above synchronization task is modified to fail.
  • the above method further comprises the following steps:
  • the synchronization task whose status ID is successful and failed in the above synchronization task table is periodically cleared.
  • the embodiment of the invention further provides a data synchronization device, where the device includes a table generation module, a lookup module and a synchronization module;
  • a table generation module configured to generate a data and device relationship table in advance according to a system configuration, where the data type and the device to be synchronized thereto are generated;
  • the foregoing searching module is configured to, when the data needs to be synchronized, search for the device that needs to be synchronized from the data and device relationship table according to the data type of the foregoing data;
  • the above synchronization module is configured to synchronize data that needs to be synchronized to the corresponding device.
  • the table generating module is configured to generate a device table by configuring configuration information of the device in the data and device relationship table;
  • the foregoing search module is configured to generate a synchronization task according to the setting of the data to be synchronized, the device name and the synchronization type of the device to be synchronized, and generate a default status identifier and a synchronization number for the synchronization task, and the synchronization task is performed. And its status identifier and number of synchronizations are inserted into the synchronization task table of the system;
  • the synchronization module is configured to schedule a synchronization task in the synchronization task table to be synchronized, and to search for attribute information of the device from the device table according to the device name in the currently scheduled synchronization task;
  • the index is used to find the data to be synchronized; according to the attribute information of the device and the synchronization type in the synchronization task, the found data is synchronized to the corresponding device; and the status identifier of the synchronization task is updated according to the synchronization result.
  • the foregoing synchronization module is configured to: when the synchronization result is successful, the currently scheduled The status identifier of the synchronization task is modified to be successful.
  • the synchronization result is a failure, it is determined whether the synchronization number of the currently scheduled synchronization task is greater than 0, and when the synchronization number of the synchronization task is greater than 0, the synchronization number of the synchronization task is reduced by one.
  • the status identifier of the synchronization task is modified to be failed;
  • the foregoing search module is configured to periodically clear the synchronization task whose status identifier is successful and failed in the synchronization task table.
  • the embodiment of the present invention pre-stores the data type and the correspondence between the device and the device to be synchronized, and when the data needs to be synchronized, according to the data type of the data, first find out the device that needs to be synchronized, and then find The configuration information of the device is synchronized to the device by means of device support, which realizes complex and customized data synchronization in the data synchronization method, realizes separation of service and logic, and can meet data of various requirements. Synchronization; Embodiments of the present invention do not require special server or special equipment support, are low-cost, easy to use and universal, and can quickly realize customized data synchronization between complex systems, and are particularly suitable for data synchronization between telecom value-added service systems.
  • the above technical effects are directed to the related embodiments of the present invention, and the present invention is not required to have each of the above technical effects.
  • FIG. 1 is a flow chart of a preferred embodiment of the data synchronization method of the present invention
  • FIG. 2 is a block diagram showing the principle of a preferred embodiment of the data synchronizing apparatus of the present invention. detailed description
  • FIG. 1 it is a flowchart of a preferred embodiment of the data synchronization method of the present invention.
  • the implementation includes the following steps:
  • Step S001 According to the system configuration, generate a data and device relationship table by using the data type and the device that needs to be synchronized, and generate attribute information of the device to generate a device table.
  • the data and device relationship table includes a data type field and a device name field.
  • Data types include user data, product data, and order relationship data.
  • the format of the data and device relationship table is shown in Table 1.
  • Table 1 is only one embodiment of the data and device relationship table in the present invention. In other embodiments, other formats may also be used.
  • the device table includes a device name field and an attribute information field, which is mainly used to store attribute information of each device in the data and device relationship table, and the attribute information includes information such as IP, port, and synchronization mode.
  • Step S002 detecting that data needs to be synchronized
  • Step S003 According to the data type of the foregoing data, look up the device that needs to be synchronized from the foregoing data and device relationship table;
  • the data type of the data to be synchronized is the user equipment, according to Table 1, the devices found are: System B, C, D.
  • Step S004 According to the index (index) of the data to be synchronized, the device name and the synchronization type of the device to be synchronized, generate a synchronization task, and set a default state identifier and a synchronization number for the synchronization task;
  • Synchronization types include add, modify, and delete;
  • the status ID includes synchronization, success, and failure.
  • the default status ID of the synchronization task is synchronous.
  • the default synchronization time can be set according to the actual application, for example, set to 10.
  • Step S005 insert the foregoing synchronization task, its status identifier, and the number of synchronizations into the synchronization task table of the system;
  • the synchronization task table includes a synchronization task field, a status identification field, and a synchronization number field, as shown in Table 2.
  • the synchronization task table may also include fields such as the survival time of the synchronization task according to the actual application.
  • Step S006 The status identifier in the scheduling synchronization task table is the synchronization task in the synchronization;
  • Step S007 Searching for the attribute information of the device in the device table according to the device name in the currently scheduled synchronization task;
  • the IP address, receiving port, and supported synchronization mode of the above device can be known.
  • Step S008 Searching for data that needs to be synchronized according to the index in the synchronization task; the index of the data is the primary key of the data, and the foregoing data can be found through the index; Step S009: according to the attribute information of the device and the synchronization type in the synchronization task. , will check The found data is synchronized to the above device;
  • the data is sent to the port 21 of the 10.2.2.8 address through FTP.
  • Step S010 determining whether the synchronization is successful, if yes, executing step S011; otherwise, executing step S012;
  • Step S011 The status flag of the synchronization task is modified to be successful, and the currently scheduled synchronization task execution ends.
  • Step S012 determining whether the synchronization number of the synchronization task is greater than 0; if yes, executing step S013; otherwise, executing step S014;
  • Step S013 The synchronization number of the synchronization task is reduced by 1, and the currently scheduled synchronization task execution ends.
  • the status flag of the synchronization task is not updated, that is, the status flag of the synchronization task at this time is still in synchronization, and may continue to be scheduled.
  • Step S014 The status flag of the synchronization task is modified to be failed, and the currently scheduled synchronization task execution ends.
  • the status identifier of the synchronization task may also be other formats, for example, 0 indicates synchronization, 1 indicates success, and 2 indicates failure.
  • the synchronization task table saves a large number of synchronization tasks, and the table is continuously increased with time.
  • the embodiment of the present invention performs a cycle of synchronization tasks in which the status identifiers in the synchronization task table are successful and failed.
  • the above period can be configured according to the actual situation, for example, it can be configured for 30 days.
  • FIG. 2 is a schematic block diagram of a preferred embodiment of the data synchronization apparatus of the present invention, this embodiment includes a table generation module 01, a lookup module 02, and a synchronization module 03;
  • the table generation module 01 is configured to generate a data and device relationship table by using a data type and a device that needs to be synchronized to the device according to the system configuration, and generate the device table by using the configuration information of the device in the data and the device relationship table;
  • the searching module 02 is configured to, when the data needs to be synchronized, search for the device that needs to be synchronized from the data and device relationship table according to the data type of the foregoing data; according to the index, the synchronization type, and the found device of the data to be synchronized Device name, generating a synchronization task, and generating a default state identifier and synchronization times for the synchronization task, inserting the synchronization task and its status identifier and synchronization times into the synchronization task table of the system; and periodically clearing the synchronization task table The status is identified as a successful and failed synchronization task;
  • the synchronization module 03 is configured to synchronize the data that needs to be synchronized to the corresponding device, specifically: scheduling the synchronization identifier in the synchronization task table as the synchronization task in the synchronization, and according to the device name in the currently scheduled synchronization task, from the foregoing device Finding the attribute information of the device in the table; searching for data that needs to be synchronized according to the index in the synchronization task; and synchronizing the found data to the device according to the attribute information of the device and the synchronization type in the synchronization task;
  • the status identifier of the currently scheduled synchronization task is modified to be successful;
  • the synchronization result is failed, it is determined whether the synchronization number of the currently scheduled synchronization task is greater than 0, and when the synchronization number of the synchronization task is greater than 0 , the synchronization number of the synchronization task is reduced by 1; when the synchronization number of the synchronization task is equal to 0, the status identifier

Abstract

本发明公开了一种数据同步方法,上述方法根据系统配置,预先将数据类型及其需要同步到的设备生成数据与设备关系表,当有数据需要同步时,根据上述数据的数据类型,从上述数据与设备关系表中查找需要同步到的设备,将上述数据同步到上述设备;本发明还公开了一种数据同步装置。本发明成本低廉且易用通用,可满足各种不同需求要求的数据同步。

Description

数据同步方法及装置 技术领域
本发明涉及通信领域, 尤其涉及一种数据同步方法及装置。 相关技术
数据同步是指各应用系统间的数据传输, 从而实现各系统间信息同步 与信息共享, 且保持信息的完整性和统一性。 比如对于电信的 "手机用户 信息", OSC (在线计费系统) 中需要用到, Bill话单系统中也需要用到, 因此管理平台在维护 "手机用户信息" 时, 需要向 OSC计费系统和 Bill话 单系统进行数据同步, 保证数据的一致。 数据同步是通过各种数据传输接 口实现的, 如 Web Service, FTP ( File Transfer Protocol, 文件传输协议)、 USB ( Universal Serial BUS, 通用串行总线)等。
目前随着电信增值业务的发展, 一个完整的电信增值业务解决方案往 往要包含多个系统, 比如目前流行的电信 SDP ( Service Delivery Platform, 业务交付平台)解决方案, 包含 OSC计费系统、 Bill话单系统、 CRM (客 户关系管理系统)等, 各个系统间需要通过数据同步达到信息共享和信息 一致。 另外, 各个局点的电信增值业务解决方案, 其需要同步的数据也不 完全相同, 比如江苏电信、 广州电信、 阿根廷电信等需要进行同步的数据 各不相同。 如果每个局点实现一种数据同步, 则工作量太大。 原因并不是 电信增值业务的个性需求太多, 而是缺少通用的数据同步规划, 缺乏全面 的数据同步解决方法。 发明内容
本发明实施例的目的是, 提供一种数据同步方法及装置, 以实现数据 同步方法中的复杂的、 定制化的数据同步。
本发明实施例提供了一种数据同步方法, 上述方法包括:
根据系统配置, 预先将数据类型及其需要同步到的设备生成数据与设 备关系表;
当有数据需要同步时, 根据上述数据的数据类型, 从上述数据与设备 关系表中查找需要同步到的设备;
将上述数据同步到对应的设备。
优选地, 上述方法在将数据类型及其需要同步到的设备生成数据与设 备关系表的同时, 还将上述设备的配置信息生成设备表;
上述数据与设备关系表包括数据类型字段和设备名称字段;
上述设备表包括设备名称字段和配置信息字段。
优选地, 上述方法在找出需要同步到的设备后, 还执行以下步驟: 根据需要同步的数据的索引 index、 同步类型以及查找到的设备的设备 名称, 生成同步任务;
为上述同步任务生成默认的状态标识及同步次数;
将上述同步任务及其状态标识、 同步次数插入到系统的同步任务表中。 优选地, 上述同步类型包括新增、 修改及删除。
优选地, 上述将数据同步到对应的设备的步驟具体为:
根据当前调度的同步任务中的设备名称, 从上述设备表中查找上述设 备的属性信息;
根据上述同步任务中的 index, 查找需要同步的数据;
根据上述设备的属性信息及上述同步任务中的同步类型, 将查找到的 数据同步到上述设备;
根据同步结果, 更新上述同步任务的状态标识。
优选地, 上述根据同步结果, 更新同步任务的状态标识的步驟具体为: 当上述同步结果为成功时, 将上述同步任务的状态标识修改为成功; 当上述同步结果为失败时,判断上述同步任务的同步次数是否大于 0;若是, 则将上述同步任务的同步次数减 1 ; 否则, 将上述同步任务的状态标识修改 为失败。
优选地, 上述方法还包括以下步驟:
周期性清除上述同步任务表中状态标识为成功及失败的同步任务。 本发明实施例还提供了一种数据同步装置, 上述装置包括表生成模块、 查找模块以及同步模块;
表生成模块, 设置为根据系统配置, 预先将数据类型及其需要同步到 的设备生成数据与设备关系表;
上述查找模块, 设置为在有数据需要同步时, 根据上述数据的数据类 型, 从上述数据与设备关系表中查找需要同步到的设备;
上述同步模块, 设置为将需要同步的数据同步到对应的设备。
优选地, 上述表生成模块, 设置为将上述数据与设备关系表中的设备 的配置信息生成设备表;
上述查找模块, 设置为根据需要同步的数据的设置为 index, 需要同步 到的设备的设备名称以及同步类型, 生成同步任务, 并为上述同步任务生 成默认的状态标识及同步次数, 将上述同步任务及其状态标识、 同步次数 插入到系统的同步任务表中;
上述同步模块, 设置为调度上述同步任务表中状态标识为同步中的同 步任务, 并根据当前调度的同步任务中的设备名称, 从上述设备表中查找 上述设备的属性信息;根据上述同步任务中的 index,查找需要同步的数据; 根据上述设备的属性信息及上述同步任务中的同步类型, 将查找到的数据 同步到对应的设备; 以及根据同步结果, 更新上述同步任务的状态标识。
优选地, 上述同步模块, 设置为在同步结果为成功时, 将当前调度的 同步任务的状态标识修改为成功; 在同步结果为失败时, 判断当前调度的 同步任务的同步次数是否大于 0, 并在上述同步任务的同步次数大于 0时, 将上述同步任务的同步次数减 1; 在上述同步任务的同步次数等于 0时, 将 上述同步任务的状态标识修改为失败;
上述查找模块, 设置为周期性清除上述同步任务表中状态标识为成功 及失败的同步任务。
本发明实施例通过预先存储数据类型及其需要同步到的设备的对应关 系和设备的配置信息, 当有数据需要同步时, 根据数据的数据类型, 首先 找出需要同步到的设备, 然后再找出设备的配置信息, 将数据通过设备支 持的方式同步到设备, 实现了数据同步方法中的复杂的、 定制化的数据同 步, 实现了业务和逻辑的分离, 可满足各种不同需求要求的数据同步; 本 发明实施例不需要特殊服务器或特殊设备的支持, 成本低廉、 易用通用, 可以在复杂系统间快速实现定制化数据同步, 尤其适用于电信增值业务系 统间的数据同步。 上述技术效果是针对本发明的相关实施例, 并不要求本 发明具备上述每一个技术效果。 附图说明
图 1是本发明数据同步方法优选实施例的流程图;
图 2是本发明数据同步装置优选实施例的原理框图。 具体实施方式
下面所描述的具体实施例仅用以解释本发明, 并不用于限定本发明。 如图 1 所示, 是本发明数据同步方法优选实施例的流程图, 本实施具 体包括以下步驟:
步驟 S001: 根据系统配置, 将数据类型及其需要同步到的设备生成数 据与设备关系表, 并将上述设备的属性信息生成设备表; 数据和设备关系表包括数据类型字段和设备名称字段。 数据类型包括 用户数据、产品数据以及定购关系数据等。数据和设备关系表的格式如表 1 所示。 当然, 表 1仅是本发明中数据和设备关系表的一个实施例, 其他实 施例中, 还可以是其他格式。
表 1
Figure imgf000007_0001
当有数据需要同步时, 只要查询数据和设备关系表, 即可知道需要同 步到哪些设备。
设备表包括设备名称字段及属性信息字段, 主要用于保存数据和设备 关系表中各设备的属性信息, 属性信息包括 IP、 端口、 同步方式等信息。
步驟 S002: 检测到有数据需要同步;
步驟 S003: 根据上述数据的数据类型, 从上述数据与设备关系表中查 找需要同步到的设备;
比如, 需要同步的数据的数据类型为用户设备, 则根据表 1 , 查找出的 设备为: 系统 B、 C、 D。
步驟 S004: 根据需要同步的数据的索引 (index ), 需要同步到的设备 的设备名称以及同步类型, 生成同步任务, 并为上述同步任务设置默认的 状态标识及同步次数;
比如, 需要同步到的设备为 3个, 则本步驟生成 3个同步任务; 同步类型包括新增、 修改及删除;
状态标识包括同步中、 成功以及失败; 同步任务的默认状态标识为同 步中, 默认同步次数可根据实际应用设置, 比如设置为 10。
步驟 S005: 将上述同步任务及其状态标识、 同步次数插入到系统的同 步任务表中;
同步任务表包括同步任务字段、 状态标识字段、 同步次数字段, 如表 2 所示。
表 2
Figure imgf000008_0001
同步任务表除了包括同步任务字段、 状态标识字段、 同步次数字段外, 还可以根据实际应用包括例如同步任务的生存时间等字段。
步驟 S006: 调度同步任务表中状态标识为同步中的同步任务; 步驟 S007: 根据当前调度的同步任务中的设备名称, 在上述设备表中 查找上述设备的属性信息;
通过设备的属性信息, 可知上述设备的 IP地址、 接收端口以及支持的 同步方式等。
步驟 S008: 根据上述同步任务中的 index, 查找需要同步的数据; 数据的 index是数据的主键, 通过 index即可查找到上述数据; 步驟 S009: 根据设备的属性信息及上述同步任务中的同步类型, 将查 找到的数据同步到上述设备;
比如, 若设备的 IP地址为 10.2.2.8, 接口端口为 21 , 支持的同步方式 为 FTP, 数据的同步类型为新增, 则将数据通过 FTP方式发送到 10.2.2.8 地址的 21端口。
步驟 S010: 判断是否同步成功, 若是, 则执行步驟 S011; 否则, 执行 步驟 S012;
步驟 S011: 将上述同步任务的状态标记修改为成功, 当前调度的同步 任务执行结束;
步驟 S012: 判断上述同步任务的同步次数是否大于 0; 若是, 则执行 步驟 S013; 否则, 执行步驟 S014;
步驟 S013: 将上述同步任务的同步次数减 1 , 当前调度的同步任务执 行结束;
本发明实施例在同步任务执行失败的次数小于预设的同步次数时, 不 更新同步任务的状态标记, 也就是说, 此时的同步任务的状态标记依然为 同步中, 可继续被调度。
步驟 S014: 将上述同步任务的状态标记修改为失败, 当前调度的同步 任务执行结束。
本发明实施例中, 同步任务的状态标识也可以是其他格式, 比如 0表 示同步中, 1表示成功, 2表示失败等。
同步任务表保存了大量的同步任务, 该表随着时间增长会不断增大, 为了节约系统资源, 提高系统性能, 本发明实施例对同步任务表中状态标 识为成功及失败的同步任务进行周期性清除, 上述周期可根据实际情况进 行配置, 比如可配置为 30天。
如图 2所示, 是本发明数据同步装置优选实施例的原理框图, 本实施 例包括表生成模块 01、 查找模块 02以及同步模块 03; 表生成模块 01 , 设置为根据系统配置, 预先将数据类型及其需要同步 到的设备生成数据与设备关系表, 并将上述数据与设备关系表中的设备的 配置信息生成设备表;
查找模块 02,设置为在有数据需要同步时,根据上述数据的数据类型, 从上述数据与设备关系表中查找需要同步到的设备; 根据需要同步的数据 的 index、 同步类型及查找到的设备的设备名称, 生成同步任务, 并为上述 同步任务生成默认的状态标识及同步次数, 将上述同步任务及其状态标识、 同步次数插入到系统的同步任务表中; 以及周期性清除上述同步任务表中 状态标识为成功及失败的同步任务;
同步模块 03 , 设置为将需要同步的数据同步到对应的设备, 具体为: 调度上述同步任务表中状态标识为同步中的同步任务, 并根据当前调度的 同步任务中的设备名称, 从上述设备表中查找上述设备的属性信息; 根据 上述同步任务中的 index, 查找需要同步的数据; 根据上述设备的属性信息 及上述同步任务中的同步类型, 将查找到的数据同步到上述设备; 以及在 同步结果为成功时, 将当前调度的同步任务的状态标识修改为成功; 在同 步结果为失败时, 判断当前调度的同步任务的同步次数是否大于 0, 并在上 述同步任务的同步次数大于 0时, 将上述同步任务的同步次数减 1 ; 在上述 同步任务的同步次数等于 0时, 将上述同步任务的状态标识修改为失败。
上述说明示出并描述了本发明的优选实施例, 但如前所述, 应当理解 本发明并非局限于本文所披露的形式, 不应看作是对其他实施例的排除, 而可用于各种其他组合、 修改和环境, 并能够在本文所述发明构想范围内, 通过上述教导或相关领域的技术或知识进行改动。 而本领域人员所进行的 改动和变化不脱离本发明的精神和范围, 则都应在本发明所附权利要求的 保护范围内。

Claims

1、 一种数据同步方法, 所述方法包括:
根据系统配置, 预先将数据类型及其需要同步到的设备生成数据与 设备关系表;
当有数据需要同步时, 根据所述数据的数据类型, 从所述数据与设 备关系表中查找需要同步到的设备;
将所述数据同步到对应的设备。
2、 根据权利要求 1所述的方法, 其中, 所述方法在将数据类型及其 需要同步到的设备生成数据与设备关系表的同时, 还将所述设备的配置 信息生成设备表;
所述数据与设备关系表包括数据类型字段和设备名称字段; 所述设备表包括设备名称字段和配置信息字段。
3、 根据权利要求 1所述的方法, 其中, 所述方法在找出需要同步到 的设备后, 还执行以下步驟:
根据需要同步的数据的索引 index、 同步类型以及查找到的设备的设 备名称, 生成同步任务;
为所述同步任务生成默认的状态标识及同步次数;
将所述同步任务及其状态标识、 同步次数插入到系统的同步任务表 中。
4、 根据权利要求 3所述的方法, 其中, 所述同步类型包括新增、 修 改及删除。
5、 根据权利要求 3所述的方法, 其中, 所述将数据同步到对应的设 备的步驟具体为:
根据当前调度的同步任务中的设备名称, 从所述设备表中查找所述 设备的属性信息; 根据所述同步任务中的 index, 查找需要同步的数据;
根据所述设备的属性信息及所述同步任务中的同步类型, 将查找到 的数据同步到对应的设备;
根据同步结果, 更新所述同步任务的状态标识。
6、 根据权利要求 5所述的方法, 其中, 所述根据同步结果, 更新同 步任务的状态标识的步驟具体为:
当所述同步结果为成功时, 将所述同步任务的状态标识修改为成功; 当所述同步结果为失败时, 判断所述同步任务的同步次数是否大于 0; 若 是, 则将所述同步任务的同步次数减 1; 否则, 将所述同步任务的状态标 识^ ίι爹改为失败。
7、 根据权利要求 1-6任一项所述的方法, 其中, 所述方法还包括以 下步驟:
周期性清除所述同步任务表中状态标识为成功及失败的同步任务。
8、 一种数据同步装置, 所述装置包括表生成模块、 查找模块以及同 步模块;
表生成模块, 设置为根据系统配置, 预先将数据类型及其需要同步 到的设备生成数据与设备关系表;
所述查找模块, 设置为在有数据需要同步时, 根据所述数据的数据 类型, 从所述数据与设备关系表中查找需要同步到的设备;
所述同步模块, 设置为将需要同步的数据同步到对应的设备。
9、 根据权利要求 8所述的装置, 其中,
所述表生成模块, 设置为将所述数据与设备关系表中的设备的配置 信息生成设备表;
所述查找模块, 设置为根据需要同步的数据的索引 index, 需要同步 到的设备的设备名称以及同步类型, 生成同步任务, 并为所述同步任务 生成默认的状态标识及同步次数, 将所述同步任务及其状态标识、 同步 次数插入到系统的同步任务表中;
所述同步模块, 设置为调度所述同步任务表中状态标识为同步中的 同步任务, 并根据当前调度的同步任务中的设备名称, 从所述设备表中 查找所述设备的属性信息; 根据所述同步任务中的 index, 查找需要同步 的数据; 根据所述设备的属性信息及所述同步任务中的同步类型, 将查 找到的数据同步到对应的设备; 以及根据同步结果, 更新所述同步任务 的^ 态标识。
10、 根据权利要求 9所述的装置, 其中,
所述同步模块, 设置为在同步结果为成功时, 将当前调度的同步任 务的状态标识修改为成功; 在同步结果为失败时, 判断当前调度的同步 任务的同步次数是否大于 0, 并在所述同步任务的同步次数大于 0时, 将 所述同步任务的同步次数减 1 ; 在所述同步任务的同步次数等于 0时, 将 所述同步任务的状态标识修改为失败;
所述查找模块, 设置为周期性清除所述同步任务表中状态标识为成 功及失败的同步任务。
PCT/CN2012/074775 2011-10-25 2012-04-26 数据同步方法及装置 WO2013060132A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201110327369XA CN102387213A (zh) 2011-10-25 2011-10-25 数据同步方法及装置
CN201110327369.X 2011-10-25

Publications (1)

Publication Number Publication Date
WO2013060132A1 true WO2013060132A1 (zh) 2013-05-02

Family

ID=45826173

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/074775 WO2013060132A1 (zh) 2011-10-25 2012-04-26 数据同步方法及装置

Country Status (2)

Country Link
CN (1) CN102387213A (zh)
WO (1) WO2013060132A1 (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102387213A (zh) * 2011-10-25 2012-03-21 中兴通讯股份有限公司 数据同步方法及装置
CN104317921B (zh) * 2014-10-29 2017-10-17 北京思特奇信息技术股份有限公司 一种跨数据库数据同步系统及方法
CN107679058B (zh) * 2017-06-26 2021-04-06 平安科技(深圳)有限公司 数据同步方法、装置及计算机可读存储介质
CN107665234B (zh) * 2017-07-25 2020-07-28 平安科技(深圳)有限公司 业务处理方法、装置、服务器和存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101398922A (zh) * 2008-10-21 2009-04-01 金蝶软件(中国)有限公司 数据同步方法及装置
CN102202073A (zh) * 2010-03-24 2011-09-28 杭州华三通信技术有限公司 一种分布式系统及其数据同步方法
CN102387213A (zh) * 2011-10-25 2012-03-21 中兴通讯股份有限公司 数据同步方法及装置

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
MY162141A (en) * 2007-12-28 2017-05-31 Univ Sains Malaysia A method for information conferencing and a system therefor
CN101771574A (zh) * 2008-12-31 2010-07-07 华为技术有限公司 网络运维的方法和网络
CN101673295B (zh) * 2009-08-28 2012-07-11 金蝶软件(中国)有限公司 一种数据同步控制方法、装置和单点登录系统
CN101895568B (zh) * 2010-06-25 2014-03-12 中兴通讯股份有限公司 一种同步数据清理的方法和系统
CN102024040A (zh) * 2010-12-08 2011-04-20 北京握奇数据系统有限公司 数据库同步方法、装置和系统

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101398922A (zh) * 2008-10-21 2009-04-01 金蝶软件(中国)有限公司 数据同步方法及装置
CN102202073A (zh) * 2010-03-24 2011-09-28 杭州华三通信技术有限公司 一种分布式系统及其数据同步方法
CN102387213A (zh) * 2011-10-25 2012-03-21 中兴通讯股份有限公司 数据同步方法及装置

Also Published As

Publication number Publication date
CN102387213A (zh) 2012-03-21

Similar Documents

Publication Publication Date Title
CN110505275A (zh) 数据传输方法、系统、服务器及计算机可读存储介质
CN109542865A (zh) 分布式集群系统配置文件同步方法、装置、系统及介质
WO2019153488A1 (zh) 服务配置管理方法、装置、存储介质和服务器
WO2014094468A1 (zh) 实现浏览器数据同步的系统、方法及浏览器客户端
WO2013170410A1 (zh) 群组通信的方法、系统、群组服务器和群组成员设备
US8903972B2 (en) Method and apparatus for sharing contents using information of group change in content oriented network environment
CN104184756A (zh) 一种数据同步方法、装置及系统
WO2015143794A1 (zh) 制作、升级方法及服务器、终端、升级系统和存储介质
WO2016078431A1 (zh) 策略文件同步管理的方法及策略同步服务器和管理设备
WO2013060132A1 (zh) 数据同步方法及装置
WO2017071337A1 (zh) 管理数据库表数据的方法、装置及系统
CN103812900A (zh) 一种数据同步方法、装置及系统
CN108965359B (zh) 通信方法、通信装置、可读介质和电子设备
WO2013083013A1 (zh) 一种网络设备间的同步方法、网络设备及系统
WO2017024470A1 (zh) 变更mcptt用户与mcptt群组关联关系的方法、装置及系统
WO2012031497A1 (zh) 一种基于匹配规则的业务消息传送方法及系统
CN110768811B (zh) 更新yang模型文件库的方法、装置和系统
CN103929365A (zh) 一种适用于udp服务的负载均衡系统及方法
CN109413118B (zh) 一种实现会话同步的方法、装置及存储介质、程序产品
WO2015096058A1 (zh) 一种数据包处理方法和装置
CN110661857B (zh) 一种数据同步方法和装置
CN108259345A (zh) 端口生成方法和装置
CN113610529A (zh) 联盟链的区块存储、获取方法、装置、节点和存储介质
WO2013097237A1 (zh) 一种部署应用进程的方法、设备和系统
CN103001987A (zh) 一种数据处理方法和数据处理节点

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12843603

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12843603

Country of ref document: EP

Kind code of ref document: A1