Plug-in management system and data synchronization method, device, storage medium and program

Through the centralized version management and dynamic loading mechanism of the plug-in management system, the problems of low plug-in maintenance efficiency and large image file size of the data synchronization engine are solved, and efficient plug-in management and rapid dynamic expansion are achieved.

CN118377834BActive Publication Date: 2024-10-11ALIBABA CLOUD FEITIAN (HANGZHOU) CLOUD COMPUTING TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410804676.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-20
Publication Date
2024-10-11
Estimated Expiration
2044-06-20

AI Technical Summary

Technical Problem

The existing data synchronization engine has low plug-in maintenance and management efficiency and high maintenance costs, and the data synchronization engine image file is too large, which affects the speed of dynamic expansion.

Method used

A plug-in management system is adopted to realize centralized version management and dynamic loading of plug-ins through the plug-in storage system and plug-in management application. The plug-in version number and metadata information provided by the user are uploaded to the plug-in storage system, and the data synchronization engine instance downloads the required plug-ins from it on demand. Perform tasks.

Benefits of technology

It reduces plug-in maintenance costs, streamlines the size of data synchronization engine instances, improves dynamic expansion speed, and reduces the startup time of data synchronization tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118377834B_ABST
    Figure CN118377834B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a plug-in management system and a data synchronization method, device, storage medium and program. The method includes: a plug-in management application obtains a plug-in with a first version number, uploads the plug-in with the first version number and its first metadata information to a plug-in storage system for storage, and the first metadata information includes a plug-in identifier, a user identifier and a first version number. The plug-in storage system updates the second metadata information stored in the plug-in version management file with the first metadata information, and the second metadata information includes the same plug-in identifier, user identifier and second version number. The data synchronization engine instance receives a data synchronization task including a target user identifier and a target plug-in identifier, starts a process, queries the plug-in version management file to obtain the first metadata information, and downloads the target plug-in with the first version number from the plug-in storage system to execute the data synchronization task. Through this solution, centralized version management of plug-ins and on-demand loading are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cloud computing technology, and in particular to a plug-in management system and a data synchronization method, device, storage medium and program. Background Art

[0002] Data synchronization technology can help users realize data transmission between two data sources, which can usually include batch data synchronization and real-time data synchronization. Users can use a data synchronization engine (such as the current batch and stream data synchronization engine) to realize the data synchronization transmission from the source data source to the destination data source. In the process of data synchronization, plug-ins are required. The function of the plug-in, in general, is that the data synchronization engine connects to various types of data sources through plug-ins to perform read and write operations. Therefore, plug-ins are the basis for the data synchronization engine to achieve scalability, that is, the same data synchronization engine can use different types of plug-ins to perform data synchronization processing on different types of data sources.

[0003] At present, when a user has a data synchronization requirement, the data synchronization engine image file corresponding to the user can be started in one or more containers in advance to form an independent data synchronization engine instance in each container. Among them, the data synchronization engine image file contains all versions of plug-ins available to the user, so that the container will also contain these plug-ins for use by the data synchronization engine instance in the container. At present, the plug-ins are maintained locally in the container. For example, when a user generates a new plug-in, the operation and maintenance personnel need to manually deploy the new plug-in to the container. When an abnormal situation is encountered when using the new plug-in and it is necessary to fall back to an old version of the plug-in, the operation and maintenance personnel need to manually complete the switch. This maintenance operation is inefficient and prone to omissions. Moreover, when the container is restarted due to abnormal operation, if the new plug-in has not been updated to the above-mentioned data synchronization engine image file, the update of the new plug-in will be lost, so the overall maintenance cost is high. In addition, as the data synchronization engine supports more and more plug-ins, the size of the data synchronization engine image file is also increasing, which is not conducive to quickly starting a new container (i.e., starting a new data synchronization engine instance) to perform data synchronization tasks during subsequent dynamic expansion. Summary of the invention

[0004] The embodiment of the present invention provides a plug-in management system and a data synchronization method, device, storage medium and program, which are used to reduce the maintenance cost of the plug-in and streamline the volume of the data synchronization engine instance.

[0005] In a first aspect, an embodiment of the present invention provides a plug-in management system, the system comprising:

[0006] A plug-in storage system, a plug-in management application, and a data synchronization engine instance started in an executor, wherein the data synchronization engine instance corresponds to a target user;

[0007] The plug-in management application is used to obtain a target plug-in with a first version number provided by a target user, determine first metadata information of the target plug-in, and upload the target plug-in with the first version number and the first metadata information to the plug-in storage system, wherein the first metadata information includes a target plug-in identifier, a target user identifier, and the first version number of the target plug-in;

[0008] The plug-in storage system is used to store the target plug-in with the first version number and the first metadata information, and to update the second metadata information stored in the plug-in version management file with the first metadata information, wherein the plug-in version management file is used to record the updated metadata information of each plug-in, and the second metadata information includes the target plug-in identifier, the target user identifier and the second version number of the target plug-in;

[0009] The first process started by the data synchronization engine instance is used to receive the first data synchronization task triggered by the target user, query the plug-in version management file to obtain the corresponding first metadata information based on the target user identifier and the target plug-in identifier contained in the first data synchronization task, and download the target plug-in with the first version number from the plug-in storage system to the executor based on the first metadata information, so as to use the target plug-in with the first version number to execute the first data synchronization task.

[0010] In a second aspect, an embodiment of the present invention provides a data synchronization method, which is applied to a process started by a data synchronization engine instance, wherein the data synchronization engine instance corresponds to a target user, and the method includes:

[0011] Receive a first data synchronization task triggered by a target user, wherein the first data synchronization task includes a target user identifier and a target plug-in identifier, and the target plug-in identifier corresponds to a target plug-in to be used;

[0012] According to the target user identifier and the target plug-in identifier, query the plug-in version management file in the plug-in storage system to obtain corresponding first metadata information, wherein the first metadata information includes the target plug-in identifier, the target user identifier and the first version number, and the plug-in version management file is used to record the updated metadata information of each plug-in, wherein after the plug-in management application uploads the target plug-in with the first version number and the first metadata information to the plug-in storage system, the plug-in storage system stores the target plug-in with the first version number and the first metadata information, and updates the second metadata information stored in the plug-in version management file with the first metadata information, wherein the second metadata information includes the target plug-in identifier, the target user identifier and the second version number of the target plug-in;

[0013] The target plug-in with the first version number is downloaded from the plug-in storage system according to the first metadata information to the executor that starts the data synchronization engine instance, so as to use the target plug-in with the first version number to execute the first data synchronization task.

[0014] In a third aspect, an embodiment of the present invention provides a data synchronization device, which is applied to a process started by a data synchronization engine instance, wherein the data synchronization engine instance corresponds to a target user, and the device includes:

[0015] A receiving module, configured to receive a first data synchronization task triggered by a target user, wherein the first data synchronization task includes a target user identifier and a target plug-in identifier, and the target plug-in identifier corresponds to a target plug-in to be used;

[0016] a query module, configured to query a plug-in version management file in a plug-in storage system according to the target user identifier and the target plug-in identifier to obtain corresponding first metadata information, wherein the first metadata information includes the target plug-in identifier, the target user identifier and a first version number, and the plug-in version management file is used to record updated metadata information of each plug-in, wherein after the plug-in management application uploads the target plug-in of the first version number and the first metadata information to the plug-in storage system, the plug-in storage system stores the target plug-in of the first version number and the first metadata information, and updates the second metadata information stored in the plug-in version management file with the first metadata information, wherein the second metadata information includes the target plug-in identifier, the target user identifier and a second version number of the target plug-in;

[0017] A download module, configured to download the target plug-in with the first version number from the plug-in storage system to an executor that starts the data synchronization engine instance according to the first metadata information;

[0018] An execution module is used to use the target plug-in with the first version number to execute the data synchronization task.

[0019] In a fourth aspect, an embodiment of the present invention provides a data synchronization method, which is applied to a plug-in storage system, and the method includes:

[0020] Receive a target plug-in with a first version number and first metadata information sent by a plug-in management application, wherein the first metadata information includes a target plug-in identifier, a target user identifier, and a first version number of the target plug-in;

