A data processing method, device and equipment in data synchronization, and a storage medium
Patent Information
- Application Number
- CN202611160919.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-31
- Publication Date
- 2026-10-13
AI Technical Summary
[0004]有鉴于此,本发明的目的在于提供一种数据同步中的数据处理方法、装置、设备及存储介质,解决了现有技术中数据同步效率低的问题
[0016]可见,本发明在业务服务启动时,扫描实现预设数据选择接口的策略插件;建立数据选择策略类型与策略插件之间的对应关系;确定当前处理场景对应的业务表,并根据业务表对应的目标数据选择策略类型确定目标策略插件;在边缘拉取场景下,调用目标策略插件,根据边缘节点特征生成边缘节点可获得的数据范围,并基于边缘节点可获得的数据范围返回同步数据;在数据恢复场景下,复用目标策略插件,根据边缘节点特征生成边缘节点有权恢复的数据归属范围,并调用按业务模型注册的恢复过滤插件,在数据归属范围内利用业务有效性过滤条件进行过滤,得到最终可恢复数据集合。
Smart Images

Figure CN122903504A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data synchronization technology, and in particular to a data processing method, apparatus, device, and storage medium for data synchronization. Background Technology
[0002] Existing synchronization frameworks generally perform two basic actions: first, the central node synchronizes configuration, policy, or business data to edge nodes; second, edge nodes synchronize locally generated data to the central node. For simple systems, unified synchronization conditions and unified broadcast policies are sufficient. However, in scenarios with multiple regions, multiple tenants, and multiple types of edge nodes, the visibility range of data for different business tables and different edge nodes often varies significantly. For example, some basic data can be synchronized to all edge nodes; some regional data can only be synchronized to edge nodes within its own region; some data needs to exclude logically deleted states; and some business data requires dynamic determination of visibility range based on business status, permission relationships, resource relationships, or node identity. If the synchronization framework hardcodes query conditions in the main process, adding new business tables or new data range rules requires continuous modification of the synchronization code, which can easily lead to scattered rules, high maintenance costs, and inconsistent synchronization ranges.
[0003] It is evident that improving the efficiency of data synchronization is a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0004] In view of this, the purpose of the present invention is to provide a data processing method, apparatus, device and storage medium for data synchronization, which solves the problem of low data synchronization efficiency in the prior art.
[0005] To address the aforementioned technical problems, this invention provides a data processing method for data synchronization, comprising: When the business service starts, scan for strategy plugins that implement the preset data selection interface; Establish a correspondence between data selection strategy types and the strategy plugins; Determine the business table corresponding to the current processing scenario, and select the strategy type and target strategy plugin based on the target data corresponding to the business table; In the edge retrieval scenario, the target strategy plugin is invoked to generate the data range that the edge node can obtain based on the edge node characteristics, and synchronous data is returned based on the data range that the edge node can obtain. In the data recovery scenario, the target strategy plugin is reused to generate the data ownership range that the edge node is entitled to recover based on the edge node characteristics, and the recovery filtering plugin registered according to the business model is called to filter the data within the ownership range using business validity filtering conditions to obtain the final recoverable data set.
[0006] Optionally, before establishing the correspondence between data selection strategy types and the strategy plugins, the following steps are also included: The strategy type declaration method is used to return the data selection strategy type corresponding to each strategy plugin; Write each strategy plugin into a mapping table with the data selection strategy type as the key; Based on the mapping table, determine whether the current strategy plugin has the same data selection strategy type as other strategy plugins; If a policy plugin corresponding to the same data selection policy type already exists in the mapping table, a startup exception will be thrown or the service will be stopped.
[0007] Optionally, when the business service starts, it scans for strategy plugins that implement the preset data selection interface, including: The preset data selection interface is defined to include a strategy type declaration method, a target edge node calculation method, and an edge retrieval query condition construction method.
[0008] Optionally, in an edge-fetching scenario, the target strategy plugin is invoked to generate the data range obtainable by the edge node based on its characteristics, and synchronized data is returned based on the data range obtainable by the edge node, including: If the edge node characteristics include at least one of edge node identifier, data center identifier, region identifier, and tenant identifier, then the target policy plugin is used to determine the edge nodes that need to be notified based on the edge node characteristics. If the edge node characteristics do not include the edge node identifier, the data center identifier, the region identifier, or the tenant identifier, then the target policy plugin is used to determine the edge nodes to be notified based on the business objects associated with the current data.
[0009] Optionally, in an edge-fetching scenario, the target strategy plugin is invoked to generate the data range obtainable by the edge node based on its characteristics, and synchronized data is returned based on the data range obtainable by the edge node, including: Receive data retrieval requests from edge nodes for the target business table; Select the strategy type and invoke the target strategy plugin based on the data corresponding to the target business table; Based on the edge node characteristics, the data range obtainable by the edge node is generated using the target strategy plugin; The data obtained from the edge node is queried from the central data, and the synchronized data is returned to the edge node.
[0010] Optionally, after determining the business table corresponding to the current processing scenario and selecting the target strategy plugin based on the target data corresponding to the business table, the method further includes: Identify the business table to be verified, and select the strategy type and call the target strategy plugin based on the data corresponding to the business table to be verified; The target strategy plugin is used to determine the range of verification data corresponding to the edge node based on the edge node characteristics; A consistency comparison is performed on the central data and the edge data based on the aforementioned verification data range; If the data at the center end and the data at the edge end are consistent within the range of the verification data, then the verification result is output. If the central data and the edge data differ within the range of the verification data, the difference result is output.
[0011] Optionally, in a data recovery scenario, the target strategy plugin is reused to generate the data ownership range for which the edge node is entitled to recovery based on the edge node characteristics. Then, a recovery filtering plugin registered according to the business model is invoked to filter the data within the ownership range using business validity filtering conditions, resulting in a final recoverable data set, including: In data recovery scenarios where data loss occurs at edge nodes and data recovery is required, the business table to be recovered is determined, and the target strategy plugin is called based on the data corresponding to the business table to be recovered and the strategy type is selected. The target strategy plugin is used to determine the data ownership range that the edge node is entitled to recover based on the edge node characteristics; wherein, the data ownership range is used to limit whether the edge node corresponding to the data or the edge node has the right to access it; The recovery filtering plugin registered according to the business model is invoked, and the validity filtering conditions are used to filter within the data ownership range to obtain the final recoverable data set that simultaneously satisfies the data ownership range and the business validity filtering conditions; wherein, the business validity filtering conditions include at least one of running, in use, not destroyed, reserved, and not deleted.
[0012] The present invention also provides a data processing apparatus for data synchronization, comprising: The strategy plugin scanning module is used to scan for strategy plugins that implement preset data selection interfaces when the business service starts. The correspondence determination module is used to establish the correspondence between data selection strategy types and the strategy plugins; The target strategy plugin determination module is used to determine the business table corresponding to the current processing scenario, and select the strategy type to determine the target strategy plugin based on the target data corresponding to the business table; wherein, the processing scenario includes at least two of the following: central real-time notification, edge retrieval, data verification, and data recovery; The target strategy plugin module is used to call the target strategy plugin in the edge pull scenario, generate the data range that the edge node can obtain based on the edge node characteristics, and return synchronized data based on the data range that the edge node can obtain. The target strategy plugin reuse module is used to reuse the target strategy plugin in data recovery scenarios, generate the data ownership range that the edge node is entitled to recover based on the edge node characteristics, and call the recovery filtering plugin registered according to the business model to filter the data within the data ownership range using business validity filtering conditions to obtain the final recoverable data set.
[0013] The present invention also provides a data processing device for data synchronization, comprising: a memory for storing a computer program; and a processor for executing the computer program to implement the data processing method for data synchronization described above.
[0014] The present invention also provides a storage medium storing a computer program, which, when executed by a processor, implements the data processing method in the above-described data synchronization.
[0015] The present invention also provides a computer program product, including a computer program / instructions, which, when executed by a processor, implement the steps of the above-described method.
[0016] As can be seen, when the business service starts, this invention scans for strategy plugins that implement the preset data selection interface; establishes a correspondence between data selection strategy types and strategy plugins; determines the business table corresponding to the current processing scenario, and determines the target strategy plugin based on the target data selection strategy type corresponding to the business table; in the edge retrieval scenario, it calls the target strategy plugin, generates the data range that the edge node can obtain based on the edge node characteristics, and returns synchronized data based on the data range that the edge node can obtain; in the data recovery scenario, it reuses the target strategy plugin, generates the data ownership range that the edge node is entitled to recover based on the edge node characteristics, and calls the recovery filtering plugin registered according to the business model to filter within the data ownership range using business validity filtering conditions to obtain the final recoverable data set.
[0017] The beneficial effects of this invention are as follows: compared with the current method of constantly modifying the synchronization code, when adding a new business table, it is only necessary to configure the existing data selection strategy type for the business table; when adding a new data range rule, it is only necessary to implement a new strategy plugin, thus eliminating the need to modify the main synchronization process, thereby improving the efficiency of data synchronization; and the same business table can reuse the same data range determination logic in different processing scenarios, thereby reducing synchronization caused by inconsistent data ranges, thereby improving the accuracy of synchronization.
[0018] In addition, the present invention also provides a data processing apparatus, device and storage medium for data synchronization, which also have the above-mentioned beneficial effects. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0020] Figure 1 A flowchart illustrating a data processing method in data synchronization provided by an embodiment of the present invention; Figure 2 A flowchart illustrating a data processing method in data synchronization provided by an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of a data processing device in data synchronization provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of a data processing device in data synchronization provided in an embodiment of the present invention. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0022] Please refer to Figure 1 , Figure 1 A flowchart illustrating a data processing method in data synchronization provided by an embodiment of the present invention. The method may include: S101 scans for strategy plugins that implement preset data selection interfaces when the business service starts.
[0023] Each step in this embodiment can be executed by a designated electronic device, which can specifically be a server, a portable terminal, or other forms. For example, the execution entity in this embodiment is a cloud-edge synchronization system. The cloud-edge synchronization system can be deployed at the central end or jointly implemented by the central end and edge nodes. The central end can be a server, a cloud platform node, or a central business service, and the edge nodes can be data center nodes, regional nodes, edge servers, or edge clients. The business service in this embodiment is a business service that loads synchronization functionality. The strategy plugin in this embodiment is a program component that implements a preset data selection interface. The preset data selection interface can be an interface that implements strategy type declaration and data selection. The strategy type declaration is used to return the data selection strategy type corresponding to the strategy plugin. Data selection is used to determine the corresponding data in scenarios such as central real-time notification, edge retrieval, data verification, or data recovery. The data selection strategy type in this embodiment is used to represent the data range determination rules adopted by the business table. The data selection strategy type can be a full strategy, a regional strategy, a non-deleted regional strategy, or a business-defined strategy. The full policy indicates that data in the business table can be obtained by all edge nodes; the regional policy indicates that data in the business table is obtained by the corresponding edge node according to the region, data center, or edge node affiliation; the non-deleted region policy indicates that data in the business table needs to exclude logically deleted data in addition to the regional affiliation; and the business-defined policy indicates that the affiliation range of data in the business table needs to be determined according to business status, permission relationship, resource relationship, or associated primary key.
[0024] S102, Establish the correspondence between data selection strategy types and strategy plugins.
[0025] In this embodiment, one data selection strategy type corresponds to one callable strategy plugin, and multiple business tables can reuse the same data selection strategy type. This embodiment does not limit the specific data structure for establishing the correspondence. For example, the strategy plugin can be written into a mapping table with the data selection strategy type as the key; or the strategy plugin can be written into a cache structure indexed by the data selection strategy type. By establishing the above correspondence, when processing a certain business table subsequently, the data selection strategy type corresponding to the business table can be determined first, and then the target strategy plugin can be determined based on the data selection strategy type.
[0026] It should be further noted that, based on any of the above embodiments, before establishing the correspondence between data selection strategy types and strategy plugins, the following may also be included: Step 1: Use the strategy type declaration method to return the data corresponding to each strategy plugin and select the strategy type.
[0027] In this embodiment, the strategy type declaration method can return a strategy identifier of integer, string, or enumeration type. This embodiment does not limit the specific form of the strategy identifier, as long as it can uniquely represent a data range determination rule. The data selection strategy type in this embodiment can determine the range of data that the current edge node is entitled to recover.
[0028] Step 2: Write each strategy plugin into a mapping table with the data selection strategy type as the key.
[0029] In this embodiment, the mapping table is used to store the correspondence between data selection strategy types and strategy plugins. Using this mapping table, after obtaining the data selection strategy type from the business table, the corresponding strategy plugin can be quickly located.
[0030] Step 3: Determine whether the current policy plugin has the same data selection policy type as other policy plugins based on the mapping table.
[0031] Step 4: If the same data selection strategy type corresponding to the strategy plugin already exists in the mapping table, throw a startup exception or stop the service startup.
[0032] This implementation uses the uniqueness constraint of the data selection strategy type to prevent multiple strategy plugins from corresponding to the same strategy type. If multiple strategy plugins correspond to the same strategy type, the same business table may match different data range rules at different runtimes, leading to unpredictable data processing scope. By throwing a startup exception or stopping service startup, configuration conflicts can be exposed during the business service startup phase, preventing erroneous strategy plugins from entering subsequent notification, retrieval, verification, or recovery processes.
[0033] S103, determine the business table corresponding to the current processing scenario, and select the strategy type and target strategy plugin based on the target data corresponding to the business table.
[0034] The processing scenarios in this embodiment may include central real-time notification, edge retrieval, data verification, and data recovery. Central real-time notification refers to the processing scenario where, after changes occur in the central business data, it is determined which edge nodes need to be notified. Data verification refers to the processing scenario where consistency comparisons are performed between central and edge data. Data recovery refers to the processing scenario where, after data loss occurs at an edge node, the data that the edge node is authorized to recover is recovered from the central data. This embodiment does not limit the method for determining the target data selection strategy type; for example, this embodiment may determine the target data selection strategy type based on annotations in the business table; or this embodiment may determine the target data selection strategy type based on the synchronized metadata of the business table.
[0035] It should be further explained that, based on any of the above embodiments, in the edge retrieval scenario, calling the target policy plugin to generate the data range that the edge node can obtain based on the edge node characteristics, and returning synchronized data based on the data range that the edge node can obtain, may include: if the edge node characteristics include at least one of edge node identifier, data center identifier, region identifier, and tenant identifier, then the target policy plugin is used to determine the edge node to be notified based on the edge node characteristics; if the edge node characteristics do not include edge node identifier, data center identifier, region identifier, or tenant identifier, then the target policy plugin is used to determine the edge node to be notified based on the business object associated with the current data.
[0036] The data processing in this embodiment may involve adding, updating, or deleting business data at the central end. The edge node identifier in this embodiment can be an edge node code, license, or node channel identifier. The data center identifier can be a data center code or Region identifier. The region identifier can be a region code, region name, or business domain identifier. The tenant identifier can be a tenant number or organization number. The business object associated with the data in this embodiment can be an object that has a primary key association, foreign key association, or business relationship with the data in the business table. For example, the hardware information data itself may not include a data center identifier. The target policy plugin can first determine the corresponding bare metal device based on the bare metal device identifier associated with the hardware information data, and then determine the edge nodes to be notified based on the data center to which the bare metal device belongs. This indirect association determination method can adapt to business tables without a directly belonging field. This embodiment does not send synchronization notifications to edge nodes that are not within the scope of this data processing. In this way, the central end does not need to broadcast business data changes to all edge nodes, thereby reducing invalid notifications and the processing overhead of irrelevant data by edge nodes.
[0037] S104, in the edge retrieval scenario, calls the target strategy plugin to generate the data range that the edge node can obtain based on the edge node characteristics, and returns synchronized data based on the data range that the edge node can obtain.
[0038] The edge retrieval scenario in this embodiment refers to the processing scenario where edge nodes actively request to retrieve business table data from the central end.
[0039] S105, In the data recovery scenario, the target strategy plugin is reused to generate the data ownership range that the edge node is entitled to recover based on the edge node characteristics, and the recovery filtering plugin registered according to the business model is called to filter the data within the data ownership range using business validity filtering conditions to obtain the final recoverable data set.
[0040] In this embodiment, reusing the target strategy plugin refers to selecting a strategy plugin based on the target data corresponding to the same business table. That is, for the same business table, instead of writing separate, unrelated data range rules for central real-time notification, edge fetching, data verification, and data recovery, the same data range determination method in the same target strategy plugin is called. For example, this application uses the same target strategy plugin in both edge fetching and data recovery scenarios. When the current processing scenario is central real-time notification, the edge nodes to be notified need to be determined, and the cloud-edge synchronization system sends synchronization notifications based on these edge nodes. When the current processing scenario is edge fetching, the data range obtainable by the current edge node is determined, and the cloud-edge synchronization system queries the central data based on this data range and returns it to the edge node. When the current processing scenario is data verification, the verification data range is determined, and the cloud-edge synchronization system performs a consistency comparison between the central data and the edge data based on this verification data range. When the current processing scenario is data recovery, the data ownership range that the current edge node is entitled to recover is determined.
[0041] It should be further explained that, based on any of the above embodiments, when the business service starts, scanning the strategy plugin that implements the preset data selection interface may include: determining that the preset data selection interface includes a strategy type declaration method, a target edge node calculation method, and an edge retrieval query condition construction method. In this embodiment, the interface of the strategy plugin includes at least a strategy type declaration method, a target edge node calculation method, and an edge retrieval query condition construction method. The target edge node calculation method is used for real-time notification at the central end, and the query condition construction method is used for edge retrieval, verification, and recovery. For example, when a piece of data at the central end changes, the target data selection strategy type of the business table to which the data belongs is read, the corresponding plugin is obtained from the strategy factory, and the strategy plugin is called to calculate the set of edge nodes that need to be notified. When an edge node actively retrieves synchronized data, the same strategy plugin is obtained according to the strategy type of the business table, and the plugin is called to generate the query conditions for the data that the edge node can synchronize. The central end returns data according to the query conditions, so that the edge node only obtains data within its own identity, region, tenant, or business scope. When the edge node performs data verification, the central end reuses the same data selection strategy type to generate the verification range, avoiding inconsistencies between the verification range and the synchronization range. When an edge node performs data recovery, the central endpoint first reuses the data selection strategy type to limit the range of data that the edge node is entitled to recover, and then calls the recovery filtering plugin to add business validity conditions. The central endpoint returns the final recoverable data in pages; after the edge node writes the data locally, the system commits the transaction or rolls back based on the recovery results and advances the synchronization time baseline. In this way, the data ownership boundaries of the same business table remain consistent in the scenarios of pulling, pushing, validating, and recovering.
[0042] It should be further explained that, based on any of the above embodiments, in an edge retrieval scenario, invoking the target strategy plugin to generate the data range obtainable by the edge node according to the edge node characteristics, and returning synchronized data based on the data range obtainable by the edge node, may include: receiving a data retrieval request initiated by the edge node for a target business table; selecting a strategy type and invoking the target strategy plugin according to the data corresponding to the target business table; generating the data range obtainable by the edge node using the target strategy plugin based on the edge node characteristics of the edge node; querying data at the central end based on the data range obtainable by the edge node, and returning the queried synchronized data to the edge node. In this embodiment, the data retrieval request may carry the table name of the target business table, the business table identifier, edge node characteristics, or retrieval scenario information. Edge node characteristics may include edge node identity, license, node code, data center identifier, region identifier, tenant identifier, or resource ownership identifier. This embodiment does not limit the form of the obtainable data range. For example, the obtainable data range may be a query condition; or the obtainable data range may also be a set of primary keys, a set of regions, a set of data centers, or a set of business ownership. For full-scale policies, the target policy plugin can generate data ranges without edge affiliation restrictions; for regional policies, it can generate regional restrictions; for policies that do not delete regions, it can add logical deletion exclusion conditions to the regional restrictions; for business-defined policies, it can generate data ranges based on business status, permission relationships, resource relationships, or associated primary keys. Through the above processing, the data range actively pulled by edge nodes and the edge nodes to be notified determined by the center in real-time notifications both originate from the same target policy plugin, thus ensuring consistency in who receives the data and who can pull which data.
[0043] It should be further explained that, after determining the business table corresponding to the current processing scenario and selecting the target strategy plugin based on the target data corresponding to the business table, it may also include: S1: Determine the business table to be verified, and select the strategy type and call the target strategy plugin based on the data corresponding to the business table to be verified; S2: Use the target strategy plugin to determine the range of verification data corresponding to the edge node based on the characteristics of the edge node; In this embodiment, the verification data range is used to limit the data sets used for consistency comparison between the central and edge nodes. If the verification data range is not determined first, and the full data from the central node is directly compared with the data from the edge node, data that the edge nodes should not have will be misjudged as missing data, resulting in false verification reports.
[0044] S3: Perform a consistency comparison between central and edge data based on the verification data range; S4: If the data at the center and the data at the edge are consistent within the verification data range, then output the verification result as passed; S5: If there are differences between the central data and the edge data within the verification data range, output the difference results.
[0045] This embodiment does not limit the specific method of consistency comparison. For example, the central and edge data can be compared row by row according to the primary key; or the summary values of the central and edge data can be generated and then compared. This embodiment can verify only the data that falls within the scope of the verification data, thus improving the accuracy of the verification.
[0046] It should be further explained that in data recovery scenarios, the target strategy plugin is reused to generate the data ownership scope that the edge node is entitled to recover based on the edge node characteristics. Then, the recovery filtering plugin registered according to the business model is invoked to filter the data within the ownership scope using business validity filtering conditions, resulting in the final recoverable data set. This can include: in data recovery scenarios where data loss occurs at the edge node and data needs to be recovered, determining the business table to be recovered, and selecting the strategy type and invoking the target strategy plugin based on the data corresponding to the business table; using the target strategy plugin to determine the data ownership scope that the edge node is entitled to recover based on the edge node characteristics; wherein, the data ownership scope is used to limit whether the edge node corresponding to the data or the edge node has the right to access it; invoking the recovery filtering plugin registered according to the business model, and filtering the data within the ownership scope using validity filtering conditions, resulting in the final recoverable data set that simultaneously satisfies the data ownership scope and business validity filtering conditions; wherein, the business validity filtering conditions include at least one of running, in use, not destroyed, reserved, and not deleted. In this embodiment, the data ownership scope is used to represent the data set belonging to the current edge node or the data set that the current edge node is entitled to access. By restricting the recovered data through the data ownership scope, it is possible to prevent data from other edge nodes from being recovered to the current edge node. The recovery filtering plugin in this embodiment is used to determine whether data is still valid and worth recovering. This embodiment does not limit the specific content of the validity filtering conditions. For example, for resource occupancy data, the validity filtering condition could be "in use" or "reserved"; or for lifecycle data, the validity filtering condition could be "not destroyed," "not archived," or "not ended"; or for data with a logical deletion flag, the validity filtering condition could be "not logically deleted." This embodiment first uses the target strategy plugin to determine which edge node the data belongs to, and then uses the recovery filtering plugin to determine whether the data is still valid. Through this two-level processing, cross-edge node recovery can be avoided, and the recovery of invalid historical data that has been ended, destroyed, archived, or tested can be prevented.
[0047] This invention provides a data processing method for data synchronization, which may include: S101, scanning for strategy plugins that implement preset data selection interfaces when a business service starts; S102, establishing a correspondence between data selection strategy types and strategy plugins; S103, determining the business table corresponding to the current processing scenario, and determining the target strategy plugin based on the target data selection strategy type corresponding to the business table; S104, in an edge retrieval scenario, calling the target strategy plugin to generate the data range that the edge node can obtain based on the edge node characteristics, and returning synchronized data based on the data range; S105, in a data recovery scenario, reusing the target strategy plugin to generate the data ownership range that the edge node is entitled to recover based on the edge node characteristics, and calling the recovery filtering plugin registered according to the business model to filter within the data ownership range using business validity filtering conditions to obtain the final recoverable data set. Compared to constantly modifying the synchronization code, when adding a new business table, only the strategy type for the existing data needs to be configured for the business table; when adding a new data range rule, only the new strategy plugin needs to be implemented, thus eliminating the need to modify the main synchronization process and improving the efficiency of data synchronization; moreover, the same data range determination logic can be reused for the same business table in different processing scenarios, thereby reducing synchronization caused by inconsistent data ranges and improving the accuracy of synchronization.
[0048] The current data range of the same business table is inconsistent in different processes, which leads to missed synchronization, incorrect synchronization, unauthorized recovery or false alarms in verification. In addition, the synchronization framework hardcodes the query conditions in the main process. When adding a new business table or a new data range rule, the synchronization code needs to be modified continuously, which can easily lead to scattered rules, high maintenance costs, inconsistent synchronization ranges, and low data synchronization efficiency.
[0049] For a clearer understanding of this invention, please refer to the following details. Figure 2 , Figure 2 This is a flowchart illustrating a data processing method in data synchronization provided by an embodiment of the present invention, which may specifically include: Step 1: Declare the strategy type for each business table using synchronous annotations. For example, one table declares roomSelectType as a regional strategy, while another table declares it as a full strategy or a business-defined strategy.
[0050] In this embodiment, the strategy type is used to identify the data selection rules adopted by the business table, and can be represented by integer, enumeration, or string encoding. The roomSelectType (scenario selection type) in the table-level annotation is an optional implementation.
[0051] Step 2: When the service starts, scan all strategy plugins that implement the data selection interface and call the strategy type method of each strategy plugin to obtain the strategy number.
[0052] In this embodiment, the data selection interface of the strategy plugin includes at least a strategy type declaration method, a target edge node calculation method, and an edge retrieval query condition construction method. The target edge node calculation method is used for real-time notification at the central end, and the query condition construction method is used for edge retrieval, verification, and recovery.
[0053] Step 3: Register the policy plugin using the policy type as the unique key. If a duplicate policy type is found, throw an exception and terminate the startup process to avoid uncertainty in the subsequent synchronization scope.
[0054] In this embodiment, plugins are registered using the strategy type as the unique key; duplicate keys trigger a startup exception. This constraint ensures that one strategy type corresponds to only one specific implementation. This embodiment can declare synchronization metadata on the data model corresponding to the business table, including at least the table name, strategy type, synchronization period, field range, whether immediate synchronization is required, and whether recovery is supported. This module establishes a declarative binding between the business table and the strategy plugins. This embodiment can scan all strategy plugins implementing the data selection interface at service startup and register them using the strategy type as the unique key. The strategy factory provides conflict protection for duplicate strategy types; if two plugins declare the same strategy type, startup fails and a conflict message is displayed.
[0055] Step 4: When a piece of data in the central terminal changes, the real-time notification module reads the strategy type of the business table to which the data belongs, obtains the corresponding strategy plugin, and calls the strategy plugin to calculate the set of edge nodes that need to be notified.
[0056] In this embodiment, when central data changes, the strategy plugin calculates the set of edge nodes that need to be notified; in the edge node retrieval scenario, the strategy plugin constructs query conditions for data that can be synchronized by the current edge node. When central data changes, this embodiment retrieves the strategy plugin based on the strategy type in the business table annotation and dynamically calculates the target edge node list. This module avoids broadcasting irrelevant data to all edge nodes.
[0057] Step 5: Send synchronization notifications only to the calculated target edge nodes. Do not send notifications to edge nodes that do not belong to this data range.
[0058] Step 6: When an edge node actively pulls synchronized data, obtain the same strategy plugin according to the business table strategy type, and call the strategy plugin to generate query conditions for the edge node to synchronize data.
[0059] In this embodiment, when the edge node actively synchronizes, the same data selection strategy plugin is invoked to generate query conditions, and only the data that the edge node is entitled to obtain is returned.
[0060] Step 7: The central terminal returns data according to the query conditions, so that the edge nodes only obtain data within their own identity, region, tenant, or business scope.
[0061] Step 8: When the edge node performs data verification, the central end reuses the same data selection strategy to generate the verification range, so as to avoid the verification range being inconsistent with the synchronization range.
[0062] This embodiment reuses the data selection strategy in the consistency verification scenario to ensure that the visible edges of the verification range, synchronization range, and recovery range are consistent.
[0063] Step 9: When the edge node performs data recovery, the central end first reuses the data selection strategy to limit the range of data that the edge node is entitled to recover, and then calls the recovery filtering plugin to add business validity conditions.
[0064] In this embodiment, different business tables can be configured with different recovery filtering logic. For example, only data that is running or in use can be recovered, while data that has ended or been destroyed cannot. The recovery filtering plugin in this embodiment is registered according to the business model and is responsible for adding business validity conditions in the recovery scenario. Its filtering conditions can include running, in use, not destroyed, reserved, not deleted, or other currently valid states. In this embodiment, in the recovery scenario, a synchronous selection strategy is first executed to determine the data ownership range, and then the recovery filtering plugin is executed to determine the data validity range. These two levels of filtering together form the final recovered data set. In this embodiment, after data loss occurs at an edge node, the edge ownership range is first limited by a data selection strategy, and then the valid data range is limited by the recovery filtering plugin. Finally, recoverable data is returned in pages.
[0065] Step 10: The central end returns the final recoverable data in pages; after the edge nodes write the data locally, they commit transactions or rollback based on the recovery results and advance the synchronization time baseline.
[0066] In this embodiment, edge retrieval, central real-time notification, data verification, and data recovery all reuse the same strategy type and strategy plugin system, ensuring consistent data boundaries for the same business table across different processes. This embodiment controls transaction commits, failure rollbacks, and synchronization time baseline advancement during the recovery write process, avoiding repeated synchronization or a partially recovered state after recovery. Specifically, for example, suppose a cloud-edge collaboration platform deploys a central node and multiple edge nodes. Different edge nodes belong to different regions, tenants, or business domains. The platform contains a basic configuration table, a regional business table, a logically deleted business table, and data tables that need to be filtered by business status. For the basic configuration table, the system configures a full-scale strategy type in the table-level annotation. This strategy plugin returns a list of all edge node licenses when the central data changes; it generates query conditions without regional restrictions when edge nodes retrieve data, ensuring all edge nodes can obtain this type of basic data. For the regional business table, the system configures a regional strategy type in the table-level annotation. When central data changes, this strategy plugin calculates the set of edge nodes to be notified based on the current data's region. When edge nodes retrieve data, it generates query conditions based on the region to which the edge node belongs, ensuring that edge nodes can only obtain data from their own region. For regional business tables with logical deletion status, the system configures the "not deleted region" strategy type in the table-level annotation. This strategy plugin adds the "not deleted" condition to the region filtering conditions, ensuring that edge nodes can only obtain data from their own region that has not been deleted. For complex business tables, the system can configure custom business strategy types. This strategy plugin can calculate the target edge nodes based on business status, permission relationships, resource ownership relationships, or tenant relationships, and generate corresponding query conditions. When the service starts, the strategy factory scans all data to select a strategy plugin. Each strategy plugin returns its own strategy type through the strategy type declaration method. The strategy factory writes the plugin to a mapping table with the strategy type as the key; if a plugin already uses the same strategy type, an exception is immediately thrown, preventing the service from starting. In this way, the system can detect strategy configuration conflicts before operation. When a certain regional business data changes at the central end, the real-time notification module reads the strategy type in the table annotation and obtains the regional strategy plugin from the strategy factory. The plugin calculates a list of edge node licenses to be notified based on the region field of the current data. The system only sends synchronization notifications to these target edge nodes and does not broadcast to edge nodes in other regions. When an edge node actively pulls regional business table data, the central end still obtains the same strategy plugin based on the strategy type in the table annotation. The plugin generates query conditions based on the edge node's license or region information, and the central end only returns data from the region to which the edge node belongs. Thus, the same strategy controls both who the central end sends notifications to and what data the edge end can pull. When an edge node performs consistency checks, the central end continues to reuse the same strategy plugin to generate the verification data range.Because the verification scope and the synchronization scope use the same strategy, the system will not include data that the edge node does not have permission to access in the verification, nor will it generate false alarms due to boundary inconsistencies. When an edge node experiences data loss and performs recovery, the central end first reuses the data selection strategy of the business table to determine the range of data that the current edge node is entitled to recover. Subsequently, the central end obtains the recovery filtering plugin based on the business model and adds business validity conditions on top of the scope of ownership. For example, for resource occupancy data, only records in use or reserved are recovered; for lifecycle data, only records that have not been destroyed are recovered; for historical transaction data, records that have ended, been archived, or are being tested can be excluded. The recovered data is ultimately determined by the synchronization selection strategy and the recovery filtering plugin. The synchronization selection strategy ensures that the data belongs to the current edge node or that the current edge node has the right to access it; the recovery filtering plugin ensures that the data still has business significance during recovery. The central end returns the final data in pages, and the edge node updates the synchronization time baseline after writing it locally.
[0067] The beneficial effects of the embodiments of the present invention may include: The dynamic calculation mechanism for target nodes in real-time notifications from the central endpoint is used to avoid fixed broadcasts. When a piece of data changes at the central endpoint, the system reads the strategy type from the annotation in the business table, retrieves the corresponding strategy plugin from the strategy factory, and calls the strategy plugin to calculate the set of edge nodes that need to be notified based on the current data. The system only sends notifications to the calculated target edge nodes, thereby reducing invalid synchronization messages and edge node-irrelevant processing.
[0068] During data recovery, edge nodes first determine the range of data they are authorized to recover using the data selection plugin corresponding to the policy type, and then overlay a recovery filtering plugin to determine the currently valid data. In other words, the selection policy determines which data belongs to which node, while the recovery filtering plugin determines whether it remains valid. This two-level filtering ensures that recovered data does not exceed authorized limits, does not cross edge nodes, and does not recover invalid historical data.
[0069] Edge data retrieval, data verification, and data recovery reuse the same strategy system. When retrieving synchronized data from edge nodes, the central endpoint generates synchronized data query conditions based on the strategy plugin; during consistency verification, the central endpoint returns data visible to the edge node for comparison using the same strategy; during data recovery, the central endpoint still uses the same strategy to define the boundaries of the data to be recovered, and then adds recovery filtering conditions. In this way, the data ownership boundaries of the same business table remain consistent across retrieval, verification, and recovery scenarios.
[0070] No modification to the main synchronization process is required. Simply configure the strategy type in the business table annotations, or add a strategy plugin that implements the data selection interface and the recovery filtering interface to extend the data range rules. This mechanism is suitable for the continuous evolution of complex systems with multiple services, multiple edge nodes, and multiple regions.
[0071] The following describes a data processing device for data synchronization provided by an embodiment of the present invention. The data processing device for data synchronization described below can be referred to in correspondence with the data processing method for data synchronization described above.
[0072] Please refer to the details. Figure 3 , Figure 3 A schematic diagram of a data processing device for data synchronization provided in an embodiment of the present invention may include: The strategy plugin scanning module 100 is used to scan for strategy plugins that implement the preset data selection interface when the business service starts. The correspondence determination module 200 is used to establish the correspondence between the data selection strategy type and the strategy plugin; The target strategy plugin determination module 300 is used to determine the business table corresponding to the current processing scenario, and select the strategy type to determine the target strategy plugin based on the target data corresponding to the business table; wherein, the processing scenario includes at least two of the following: central real-time notification, edge retrieval, data verification, and data recovery; The target strategy plugin uses module 400 to call the target strategy plugin in the edge pull scenario, generate the data range that the edge node can obtain based on the edge node characteristics, and return synchronized data based on the data range that the edge node can obtain. The target strategy plugin reuse module 500 is used to reuse the target strategy plugin in the data recovery scenario, generate the data ownership range that the edge node is entitled to recover based on the edge node characteristics, and call the recovery filtering plugin registered according to the business model to filter the data ownership range using business validity filtering conditions to obtain the final recoverable data set.
[0073] Furthermore, based on any of the above embodiments, the data processing device in the above data synchronization may further include: The data selection strategy type determination module is used to return the data selection strategy type corresponding to each strategy plugin using the strategy type declaration method; The mapping table determination module is used to write each policy plugin into a mapping table with the data selection policy type as the key; The judgment module is used to determine, based on the mapping table, whether the current strategy plugin has the same data selection strategy type as other strategy plugins; The exception determination module is used to throw a startup exception or stop service startup if a policy plugin corresponding to the same data selection policy type already exists in the mapping table.
[0074] Furthermore, based on any of the above embodiments, the policy plugin scanning module 100 may include: The preset data selection interface is defined to include a strategy type declaration method, a target edge node calculation method, and an edge retrieval query condition construction method.
[0075] Furthermore, based on any of the above embodiments, the target strategy plugin uses module 400, which includes: The edge determination unit is used to determine the edge nodes to be notified based on the edge node characteristics if the edge node characteristics include at least one of edge node identifier, data center identifier, region identifier and tenant identifier. The edge node determination unit based on associated business objects is used to determine the edge nodes to be notified based on the business objects associated with the current data if the edge node characteristics do not include the edge node identifier, the data center identifier, the region identifier, or the tenant identifier.
[0076] Furthermore, based on any of the above embodiments, the target strategy plugin uses module 400, which includes: The data retrieval request receiving unit is used to receive data retrieval requests initiated by edge nodes for the target business table; The target strategy plugin invocation unit is used to select the strategy type and invoke the target strategy plugin based on the data corresponding to the target business table. The edge node obtainable data range determination unit is used to generate the edge node obtainable data range based on the edge node characteristics of the edge node using the target strategy plugin; The return unit is used to query the central data based on the data range available to the edge node, and return the queried synchronization data to the edge node.
[0077] Furthermore, based on any of the above embodiments, the data processing device in the above data synchronization may further include: The target strategy plugin invocation module in the verification scenario is used to determine the business table to be verified, and select the strategy type to invoke the target strategy plugin according to the data corresponding to the business table to be verified. The verification data range determination module is used to determine the verification data range corresponding to the edge node based on the edge node characteristics using the target strategy plugin. The consistency comparison module is used to perform consistency comparison between the central data and the edge data based on the verification data range; The verification pass module is used to output a verification pass result if the central end data and the edge end data are consistent within the verification data range; The difference determination module is used to output the difference result if there is a difference between the central end data and the edge end data within the range of the verification data.
[0078] Furthermore, based on any of the above embodiments, the target strategy plugin reuse module 500 includes: The target strategy plugin invocation unit in the recovery scenario is used to determine the business table to be recovered in the data recovery scenario where data loss occurs at the edge node and data needs to be recovered, and to select the strategy type and invoke the target strategy plugin according to the data corresponding to the business table to be recovered; The data ownership scope determination unit is used to determine the data ownership scope that the edge node has the right to recover based on the edge node characteristics of the edge node using the target strategy plugin; wherein, the data ownership scope is used to limit whether the edge node corresponding to the data or the edge node has the right to access it. The final recoverable data set determination unit is used to call the recovery filtering plugin registered according to the business model, and filter the data within the data ownership range using the validity filtering conditions to obtain the final recoverable data set that simultaneously satisfies the data ownership range and the business validity filtering conditions; wherein, the business validity filtering conditions include at least one of running, in use, not destroyed, reserved, and not deleted.
[0079] It should be noted that the order of the modules and units in the data processing device during the above data synchronization can be changed without affecting the logic.
[0080] The data processing device for data synchronization provided in this embodiment of the invention, compared with the current method of constantly modifying the synchronization code, only requires configuring the existing data selection strategy type for the business table when adding a new business table; when adding a new data range rule, only a new strategy plugin needs to be implemented, thus eliminating the need to modify the main synchronization process, thereby improving the efficiency of data synchronization; and the same data range determination logic can be reused for the same business table in different processing scenarios, thereby reducing synchronization caused by inconsistent data ranges and improving the accuracy of synchronization.
[0081] The following describes a data processing device for data synchronization provided by an embodiment of the present invention. The data processing device for data synchronization described below and the data processing method for data synchronization described above can be referred to in correspondence with each other.
[0082] Please refer to Figure 4 , Figure 4 A schematic diagram of a data processing device for data synchronization provided in an embodiment of the present invention may include: Memory 10 is used to store computer programs; Processor 20 is used to execute computer programs to implement the data processing method in the above-described data synchronization.
[0083] The memory 10, processor 20, and communication interface 30 all communicate with each other through the communication bus 40.
[0084] In this embodiment of the invention, the memory 10 is used to store one or more programs. The programs may include program code, which includes computer operation instructions. In this embodiment of the invention, the memory 10 may store programs for implementing the following functions: When the business service starts, scan for strategy plugins that implement the preset data selection interface; Establish the correspondence between data selection strategy types and strategy plugins; Identify the business table corresponding to the current processing scenario, and select the strategy type and target strategy plugin based on the target data corresponding to the business table; In edge retrieval scenarios, the target strategy plugin is invoked to generate the data range that the edge node can obtain based on the edge node characteristics, and synchronous data is returned based on the data range; In data recovery scenarios, the target strategy plugin is reused to generate the data ownership scope that the edge node is entitled to recover based on the edge node characteristics. The recovery filtering plugin registered according to the business model is then called to filter the data within the ownership scope using business validity filtering conditions, thus obtaining the final recoverable data set.
[0085] In one possible implementation, the memory 10 may include a program storage area and a data storage area, wherein the program storage area may store the operating system and applications required for at least one function; and the data storage area may store data created during use.
[0086] Furthermore, memory 10 may include read-only memory and random access memory, providing instructions and data to the processor. A portion of the memory may also include NVRAM. The memory stores operating systems and operating instructions, executable modules, or data structures, or subsets thereof, or extended sets thereof, wherein the operating instructions may include various operating instructions for implementing various operations. The operating system may include various system programs for implementing various basic tasks and handling hardware-based tasks.
[0087] Processor 20 can be a central processing unit (CPU), an application-specific integrated circuit, a digital signal processor, a field-programmable gate array, or other programmable logic device. Processor 20 can be a microprocessor or any conventional processor. Processor 20 can call programs stored in memory 10.
[0088] The communication interface 30 can be an interface for the communication module, used to connect with other devices or systems.
[0089] Of course, it should be noted that, Figure 4 The structure shown does not constitute a limitation on the data processing device in data synchronization in the embodiments of the present invention. In practical applications, the data processing device in data synchronization may include devices such as... Figure 4 More or fewer components as shown, or combinations of certain components.
[0090] The following describes the computer-readable storage medium provided in the embodiments of the present invention. The computer-readable storage medium described below can be referred to in correspondence with the data processing method in data synchronization described above.
[0091] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the data processing method in the above-described data synchronization.
[0092] The computer-readable storage medium may include various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0093] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0094] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0095] Finally, it should be noted that in this document, relationships such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
[0096] The above provides a detailed description of the data processing method, apparatus, and storage medium for data synchronization provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A data processing method in data synchronization, characterized in that, include: When the business service starts, scan for strategy plugins that implement the preset data selection interface; Establish a correspondence between data selection strategy types and the strategy plugins; Determine the business table corresponding to the current processing scenario, and select the strategy type and target strategy plugin based on the target data corresponding to the business table; In the edge retrieval scenario, the target strategy plugin is invoked to generate the data range that the edge node can obtain based on the edge node characteristics, and synchronous data is returned based on the data range that the edge node can obtain. In the data recovery scenario, the target strategy plugin is reused to generate the data ownership range that the edge node is entitled to recover based on the edge node characteristics, and the recovery filtering plugin registered according to the business model is called to filter the data within the ownership range using business validity filtering conditions to obtain the final recoverable data set.
2. The data processing method in data synchronization according to claim 1, characterized in that, Before establishing the correspondence between data selection strategy types and the strategy plugins, the following steps are also included: The strategy type declaration method is used to return the data selection strategy type corresponding to each strategy plugin; Write each strategy plugin into a mapping table with the data selection strategy type as the key; Based on the mapping table, determine whether the current strategy plugin has the same data selection strategy type as other strategy plugins; If a policy plugin corresponding to the same data selection policy type already exists in the mapping table, a startup exception will be thrown or the service will be stopped.
3. The data processing method in data synchronization according to claim 1, characterized in that, When the business service starts, it scans for strategy plugins that implement the preset data selection interface, including: The preset data selection interface is defined to include a strategy type declaration method, a target edge node calculation method, and an edge retrieval query condition construction method.
4. The data processing method in data synchronization according to any one of claims 1 to 3, characterized in that, In edge retrieval scenarios, the target strategy plugin is invoked to generate the data range obtainable by the edge node based on its characteristics, and synchronized data is returned based on this data range, including: If the edge node characteristics include at least one of edge node identifier, data center identifier, region identifier, and tenant identifier, then the target policy plugin is used to determine the edge nodes that need to be notified based on the edge node characteristics; If the edge node characteristics do not include the edge node identifier, the data center identifier, the region identifier, or the tenant identifier, then the target policy plugin is used to determine the edge nodes to be notified based on the business objects associated with the current data.
5. The data processing method in data synchronization according to claim 1, characterized in that, In edge retrieval scenarios, the target strategy plugin is invoked to generate the data range obtainable by the edge node based on its characteristics, and synchronized data is returned based on this data range, including: Receive data retrieval requests from edge nodes for the target business table; Select the strategy type and invoke the target strategy plugin based on the data corresponding to the target business table; Based on the edge node characteristics, the data range obtainable by the edge node is generated using the target strategy plugin; The data obtained from the edge node is queried from the central data, and the synchronized data is returned to the edge node.
6. The data processing method in data synchronization according to claim 1, characterized in that, After determining the business table corresponding to the current processing scenario and selecting the target strategy plugin based on the target data corresponding to the business table, the process also includes: Identify the business table to be verified, and select the strategy type and call the target strategy plugin based on the data corresponding to the business table to be verified; The target strategy plugin is used to determine the range of verification data corresponding to the edge node based on the edge node characteristics; A consistency comparison is performed on the central data and the edge data based on the aforementioned verification data range; If the data at the center end and the data at the edge end are consistent within the range of the verification data, then the verification result is output. If the data at the center end and the data at the edge end differ within the range of the verification data, the difference result is output.
7. The data processing method in data synchronization according to claim 1, characterized in that, In data recovery scenarios, the target strategy plugin is reused to generate the data ownership range for which the edge node is entitled to recovery based on the edge node characteristics. Then, the recovery filtering plugin registered according to the business model is invoked to filter the data within the ownership range using business validity filtering conditions, resulting in the final recoverable data set, including: In data recovery scenarios where data loss occurs at edge nodes and data recovery is required, the business table to be recovered is determined, and the target strategy plugin is called based on the data corresponding to the business table to be recovered and the strategy type is selected. The target strategy plugin is used to determine the data ownership range that the edge node is entitled to recover based on the edge node characteristics; wherein, the data ownership range is used to limit whether the edge node corresponding to the data or the edge node has the right to access it; The recovery filtering plugin registered according to the business model is invoked, and the validity filtering conditions are used to filter within the data ownership range to obtain the final recoverable data set that simultaneously satisfies the data ownership range and the business validity filtering conditions; wherein, the business validity filtering conditions include at least one of running, in use, not destroyed, reserved, and not deleted.
8. A data processing apparatus for data synchronization, characterized in that, include: The strategy plugin scanning module is used to scan for strategy plugins that implement preset data selection interfaces when the business service starts. The correspondence determination module is used to establish the correspondence between data selection strategy types and the strategy plugins; The target strategy plugin determination module is used to determine the business table corresponding to the current processing scenario, and select the strategy type to determine the target strategy plugin based on the target data corresponding to the business table; wherein, the processing scenario includes at least two of the following: central real-time notification, edge retrieval, data verification, and data recovery; The target strategy plugin module is used to call the target strategy plugin in the edge pull scenario, generate the data range that the edge node can obtain based on the edge node characteristics, and return synchronized data based on the data range that the edge node can obtain. The target strategy plugin reuse module is used to reuse the target strategy plugin in data recovery scenarios, generate the data ownership range that the edge node is entitled to recover based on the edge node characteristics, and call the recovery filtering plugin registered according to the business model to filter the data within the data ownership range using business validity filtering conditions to obtain the final recoverable data set.
9. A data processing device for data synchronization, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of the data processing method in data synchronization as described in any one of claims 1 to 7.
10. A storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the steps of the data processing method in data synchronization as described in any one of claims 1 to 7.