WO2016034061A1 - 一种基于数据包的移动数据同步冲突预处理与消解方法 - Google Patents
一种基于数据包的移动数据同步冲突预处理与消解方法 Download PDFInfo
- Publication number
- WO2016034061A1 WO2016034061A1 PCT/CN2015/088104 CN2015088104W WO2016034061A1 WO 2016034061 A1 WO2016034061 A1 WO 2016034061A1 CN 2015088104 W CN2015088104 W CN 2015088104W WO 2016034061 A1 WO2016034061 A1 WO 2016034061A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- data
- conflict
- synchronization
- mobile
- entity
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 35
- 238000007781 pre-processing Methods 0.000 title claims abstract description 31
- 238000001514 detection method Methods 0.000 claims abstract description 20
- 230000001360 synchronised effect Effects 0.000 claims abstract description 7
- 230000006870 function Effects 0.000 claims description 10
- 230000008569 process Effects 0.000 claims description 10
- 230000029087 digestion Effects 0.000 claims description 5
- 238000013500 data storage Methods 0.000 claims description 3
- 238000012217 deletion Methods 0.000 claims description 3
- 230000037430 deletion Effects 0.000 claims description 3
- 230000007246 mechanism Effects 0.000 abstract description 6
- 230000008901 benefit Effects 0.000 abstract description 3
- 230000004044 response Effects 0.000 abstract description 3
- 238000005516 engineering process Methods 0.000 description 9
- 238000011161 development Methods 0.000 description 5
- 238000004891 communication Methods 0.000 description 4
- 238000012545 processing Methods 0.000 description 4
- 230000008859 change Effects 0.000 description 2
- 238000012790 confirmation Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 238000013508 migration Methods 0.000 description 1
- 230000005012 migration Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000002360 preparation method Methods 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
- 238000012800 visualization Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/40—Support for services or applications
Definitions
- the invention relates to a data packet-based mobile data synchronization conflict pre-processing and digestion method, and belongs to the technical field of mobile applications.
- Mobile jobs have online mode, pure offline mode, and "online + offline” hybrid mode. Due to the low bandwidth, long latency, and intermittent connectivity of mobile computing environments, these mobile modes are cached and updated in mobile business applications. Two-way data exchange, access queues, and intermittent connections are prone to data inconsistency conflicts. To ensure data consistency between the mobile terminal and the back-end service system, both the mobile terminal and the back-end service system are involved. Data synchronization and conflict handling, therefore, conflict preprocessing and detection resolution of mobile data synchronization are key and complex technical difficulties in mobile applications.
- file copy synchronization mode uses file as a synchronization processing unit to realize data synchronization by copying, and can use special synchronization software such as Windows ActiveSync, but exists.
- file copy synchronization mode uses file as a synchronization processing unit to realize data synchronization by copying, and can use special synchronization software such as Windows ActiveSync, but exists.
- data synchronization based on network communication mainly exists in Web Service and embedded database with mobile terminal
- Two kinds of technical routes for data synchronization are realized.
- the data synchronization technology is implemented by Web Service to call the remote server's Web Service interface to realize data download and upload.
- This technology route realizes low cost, but it is a real-time online data synchronization mode and is stable to the network.
- the requirements for reliability and reliability are high, and the network delay is obvious when the large data volume is transmitted, which tends to increase the load of the back-end service system, and lacks the corresponding conflict pre-processing and resolution mechanism.
- the data synchronization technology of mobile terminal embedded database uses TCP connection and binary data flow to complete the efficient synchronization of data. Some transaction-level data synchronization models and algorithms, conflict avoidance mechanism, and multi-version conflict resolution technology are proposed. Sybase, IBM DB2 as the representative.
- the data format based on the embedded database synchronization method is closed, and the conflict handling and resolution functions need to be customized according to the service characteristics, which reduces the versatility and adaptability.
- the biggest bottleneck is the real-time access to the back-end database, resulting in low concurrency performance.
- the present invention provides a data packet based mobile data synchronization conflict preprocessing and resolution method.
- a packet-based mobile data synchronization conflict preprocessing and resolution method comprising the following steps,
- Step 1 Generate an incremental data packet and upload it to the mobile application server through the data synchronization service
- Step 2 through the data synchronization conflict pre-processing, create an intermediate table for the incremental data related to the movement and synchronization; for the incremental data that does not involve the movement and synchronization, backfill the data to the back-end business system according to the synchronization rule;
- Step 3 performing conflict detection on the incremental data in the intermediate table to obtain conflict incremental data
- step 4 the conflict resolution data is used to resolve the conflict incremental data
- Step 5 Move the delta data in the intermediate table to the service data table of the backend service system.
- the data synchronization conflict preprocessing process firstly divides the data of the mobile application into mobile middleware basic data, technical data and business data according to the data storage location, the main purpose and the synchronous mobile characteristic, wherein the mobile middleware basic data and technology
- the data is mainly stored in different mobile control components, and does not need to be synchronized and moved.
- the service data is stored in the mobile terminal, the back-end service is the same, and the mobile data synchronization middleware is used to support the mobile service flow, and data synchronization and movement are required.
- the intermediate table is then created for incremental data involving movement and synchronization, and finally added to the intermediate table by preprocessing strategy.
- the preprocessing strategy is
- E x is The set E represents a type of business entity, the element E x ⁇ E is an instantiation of the entity class, the set F represents the attributes of a set of business entities, the element F y ⁇ F is an attribute name, and F 0 is an intrinsic attribute name. Is the unique identifier of the entity; the set V represents a set of attribute values, the element V(x, y) ⁇ V, which represents the value on the attribute F y of the entity E x , and the value of V (x, 0) as the primary key, denoted as PK (x); x ⁇ [0, n], y ⁇ [0, n], n is a positive integer.
- the unstructured data in the delta data is stored in a structured manner.
- the attribute name and the data type of the intermediate table are consistent with the data structure of the service data table; the intermediate table attribute adds "data packet task ID”, "data instance ID”, and “data” to the service data table attribute. Execution user”, “data operation mode” and logical primary key; the association relationship and constraint conditions of the intermediate table are the same as the business data table.
- the conflict detection process is that the "packet task ID" and the "data entity ID” identifier are used as the basis of the conflict detection determination strip. If there are two or more records, a data conflict occurs.
- the conflict resolution algorithm is used to dissect the conflict incremental data, and the conflict data is digested by calling the data conflict resolution stored procedure and function on the database side, and the conflict resolution algorithm is performed by using the incremental data packet uploaded by the user as a unit.
- the algorithm is implemented in the business system database through stored procedures and functions, and the conflict data is digested in the same database.
- the invention has the beneficial effects that the present invention firstly proposes a data packet-based mobile data synchronization conflict pre-processing and resolution mechanism, and classifies mobile application data by data movement and synchronization characteristics, and separately formulates different data synchronization conflict pre-preparations.
- the processing strategy can predict and effectively avoid conflicts in advance; conflict detection and conflict resolution create an intermediate table as a medium.
- This conflict detection mechanism for intermediate tables not only has the advantage of high efficiency, but also avoids conflict data directly synchronized to In the business data table, the security of the business system data is improved; the conflict resolution algorithm is implemented by the stored procedure and the function, and the special queue and the multi-thread concurrency control model are adopted, and the conflict resolution, the intermediate table and the service data table are implemented in the intermediate table.
- Figure 1 is a flow chart of the present invention.
- Figure 2 is a pre-processing strategy diagram.
- a packet-based mobile data synchronization conflict pre-processing and resolution method includes the following steps:
- step one an incremental data packet is generated and uploaded to the mobile application server through the data synchronization service.
- Incremental data packet is a unified client development framework for mobile applications.
- the change log of data is automatically recorded when the framework runs.
- the incremental data upload depends on the data change log of the mobile terminal.
- the mobile terminal firstly according to the log, according to the operation time sequence.
- the changed data is sequentially taken out, deduplicated, and merged to generate incremental data packets.
- the mobile application server adopts the incremental packet processing pool mode to asynchronously submit incremental data packets.
- the submitted incremental packet first enters the backfill job package queue with the status "Pending" and attempts to join the backfill task pool.
- the mobile application server scans the backfill job package task pool and the queue, and processes the incremental data packets in the order of the inbound order.
- the data synchronization conflict preprocessing is used to create an intermediate table for the incremental data related to the movement and the synchronization; for the incremental data not involving the movement and the synchronization, the data is backfilled to the backend business system according to the synchronization rule.
- conflict data may occur, that is, when one service data is modified by one mobile terminal, the service system or another mobile terminal is also modified, for example, a data packet is downloaded to Multiple mobile terminals, many people have edited the "work summary" field. In this case, it is equivalent to modifying the same data record by multiple people. Therefore, we adopt conflict pre-processing, which can predict and effectively avoid conflicts in advance.
- Data synchronization conflict preprocessing classifies incremental data and then processes it according to different categories.
- the mobile application data is divided into mobile middleware basic data, technical data and business data, wherein the mobile middleware basic data and technical data are mainly stored in different mobile control components.
- business data is stored in the mobile terminal, the same back-end service and mobile data synchronization middleware, used to support mobile service flow, need to synchronize and move data; create incremental data related to mobile and synchronization
- the intermediate table is added to the intermediate table according to the pre-processing strategy; for incremental data that does not involve movement and synchronization, the data is backfilled to the back-end business system according to the synchronization rules.
- the intermediate table is used for temporarily storing incremental data related to movement and synchronization.
- the attribute names and data types of the intermediate table are consistent with the data structure of the service data table.
- the intermediate table needs to be displayed on the interface, and the intermediate table is expanded.
- intermediate tables are generally created by specific modeling tools. The specifications for creating intermediate tables are as follows:
- the intermediate table attribute adds "packet task ID”, "data instance ID”, “data execution user”, “data operation mode” and logical primary key to the business data table attribute;
- E represent a type of business entity, usually in the form of a table object in the database, where the element E x ⁇ E is an instantiation of the entity class, x ⁇ [0, n], n is a positive integer, E x ′ A subset of E x is usually stored in the embedded database of the mobile terminal, and its elements are only items in which data changes occur;
- the set F represent the attributes of a set of business entities, in the database is a set of fields of the table object, wherein the element F y ⁇ F, represents a property name of the table, y ⁇ [0, n], F 0 is an intrinsic attribute name,
- the GUID is usually used as the unique identifier in the intermediate table;
- V represent a set of attribute values, where the element V(x, y) ⁇ V, represents the value on the attribute F y of the entity E x , and V(x, 0) is the value of the primary key, denoted as PK(x);
- the entity E x will be the smallest unit of a data synchronization operation. with It indicates three types of operation, namely, adding, updating, and deleting the mobile terminal on the entity E x .
- the data synchronization rule declares, modifies, and deletes an intermediate data table by using a Table tag, and uses SQL such as InsertLogic, UpdateLogic, and DeleteLogic when adding data.
- unstructured data text, word document, picture, etc.
- the method requires unstructured data to be stored in a structured manner, and the conflict preprocessing and resolution are built on the structured description information and maintained by the description information. Mapping relationship with unstructured data.
- Step 3 Perform conflict detection on the incremental data in the intermediate table to obtain conflict incremental data.
- a data synchronization mechanism is implemented through data packets to design a reasonable task allocation and management system. For example, a data packet task is downloaded to multiple terminals, and multiple people execute it. Each person only fills in the work processing information within his or her own responsibility. In this case, there is no logical intersection, and the actual data has no conflict.
- the data collision detection method provided by the present invention is that multiple people modify the data collision detection of the same data entity, any one.
- the primary station service system is triggered to perform conflict detection.
- the conflict detection process is based on the “packet task ID” and the “data entity ID” identifier as the basis for the conflict detection judgment bar. Two or more records, that is, data conflicts occur.
- step four the conflict resolution data is used to resolve the conflict incremental data.
- the digestion process is: the conflicting data is digested by calling the data conflict resolution stored procedure and the function on the database side, and the conflict resolution algorithm is performed by the incremental data packet uploaded by the user once, and the algorithm is stored in the business system database through the storage process and Function implementation, conflict data is digested in the same database to reduce the load on the application server of the business system and improve execution efficiency.
- Step 5 Move the incremental data of the intermediate table to the service data table of the backend service system.
- the data conflict resolution and synchronous mobility methods provided by the example use a special queue and a multi-threaded concurrency control model to ensure the fast response capability and stability of the business system.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本发明公开了一种基于数据包的移动数据同步冲突预处理与消解方法,通过数据的移动和同步特性对移动应用数据进行分类,分别制定不同的数据同步冲突预处理策略,能够对冲突进行提前预判和有效规避;冲突检测和冲突消解通过创建中间表作为媒介,这种面向中间表的冲突检测机制,不仅具有效率高的优点,而且避免冲突数据直接同步到业务数据表中;冲突消解算法,以存储过程和函数实现,并采用特殊队列和多线程并发控制模型,在中间表中实现冲突消解,中间表与业务数据表之间仅进行数据移动,起到分担业务系统负载的作用,解决了国内外同类方案未能解决的业务高峰期大数据量、高并发引起的业务系统性能瓶颈问题,保证了业务系统的快速响应能力和稳定性。
Description
本发明涉及一种基于数据包的移动数据同步冲突预处理与消解方法,属于移动应用技术领域。
随着无线通信技术发展和手持便携智能终端的普及应用,移动信息化逐渐成为了每个行业的核心,新的移动技术、应用和服务带来了令人兴奋的业务增长机遇。企业移动信息化已形成四个重大的发展趋势:传统有线应用向移动应用迁移、移动应用大规模普及、技术发展多样化、移动应用独立发展。
移动作业有在线模式、纯离线模式和“在线+离线”混合模式,由于移动计算环境具有低带宽、长延迟和间歇性连接等特性,在移动业务应用中,这些作业模式在数据缓存和更新、双向数据交换、访问队列和间歇性连接等操作时均容易导致数据的不一致性冲突,为确保移动终端与后端业务系统之间的数据一致性,都涉及到移动终端与后端业务系统间的数据同步和冲突处理,因此,移动数据同步的冲突预处理与检测消解是移动应用中关键而又复杂的技术难点。
目前移动数据同步主要分为文件拷贝和基于网络通信的数据同步两种方式:文件拷贝同步方式以文件作为同步处理单元,以拷贝方式实现数据同步,可通过Windows ActiveSync等专用的同步软件,但存在操作不方便、同步软件封闭、没有考虑事务概念等缺点,因此难以实现细粒度的冲突检测和数据回滚;基于网络通信的数据同步主要存在以Web Service和以移动终端嵌入式数据库
实现数据同步两类技术路线,以Web Service实现数据同步技术通过网络调用远程服务器的Web Service接口实现数据下载与上传,此技术路线实现成本低,但由于是实时在线数据同步模式,对网络的稳定性、可靠性要求较高,且在大数据量传输时网络延时比较明显,易加重后端业务系统负荷,缺乏相应的冲突预处理和消解机制。以移动终端嵌入式数据库实现数据同步技术采用TCP连接、二进制数据流方式完成数据的高效同步,提出了一些事务级数据同步模型和算法、冲突规避机制,以及多版本冲突消解技术等,这类产品以Sybase、IBM DB2为代表。总体而言,基于嵌入式数据库同步方式的数据格式具有封闭性,需要根据业务特征定制冲突处理及消解函数,降低了通用性和适应性,最大瓶颈在于对后台数据库的实时访问而导致并发性能低对数据库产生很大的压力,高峰时段频繁出现后台或中介数据库无响应的情况;并且对冲突检测和消解之前如何进行有效的冲突规避的机制研究甚少。
发明内容
为了解决上述技术问题,本发明提供了一种基于数据包的移动数据同步冲突预处理与消解方法。
为了达到上述目的,本发明所采用的技术方案是:
一种基于数据包的移动数据同步冲突预处理与消解方法,包括以下步骤,
步骤一,生成增量数据包,并通过数据同步服务上传至移动应用服务器;
步骤二,通过数据同步冲突预处理,对涉及移动和同步的增量数据创建中间表;对没有涉及移动和同步的增量数据,依据同步规则将数据回填至后端业务系统;
步骤三,对中间表中的增量数据进行冲突检测,获得冲突增量数据;
步骤四,采用冲突消解算法对冲突增量数据进行消解;
步骤五,将中间表中消解后的增量数据移动至后端业务系统的业务数据表中。
所述数据同步冲突预处理过程为,首先按照数据贮存位置、主要用途和同步移动特性,将移动应用的数据分为移动中间件基础数据、技术数据和业务数据,其中移动中间件基础数据和技术数据主要贮存在不同的移动控制组件中,不需要同步和移动;业务数据贮存在移动终端、后端业务相同及移动数据同步中间件中,用于支撑移动业务流转,需要进行数据同步与移动,然后对涉及移动和同步的增量数据创建中间表,最后按预处理策略添加到中间表。
所述预处理策略为,
Ex的表达式为 其中,集合E表示一类业务实体,元素Ex∈E为实体类的一个实例化;集合F表示一组业务实体的属性,元素Fy∈F为一个属性名称,F0为固有属性名称,为实体的唯一标识;集合V表示一组属性值,元素V(x,y)∈V,表示实体Ex的属性Fy上的值,V(x,0)
为主键的值,记为PK(x);所述x∈[0,n],y∈[0,n],n为正整数。
所述增量数据中的非结构化数据以结构化的方式进行存储。
所述中间表的属性名称以及数据类型均与业务数据表的数据结构一致;所述中间表属性在业务数据表属性的基础上增加了“数据包任务ID”、“数据实例ID”、“数据执行用户”、“数据操作模式”及逻辑主键;所述中间表的关联关系和约束条件均与业务数据表相同。
所述冲突检测过程为,以“数据包任务ID”和“数据实体ID”标识作为冲突检测判断条依据,如果存在两条或两条以上记录,即发生数据冲突。
采用冲突消解算法对冲突增量数据进行消解过程为,在数据库侧通过调用数据冲突消解存储过程和函数对冲突数据进行消解,所述冲突消解算法以用户一次上传的增量数据包为单位进行消解,算法在业务系统数据库通过存储过程和函数实现,冲突数据在同一数据库中进行消解。
本发明的有益效果是:本发明首次提出了一种基于数据包的移动数据同步冲突预处理和消解机制,通过数据的移动和同步特性对移动应用数据进行分类,分别制定不同的数据同步冲突预处理策略,能够对冲突进行提前预判和有效规避;冲突检测和冲突消解通过创建中间表作为媒介,这种面向中间表的冲突检测机制,不仅具有效率高的优点,而且避免冲突数据直接同步到业务数据表中,提高了业务系统数据的安全性;冲突消解算法,以存储过程和函数实现,并采用特殊队列和多线程并发控制模型,在中间表中实现冲突消解,中间表与业务数据表之间仅进行数据移动,起到分担业务系统负载的作用,解决了国内外同类方案未能解决的业务高峰期大数据量、高并发引起的业务系统性能瓶颈问题,保证了业务系统的快速响应能力和稳定性。
图1为本发明的流程图。
图2为预处理策略图。
下面将结合说明书附图,对本发明作进一步说明。以下实施例仅用于更加清楚地说明本发明的技术方案,而不能以此来限制本发明的保护范围。
如图1所示,一种基于数据包的移动数据同步冲突预处理与消解方法,包括以下步骤:
步骤一,生成增量数据包,并通过数据同步服务上传至移动应用服务器。
增量数据包是移动应用基于统一的客户端开发框架,框架运行时自动记录数据的变更日志,增量数据上传依赖于移动终端的数据变更日志,移动终端首先根据日志,按照操作时间顺序,将变更的数据依次取出、去重、归并,生成增量数据包。
移动应用服务器采用增量数据包处理池方式,对增量数据包进行异步提交。提交的增量数据包首先进入回填作业包队列,状态为“待处理”,并尝试加入回填任务池。移动应用服务器对回填作业包任务池和队列进行扫描,按入池顺序先后处理状态为待处理的增量数据包。
步骤二,通过数据同步冲突预处理,对涉及移动和同步的增量数据创建中间表;对没有涉及移动和同步的增量数据,依据同步规则将数据回填至后端业务系统。
在数据更新时,有可能出现冲突数据,即在一条业务数据被一个移动终端修改时,业务系统或另一个移动终端也进行了修改,例如:一个数据包下载到
多个移动终端,多人都编辑了“工作总结”字段。这种情况,相当于多人修改了同一条数据记录。因此我们采用了冲突预处理,能够对冲突进行提前预判和有效规避。
数据同步冲突预处理先对增量数据进行分类,然后根据不同的类别进行处理。先按照数据贮存位置、主要用途和同步移动特性,将移动应用的数据分为移动中间件基础数据、技术数据和业务数据,其中移动中间件基础数据和技术数据主要贮存在不同的移动控制组件中,不需要同步和移动;业务数据贮存在移动终端、后端业务相同及移动数据同步中间件中,用于支撑移动业务流转,需要进行数据同步与移动;对涉及移动和同步的增量数据创建中间表,并按预处理策略添加到中间表;对没有涉及移动和同步的增量数据,依据同步规则将数据回填至后端业务系统。
上述的中间表用以暂存涉及移动和同步的增量数据,中间表的属性名称以及数据类型均与业务数据表的数据结构一致,另外,中间表需要进行界面展现,对中间表进行扩充,以实现冲突手动确认等功能,一般通过特定的建模工具创建中间表,创建中间表的规范如下:
(1)中间表命名规范:业务表名+“_ZJB”;
(2)中间表属性在业务数据表属性的基础上增加了“数据包任务ID”、“数据实例ID”、“数据执行用户”、“数据操作模式”及逻辑主键;
(3)中间表的关联关系和约束条件均与业务数据表相同。
如图2所示,上述用以将涉及移动和同步的增量数据添加到中间表的策略如下:
令集合E表示一类业务实体,在数据库中通常以表对象的形式存在,其中
元素Ex∈E为实体类的一个实例化,x∈[0,n],n为正整数,Ex′为Ex的子集,通常存储在移动终端嵌入式数据库中,其元素仅为发生数据变更的项;
令集合F表示一组业务实体的属性,在数据库中为表对象的字段集合,其中元素Fy∈F,表示表的一个属性名称,y∈[0,n],F0为固有属性名称,作为实体的唯一标识(主键),中间表中通常用GUID作为唯一标识;
令集合V表示一组属性值,其中元素V(x,y)∈V,表示实体Ex的属性Fy上的值,V(x,0)为主键的值,记为PK(x);
所述数据同步规则通过Table标签声明对一张中间数据表的查询、修改和删除SQL,数据添加时使用InsertLogic、UpdateLogic、DeleteLogic等SQL。
针对非结构化数据(文本、word文档、图片等)同步,本方法要求非结构化数据以结构化方式进行存储,其冲突预处理和消解建立在结构化的描述信息之上,由描述信息维护与非结构化数据的映射关系。
步骤三,对中间表中的增量数据进行冲突检测,获得冲突增量数据。
为了尽可能的避免冲突,通过数据包进行数据同步机制,设计出合理的任务分配及管理制度。例如一个数据包任务下载到多个终端,多人执行,每人只填写自己负责范围内的工作处理信息,这种情况,从逻辑上无交叉,实际数据无冲突。
但是冲突是不可避免的,所以本发明对中间表中的增量数据进行冲突检测,以便后续的消解,本发明提供的数据冲突检测方法是多人修改了同一数据实体的数据冲突检测,任意一个执行用户将增量数据上传到中间表后,均触发主站业务系统进行冲突检测,冲突检测过程为,以“数据包任务ID”和“数据实体ID”标识作为冲突检测判断条依据,如果存在两条或两条以上记录,即发生数据冲突。
步骤四,采用冲突消解算法对冲突增量数据进行消解。
消解过程为,在数据库侧通过调用数据冲突消解存储过程和函数对冲突数据进行消解,所述冲突消解算法以用户一次上传的增量数据包为单位进行消解,算法在业务系统数据库通过存储过程和函数实现,冲突数据在同一数据库中进行消解,用以减轻业务系统应用服务器负荷,提高执行效率。
针对不同的类型的数据冲突,消解的原则也不同,主要分为以下几类:
(1)针对业务系统与移动终端的数据冲突,原则上,对数据操作时间点进行比较,采用时间优先原则消解冲突;
(2)针对多移动终端的数据冲突,采用按操作时间优先及自定义扩展冲突消解组件相结合的方式进行消解;
(3)针对需要用户手动进行数据冲突确认及编辑的情况,更新数据包的状
态为“发生数据冲突,未进行同步”,用户触发“数据冲突手动确认”功能,弹出数据冲突解决可视化界面,对冲突数据进行忽略、编辑操作并保存到中间表,待业务系统或用户对检测出的数据冲突验证无误之后,再通过冲突消解算法对冲突数据进行消解,最终实现数据同步。
步骤五,将中间表的增量数据移动至后端业务系统的业务数据表中。
高峰期大数据量、高并发的数据同步任务往往给业务系统应用服务及数据库服务器造成难以控制的影响,例如,数据库死锁、服务器高内存及CPU资源占用等性能瓶颈问题,因此,本发明实施例提供的数据冲突消解及同步移动方法中采用特殊队列和多线程并发控制模型,用以保证业务系统的快速响应能力和稳定性。
以上显示和描述了本发明的基本原理、主要特征及优点。本行业的技术人员应该了解,本发明不受上述实施例的限制,上述实施例和说明书中描述的只是说明本发明的原理,在不脱离本发明精神和范围的前提下,本发明还会有各种变化和改进,这些变化和改进都落入要求保护的本发明范围内。本发明要求保护范围由所附的权利要求书及其等效物界定。
Claims (7)
- 一种基于数据包的移动数据同步冲突预处理与消解方法,其特征在于:包括以下步骤,步骤一,生成增量数据包,并通过数据同步服务上传至移动应用服务器;步骤二,通过数据同步冲突预处理,对涉及移动和同步的增量数据创建中间表;对没有涉及移动和同步的增量数据,依据同步规则将数据回填至后端业务系统;步骤三,对中间表中的增量数据进行冲突检测,获得冲突增量数据;步骤四,采用冲突消解算法对冲突增量数据进行消解;步骤五,将中间表中消解后的增量数据移动至后端业务系统的业务数据表中。
- 根据权利要求1所述的一种基于数据包的移动数据同步冲突预处理与消解方法,其特征在于:所述数据同步冲突预处理过程为,首先按照数据贮存位置、主要用途和同步移动特性,将移动应用的数据分为移动中间件基础数据、技术数据和业务数据,其中移动中间件基础数据和技术数据主要贮存在不同的移动控制组件中,不需要同步和移动;业务数据贮存在移动终端、后端业务相同及移动数据同步中间件中,用于支撑移动业务流转,需要进行数据同步与移动,然后对涉及移动和同步的增量数据创建中间表,最后按预处理策略添加到中间表。
- 根据权利要求2所述的一种基于数据包的移动数据同步冲突预处理与消解方法,其特征在于:所述预处理策略为,
- 根据权利要求2所述的一种基于数据包的移动数据同步冲突预处理与消解方法,其特征在于:所述增量数据中的非结构化数据以结构化的方式进行存储。
- 根据权利要求2所述的一种基于数据包的移动数据同步冲突预处理与消解方法,其特征在于:所述中间表的属性名称以及数据类型均与业务数据表的数据结构一致;所述中间表属性在业务数据表属性的基础上增加了“数据包任务ID”、“数据实例ID”、“数据执行用户”、“数据操作模式”及逻辑主键;所述中间表的关联关系和约束条件均与业务数据表相同。
- 根据权利要求5所述的一种基于数据包的移动数据同步冲突预处理与消 解方法,其特征在于:所述冲突检测过程为,以“数据包任务ID”和“数据实体ID”标识作为冲突检测判断条依据,如果存在两条或两条以上记录,即发生数据冲突。
- 根据权利要求1所述的一种基于数据包的移动数据同步冲突预处理与消解方法,其特征在于:采用冲突消解算法对冲突增量数据进行消解过程为,在数据库侧通过调用数据冲突消解存储过程和函数对冲突数据进行消解,所述冲突消解算法以用户一次上传的增量数据包为单位进行消解,算法在业务系统数据库通过存储过程和函数实现,冲突数据在同一数据库中进行消解。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410441495.1 | 2014-09-01 | ||
CN201410441495.1A CN104253858B (zh) | 2014-09-01 | 2014-09-01 | 一种基于数据包的移动数据同步冲突预处理与消解方法 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2016034061A1 true WO2016034061A1 (zh) | 2016-03-10 |
Family
ID=52188381
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2015/088104 WO2016034061A1 (zh) | 2014-09-01 | 2015-08-26 | 一种基于数据包的移动数据同步冲突预处理与消解方法 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN104253858B (zh) |
WO (1) | WO2016034061A1 (zh) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109885618A (zh) * | 2019-02-25 | 2019-06-14 | 南京金信通信息服务有限公司 | Sap系统和sap bw系统信息同步的方法和装置 |
CN110865897A (zh) * | 2018-08-28 | 2020-03-06 | 阿里巴巴集团控股有限公司 | 冲突检测方法和装置以及电子设备 |
CN111352944A (zh) * | 2020-02-10 | 2020-06-30 | 北京百度网讯科技有限公司 | 数据处理方法、装置、电子设备与存储介质 |
CN112800040A (zh) * | 2021-01-22 | 2021-05-14 | 平安养老保险股份有限公司 | 业务数据校验方法、装置、计算机设备及存储介质 |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104253858B (zh) * | 2014-09-01 | 2017-07-14 | 国家电网公司 | 一种基于数据包的移动数据同步冲突预处理与消解方法 |
CN105072153B (zh) * | 2015-07-10 | 2018-10-09 | 成都品果科技有限公司 | 一种移动设备上基于增量更新的异构数据同步方法 |
CN110277158A (zh) * | 2019-05-23 | 2019-09-24 | 广州博而济信息科技有限公司 | 一种适合于各类呼吸机进行自动化适配并整理存储数据的方法 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102917020A (zh) * | 2011-09-24 | 2013-02-06 | 国网电力科学研究院 | 一种基于数据包的移动终端与业务系统数据同步的方法 |
CN102999482A (zh) * | 2011-12-12 | 2013-03-27 | 微软公司 | 用于管理协作文档的技术 |
CN103916482A (zh) * | 2014-04-21 | 2014-07-09 | 合肥盈云信息科技有限公司 | 一种基于sqlite的数据同步传输方法 |
CN104253858A (zh) * | 2014-09-01 | 2014-12-31 | 国家电网公司 | 一种基于数据包的移动数据同步冲突预处理与消解方法 |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102495910B (zh) * | 2011-12-28 | 2013-09-18 | 畅捷通信息技术股份有限公司 | 实现异构系统数据定时同步的装置和方法 |
-
2014
- 2014-09-01 CN CN201410441495.1A patent/CN104253858B/zh active Active
-
2015
- 2015-08-26 WO PCT/CN2015/088104 patent/WO2016034061A1/zh active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102917020A (zh) * | 2011-09-24 | 2013-02-06 | 国网电力科学研究院 | 一种基于数据包的移动终端与业务系统数据同步的方法 |
CN102999482A (zh) * | 2011-12-12 | 2013-03-27 | 微软公司 | 用于管理协作文档的技术 |
CN103916482A (zh) * | 2014-04-21 | 2014-07-09 | 合肥盈云信息科技有限公司 | 一种基于sqlite的数据同步传输方法 |
CN104253858A (zh) * | 2014-09-01 | 2014-12-31 | 国家电网公司 | 一种基于数据包的移动数据同步冲突预处理与消解方法 |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110865897A (zh) * | 2018-08-28 | 2020-03-06 | 阿里巴巴集团控股有限公司 | 冲突检测方法和装置以及电子设备 |
CN110865897B (zh) * | 2018-08-28 | 2023-05-02 | 阿里巴巴集团控股有限公司 | 冲突检测方法和装置以及电子设备 |
CN109885618A (zh) * | 2019-02-25 | 2019-06-14 | 南京金信通信息服务有限公司 | Sap系统和sap bw系统信息同步的方法和装置 |
CN111352944A (zh) * | 2020-02-10 | 2020-06-30 | 北京百度网讯科技有限公司 | 数据处理方法、装置、电子设备与存储介质 |
CN111352944B (zh) * | 2020-02-10 | 2023-08-18 | 北京百度网讯科技有限公司 | 数据处理方法、装置、电子设备与存储介质 |
CN112800040A (zh) * | 2021-01-22 | 2021-05-14 | 平安养老保险股份有限公司 | 业务数据校验方法、装置、计算机设备及存储介质 |
CN112800040B (zh) * | 2021-01-22 | 2024-02-06 | 平安养老保险股份有限公司 | 业务数据校验方法、装置、计算机设备及存储介质 |
Also Published As
Publication number | Publication date |
---|---|
CN104253858A (zh) | 2014-12-31 |
CN104253858B (zh) | 2017-07-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2016034061A1 (zh) | 一种基于数据包的移动数据同步冲突预处理与消解方法 | |
KR102293093B1 (ko) | 분산된 데이터 스토어 내의 버젼형 계층 데이터 구조 | |
US9785668B2 (en) | High performance real-time relational database system and methods for using same | |
US20220083529A1 (en) | Tracking database partition change log dependencies | |
WO2022017347A1 (zh) | 分布式数据库系统及数据处理方法 | |
WO2022143045A1 (zh) | 数据血缘关系的确定方法及装置、存储介质、电子装置 | |
WO2011108695A1 (ja) | 並列データ処理システム、並列データ処理方法及びプログラム | |
US10754844B1 (en) | Efficient database snapshot generation | |
US9971820B2 (en) | Distributed system with accelerator-created containers | |
CN104142930B (zh) | 通用δ数据装载 | |
JP7220807B2 (ja) | データ読み取り方法、装置、コンピュータ装置及びコンピュータプログラム | |
US20200065313A1 (en) | Extensible content object metadata | |
CN109902117B (zh) | 业务系统分析方法和装置 | |
WO2020238597A1 (zh) | 基于Hadoop的数据更新方法、装置、系统及介质 | |
EP2797013A1 (en) | Database update execution according to power management schemes | |
MXPA05005856A (es) | Metodo, sistema y aparato para exponer rangos de libro de trabajo como fuentes de datos. | |
US20110106853A1 (en) | Declarative model security pattern | |
US11429629B1 (en) | Data driven indexing in a spreadsheet based data store | |
AU2005310983B2 (en) | Cache for an enterprise software system | |
US9003054B2 (en) | Compressing null columns in rows of the tabular data stream protocol | |
WO2022062555A1 (zh) | 一种实现跨不同数据库引擎事务强一致性的系统及方法 | |
JP2007503051A (ja) | ハードウェア/ソフトウェアインターフェイスシステムによって管理可能な情報単位の拡張および継承のためのシステムおよび方法 | |
CN101968747B (zh) | 一种机群应用管理系统及其应用管理方法 | |
US10445299B2 (en) | Optimizing memory by sharing datasets between workspaces | |
Hamdi et al. | QoS management in real-time spatial big data using a feedback control scheduling |
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: 15838260 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: 15838260 Country of ref document: EP Kind code of ref document: A1 |