[0021] The target plug-in with the first version number and the first metadata information are stored, and the second metadata information stored in the plug-in version management file is updated with the first metadata information, wherein the plug-in version management file is used to record the updated metadata information of each plug-in, and the second metadata information includes the target plug-in identifier, the target user identifier, and the second version number of the target plug-in;

[0022] In response to the process started by the data synchronization engine instance, after receiving the data synchronization task triggered by the target user, the first metadata information corresponding to the plug-in query request queried from the plug-in version management file is fed back to the process based on the plug-in query request triggered by the target user identifier and the target plug-in identifier contained in the data synchronization task, so that the process downloads the target plug-in with the first version number from the plug-in storage system according to the first metadata information, and uses the target plug-in with the first version number to execute the data synchronization task. The data synchronization engine instance corresponds to the target user.

[0023] In a fifth aspect, an embodiment of the present invention provides a data synchronization method, which is applied to a plug-in management application, and the method includes:

[0024] Get the target plug-in with the first version number provided by the target user;

[0025] Determine first metadata information of the target plug-in, where the first metadata information includes a target plug-in identifier, a target user identifier, and a first version number of the target plug-in;

[0026] The target plug-in of the first version number and the first metadata information are uploaded to the plug-in storage system so that the plug-in storage system stores the target plug-in of the first version number and the first metadata information, and updates the second metadata information stored in the plug-in version management file with the first metadata information. The plug-in version management file is used to record the updated metadata information of each plug-in, and the second metadata information includes the target plug-in identifier, the target user identifier and the second version number of the target plug-in; the first metadata information enables the process started by the data synchronization engine instance corresponding to the target user to download the target plug-in of the first version number from the plug-in storage system based on the first metadata information to perform the data synchronization task.

[0027] In the sixth aspect, an embodiment of the present invention provides an electronic device, comprising: a memory, a processor, and a communication interface; wherein the memory stores executable code, and when the executable code is executed by the processor, the processor can at least implement the data synchronization method described in the second aspect, the third aspect, or the fourth aspect.

[0028] In the seventh aspect, an embodiment of the present invention provides a non-temporary machine-readable storage medium, on which executable code is stored. When the executable code is executed by a processor of an electronic device, the processor can at least implement the data synchronization method described in the second aspect, the third aspect, or the fourth aspect.

[0029] In an eighth aspect, an embodiment of the present invention provides a computer program product, which includes a computer program, and when the computer program product is executed by a processor of an electronic device, the processor can at least implement the data synchronization method described in the second aspect, the third aspect, or the fourth aspect.

[0030] The plug-in management system provided by the embodiment of the present invention is applicable to data synchronization scenarios and is used to intelligently manage plug-ins supported by a data synchronization engine. Specifically, the plug-in management system includes a plug-in storage system, a plug-in management application, and a data synchronization engine instance started in an executor (such as a container, a virtual machine, etc.). Taking a data synchronization engine instance corresponding to a target user as an example, the data synchronization engine instance can be started based on a data synchronization engine image file corresponding to the target user that does not contain a plug-in.

[0031] Among them, the plug-in management application and the plug-in storage system are used to implement centralized version management of plug-ins of different users. The plug-in storage system is equivalent to a central warehouse, which is used to store the metadata information and plug-ins of each user's plug-in. Taking the target plug-in provided by the target user as an example, after the plug-in management application obtains the target plug-in with the first version number provided by the target user, it determines the first metadata information of the target plug-in, and uploads the target plug-in and the first metadata information to the plug-in storage system, wherein the first metadata information includes the target plug-in identifier, the target user identifier and the first version number of the target plug-in. The plug-in storage system stores the target plug-in and the first metadata information, and updates the second metadata information stored in the plug-in version management file with the first metadata information, wherein the second metadata information includes the target plug-in identifier, the target user identifier and the second version number of the target plug-in. Among them, the plug-in version management file is used to record the updated metadata information of each plug-in. In other words, the plug-in version management file is used to implement version management of plug-ins of various versions of each user, mainly recording the version information of the plug-in corresponding to the latest update operation of each user.

[0032] Based on this, when the data synchronization engine instance corresponding to the target user receives the first data synchronization task triggered by the target user, it starts the first process to process the first data synchronization task. The first process queries the plug-in version management file to obtain the corresponding first metadata information based on the target user identifier and the target plug-in identifier contained in the first data synchronization task, and then downloads the target plug-in with the first version number from the plug-in storage system to the local executor based on the first metadata information, so as to use the target plug-in with the first version number to execute the first data synchronization task.

[0033] In the above solution, the plug-in management application and the plug-in storage system implement storage and version management of each user's plug-in, so that the data synchronization engine instance can load the required plug-in on demand, reducing the size of the data synchronization engine instance. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0035] Figure 1 A schematic diagram of a plug-in management system provided by an embodiment of the present invention;

[0036] Figure 2 A schematic diagram of a plug-in version management file provided by an embodiment of the present invention;

[0037] Figure 3 A schematic diagram of another plug-in version management file provided by an embodiment of the present invention;

[0038] Figure 4 A flowchart of a data synchronization method provided by an embodiment of the present invention;

[0039] Figure 5 A schematic diagram of an application of a data synchronization method provided by an embodiment of the present invention;

[0040] Figure 6 A flowchart of a data synchronization method provided by an embodiment of the present invention;

[0041] Figure 7 A flowchart of a data synchronization method provided by an embodiment of the present invention;

[0042] Figure 8 A schematic diagram of the structure of a data synchronization device provided by an embodiment of the present invention;

[0043] Fig. 9 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0044] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0045] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the embodiments of the present invention are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0046] Some embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the case where there is no conflict between the embodiments, the following embodiments and the features in the embodiments can be combined with each other. In addition, the step sequence in the following method embodiments is only an example and not a strict limitation.

[0047] Assume that a user uses a data synchronization engine to synchronize data between different data sources. The user provides three available plug-ins, such as plug-in a, version number V1; plug-in a, version number V2, plug-in b, version number V1. That is, these three plug-ins are two plug-ins with different names, and plug-in a has two versions. The data synchronization engine image file corresponding to the user contains the above three plug-ins and other configuration information required to start the data synchronization engine instance, such as the operating system, memory space and other configuration information.

[0048] The user can apply to the cloud service provider for the allocation of multiple executors, such as containers, virtual machines, etc., and start the above data synchronization engine image file in these executors to form multiple data synchronization engine instances. It can be understood that each data synchronization engine instance has the above three plug-ins. When a user triggers a data synchronization task, the task scheduling service provided by the cloud service provider can schedule the data synchronization task to a data synchronization engine instance. The data synchronization engine instance starts a process and uses one of the plug-ins to execute the data synchronization task. For example, according to the update time of the three plug-ins, the plug-in with the latest update time is selected, such as the version number V1 of plug-in b.

[0049] If the user updates a new plug-in based on the above three plug-ins, such as plug-in b, version number V2, that is, the version of plug-in b is upgraded from V1 to V2, the operation and maintenance personnel on the cloud service provider side will deploy the new plug-in to the above multiple executors after receiving the new plug-in, and configure the subsequent data synchronization tasks to use the new plug-in for processing. If an exception occurs during the processing of a data synchronization task using the new plug-in, and it is determined after troubleshooting that the exception is caused by the new plug-in, then it may be necessary to roll back to an older version, such as the version number V1 of plug-in b. At this time, the operation and maintenance personnel on the cloud service provider side need to replace the plug-in used by the process started by the data synchronization engine instance in the executor back to the old version. In other words, the operation and maintenance personnel need to maintain all plug-ins separately in each executor corresponding to each user, and the maintenance cost is high.

[0050] In addition, as the data synchronization engine supports more and more plug-ins, the size of the data synchronization engine image file is also getting larger. For example, in the above example, a data synchronization engine image file contains multiple plug-ins. When expansion is required, the data synchronization engine image file containing multiple plug-ins is used to start in the newly expanded executor to form a new data synchronization engine instance, and the expansion speed is slow.

[0051] In view of this, an embodiment of the present invention provides a solution for centralized management of plug-ins and dynamic loading of plug-ins, which reduces the maintenance cost of plug-ins and streamlines the size of the data synchronization engine image file, laying the foundation for the rapid deployment of the data synchronization engine during dynamic expansion. In summary, the plug-ins are hosted in a central warehouse - the plug-in storage system, and when the data synchronization task needs to be executed, the required plug-ins are dynamically loaded from it according to the task requirements. The plug-ins only need to be maintained in the central warehouse and no longer need to be maintained in each executor. At the same time, loading plug-ins on demand can reduce the size of the data synchronization engine image file used to start the data synchronization engine instance, speed up the dynamic expansion mode of the data synchronization engine instance, and thus start the execution of the data synchronization task more quickly.

[0052] In the embodiment of the present invention, the data synchronization engine instance started based on the data synchronization engine mirror file may also be referred to as the data synchronization engine listening instance, and the process started by the data synchronization engine instance may also be referred to as the data synchronization engine execution instance. Among them, only one data synchronization engine listening instance is started in one executor for receiving data synchronization tasks and starting the data synchronization engine execution instance, so when multiple data synchronization tasks are received, multiple data synchronization engine execution instances will be started.

[0053] Figure 1 A schematic diagram of a plug-in management system provided by an embodiment of the present invention, such as Figure 1 As shown, the plug-in management system includes: a plug-in storage system, a plug-in management application, and a data synchronization engine instance started in the executor, such as Figure 1 Multiple data synchronization engine instances corresponding to different users are shown in FIG.

[0054] In the embodiment of the present invention, it can be considered that each user corresponds to two data synchronization engine image files, one of which is a data synchronization engine image file F1 that contains all the plug-ins corresponding to the user, and the other is a data synchronization engine image file F2 that does not contain any plug-ins. Alternatively, in an optional embodiment, the data synchronization engine image file F2 may contain only one backup plug-in used as a "fallback". The so-called "fallback" means that it is used as a backup when other plug-ins run abnormally. Therefore, the data synchronization engine image file that does not contain a plug-in in the embodiment of the present invention may be a data synchronization engine image file that does not contain any plug-ins or has only one backup plug-in.

[0055] The data synchronization engine image file F2 can be used to start the data synchronization engine instance, that is, it is used for the data synchronization engine instance. The data synchronization engine image file F1 is used for the plug-in management application. Users can place the various plug-ins they provide in the data synchronization engine image file F1 as the data source of the plug-in management application.

[0056] Each user can apply for a set number of executors in advance from the cloud service provider according to their task requirements, and can dynamically scale up and down according to task requirements. For ease of description, in the embodiments of the present invention, only any user is used as the target user, and any executor corresponding to the target user is used as an example for explanation.

[0057] The data synchronization engine image file corresponding to the target user that does not contain a plug-in can be started in an executor corresponding to the target user to obtain a data synchronization engine instance corresponding to the target user. As mentioned above, at this time, at the initial startup, the executor has no or only a backup plug-in. For the convenience of description, it is assumed that the executor does not contain a plug-in at this time.

[0058] If a data synchronization task is to be executed, the activated data synchronization engine instance also needs to load the plug-in required for the data synchronization task through the activated process. In the embodiment of the present invention, each plug-in of each user is centrally managed and stored by the plug-in management application and the plug-in storage system.

[0059] The plug-in management application can be an application provided by a cloud service provider for plug-in management of the data synchronization engine, and can be a "one-time application", but is not limited to this. In simple terms, a one-time application is an application that is started in the executor when needed, and exits after execution, and no longer occupies resources such as the executor. The executor where the application is started is different from the executor where the data synchronization engine instance is located.

[0060] The plugin management application is responsible for the maintenance of plugins in the plugin management system, mainly including uploading plugins and switching plugin versions.

[0061] The plugin storage system is actually a storage engine, which can be implemented in a way such as object storage. In the plugin storage system, the plugin ID, version number, and user ID of the plugin can be organized as the plugin key, and the plugin (i.e., the execution package of the plugin) can be stored as the value. In the plugin storage system, user isolation and version management of the plugin can be implemented, that is, the plugins of each version for each user can be managed separately, which is explained in detail below.

[0062] In actual applications, the above key can also include the type of plug-in. The plug-in type can include two types: reader and writer, corresponding to different data sources. In the process of synchronously transmitting data from the source data source to the destination data source, it is necessary to read data from the source data source and write it to the destination data source. Therefore, the plug-in used for the source data source is a reader type plug-in, and the plug-in used for the destination data source is a writer type plug-in. The same plug-in can be used for both the source data source and the destination data source.

[0063] In actual applications, the plug-ins provided by each user can be stored in a set storage space provided by the cloud service provider (different from the above plug-in storage system). Assume that the storage space is empty. Then, the target plug-in with the first version number provided by the target user (i.e., the execution package of the target plug-in, or the installation package) is stored in the storage space. Then, the plug-in management application is started, and the plug-in management application reads the target plug-in with the first version number of the target user from the storage space, and determines the first metadata information of the target plug-in. The first metadata information includes the target plug-in identifier (for example, plug-in a), the target user identifier (for example, user1), and the first version number of the target plug-in (for example, Vi). Among them, the configuration file of the target plug-in provided by the target user can include the above information, which is extracted from it to form the first metadata information. The first metadata information can actually be used as a key in the plug-in storage system. Optionally, the first metadata information can also include the type of the target plug-in, such as reader or writer. After that, the plug-in management application uploads the target plug-in with the first version number and the first metadata information to the plug-in storage system. After the plug-in management application completes the upload task, it can exit, release the occupied resources, and be started again when there is an upload task next time.

[0064] After receiving the target plug-in with the first version number and the first metadata information corresponding to it, the plug-in storage system stores the target plug-in with the first version number and the first metadata information. As described above, the first metadata information can be used as the key and the target plug-in with the first version number can be used as the value for storage. On the other hand, a plug-in version management file is maintained in the plug-in storage system for recording the updated metadata information of each plug-in.

[0065] As assumed above, when the target plug-in with the first version number is the first plug-in to be uploaded, the plug-in version management file is previously empty. After receiving the first metadata information of the target plug-in, it can be directly written into the plug-in version management file. However, assuming that the above-mentioned target user has previously provided a target plug-in with another version number (the second version number), and assuming that the corresponding second metadata information is: target plug-in identifier = plug-in a, target user identifier = user1, second version number = Vj. The plug-in version management file already contains the second metadata information. Then, after the target plug-in with the first version number is uploaded, the plug-in management system can update (i.e. replace) the second metadata information corresponding to the target plug-in identifier and target user identifier in the plug-in version management file with the first metadata information, so that the plug-in version management file records the identifier of the plug-in that is updated the latest corresponding to the same target plug-in identifier and target user identifier.

[0066] The above metadata information can be organized into a directory structure or a tree structure in the plug-in version management file. Figure 2 To illustrate. Figure 2 In the example, the root directory / root node can be the storage location of the plug-in version management file in the plug-in storage system. The root directory / root node contains files marked with plug-in identifiers (such as Figure 2 Each sub-directory / sub-node named by the plug-in identifier (plug-in a, plug-in b) contains a key-value pair consisting of a user identifier and a plug-in version number, in the form of [user identifier: plug-in version number], for example Figure 2 Optionally, each subdirectory / subnode named after the plug-in identifier may include a subdirectory / subnode named after the user identifier, and the plug-in version number may be recorded under the subdirectory / subnode named after the user identifier.

[0067] In an optional embodiment, the root directory / root node may further include a subdirectory / subnode of a plug-in type, such as a reader subdirectory, which may include subdirectories / subnodes named with plug-in identifiers.

[0068] The organizational format can be expressed as:

[0069] "reader":{

[0070] "pluginName": {

[0071] "tenantCode": "pluginVersion"

[0072] }

[0073] }

[0074] Among them, pluginName indicates the plug-in identifier (such as the name of the plug-in), tenantCode indicates the user identifier, and pluginVersion indicates the version number of the plug-in.

[0075] Taking the first metadata information (plugin a, user1, Vi) and the second metadata information (plugin a, user1, Vj) as an example, the update result of the plug-in version management file is as follows: Figure 2 as shown in .

[0076] As mentioned above, the plug-in version management file is not used to record the versions of all plug-ins of each user, but to record which version number of each user's plug-in with different plug-in identifiers can be used currently - the latest updated version number, because in actual applications, the latest updated version is often used first.

[0077] In addition, based on the plug-in version management file, user-isolated version management can also be implemented. Specifically, Figure 2 As shown in , assuming that plugin a is updated by user 1 and user 2 respectively, the version number updated by user 1 is Vi, and the version number updated by user 2 is Vk, then according to Figure 2 The metadata information is organized in such a way that the version numbers of two different users corresponding to the same plug-in identifier correspond to two key-value pairs under the subdirectory of plug-in a and are stored separately, that is, user isolation.

[0078] Based on the uploading of the plug-in metadata information by the plug-in management application and the maintenance of the plug-in management version file by the plug-in storage system, the process started by the data synchronization engine instance can load the required plug-in from the plug-in storage system on demand.

[0079] Taking the data synchronization engine instance corresponding to the target user as an example, after receiving the first data synchronization task triggered by the target user, the first process is started. The first process queries the plug-in version management file to obtain the corresponding first metadata information based on the target user identifier and the target plug-in identifier contained in the first data synchronization task, and then downloads the target plug-in with the first version number from the plug-in storage system to the local executor based on the first metadata information, so as to use the target plug-in with the first version number to execute the first data synchronization task. Specifically, the first process can send a plug-in query request containing the target user identifier and the target plug-in identifier to the plug-in storage system, and the plug-in storage system queries the plug-in version management file, and after obtaining the first metadata information, it can be fed back to the first process. The first process queries the plug-in storage system again based on the first metadata information to obtain the corresponding target plug-in with the first version number, or the plug-in storage system can directly further query the corresponding target plug-in with the first version number after querying the first metadata information to feed back to the first process.

[0080] Based on the organization method of metadata information, you can first query the target plug-in identifier in the plug-in management file, and then query the target key-value pair with the target user identifier as the key in the multiple key-value pairs corresponding to the target plug-in identifier. The version number contained in the target key-value pair is the first version number, so as to determine that the target plug-in with the first version number is required to execute the first data synchronization task, and it can be loaded into the local executor in the plug-in storage system.

[0081] A cache space may be created in the executor, and the target plug-in with the first version number may be loaded into the cache space and associated with the first metadata information.

[0082] In addition, if the first process started by the data synchronization engine instance does not find the first metadata information in the plug-in version management file, the first data synchronization task is executed according to the backup plug-in pre-installed in the executor (installed when starting the data synchronization engine instance).

[0083] In actual applications, in addition to the target user identifier corresponding to the target user and the identifier of the target plug-in to be used, the first data synchronization task may optionally also include the version number of the target plug-in to be used. At this time, the plug-in version management file is queried. If it is determined that the corresponding record is contained in the file, the target plug-in with the version number can be downloaded. If the record is not contained, an error prompt message can be fed back, and the first data synchronization task can be executed based on the above-mentioned backup plug-in.

[0084] It should be noted that, in the above embodiment, in a target plug-in with a first version number and a target plug-in with a second version number corresponding to the same target plug-in identifier, the first version number is not necessarily higher than the second version number.

[0085] For example, the target user's target plug-in has two versions, V1 and V2, and V2 is higher than V1. After uploading the V1 version of the target plug-in, the metadata information recorded in the plug-in version management file corresponds to the V1 version. Afterwards, after the version is upgraded to V2 and uploaded, the metadata information recorded in the plug-in version management file corresponds to the V2 version. At this time, the first process downloads the V2 version of the target plug-in from the plug-in storage system. However, if an exception occurs during the process of the first process using the V2 version of the target plug-in to perform the data synchronization task, and after troubleshooting it is determined that the fault is caused by the V2 version of the target plug-in, then it is necessary to switch back to the V1 version of the target plug-in. At this time, the plug-in management application is started again, and the plug-in management application maintains the metadata information of the V1 version of the target plug-in in the organizational format of the aforementioned metadata information, thereby uploading the metadata information of the V1 version of the target plug-in to the plug-in management system again, so that it updates the metadata information corresponding to the V2 version of the target plug-in in the plug-in version management file to the metadata information of the V1 version of the target plug-in. In this way, the first process will download the V1 version of the target plug-in later. As can be seen from this example, what is recorded in the plug-in version management file is the "updated" metadata information. The version number in the updated metadata information here is not necessarily higher than the previous version number, which depends on the update operation behavior.

[0086] In the above scheme, the startup of the data synchronization engine instance does not need to rely on the plug-in contained in the data synchronization engine image file, that is, the data synchronization engine instance is started based on the data synchronization engine image file that does not contain the plug-in, which can realize the rapid startup of the data synchronization engine instance. When expanding the capacity, it can also realize rapid expansion and timely process the data synchronization tasks. The storage of each user's plug-in and the management of the currently available plug-in versions are realized by an additional plug-in management application and a plug-in storage system, so that the process started by the data synchronization engine instance can load the required plug-in on demand, reducing the size of the data synchronization engine instance. The plug-in of each user is uniformly managed through the plug-in management application and the plug-in storage system, and there is no need to manage the plug-in in the executor, which reduces the plug-in maintenance cost.

[0087] In an optional embodiment, the plug-in management application can also obtain the usage permission information of the target plug-in with the first version number provided by the target user, and determine the metadata information corresponding to the target plug-in with the first version number based on the usage permission information. Among them, the usage permission information may include: target user's own use, public use (that is, provided to any other user for use). Of course, it can also be made public to some other users for use. The principle is similar to public use and is not explained separately. When the target user releases the target plug-in with the first version number, the usage permission information of the target plug-in with the first version number can be indicated.

[0088] If the usage permission information indicates that the target plug-in with the first version number is used by the target user, the first metadata information including the target user identifier is determined. If the target plug-in with the first version number indicated by the usage permission information is publicly usable, the third metadata information including the set public user identifier (for example, represented as tenantroot) is determined, so that the target plug-in with the first version number and the third metadata information are uploaded to the plug-in storage system, and the third metadata information includes the target plug-in identifier, the public user identifier and the first version number.

[0089] Similar to updating the second metadata information with the first metadata information, the plug-in storage system stores the target plug-in of the first version number and the third metadata information, and updates the fourth metadata information stored in the plug-in version management file with the third metadata information. The fourth metadata information includes the target plug-in identifier, the public user identifier and the third version number of the target plug-in.

[0090] For ease of understanding, combined Figure 3 Example description.

[0091] exist Figure 3In this example, plugin a and plugin b are taken as examples. Assume that initially, the user identified as user1 provides plugin a with version number V2; the user identified as user2 provides plugin b with version number V1, and both users are configured to use the corresponding version of the plugin for "self-use". By uploading the metadata information of each plugin management application, a plugin version management file is formed in the plugin storage system. Figure 3 The two versions of the two users are shown in the figure. Later, suppose the user identified as user3 upgrades the version of plugin a, provides plugin a with version number V3, and sets it to use the V3 version of plugin a for self-use. The plugin management application uploads the corresponding metadata information to the plugin storage system. The plugin storage system does not find the version record corresponding to plugin a, user3 in the plugin version management file, so a new version record of plugin a, user3: version number V3 is added. Later, suppose the user identified as user4 ( Figure 3 A user (not shown) provides plugin a with version number V4 and configures plugin a with version number V4 to be "publicly used". The plugin management application determines that the user ID in the metadata information is the public user ID tenantroot. Based on this, a plugin version management file in the plugin storage system is formed. Figure 3 The plug-in a, tenantroot: version number V4 in the diagram indicates that the plug-in a of version V4 can be used by all users. Similarly, the user ID is user5 ( Figure 3 A user (not shown) provides a plug-in b with version number V2, and configures the plug-in b with version number V2 to be "publicly used". The plug-in management application determines that the user identifier in the metadata information is the public user identifier tenantroot. Based on this, a plug-in version management file in the plug-in storage system is formed. Figure 3 The plug-in b, tenantroot: version number V2 shown in the figure indicates that the plug-in b of version V2 can be publicly used by all users.

[0092] It should be noted that, assuming the user ID is user6 ( Figure 3 A user (not shown) then provides plugin b with version number V3, and configures plugin b with version number V3 to be "publicly used". The plugin management application determines that the user ID in the metadata information is the public user ID tenantroot, the version number is V3, and the plugin ID is plugin b. Based on this, the version record of plugin b, tenantroot: version number V3 in the plugin version management file of the plugin storage system will replace the version record of plugin b, tenantroot: version number V2, such as Figure 3 as shown in .

[0093] Based on the above setting of the plug-in usage permission, when the target user triggers the first data synchronization task, the corresponding first process loads the plug-in as follows:

[0094] If the first metadata information is queried from the plug-in version management file according to the target user identifier and the target plug-in identifier included in the first data synchronization task, the target plug-in with the first version number is downloaded from the plug-in storage system to the executor according to the first metadata information;

[0095] If the first metadata information is not found from the plug-in version management file according to the target user identifier and the target plug-in identifier included in the first data synchronization task, query the plug-in version management file according to the public user identifier and the target plug-in identifier;

[0096] If the third metadata information is queried from the plug-in version management file according to the public user identifier and the target plug-in identifier, the target plug-in with the first version number is downloaded from the plug-in storage system to the executor according to the third metadata information.

[0097] For ease of understanding, we still combine Figure 3 Let’s use the example in to illustrate.

[0098] Assume that the target user identifier contained in the first data synchronization task is user1, and the target plug-in identifier is plug-in a. The first process uses (plug-in a, use1) as the query keyword to query the plug-in version management file, and directly queries the corresponding version number V2 from it. Then, the V2 version of plug-in a can be downloaded from the plug-in storage system.

[0099] Assume that the target user identifier contained in the first data synchronization task is user5, and the target plug-in identifier is plug-in a. The first process queries the plug-in version management file with (plug-in a, user5) as the query keyword, and finds that there is no corresponding metadata information. Then, the plug-in version management file is queried with (plug-in a, tenantroot) and the corresponding version number V4 is queried. Then, the V4 version of plug-in a can be downloaded from the plug-in storage system.

[0100] From the above example, it can be seen that if user identifiers are divided into two categories: public user identifiers and personal user identifiers (user identifiers other than public user identifiers), personal user identifiers should be searched first, and if the search fails, the public user identifier should be searched.

[0101] In addition, assuming that the above-mentioned V2 version plug-in a or V4 version plug-in a is queried based on the metadata information, if the corresponding plug-in is not successfully downloaded from the plug-in storage system (for example, the plug-in is deleted due to an erroneous operation), then as described above, the first process can use the backup plug-in to perform the first data synchronization task.

[0102] As described above, for the first process started by the target user in a certain executor, the target plug-in with the first version number downloaded by the first process can be stored in the preset cache space in the executor. This cache mechanism is mainly to support the reuse of the same plug-in under the same user and the same version, avoid repeated downloading of plug-ins, and speed up the startup of data synchronization tasks.

[0103] Specifically, after the first data synchronization task, the data synchronization engine instance receives a second data synchronization task triggered by the target user and starts a second process. The second process executes the second data synchronization task based on the target user identifier and target plug-in identifier contained in the second data synchronization task. If the corresponding target plug-in with the first version number is queried from the preset cache space, the second process uses the target plug-in with the first version number to execute the second data synchronization task.

[0104] In fact, the above data synchronization engine instance can start different processes to complete different data synchronization tasks triggered by the target user. The process corresponding to the first data synchronization task is called the first process, and the process corresponding to the second data synchronization task is called the second process. Assume that the two data synchronization tasks are triggered successively, and the user identifiers and plug-in identifiers contained therein are the same. Then, after the first process downloads the target plug-in with the first version number to the local cache space of the executor, as long as the cache release condition has not been met, the second process can query the cache space after it is started. If the plug-in corresponding to the target user identifier and the target plug-in identifier is stored therein, the plug-in can be used. If it is not found in the cache space, it is downloaded from the plug-in storage system according to the download process described in the above embodiment.

[0105] The cache space records corresponding metadata information in association with the target plug-in of the first version number, such as plug-in ID, user ID, and version number. The cache release condition is, for example, that the cache reaches a set time.

[0106] In addition, in actual applications, the above data synchronization engine may receive multiple data synchronization tasks triggered concurrently by the target user, and the user ID and plug-in ID in multiple data synchronization tasks are the same. In this case, multiple processes need to be started separately to execute multiple data synchronization tasks in parallel. In this case, the same plug-in may be downloaded by different processes at the same time. In order to avoid the problem of concurrent downloads, a lock mechanism needs to be introduced.

[0107] Assume that the data synchronization engine instance receives the concurrent first data synchronization task and the second data synchronization task including the target user identifier and the target plug-in identifier, and respectively starts the first process and the second process to execute the first data synchronization task and the second data synchronization task. Then, the first process and the second process, after querying the plug-in version management file according to the target user identifier and the target plug-in identifier to obtain the first metadata information respectively, respectively grab the lock file corresponding to the target user identifier, the first version number and the target plug-in identifier, and the process that successfully grabs the lock downloads the target plug-in with the first version number from the plug-in storage system to the preset cache space in the executor according to the first metadata information, and the process that fails to successfully grab the lock obtains the target plug-in with the first version number from the preset cache space.

[0108] The above two processes query the plug-in version management file with the target plug-in identifier and the target user identifier respectively, and obtain the same first metadata information, but the two processes may obtain the query results in a different time. After a process obtains the first metadata information first, the data synchronization engine instance can establish a directory of the first version number / target user identifier / locks (lock) locally on the executor, and maintain a lock file with the target plug-in identifier as the file name under this directory. When the above two processes need to download the corresponding target plug-in with the first version number based on the first metadata information obtained by each of them, they need to grab the lock of the lock file first. The process that successfully grabs the lock downloads the target plug-in with the first version number from the plug-in storage system according to the first metadata information, which avoids the situation where multiple processes download the plug-in when different data synchronization tasks using the same plug-in are started at the same time. The lock grabbing mechanism can be implemented based on existing related technologies and will not be repeated here.

[0109] In actual applications, a directory with a path of version number / user ID / plug-in name can be created in the cache space of the executor, and the downloaded target plug-in of the first version number can be stored in the corresponding directory according to the directory structure. In addition, a log file can be added to the directory to record the download timestamp of the target plug-in of the first version number.

[0110] Through the above embodiment, the process started by the data synchronization engine instance loads the required plug-ins on demand based on the data synchronization task started to be executed, which can avoid storing too many irrelevant plug-ins in the executor and excessive occupation of resources.

[0111] As described in the above embodiments, the plug-in management application can be used to upload the plug-in and the corresponding metadata information. In the embodiments of the present invention, two upload mechanisms are provided to adapt to different upload scenarios.

[0112] First, a small amount of upload scenarios. A small amount of upload scenarios refers to an upload involving only a small number of plug-ins (the number is less than the set threshold).

[0113] Taking the upload of at least one plug-in whose number is less than the set threshold as an example, at this time, the upload of the at least one plug-in is completed in the publishing process of the plug-in management application. The publishing process includes: packaging and starting the plug-in management application. Among them, the packaging of the plug-in management application can be understood as forming its execution package so that the execution package can be run in the executor to start the plug-in management application. When the plug-in management application is packaged, at least one plug-in and the metadata information corresponding to at least one plug-in are packaged into the execution package of the plug-in management application. When the plug-in management application is started using the execution package, the plug-in management application can upload the at least one plug-in and the metadata information corresponding to each of them to the plug-in storage system.

[0114] Second, large-scale upload scenarios. Large-scale upload scenarios refer to uploads involving only a large number of plug-ins (the number is greater than the set threshold) in one upload.

[0115] At this time, packaging a large number of plug-ins into the execution package of the plug-in management application will make the execution package too large and the startup time of the plug-in management application will be too long. At this time, the storage paths of multiple plug-ins (the number of multiple plug-ins is greater than the set threshold) in their corresponding data synchronization engine image files can be set in the startup parameters of the plug-in management application. When the plug-in management application is started, it can read multiple plug-ins and the metadata information corresponding to each of the multiple plug-ins according to these storage paths, and upload the multiple plug-ins and the metadata information corresponding to each of the multiple plug-ins to the plug-in storage system.

[0116] Figure 4 The present invention provides a flowchart of a data synchronization method according to an embodiment of the present invention, wherein the method is applied to a process started by a data synchronization engine instance corresponding to a target user. Figure 4 As shown, the method may include the following steps:

[0117] 401. Receive a first data synchronization task triggered by a target user. The first data synchronization task includes a target user identifier and a target plug-in identifier. The target plug-in identifier corresponds to a target plug-in to be used.

[0118] 402. According to the target user identifier and the target plug-in identifier, query the plug-in version management file in the plug-in storage system to obtain corresponding first metadata information, wherein the first metadata information includes the target plug-in identifier, the target user identifier and the first version number, and the plug-in version management file is used to record the updated metadata information of each plug-in, wherein after the plug-in management application uploads the target plug-in of the first version number and the first metadata information to the plug-in storage system, the plug-in storage system stores the target plug-in of the first version number and the first metadata information, and updates the second metadata information stored in the plug-in version management file with the first metadata information, wherein the second metadata information includes the target plug-in identifier, the target user identifier and the second version number of the target plug-in.

[0119] 403. Download a target plug-in with a first version number from a plug-in storage system according to the first metadata information, and use the target plug-in with the first version number to perform a first data synchronization task.

[0120] As described above, when the usage permission information of the target plug-in with the first version number indicates that the target plug-in with the first version number is used by the target user, the plug-in management application determines the first metadata information including the target user identifier, so that the plug-in storage system stores and queries the first metadata information. When the usage permission information of the target plug-in with the first version number indicates that the target plug-in with the first version number can be used publicly, the plug-in management application determines the third metadata information including the public user identifier and the target plug-in identifier, so that the plug-in storage system stores the third metadata information.

[0121] Then the above process will first query the plug-in storage system according to the target user identifier and target plug-in identifier contained in the first data synchronization task. If the corresponding first metadata information is not found in the plug-in version management file, the plug-in version management file will be queried according to the public user identifier and the target plug-in identifier. If the third metadata information is found in the plug-in version management file according to the public user identifier and the target plug-in identifier, the target plug-in with the first version number will be downloaded from the plug-in storage system to the executor where the data synchronization engine is located according to the third metadata information. Specifically, the target plug-in with the first version number is downloaded to the preset cache space in the executor.

[0122] Optionally, the method also includes: receiving a second data synchronization task triggered by a target user, and based on a target user identifier and a target plug-in identifier contained in the second data synchronization task, if a corresponding target plug-in with a first version number is queried from a preset cache space, using the target plug-in with the first version number to execute the second data synchronization task.

[0123] When the first data synchronization task and the second data synchronization task are triggered concurrently, the processes started by the data synchronization engine instance include the first process corresponding to the first data synchronization task and the second process corresponding to the second data synchronization task. After querying the plug-in version management file according to the target user identifier and the target plug-in identifier to obtain the first metadata information respectively, the first process and the second process respectively grab the lock of the lock file corresponding to the target user identifier, the first version number and the target plug-in identifier. If the first process succeeds in grabbing the lock, the target plug-in with the first version number is downloaded from the plug-in storage system to the preset cache space in the executor according to the first metadata information. If the second process fails to grab the lock, the target plug-in with the first version number is obtained from the preset cache space. It is assumed here that there is no third metadata information.

[0124] In addition, optionally, if the first metadata information is not found (or the third metadata information is not found either), the first data synchronization task is executed according to the backup plug-in pre-installed in the executor.

[0125] The detailed execution process of the data synchronization engine instance can refer to the relevant description in the aforementioned embodiment and will not be repeated here.

[0126] Figure 5 An application schematic diagram of a data synchronization method provided by an embodiment of the present invention is executed by a process in a data synchronization engine instance corresponding to a target user.

[0127] like Figure 5 As shown in , when a data synchronization task is received, the corresponding plug-in version number is queried from the plug-in version management file according to the configuration information (plug-in identifier and user identifier) ​​contained in the data synchronization task. If the plug-in corresponding to the plug-in version number is not queried from the plug-in storage system, the data synchronization task is executed using the backup plug-in pre-installed in the executor (taking the container as an example). If the corresponding plug-in is found in the plug-in storage system, the corresponding plug-in is queried whether it is stored in the local cache space of the executor. Among them, the order of the steps of querying whether the corresponding plug-in exists in the plug-in storage system and the local cache space of the executor is not limited.

[0128] If there is a plug-in in the cache space, the data synchronization task is performed using the plug-in in the cache space. If there is no plug-in in the cache space, the corresponding lock of the executor is acquired. After the lock is successfully acquired, it is determined again whether the corresponding plug-in is stored in the local cache space of the executor. If not, the corresponding plug-in is downloaded from the plug-in storage system to the cache space, and then the lock is released; if there is a plug-in stored in the cache space, the data synchronization task is performed using the plug-in stored in the cache space.

[0129] The purpose of re-judgment after the lock grabbing is to avoid other processes having downloaded the corresponding plug-in to the cache space during the lock grabbing period.

[0130] Figure 6 A flowchart of a data synchronization method provided by an embodiment of the present invention, the method is applied to a plug-in storage system, such as Figure 6 As shown, the method may include the following steps:

[0131] 601. Receive a target plug-in with a first version number and first metadata information sent by a plug-in management application, where the first metadata information includes a target plug-in identifier, a target user identifier, and a first version number of the target plug-in.

[0132] 602. Store the target plug-in of the first version number and the first metadata information, and use the first metadata information to update the second metadata information stored in the plug-in version management file, the plug-in version management file is used to record the updated metadata information of each plug-in, and the second metadata information includes the target plug-in identifier, the target user identifier and the second version number of the target plug-in.

[0133] 603. In response to the process started by the data synchronization engine instance, after receiving the data synchronization task triggered by the target user, the process will feedback the first metadata information corresponding to the plug-in query request queried from the plug-in version management file to the process based on the plug-in query request triggered by the target user identifier and the target plug-in identifier contained in the data synchronization task, so that the process can download the target plug-in with the first version number from the plug-in storage system according to the first metadata information, and use the target plug-in with the first version number to perform the data synchronization task. The data synchronization engine instance corresponds to the target user.

[0134] As described above, the first metadata information is generated when the plug-in management application determines that the target plug-in with the first version number is used by the target user himself according to the usage permission information of the target plug-in with the first version number.

[0135] Optionally, the above method further includes:

[0136] Receive a target plug-in with a first version number and third metadata information sent by a plug-in management application, where the third metadata information includes a target plug-in identifier, a public user identifier, and a first version number of the target plug-in; the third metadata information is generated when the plug-in management application determines that the target plug-in with the first version number can be publicly used according to usage permission information of the target plug-in with the first version number;

[0137] The target plug-in of the first version number and the third metadata information are stored, and the fourth metadata information stored in the plug-in version management file is updated with the third metadata information, wherein the fourth metadata information includes the target plug-in identifier, the public user identifier and the third version number of the target plug-in.

[0138] Thus, optionally, the method further includes: in response to the plug-in query request, if the first metadata information is not found from the plug-in version management file according to the target user identifier and the target plug-in identifier, then the plug-in version management file is queried according to the public user identifier and the target plug-in identifier, and if the third metadata information is found from the plug-in version management file according to the public user identifier and the target plug-in identifier, the third metadata information is fed back to the process, so that the process downloads the target plug-in of the first version number from the plug-in storage system according to the third metadata information. Alternatively, the plug-in storage system directly obtains the target plug-in of the first version number based on the third metadata information, and feeds back the target plug-in of the first version number and the third metadata information to the process. The process can associate the target plug-in of the first version number with the third metadata information and store them in the cache space of the executor.

[0139] The detailed execution process of the plug-in storage system can refer to the relevant description in the aforementioned embodiment, which will not be repeated here.

[0140] Figure 7 A flowchart of a data synchronization method provided by an embodiment of the present invention is applied to a plug-in management application, such as Figure 7 As shown, the method may include the following steps:

[0141] 701. Obtain a target plug-in with a first version number provided by a target user.

[0142] 702. Determine first metadata information of the target plug-in, where the first metadata information includes a target plug-in identifier, a target user identifier, and a first version number of the target plug-in.

[0143] Determining the first metadata information of the target plug-in includes: obtaining usage permission information of the target plug-in with a first version number, and determining the first metadata information including the target user identifier according to the usage permission information indicating that the target plug-in with the first version number is used by the target user.

[0144] 703. Upload the target plug-in of the first version number and the first metadata information to the plug-in storage system, so that the plug-in storage system stores the target plug-in of the first version number and the first metadata information, and updates the second metadata information stored in the plug-in version management file with the first metadata information. The plug-in version management file is used to record the updated metadata information of each plug-in. The second metadata information includes the target plug-in identifier, the target user identifier and the second version number of the target plug-in. The first metadata information enables the process started by the data synchronization engine instance corresponding to the target user to download the target plug-in of the first version number from the plug-in storage system based on the first metadata information to perform the data synchronization task.

[0145] Optionally, if the target plug-in with the first version number indicated by the usage permission information of the target plug-in is publicly available, the plug-in management application determines the third metadata information including the set public user identifier, uploads the target plug-in and the third metadata information to the plug-in storage system, the third metadata information including the target plug-in identifier, the public user identifier and the first version number, so that the plug-in storage system stores the target plug-in with the first version number and the third metadata information, and updates the fourth metadata information stored in the plug-in version management file with the third metadata information, the fourth metadata information including the target plug-in identifier, the public user identifier and the third version number of the target plug-in. The third metadata information enables the above process to download the target plug-in with the first version number from the plug-in storage system based on the third metadata information to perform the data synchronization task.

[0146] As described above, the plug-in management application can use two different methods to manage the plug-in metadata information and the plug-in.

[0147] The first type: the startup parameters of the plug-in management application include the storage paths of multiple plug-ins in the data synchronization engine image files corresponding to each of them, so that when the plug-in management application is started, it reads multiple plug-ins and metadata information corresponding to each of the multiple plug-ins according to the storage path, and uploads the multiple plug-ins and metadata information corresponding to each of the multiple plug-ins to the plug-in storage system. Among them, the multiple plug-ins include the above-mentioned target plug-in, and the number of the multiple plug-ins is greater than the set threshold.

[0148] The second method: when the plug-in management application is packaged, at least one plug-in and metadata information corresponding to at least one plug-in are packaged into the execution package of the plug-in management application, so that when the plug-in management application is started using the execution package, the plug-in management application uploads the at least one plug-in and metadata information corresponding to at least one plug-in to the plug-in storage system. The at least one plug-in includes the target plug-in, and the number of the at least one plug-in is less than a set threshold.

[0149] The detailed execution process of the plug-in management application can refer to the relevant description in the above embodiment, which will not be repeated here.

[0150] The data synchronization device of one or more embodiments of the present invention will be described in detail below. Those skilled in the art will appreciate that these devices can be configured using commercially available hardware components through the steps taught in this solution.

[0151] Figure 8 A schematic diagram of the structure of a data synchronization device provided by an embodiment of the present invention is shown in FIG. Figure 8 As shown, the device includes: a receiving module 11, a query module 12, a downloading module 13, and an execution module 14.

[0152] The receiving module 11 is used to receive a first data synchronization task triggered by a target user, wherein the first data synchronization task includes a target user identifier and a target plug-in identifier, and the target plug-in identifier corresponds to a target plug-in to be used.

[0153] The query module 12 is used to query the plug-in version management file in the plug-in storage system according to the target user identifier and the target plug-in identifier to obtain the corresponding first metadata information, wherein the first metadata information includes the target plug-in identifier, the target user identifier and the first version number, and the plug-in version management file is used to record the updated metadata information of each plug-in, wherein after the plug-in management application uploads the target plug-in with the first version number and the first metadata information to the plug-in storage system, the plug-in storage system stores the target plug-in with the first version number and the first metadata information, and updates the second metadata information stored in the plug-in version management file with the first metadata information, wherein the second metadata information includes the target plug-in identifier, the target user identifier and the second version number of the target plug-in.

[0154] The download module 13 is used to download the target plug-in with the first version number from the plug-in storage system to the executor that starts the data synchronization engine instance according to the first metadata information.

[0155] The execution module 14 is used to use the target plug-in with the first version number to execute the data synchronization task.

[0156] Figure 8 The device shown can execute the steps executed by the data synchronization engine instance in the aforementioned embodiment. The detailed execution process and technical effects can be found in the description of the aforementioned embodiment, which will not be repeated here.

[0157] In one possible design, the above Figure 8 The structure of the device shown can be implemented as an electronic device. Fig. 9 As shown, the electronic device may include: a processor 21, a memory 22, and a communication interface 23. The memory 22 stores executable codes, and when the executable codes are executed by the processor 21, the processor 21 can at least implement the data synchronization method provided in the above embodiments.

[0158] In addition, an embodiment of the present invention provides a non-temporary machine-readable storage medium, on which executable code is stored. When the executable code is executed by a processor of an electronic device, the processor can at least implement the data synchronization method provided in the aforementioned embodiment.

[0159] The device embodiments described above are merely illustrative, wherein the network elements described as separate components may or may not be physically separated. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Ordinary technicians in this field can understand and implement it without creative work.

[0160] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by adding a necessary general hardware platform, and of course can also be implemented by combining hardware and software. Based on such an understanding, the above technical solution can essentially or in other words be embodied in the form of a computer product, and the present invention can be implemented in the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0161] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A data synchronization method, characterized in that: Applied to a process started by a data synchronization engine instance, the data synchronization engine instance corresponding to a target user, the method comprising: Receive a first data synchronization task triggered by a target user, wherein the first data synchronization task includes a target user identifier and a target plug-in identifier, and the target plug-in identifier corresponds to a target plug-in to be used; According to the target user identifier and the target plug-in identifier, query the plug-in version management file in the plug-in storage system to obtain corresponding first metadata information, wherein the first metadata information includes the target plug-in identifier, the target user identifier and the first version number, and the plug-in version management file is used to record the updated metadata information of each plug-in, wherein after the plug-in management application uploads the target plug-in with the first version number and the first metadata information to the plug-in storage system, the plug-in storage system stores the target plug-in with the first version number and the first metadata information, and updates the second metadata information stored in the plug-in version management file with the first metadata information, wherein the second metadata information includes the target plug-in identifier, the target user identifier and the second version number of the target plug-in; The target plug-in with the first version number is downloaded from the plug-in storage system according to the first metadata information to the executor that starts the data synchronization engine instance, so as to use the target plug-in with the first version number to execute the first data synchronization task.

2. The method according to claim 1, characterized in that The method comprises: If the first metadata information is not found from the plug-in version management file according to the target user identifier and the target plug-in identifier included in the first data synchronization task, query the plug-in version management file according to the public user identifier and the target plug-in identifier; If third metadata information is queried from the plug-in version management file according to the public user identifier and the target plug-in identifier, downloading the target plug-in with the first version number from the plug-in storage system to the executor according to the third metadata information; Among them, when the usage permission information of the target plug-in with the first version number indicates that the target plug-in with the first version number is used by the target user himself, the first metadata information including the target user identifier is obtained; when the usage permission information of the target plug-in with the first version number indicates that the target plug-in with the first version number can be publicly used, the third metadata information including the public user identifier is obtained.

3. The method according to claim 1, characterized in that The target plug-in of the first version number is downloaded to a preset cache space in the executor; The method further comprises: Receiving a second data synchronization task triggered by the target user; According to the target user identifier and the target plug-in identifier included in the second data synchronization task, if the corresponding target plug-in with the first version number is queried from the preset cache space, the target plug-in with the first version number is used to execute the second data synchronization task.

4. The method according to claim 1, characterized in that: The method further includes: if the first metadata information is not found, executing the first data synchronization task according to a backup plug-in pre-installed in the executor.

5. A data synchronization method, characterized in that: Applied to a plug-in storage system, the method comprises: Receive a target plug-in with a first version number and first metadata information sent by a plug-in management application, wherein the first metadata information includes a target plug-in identifier, a target user identifier, and a first version number of the target plug-in; The target plug-in with the first version number and the first metadata information are stored, and the second metadata information stored in the plug-in version management file is updated with the first metadata information, wherein the plug-in version management file is used to record the updated metadata information of each plug-in, and the second metadata information includes the target plug-in identifier, the target user identifier, and the second version number of the target plug-in; In response to the process started by the data synchronization engine instance, after receiving the data synchronization task triggered by the target user, the first metadata information corresponding to the plug-in query request queried from the plug-in version management file is fed back to the process based on the plug-in query request triggered by the target user identifier and the target plug-in identifier contained in the data synchronization task, so that the process downloads the target plug-in with the first version number from the plug-in storage system according to the first metadata information, and uses the target plug-in with the first version number to execute the data synchronization task. The data synchronization engine instance corresponds to the target user.

6. The method according to claim 5, characterized in that The first metadata information is generated when the plug-in management application determines that the target plug-in with the first version number is used by the target user according to the usage permission information of the target plug-in with the first version number; the method further includes: Receive the target plug-in of the first version number and third metadata information sent by the plug-in management application, wherein the third metadata information includes the target plug-in identifier, the public user identifier and the first version number of the target plug-in; the third metadata information is generated when the plug-in management application determines that the target plug-in of the first version number can be publicly used according to the usage permission information of the target plug-in of the first version number; The target plug-in of the first version number and the third metadata information are stored, and the fourth metadata information stored in the plug-in version management file is updated with the third metadata information, wherein the fourth metadata information includes the target plug-in identifier, the public user identifier and the third version number of the target plug-in.

7. The method according to claim 6, characterized in that The method further comprises: In response to the plug-in query request, if the first metadata information is not found from the plug-in version management file according to the target user identifier and the target plug-in identifier, query the plug-in version management file according to the public user identifier and the target plug-in identifier; If the third metadata information is queried from the plug-in version management file according to the public user identifier and the target plug-in identifier, the third metadata information is fed back to the process so that the process downloads the target plug-in of the first version number from the plug-in storage system according to the third metadata information.

8. A data synchronization method, characterized in that: Applied to a plug-in management application, the method includes: Get the target plug-in with the first version number provided by the target user; Determine first metadata information of the target plug-in, where the first metadata information includes a target plug-in identifier, a target user identifier, and a first version number of the target plug-in; The target plug-in of the first version number and the first metadata information are uploaded to the plug-in storage system so that the plug-in storage system stores the target plug-in of the first version number and the first metadata information, and the second metadata information stored in the plug-in version management file is updated with the first metadata information. The plug-in version management file is used to record the updated metadata information of each plug-in, and the second metadata information includes the target plug-in identifier, the target user identifier and the second version number of the target plug-in; the first metadata information enables the process started by the data synchronization engine instance corresponding to the target user to download the target plug-in of the first version number from the plug-in storage system based on the first metadata information to perform the data synchronization task.

9. The method according to claim 8, characterized in that The method further comprises: According to the indication in the usage permission information of the target plug-in with the first version number that the target plug-in with the first version number can be used publicly, determining third metadata information including a set public user identifier; The target plug-in and the third metadata information are uploaded to the plug-in storage system, wherein the third metadata information includes the target plug-in identifier, the public user identifier, and the first version number, so that the plug-in storage system stores the target plug-in of the first version number and the third metadata information, and the fourth metadata information stored in the plug-in version management file is updated with the third metadata information, wherein the fourth metadata information includes the target plug-in identifier, the public user identifier, and the third version number of the target plug-in; the third metadata information enables the process to download the target plug-in of the first version number from the plug-in storage system based on the third metadata information to perform a data synchronization task.

10. The method according to claim 8, characterized in that The startup parameters of the plug-in management application include storage paths of multiple plug-ins in the data synchronization engine image files corresponding to each other; the method further includes: When the plug-in management application is started, it reads the multiple plug-ins and metadata information corresponding to each of the multiple plug-ins according to the storage path, and uploads the multiple plug-ins and metadata information corresponding to each of the multiple plug-ins to the plug-in storage system, wherein the multiple plug-ins include the target plug-in, and the number of the multiple plug-ins is greater than a set threshold.

11. The method according to claim 8, characterized in that When the plug-in management application is packaged, at least one plug-in and metadata information corresponding to each of the at least one plug-in are packaged into an execution package of the plug-in management application, so that when the plug-in management application is started using the execution package, the plug-in management application uploads the at least one plug-in and metadata information corresponding to each of the at least one plug-in to the plug-in storage system, the at least one plug-in includes the target plug-in, and the number of the at least one plug-in is less than a set threshold.

12. A plug-in management system, characterized in that: include: A plug-in storage system, a plug-in management application, and a data synchronization engine instance started in an executor, wherein the data synchronization engine instance corresponds to a target user; The plug-in management application is used to obtain a target plug-in with a first version number provided by a target user, determine first metadata information of the target plug-in, and upload the target plug-in with the first version number and the first metadata information to the plug-in storage system, wherein the first metadata information includes a target plug-in identifier, a target user identifier, and the first version number of the target plug-in; The plug-in storage system is used to store the target plug-in with the first version number and the first metadata information, and to update the second metadata information stored in the plug-in version management file with the first metadata information, wherein the plug-in version management file is used to record the updated metadata information of each plug-in, and the second metadata information includes the target plug-in identifier, the target user identifier and the second version number of the target plug-in; The first process started by the data synchronization engine instance is used to receive the first data synchronization task triggered by the target user, query the plug-in version management file to obtain the corresponding first metadata information based on the target user identifier and the target plug-in identifier contained in the first data synchronization task, and download the target plug-in with the first version number from the plug-in storage system to the executor based on the first metadata information, so as to use the target plug-in with the first version number to execute the first data synchronization task.

13. The system according to claim 12, characterized in that The plug-in management application is used to obtain usage permission information of the target plug-in with the first version number, and determine the first metadata information including the target user identifier according to the usage permission information indicating that the target plug-in with the first version number is used by the target user; as well as, According to the indication of the use permission information that the target plug-in with the first version number can be publicly used, determining third metadata information including a set public user identifier, uploading the target plug-in and the third metadata information to the plug-in storage system, wherein the third metadata information includes the target plug-in identifier, the public user identifier and the first version number; The plug-in storage system is used to store the target plug-in of the first version number and the third metadata information, and to update the fourth metadata information stored in the plug-in version management file with the third metadata information, wherein the fourth metadata information includes the target plug-in identifier, the public user identifier and the third version number of the target plug-in.

14. The system according to claim 13, characterized in that The first process started by the data synchronization engine instance is used to download the target plug-in with the first version number from the plug-in storage system to the executor according to the first metadata information if the first metadata information is queried from the plug-in version management file according to the target user identifier and the target plug-in identifier contained in the first data synchronization task; If the first metadata information is not found from the plug-in version management file according to the target user identifier and the target plug-in identifier included in the first data synchronization task, query the plug-in version management file according to the public user identifier and the target plug-in identifier; If the third metadata information is found from the plug-in version management file according to the public user identifier and the target plug-in identifier, the target plug-in with the first version number is downloaded from the plug-in storage system to the executor according to the third metadata information.

15. The system according to claim 12, characterized in that The target plug-in of the first version number is downloaded to a preset cache space in the executor; The second process started by the data synchronization engine instance is used to receive a second data synchronization task triggered by the target user. According to the target user identifier and the target plug-in identifier contained in the second data synchronization task, if the corresponding target plug-in with the first version number is queried from the preset cache space, the target plug-in with the first version number is used to execute the second data synchronization task.

16. An electronic device, characterized in that: include: A memory, a processor, and a communication interface; wherein the memory stores executable code, and when the executable code is executed by the processor, the processor executes the data synchronization method as described in any one of claims 1-11.

17. A non-transitory machine-readable storage medium, characterized in that: The non-transitory machine-readable storage medium stores executable code, and when the executable code is executed by a processor of an electronic device, the processor executes the data synchronization method as described in any one of claims 1-11.

18. A computer program product, characterized in that include: A computer program, when executed by a processor of an electronic device, causes the processor to execute the data synchronization method as described in any one of claims 1-11.

Citation Information

Patent Citations

  • Plug-in loading method and device

    CN110134457A

  • Plug-in installation method and device and storage medium

    CN112667306A

  • Plug-in processing device and method, computer equipment and storage medium

    CN114443159A

  • Method and device for performing plug-in management on target database

    CN116610384A

  • Dynamically Loaded Plugin Architecture

    US20140282471A1